summaryrefslogtreecommitdiffstats
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2010-03-27 18:31:42 +0100
committerDavid Lamparter <equinox@diac24.net>2010-03-27 18:31:42 +0100
commitbe066ba3fa52ef82754532a419e18c166024cb80 (patch)
treed89bc9effe3b1312a1d519dfdd9f26fd444354d8 /zebra/interface.c
parentaa218e113700e6c1ca884eef7bbfe1c207abb063 (diff)
downloadquagga-be066ba3fa52ef82754532a419e18c166024cb80.tar.bz2
quagga-be066ba3fa52ef82754532a419e18c166024cb80.tar.xz
zebra: fix interface deletion bug introduced by ptp address support
meh. forgot to even look at the interface deletion path. this doesn't really work well when looking for the local address in the subnet list which has the connected prefix in it... loop ensues. fix by using the connected prefix when looking at the list of connected prefixes. duh.
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index d52dfa29..3deb190f 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -386,7 +386,7 @@ void
if_delete_update (struct interface *ifp)
{
struct connected *ifc;
- struct prefix *p;
+ struct prefix cp;
struct route_node *rn;
struct zebra_if *zebra_if;
@@ -415,10 +415,11 @@ if_delete_update (struct interface *ifp)
while ((node = (last ? last->next : listhead (ifp->connected))))
{
ifc = listgetdata (node);
- p = ifc->address;
-
- if (p->family == AF_INET
- && (rn = route_node_lookup (zebra_if->ipv4_subnets, p)))
+ cp = *CONNECTED_PREFIX(ifc);
+ apply_mask (&cp);
+
+ if (cp.family == AF_INET
+ && (rn = route_node_lookup (zebra_if->ipv4_subnets, &cp)))
{
struct listnode *anode;
struct listnode *next;
@@ -440,7 +441,6 @@ if_delete_update (struct interface *ifp)
next = anode->next;
ifc = listgetdata (anode);
- p = ifc->address;
connected_down_ipv4 (ifp, ifc);
@@ -468,7 +468,7 @@ if_delete_update (struct interface *ifp)
route_unlock_node (rn);
}
#ifdef HAVE_IPV6
- else if (p->family == AF_INET6)
+ else if (cp.family == AF_INET6)
{
connected_down_ipv6 (ifp, ifc);