Added more #ifdefs for IPv6.