summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@openbsd.org>2017-08-31 14:53:36 -0300
committerGitHub <noreply@github.com>2017-08-31 14:53:36 -0300
commitff228d294813d59ca97b71995aa2d524476c08f0 (patch)
treedbb7aeaa3344cd5208d392bccaca0f6b576976d8 /zebra/interface.c
parent8941a38520ca0c162015fd137311b2b9c6633cbc (diff)
parentb06427987d1015bedc7d43c0087eab7671b097b4 (diff)
Merge pull request #1076 from donaldsharp/connected
Connected
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 5668590fdc..5d02259159 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -527,18 +527,13 @@ static void if_install_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)) {
if (CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
zebra_interface_address_add_update(ifp, ifc);
- p = ifc->address;
- if (p->family == AF_INET)
- connected_up_ipv4(ifp, ifc);
- else if (p->family == AF_INET6)
- connected_up_ipv6(ifp, ifc);
+ connected_up(ifp, ifc);
}
}
}
@@ -549,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);
}
}
}
@@ -608,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
@@ -642,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);