diff options
author | JuanJo Ciarlante <juanjosec@gmail.com> | 2011-03-22 21:59:23 +0100 |
---|---|---|
committer | JuanJo Ciarlante <juanjosec@gmail.com> | 2011-03-25 13:30:32 +0100 |
commit | d3774cdf1e3c2f4e86fac52a723a3869b75b5b4e (patch) | |
tree | 37264ab14a91189a1a6ae1bf7f8ffd94c9330060 /socket.h | |
parent | * ipv6-0.4.14: fix xinetd usage: (diff) | |
download | openvpn-d3774cdf1e3c2f4e86fac52a723a3869b75b5b4e.tar.xz |
* ipv6-0.4.15: add --multihome support to xBSD
- _both_ for IPv4 (which was missing) and for IPv6
- tested on OpenBSD 4.7, FreeBSD 8.1
Diffstat (limited to 'socket.h')
-rw-r--r-- | socket.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -86,7 +86,12 @@ struct link_socket_actual struct openvpn_sockaddr dest; #if ENABLE_IP_PKTINFO union { +#ifdef HAVE_IN_PKTINFO struct in_pktinfo in4; +#endif +#ifdef IP_RECVDSTADDR + struct in_addr in4; +#endif #ifdef USE_PF_INET6 struct in6_pktinfo in6; #endif @@ -594,7 +599,12 @@ addr_defined_ipi (const struct link_socket_actual *lsa) #if ENABLE_IP_PKTINFO if (!lsa) return 0; switch (lsa->dest.addr.sa.sa_family) { +#ifdef HAVE_IN_PKTINFO case AF_INET: return lsa->pi.in4.ipi_spec_dst.s_addr != 0; +#endif +#ifdef IP_RECVDSTADDR + case AF_INET: return lsa->pi.in4.s_addr != 0; +#endif #ifdef USE_PF_INET6 case AF_INET6: return !IN6_IS_ADDR_UNSPECIFIED(&lsa->pi.in6.ipi6_addr); #endif |