diff options
Diffstat (limited to 'extra/quagga/quagga-0.99.11-ipv6-only.patch')
-rw-r--r-- | extra/quagga/quagga-0.99.11-ipv6-only.patch | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/extra/quagga/quagga-0.99.11-ipv6-only.patch b/extra/quagga/quagga-0.99.11-ipv6-only.patch deleted file mode 100644 index 53636d6b5..000000000 --- a/extra/quagga/quagga-0.99.11-ipv6-only.patch +++ /dev/null @@ -1,29 +0,0 @@ -On Linux the default behaviour of getaddrinfo is to provide both IPV4 and IPV6 -addresses if available. But the default behaviour of binding to an IPV6 address -is to handle both the native IPV6 address and IPV4 to IPV6 mapped addresses. -Without this patch what happens is: - 1. First address is IPV6, bind succeeds. - 2. Second address is IPV4, bind fails (port already used by IPV6) - 3. incoming connections come in on IPV6 listen socket, as IPV4 mapped - addresses then BGP gets confused because of client with unexpected address. - -The fix is to force IPV6 socket as IPV6 only. - ---- a/bgpd/bgp_network.c 2008-08-27 17:59:20.000000000 -0700 -+++ b/bgpd/bgp_network.c 2008-08-27 18:02:46.000000000 -0700 -@@ -412,6 +412,15 @@ bgp_socket (struct bgp *bgp, unsigned sh - setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL); - #endif - -+#ifdef IPV6_V6ONLY -+ /* Want only IPV6 on ipv6 socket (not mapped addresses) */ -+ if (ainfo->ai_family == AF_INET6) { -+ int on = 1; -+ setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, -+ (void *) &on, sizeof (on)); -+ } -+#endif -+ - if (bgpd_privs.change (ZPRIVS_RAISE) ) - zlog_err ("bgp_socket: could not raise privs"); - |