]> git.puffer.fish Git - mirror/frr.git/commitdiff
[interface configuration] Preserve flag indicating address was set by quagga.
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Fri, 19 May 2006 13:53:23 +0000 (13:53 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Fri, 19 May 2006 13:53:23 +0000 (13:53 +0000)
2006-05-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* connected.c: (connected_add_ipv4,connected_add_ipv6) If the
  new struct connected matches an already existing one
  (that will consequently be removed by connected_withdraw),
  then be sure to preserve the ZEBRA_IFC_CONFIGURED flag.

zebra/ChangeLog
zebra/connected.c

index 6235071f6e310c328edcd33b9b2ca50371d69949..3ad0e83f1f98598f88cd50b155cebf52d50ac493 100644 (file)
@@ -1,3 +1,10 @@
+2006-05-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * connected.c: (connected_add_ipv4,connected_add_ipv6) If the
+         new struct connected matches an already existing one
+         (that will consequently be removed by connected_withdraw),
+         then be sure to preserve the ZEBRA_IFC_CONFIGURED flag.
+
 2006-05-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * kernel_socket.c: (ifam_read_mesg) Improve debug message
index 7e4f0fc7b9a8abb8269ff728ea3df7609867c7e4..39f47805182181128390886ef3998efd84cbafa5 100644 (file)
@@ -225,7 +225,11 @@ connected_add_ipv4 (struct interface *ifp, int flags, struct in_addr *addr,
 
   /* Check same connected route. */
   if ((current = connected_check (ifp, (struct prefix *) ifc->address)))
-    connected_withdraw (current); /* implicit withdraw - freebsd does this */
+    {
+      if (CHECK_FLAG(current->conf, ZEBRA_IFC_CONFIGURED))
+       SET_FLAG(ifc->conf, ZEBRA_IFC_CONFIGURED);
+      connected_withdraw (current); /* implicit withdraw - freebsd does this */
+    }
   
   connected_announce (ifp, ifc);
 }
@@ -364,7 +368,11 @@ connected_add_ipv6 (struct interface *ifp, struct in6_addr *addr,
     ifc->label = XSTRDUP (MTYPE_CONNECTED_LABEL, label);
   
   if ((current = connected_check (ifp, (struct prefix *) ifc->address)))
-    connected_withdraw (current); /* implicit update of existing address */
+    {
+      if (CHECK_FLAG(current->conf, ZEBRA_IFC_CONFIGURED))
+       SET_FLAG(ifc->conf, ZEBRA_IFC_CONFIGURED);
+      connected_withdraw (current); /* implicit update of existing address */
+    }
   
   connected_announce (ifp, ifc);
 }