]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Fix situation where we would notify the owner it lost due to admin distance
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 14 Feb 2018 02:30:03 +0000 (21:30 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 23 Feb 2018 19:45:57 +0000 (14:45 -0500)
The 'struct route_entry *old' and 'struct route_entry *new' can sometimes
be the same route type( for a route replace ), so when we are checking
to see if a new owner has taken over, don't tell the owner it is
replacing it self.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
zebra/zebra_rib.c

index 1ba85f0ea25bce729208d2a5e70b78e7cb6eb5dc..82b92ae0ddad8015e6d6230d73ec5e3286213f08 100644 (file)
@@ -1110,7 +1110,7 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re,
         * If this is a replace to a new RE let the originator of the RE
         * know that they've lost
         */
-       if (old && old != re)
+       if (old && (old != re) && (old->type != re->type))
                zsend_route_notify_owner(old, p, ZAPI_ROUTE_BETTER_ADMIN_WON);
 
        /*