On 13/09/11 18:51, Stephen Hemminger wrote:
There is an issue with libvirt, IPV6 and bridging.
Basically, a recent change to the kernel to not bring carrier up if
bridge port is down breaks things like dnsmasq because IPV6 doesn't
show addresses as available.

Ideally, dnsmasq would just wait until IPv6 addresses were good.

Looking at dnsmasq source, this is what I think needs to happen:

1. Add check for tentative addresses here, and ignore them.
    This is similar to a fix which was needed in ntp.

diff --git a/src/netlink.c b/src/netlink.c
index df3585f..b2f4cd9 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -213,6 +213,12 @@ int iface_enumerate(int family, void *parm, int (*callback)
                 else if (ifa->ifa_family == AF_INET6)
                   {
                     struct in6_addr *addrp = NULL;
+
+                   /* An interface may have an IPv6 address which is still
+                      undergoing DAD.  If so, ignore it. */
+                   if (ifa->ifa_flags&  IFA_F_TENTATIVE)
+                           return 0;
+
                     while (RTA_OK(rta, len1))
                       {
                         if (rta->rta_type == IFA_ADDRESS)

2. You could then remove the dad_count sleep loop in network.c as well.

3. Make dnsmasq handle address hot plug, by listening for IPV6 address changes
    as well as ROUTE changes. Not sure if the code is ready to deal with this.

Ok, I'll take a look. This is what gets me about IPv6, the massive seconds-system effect. Let's increase the size of IP addresses, and whilst we're at it make the world a whole lot more complex for no good reason.


4. The dnsmasq server should also be listening for hot plug interfaces on 
netlink
    as well, or do you rely on dbus for that?

Not sure I quite understand this question.


Cheers,

Simon.





Reply via email to