summaryrefslogtreecommitdiff
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2013-01-24 14:04:44 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2013-09-19 17:51:16 +0200
commit9db047fcb1bedcf1a5a1962e49aa70f48f969b96 (patch)
treed09388f975d4201dc905cb00522e5d56b09a1cfe /zebra/connected.c
parent599da95527ec8e09cd3d890dc3addc6f2e791a0c (diff)
zebra: make if_subnet_delete a bit more strict
Enhance if_subnet_delete so it will complain about improper use. Also, fix one occurence of improper use where it was called for IPv6 as well. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index 05538c5d..3db1271d 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -49,8 +49,9 @@ connected_withdraw (struct connected *ifc)
{
zebra_interface_address_delete_update (ifc->ifp, ifc);
- if_subnet_delete (ifc->ifp, ifc);
-
+ if (ifc->address->family == AF_INET)
+ if_subnet_delete (ifc->ifp, ifc);
+
if (ifc->address->family == AF_INET)
connected_down_ipv4 (ifc->ifp, ifc);
#ifdef HAVE_IPV6