]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Smarten up pim_nexthop_lookup
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 Aug 2017 12:49:10 +0000 (08:49 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 Aug 2017 14:30:19 +0000 (10:30 -0400)
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 <sharpd@cumulusnetworks.com>
pimd/pim_rpf.c

index 36c6c894ef04be6410865306876250b8b837b16d..fd09b04b8aa6c396c65a52ecefeb3ba270005840 100644 (file)
@@ -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) {