diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-31 13:47:26 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-31 13:47:26 -0400 |
| commit | 11461c63905a2e458785fbafff0a5b643b2de9d2 (patch) | |
| tree | 65fdb62a8ee7a21ee3e475e80c442613b659712c /zebra/interface.c | |
| parent | ae87977c35c5e63ac2640de06ed2783759f2dfdd (diff) | |
zebra: Refactor connected_down_ipv[4|6]
The connected_down_ipv[4|6] functions are basically identical.
Refactor into one common interface.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 354e9177ae..5d02259159 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -544,17 +544,11 @@ static void if_uninstall_connected(struct interface *ifp) struct listnode *node; struct listnode *next; struct connected *ifc; - struct prefix *p; if (ifp->connected) { for (ALL_LIST_ELEMENTS(ifp->connected, node, next, ifc)) { - p = ifc->address; zebra_interface_address_delete_update(ifp, ifc); - - if (p->family == AF_INET) - connected_down_ipv4(ifp, ifc); - else if (p->family == AF_INET6) - connected_down_ipv6(ifp, ifc); + connected_down(ifp, ifc); } } } @@ -603,7 +597,7 @@ static void if_delete_connected(struct interface *ifp) next = anode->next; ifc = listgetdata(anode); - connected_down_ipv4(ifp, ifc); + connected_down(ifp, ifc); /* XXX: We have to send notifications * here explicitly, because we destroy @@ -637,7 +631,7 @@ static void if_delete_connected(struct interface *ifp) rn->info = NULL; route_unlock_node(rn); } else if (cp.family == AF_INET6) { - connected_down_ipv6(ifp, ifc); + connected_down(ifp, ifc); zebra_interface_address_delete_update(ifp, ifc); |
