diff options
author | Adam Tkac <atkac@redhat.com> | 2011-11-11 09:25:44 +0100 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2011-11-11 09:25:44 +0100 |
commit | 961e87b7c942afcf7bf2de1e70c091b3acd95029 (patch) | |
tree | 2976b9144e332e64913570a70d8ea8f50b2b1959 /bind99-v6only.patch | |
parent | 61b073aa6a5fcf448ffd3a18970c38e4eaef1284 (diff) | |
download | bind-961e87b7c942afcf7bf2de1e70c091b3acd95029.tar.gz bind-961e87b7c942afcf7bf2de1e70c091b3acd95029.tar.xz bind-961e87b7c942afcf7bf2de1e70c091b3acd95029.zip |
update to 9.9.0b1
- bind98-dlz_buildfix.patch merged
Signed-off-by: Adam Tkac <atkac@redhat.com>
Diffstat (limited to 'bind99-v6only.patch')
-rw-r--r-- | bind99-v6only.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bind99-v6only.patch b/bind99-v6only.patch new file mode 100644 index 0000000..371eaa3 --- /dev/null +++ b/bind99-v6only.patch @@ -0,0 +1,29 @@ +diff -up bind-9.9.0b1/lib/isc/unix/socket.c.v6only bind-9.9.0b1/lib/isc/unix/socket.c +--- bind-9.9.0b1/lib/isc/unix/socket.c.v6only 2011-11-10 14:35:26.457842491 +0100 ++++ bind-9.9.0b1/lib/isc/unix/socket.c 2011-11-10 14:38:55.928827943 +0100 +@@ -5726,7 +5726,24 @@ isc__socket_ipv6only(isc_socket_t *sock0 + + #ifdef IPV6_V6ONLY + if (sock->pf == AF_INET6) { +- if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, ++ int current; ++ socklen_t len = sizeof(int); ++ if (getsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, ++ (void *)¤t, &len) < 0 ) { ++ char strbuf[ISC_STRERRORSIZE]; ++ isc__strerror(errno, strbuf, sizeof(strbuf)); ++ UNEXPECTED_ERROR(__FILE__, __LINE__, ++ "getsockopt(%d, IPV6_V6ONLY) " ++ "%s: %s", sock->fd, ++ isc_msgcat_get(isc_msgcat, ++ ISC_MSGSET_GENERAL, ++ ISC_MSG_FAILED, ++ "failed"), ++ strbuf); ++ } ++ ++ if (current != onoff && ++ setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, + (void *)&onoff, sizeof(int)) < 0) { + char strbuf[ISC_STRERRORSIZE]; + isc__strerror(errno, strbuf, sizeof(strbuf)); |