Thread (6 messages) 6 messages, 3 authors, 2010-06-30

Re: nonlocal_bind & IPv6

From: Rémi Denis-Courmont <hidden>
Date: 2010-06-25 18:59:59

On Fri, 25 Jun 2010 20:43:45 +0200, Michal Humpula
[off-list ref] wrote:
I was just wondering, what's wrong with this?
It's not in unified format :D
quoted hunk ↗ jump to hunk
*** linux-2.6.34/net/ipv6/af_inet6.c    2010-05-16 23:17:36.000000000
+0200
--- linux-2.6.34-hack/net/ipv6/af_inet6.c       2010-06-25
19:50:19.000000000 +0200
***************
*** 345,354 ****
--- 345,356 ----
                        if (!(addr_type & IPV6_ADDR_MULTICAST)) {
                                if (!ipv6_chk_addr(net, &addr->sin6_addr,
                                                   dev, 0)) {
+           if (!sysctl_ip_nonlocal_bind) {
                                        err = -EADDRNOTAVAIL;
                                        goto out_unlock;
            }
                                }
+                       }
                        rcu_read_unlock();
                }
        }
Motivation: just want to balance one IPv6 address between two nodes with
the help of keepalived the same way I do it with IPv4 without the need
of restarting the daemons binding on that IP.
nonlocal_bind seems a bit 80's to me. Why don't you bind the daemon to
[::]? If it needs to know its own address, it can always use getsockname()
for connected sockets and IPV6_PKTINFO ancillary data for datagram sockets.

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help