Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
si.si_af == AF_INET6) {
int val = 1;
+#ifdef INET6
setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &val, sizeof(val));
+#endif
}
return fd;
}
case AF_INET:
(void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val));
break;
-
+#ifdef INET6
case AF_INET6:
(void) setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val));
break;
+#endif
}
}
}
break;
+#ifdef INET6
case AF_INET6:
if (cmsg->cmsg_level != SOL_IPV6
|| cmsg->cmsg_type != IPV6_PKTINFO
pkti->ipi6_ifindex = 0;
}
break;
+#endif
default:
return 0;