summaryrefslogtreecommitdiff
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-05-19 13:53:23 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-05-19 13:53:23 +0000
commit0f38dc4d4729b562551f8f53e7343f5a53b2dbf5 (patch)
treee6d4f73e30c3d6e0859f3bc4e4867fb2323284bf /zebra/connected.c
parent55196042ac8def6f0057039017eb6a400d7f73fb (diff)
[interface configuration] Preserve flag indicating address was set by quagga.
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.
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index 7e4f0fc7..39f47805 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -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);
}