]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: router mac same as self supress bgp update 3848/head
authorChirag Shah <chirag@cumulusnetworks.com>
Thu, 28 Feb 2019 00:36:47 +0000 (16:36 -0800)
committerChirag Shah <chirag@cumulusnetworks.com>
Mon, 4 Mar 2019 17:56:13 +0000 (09:56 -0800)
bgp update can contain router mac address same as one of SVIs
mac address, during processing of evpn route in bpg_update()
check for the flag is set and filter the route from installing.
This check is done prior to attribute lookup or storing in database.

Parse check and set is done once during attribute parse
because all the NLRIs containing evpn prefix
(type-2/type-5) will have same exntended community applicable.

Ticket:CM-23674
Reviewed By:CCR-8336
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_route.c

index 666254a62010bed4fef15aa48930844843332caa..a83e4419e4b1643d3c2fcbe4c7e5894c3d410a13 100644 (file)
@@ -3094,7 +3094,7 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id,
                goto filtered;
        }
 
-       if (bgp_mac_entry_exists(p)) {
+       if (bgp_mac_entry_exists(p) || bgp_mac_exist(&attr->rmac)) {
                reason = "self mac;";
                goto filtered;
        }