netdev
[Top] [All Lists]

IPv6 address autoconfiguration fix

To: netdev@xxxxxxxxxxx
Subject: IPv6 address autoconfiguration fix
From: Jacek Konieczny <jajcus@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Jun 2000 14:51:13 +0200
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.1.11i
 This patch fixes problem with disapearing all-nodes (ff02::1) multicast
 address after setting interface down and up. When all-nodes address is not
 present IPv6 address autoconfiguration doesn't work.

Greets,
        Jacek Konieczny <jajcus@xxxxxxxxxx>

PS.
        I have already sent it to Alexey Kuznetsov, but a friend of mine
asked me to send it here too.
        It is possible the fix will be included in 2.2.17 kernel?

diff -durN linux-2.2.16.orig/net/ipv6/addrconf.c linux/net/ipv6/addrconf.c
--- linux-2.2.16.orig/net/ipv6/addrconf.c       Tue Jan  4 19:12:27 2000
+++ linux/net/ipv6/addrconf.c   Fri Jun  9 20:37:48 2000
@@ -255,8 +255,6 @@
                idev = ipv6_add_dev(dev);
                if (idev == NULL)
                        return NULL;
-               if (dev->flags&IFF_UP)
-                       ipv6_mc_up(idev);
        }
        return idev;
 }
@@ -1045,6 +1043,8 @@
                return;
        }
 
+       ipv6_mc_up(idev);
+               
        addrconf_lock();
        ifp = ipv6_add_addr(idev, &addr, IFA_HOST);
 
@@ -1084,6 +1084,8 @@
        if (idev == NULL)
                return;
 
+       ipv6_mc_up(idev);
+       
 #ifdef CONFIG_IPV6_EUI64
        memset(&addr, 0, sizeof(struct in6_addr));
 
@@ -1120,6 +1122,8 @@
                printk(KERN_DEBUG "init sit: add_dev failed\n");
                return;
        }
+
+       ipv6_mc_up(idev);
 
        sit_add_v4_addrs(idev);
 

<Prev in Thread] Current Thread [Next in Thread>
  • IPv6 address autoconfiguration fix, Jacek Konieczny <=