From 6488167fd0c67eeabbc1a8cdb336cf63f0d5cf98 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 12 Sep 2005 16:58:52 +0000 Subject: 2005-09-12 Paul Jakma * (general) RTM_CHANGE and implicit withdraw on RTM_NEWADDR support. * connected.c: (connected_withdraw) new function. withdraw a connected subnet address set from zebra, and pass information along to clients. (connected_announce) similar, but to announce a new connected subnet address set. (connected_check_ipv4) renamed to connected_check, as its AFI independent. (connected_add_ipv{4,6}) Remove the connected address announce stuff, use connected_announce instead. If connected_check indicates address is already present, treat it as an implicit withdraw of the existing address, ie remove the old address details and replace with the new details. (connected_delete_ipv{4,6}) Use connected_withdraw. (connected_check_ipv6) deleted in favour of connected_check. * connected.h: Rename connected_check_ipv4 to connected_check. delete connected_check_ipv6. * interface.c: Use connected_check rather than the AFI specific symbols. * kernel_socket.c: (rtm_read) RTM_CHANGE support. Create a rib delete event for the existing route, before adding route again. (kernel_read) we can handle RTM_CHANGE now. --- zebra/interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 92e43d97..49fffcf5 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1150,7 +1150,7 @@ ip_address_install (struct vty *vty, struct interface *ifp, return CMD_WARNING; } - ifc = connected_check_ipv4 (ifp, (struct prefix *) &cp); + ifc = connected_check (ifp, (struct prefix *) &cp); if (! ifc) { ifc = connected_new (); @@ -1236,7 +1236,7 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp, } /* Check current interface address. */ - ifc = connected_check_ipv4 (ifp, (struct prefix *) &cp); + ifc = connected_check (ifp, (struct prefix *) &cp); if (! ifc) { vty_out (vty, "%% Can't find address%s", VTY_NEWLINE); @@ -1346,7 +1346,7 @@ ipv6_address_install (struct vty *vty, struct interface *ifp, return CMD_WARNING; } - ifc = connected_check_ipv6 (ifp, (struct prefix *) &cp); + ifc = connected_check (ifp, (struct prefix *) &cp); if (! ifc) { ifc = connected_new (); @@ -1425,7 +1425,7 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp, } /* Check current interface address. */ - ifc = connected_check_ipv6 (ifp, (struct prefix *) &cp); + ifc = connected_check (ifp, (struct prefix *) &cp); if (! ifc) { vty_out (vty, "%% Can't find address%s", VTY_NEWLINE); -- cgit v1.2.3