Commit cd7ffa4c authored by Brian Wellington's avatar Brian Wellington
Browse files

381. [bug] Check for IPV6_RECVPKTINFO and use it instead of

                        IPV6_PKTINFO if found. [RT #229]
parent 63fa0d3c
381. [bug] Check for IPV6_RECVPKTINFO and use it instead of
IPV6_PKTINFO if found. [RT #229]
380. [bug] nsupdate didn't work with IPv6.
379. [func] New library function isc_sockaddr_anyofpf().
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.153 2000/08/01 01:31:27 tale Exp $ */
/* $Id: socket.c,v 1.154 2000/08/10 00:05:43 bwelling Exp $ */
#include <config.h>
......@@ -1201,14 +1201,27 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#endif /* SO_TIMESTAMP */
#if defined(ISC_PLATFORM_HAVEIPV6)
#ifdef IPV6_RECVPKTINFO
/* 2292bis */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
(void *)&on, sizeof (on)) < 0)) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_RECVPKTINFO) "
"failed: %s",
sock->fd, strerror(errno));
}
#else
/* 2292 */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
(void *)&on, sizeof (on)) < 0)) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_PKTINFO) failed: %s",
"setsockopt(%d, IPV6_PKTINFO) "
"failed: %s",
sock->fd, strerror(errno));
}
#endif /* IPV6_RECVPKTINFO */
#ifdef IPV6_USE_MIN_MTU /*2292bis, not too common yet*/
/* use minimum MTU */
if (pf == AF_INET6) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment