diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-01 16:41:26 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-03 05:21:26 +0100 |
commit | ec22de20ab78db7be405e7361df8e98188c1ece5 (patch) | |
tree | 1a7dba7fd1c363abd221d531ebb37f829231d15e /zebra | |
parent | 446e7f9de21e049d37cd2cca035355b179819237 (diff) | |
download | quagga-ec22de20ab78db7be405e7361df8e98188c1ece5.tar.bz2 quagga-ec22de20ab78db7be405e7361df8e98188c1ece5.tar.xz |
zebra: fix bug #486 (lingering after IP address deletion)
zebra address bookkeeping is a mess. this is just a workaround to have
IPv4 address deletion somewhat working on Linux.
the if_unset_prefix call is synchronous, when it returns success the
address deletion completed successfully. this is either signaled by a
netlink ACK or by an OK return value from ioctl().
[cherry-picked from 48f685f3...]
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/interface.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index ba4cf25f..aa078925 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1279,18 +1279,23 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp, safe_strerror(errno), VTY_NEWLINE); return CMD_WARNING; } + /* success! now update all internal state... */ + + /* Remove connected route. */ + connected_down_ipv4 (ifp, ifc); -#if 0 /* Redistribute this information. */ zebra_interface_address_delete_update (ifp, ifc); - /* Remove connected route. */ - connected_down_ipv4 (ifp, ifc); + /* IP address propery set. */ + UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL); + + /* remove from interface, remark secondaries */ + if_subnet_delete (ifp, ifc); /* Free address information. */ listnode_delete (ifp->connected, ifc); connected_free (ifc); -#endif return CMD_SUCCESS; } |