Add IPv6 compatibility

Change-Id: Ief9af1231fdbbd361e16eabd0bcd2928c9e762be