]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: dismiss babel_redistribute_unset()
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 11 Feb 2012 11:25:01 +0000 (15:25 +0400)
committerPaul Jakma <paul@quagga.net>
Sun, 25 Mar 2012 16:06:54 +0000 (17:06 +0100)
The function was effectively duplicating existing
zclient_redistribute(). This makes no_babel_redistribute_type()
consistent with babel_redistribute_type()

babeld/babel_zebra.c

index eced995e0e615b17fcaa16c050c10a4971f3498a..ed6566f7ddb343ab5163fa521434a7be9f402956 100644 (file)
@@ -186,23 +186,6 @@ babel_zebra_read_ipv4 (int command, struct zclient *zclient,
     return 0;
 }
 
-static int
-babel_redistribute_unset (int type)
-{
-    if (! zclient->redist[type])
-        return CMD_SUCCESS;
-
-    zclient->redist[type] = 0;
-
-    if (zclient->sock > 0)
-        zebra_redistribute_send (ZEBRA_REDISTRIBUTE_DELETE, zclient, type);
-
-    /* perhaps should we remove xroutes having the same type... */
-
-    return CMD_SUCCESS;
-}
-
-
 /* [Babel Command] */
 DEFUN (babel_redistribute_type,
        babel_redistribute_type_cmd,
@@ -246,7 +229,9 @@ DEFUN (no_babel_redistribute_type,
         return CMD_WARNING;
     }
 
-    return babel_redistribute_unset (type);
+    zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, type);
+    /* perhaps should we remove xroutes having the same type... */
+    return CMD_SUCCESS;
 }
 
 #ifndef NO_DEBUG