summaryrefslogtreecommitdiff
path: root/babeld
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2012-02-11 15:25:01 +0400
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:54 +0100
commit359be3d0e4db5c931b1ad0dabbac2dea77394de1 (patch)
tree4df570e46604bb29f178a94656abcbfbd9154edd /babeld
parent3c442e8802c260a0ce9787b5f432a7a2a093be25 (diff)
babeld: dismiss babel_redistribute_unset()
The function was effectively duplicating existing zclient_redistribute(). This makes no_babel_redistribute_type() consistent with babel_redistribute_type()
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_zebra.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c
index eced995e..ed6566f7 100644
--- a/babeld/babel_zebra.c
+++ b/babeld/babel_zebra.c
@@ -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