mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
zebra: lingering IP address after deletion (BZ#486)
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(). This version is wrapped by #ifdef HAVE_NETLINK so we don't touch the BSDs for now. * zebra/interface.c: On Linux, update zebra internal state after deleting an address. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
1080c13f5d
commit
7f062c217b
@ -1297,14 +1297,29 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp,
|
|||||||
safe_strerror(errno), VTY_NEWLINE);
|
safe_strerror(errno), VTY_NEWLINE);
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
|
/* success! call returned that the address deletion went through.
|
||||||
|
* this is a synchronous operation, so we know it succeeded and can
|
||||||
|
* now update all internal state. */
|
||||||
|
|
||||||
#if 0
|
/* the HAVE_NETLINK check is only here because, on BSD, although the
|
||||||
/* Redistribute this information. */
|
* call above is still synchronous, we get a second confirmation later
|
||||||
zebra_interface_address_delete_update (ifp, ifc);
|
* through the route socket, and we don't want to touch that behaviour
|
||||||
|
* for now. It should work without the #ifdef, but why take the risk...
|
||||||
|
* -- equinox 2012-07-13 */
|
||||||
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
/* Remove connected route. */
|
/* Remove connected route. */
|
||||||
connected_down_ipv4 (ifp, ifc);
|
connected_down_ipv4 (ifp, ifc);
|
||||||
|
|
||||||
|
/* Redistribute this information. */
|
||||||
|
zebra_interface_address_delete_update (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. */
|
/* Free address information. */
|
||||||
listnode_delete (ifp->connected, ifc);
|
listnode_delete (ifp->connected, ifc);
|
||||||
connected_free (ifc);
|
connected_free (ifc);
|
||||||
|
Loading…
Reference in New Issue
Block a user