mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
1767. [port] Builds on IPv6 platforms without IPv6 Advanced API
support for (struct in6_pktinfo) failed. [RT #13077]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.242 2004/10/05 03:17:18 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.243 2004/11/18 21:31:47 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -502,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
|
||||
@@ -541,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
|
||||
|
||||
@@ -551,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) {
|
||||
|
||||
@@ -676,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;
|
||||
@@ -1215,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)
|
||||
@@ -1229,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;
|
||||
@@ -1473,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)
|
||||
@@ -1504,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) {
|
||||
|
Reference in New Issue
Block a user