diff options
author | dougb <dougb@FreeBSD.org> | 2005-03-17 08:04:02 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2005-03-17 08:04:02 +0000 |
commit | 6c00746d362144ea66eb0e93ad2dca75df176135 (patch) | |
tree | 56538def4af42f6875185c84274a942bf33b5d24 /contrib/bind9/lib/isc/unix | |
parent | 46172d5768cf5570203b7b39866b786fec8be024 (diff) | |
download | FreeBSD-src-6c00746d362144ea66eb0e93ad2dca75df176135.zip FreeBSD-src-6c00746d362144ea66eb0e93ad2dca75df176135.tar.gz |
Vendor import of BIND 9.3.1
Diffstat (limited to 'contrib/bind9/lib/isc/unix')
-rw-r--r-- | contrib/bind9/lib/isc/unix/ifiter_ioctl.c | 7 | ||||
-rw-r--r-- | contrib/bind9/lib/isc/unix/socket.c | 20 |
2 files changed, 12 insertions, 15 deletions
diff --git a/contrib/bind9/lib/isc/unix/ifiter_ioctl.c b/contrib/bind9/lib/isc/unix/ifiter_ioctl.c index 5825eb8..6842c1f 100644 --- a/contrib/bind9/lib/isc/unix/ifiter_ioctl.c +++ b/contrib/bind9/lib/isc/unix/ifiter_ioctl.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.14 2004/06/22 04:40:23 marka Exp $ */ +/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.15 2004/11/10 22:22:49 marka Exp $ */ /* * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl. @@ -339,9 +339,8 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) { result = ISC_R_UNEXPECTED; goto socket6_failure; } - iter->result6 = getbuf6(iter); - if (iter->result6 != ISC_R_NOTIMPLEMENTED && - iter->result6 != ISC_R_SUCCESS) + result = iter->result6 = getbuf6(iter); + if (result != ISC_R_NOTIMPLEMENTED && result != ISC_R_SUCCESS) goto ioctl6_failure; } #endif diff --git a/contrib/bind9/lib/isc/unix/socket.c b/contrib/bind9/lib/isc/unix/socket.c index 5ab1adf..f23b72b 100644 --- a/contrib/bind9/lib/isc/unix/socket.c +++ b/contrib/bind9/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.207.2.19.2.13 2004/07/01 04:51:15 marka Exp $ */ +/* $Id: socket.c,v 1.207.2.19.2.15 2004/11/18 21:31:16 marka Exp $ */ #include <config.h> @@ -62,12 +62,8 @@ * some as socklen_t. This is here so it can be easily changed if needed. */ #ifndef ISC_SOCKADDR_LEN_T -#ifdef _BSD_SOCKLEN_T_ -#define ISC_SOCKADDR_LEN_T _BSD_SOCKLEN_T_ -#else #define ISC_SOCKADDR_LEN_T unsigned int #endif -#endif /* * Define what the possible "soft" errors can be. These are non-fatal returns @@ -506,7 +502,7 @@ static void process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) { #ifdef USE_CMSG struct cmsghdr *cmsgp; -#ifdef ISC_PLATFORM_HAVEIPV6 +#ifdef ISC_PLATFORM_HAVEIN6PKTINFO struct in6_pktinfo *pktinfop; #endif #ifdef SO_TIMESTAMP @@ -545,7 +541,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) { #ifdef SO_TIMESTAMP timevalp = NULL; #endif -#ifdef ISC_PLATFORM_HAVEIPV6 +#ifdef ISC_PLATFORM_HAVEIN6PKTINFO pktinfop = NULL; #endif @@ -555,7 +551,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) { isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PROCESSCMSG, "processing cmsg %p", cmsgp); -#ifdef ISC_PLATFORM_HAVEIPV6 +#ifdef ISC_PLATFORM_HAVEIN6PKTINFO if (cmsgp->cmsg_level == IPPROTO_IPV6 && cmsgp->cmsg_type == IPV6_PKTINFO) { @@ -680,7 +676,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev, msg->msg_control = NULL; msg->msg_controllen = 0; msg->msg_flags = 0; -#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIPV6) +#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO) if ((sock->type == isc_sockettype_udp) && ((dev->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0)) { struct cmsghdr *cmsgp; @@ -1219,7 +1215,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type, * set up cmsg buffers */ cmsgbuflen = 0; -#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIPV6) +#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO) cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo)); #endif #if defined(USE_CMSG) && defined(SO_TIMESTAMP) @@ -1233,7 +1229,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type, } cmsgbuflen = 0; -#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIPV6) +#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO) cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo)); #endif sock->sendcmsgbuflen = cmsgbuflen; @@ -1477,6 +1473,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, "No buffer available to receive " "IPv6 destination"); } +#ifdef ISC_PLATFORM_HAVEIN6PKTINFO #ifdef IPV6_RECVPKTINFO /* 2292bis */ if ((pf == AF_INET6) @@ -1508,6 +1505,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, strbuf); } #endif /* IPV6_RECVPKTINFO */ +#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */ #ifdef IPV6_USE_MIN_MTU /*2292bis, not too common yet*/ /* use minimum MTU */ if (pf == AF_INET6) { |