From fbf4aeaae6cb001a4b2ae1a8a4b28812d7910da7 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 6 Oct 2016 10:16:58 -0300 Subject: [PATCH] ldpd: remove dead code from zsend_redistribute_route() As a general rule of thumb, we should write functions that do one thing and that do it well. All callers of zsend_redistribute_route() are already checking if the route should be redistributed or not (as the comment says), so we definitely shouldn't bother with that in this function. Signed-off-by: Renato Westphal --- zebra/zserv.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/zebra/zserv.c b/zebra/zserv.c index 18076fb62d..0b69af5124 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -646,16 +646,6 @@ zsend_redistribute_route (int add, struct zserv *client, struct prefix *p, } } - /* Came from VRF lib patch, is this really needed? callers of this routine - do check for redist.., so may be its not needed. - Check this client need this route. - if (!vrf_bitmap_check (client->redist[family2afi(p->family)][rib->type], - rib->vrf_id) && - !(is_default (p) && - vrf_bitmap_check (client->redist_default, rib->vrf_id))) - return 0; - */ - s = client->obuf; stream_reset (s); memset(&dummy_nh, 0, sizeof(struct nexthop)); -- 2.39.5