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>
diff --git a/zebra/connected.c b/zebra/connected.c
index 05538c5..3db1271 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -49,8 +49,9 @@
     {
       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