From ea89ab14e26e7041277e0a584ea7144e9cb455ac Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 31 Aug 2017 08:49:10 -0400 Subject: [PATCH] pimd: Smarten up pim_nexthop_lookup There exists cases where we have not properly configured a RP yet, but we are getting callbacks for nocache. This is generating allot of spam messages in the log. In the case where we attempt to lookup INADDR_NONE just say it fails without need to talk to anyone since we'll never get a real answer from zebra anyways. Signed-off-by: Donald Sharp --- pimd/pim_rpf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c index 36c6c894ef..fd09b04b8a 100644 --- a/pimd/pim_rpf.c +++ b/pimd/pim_rpf.c @@ -61,6 +61,14 @@ int pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop, int found = 0; int i = 0; + /* + * We should not attempt to lookup a + * 255.255.255.255 address, since + * it will never work + */ + if (addr.s_addr == INADDR_NONE) + return -1; + if ((nexthop->last_lookup.s_addr == addr.s_addr) && (nexthop->last_lookup_time > last_route_change_time)) { if (PIM_DEBUG_TRACE) { -- 2.39.5