[zebra] Fix forgetfulness wrt configured address on FreeBSD
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* (general) The key fixes are actually Andrew Schorr's.
* interface.c: (ip_address_uninstall) Unset the configured flag.
* connected.c: (connected_same) new helper, check whether
two connected are same.
(connected_implicit_withdraw) new helper, consolidation of
existing code in connected_add_ipv{4,6}.
Try filter out unneeded Zserv address delete/adds when
address is exact same.
Where old address is implicitely removed, be sure to preserve
the IFC_CONFIGURED flag if set, fixes bug where configured
addresses were being lost on FreeBSD.
diff --git a/zebra/interface.c b/zebra/interface.c
index e386047..69124b3 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1273,6 +1273,8 @@
if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED))
return CMD_WARNING;
+ UNSET_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED);
+
/* This is not real address or interface is not active. */
if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)
|| ! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))