From: Ken Raeburn Date: Mon, 14 Jul 2008 15:19:25 +0000 (+0000) Subject: Use RFC 3542's IPV6_RECVPKTINFO if available. (And IP_RECVPKTINFO too.) X-Git-Tag: krb5-1.7-alpha1~597 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa8f0f47e086a9203a279fd41412f5409eead051;p=krb5.git Use RFC 3542's IPV6_RECVPKTINFO if available. (And IP_RECVPKTINFO too.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20515 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/network.c b/src/kdc/network.c index bfb03a9d2..4b01ba4a9 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -115,6 +115,16 @@ setv6only(int sock, int value) } #endif +/* Use RFC 3542 API below, but fall back from IPV6_RECVPKTINFO to + IPV6_PKTINFO for RFC 2292 implementations. */ +#ifndef IPV6_RECVPKTINFO +#define IPV6_RECVPKTINFO IPV6_PKTINFO +#endif +/* Parallel, though not standardized. */ +#ifndef IP_RECVPKTINFO +#define IP_RECVPKTINFO IP_PKTINFO +#endif + static int set_pktinfo(int sock, int family) { @@ -125,13 +135,13 @@ set_pktinfo(int sock, int family) #if defined(IP_PKTINFO) && defined(HAVE_STRUCT_IN_PKTINFO) case AF_INET: proto = IPPROTO_IP; - option = IP_PKTINFO; + option = IP_RECVPKTINFO; break; #endif #if defined(IPV6_PKTINFO) && defined(HAVE_STRUCT_IN6_PKTINFO) case AF_INET6: proto = IPPROTO_IPV6; - option = IPV6_PKTINFO; + option = IPV6_RECVPKTINFO; break; #endif default: