mirror_frr/bgpd
Anuradha Karuppiah 6d8c603a93 bgpd: use IP address as tie breaker if the MM seq number is the same
Same sequence number handling is specified by RFC 7432 -
[
If two (or more) PEs advertise the same MAC address with the same
sequence number but different Ethernet segment identifiers, a PE that
receives these routes selects the route advertised by the PE with the
lowest IP address as the best route.

If the PE is the originator of the MAC route and it receives the same
MAC address with the same sequence number that it generated, it will
compare its own IP address with the IP address of the remote PE and
will select the lowest IP.  If its own route is not the best one, it
will withdraw the route.
]

To implement that specification this commit uses nexthop IP as a tie
breaker between two paths of equal seq number with lower IP winning.

Now if a local path already exists with the same sequence number but higher
(local-VTEP) IP it is evicted (deleted and withdrawn from the peers) and
the winning new remote path is installed in zebra. This is existing code
and handled implicitly via evpn_route_select_install.

If a local path is rxed from zebra with the same sequence as the
current remote winner it is rejected (not installed in the bgp
routing tables) and zebra is asked to re-install the older/remote winner.
This is a race condition that can only happen if bgp's add and zebra's add
cross paths. Additional handling has been added in this commit via
evpn_cleanup_local_non_best_route to take care of the race condition.

Ticket: CM-22674
Reviewed By: CCR-7937

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2018-10-31 06:23:32 -04:00
..
rfapi bgpd: use the vrf_bitmap_*() helper functions when necessary 2018-10-20 12:39:05 -03:00
rfp-example build: make rfptest and ospfclient "noinst" 2018-10-28 19:48:55 +01:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
BGP4-MIB.txt Initial revision 2002-12-13 20:15:29 +00:00
bgp_advertise.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_advertise.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_aspath.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_aspath.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_attr_evpn.c bgpd: support evpn nd ext community 2018-07-17 13:06:41 -07:00
bgp_attr_evpn.h bgpd: support evpn nd ext community 2018-07-17 13:06:41 -07:00
bgp_attr.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_attr.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_bfd.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_btoa.c bgpd: Untrusted argument (Coverity 1399380) 2018-06-19 15:00:25 +02:00
bgp_clist.c bgpd:Fixing the signature of community_free function 2018-10-23 09:52:32 -07:00
bgp_clist.h bgpd: clean up clist management logic 2018-04-17 13:58:24 -04:00
bgp_community.c Merge branch 'master' of https://github.com/FRRouting/frr into community 2018-10-23 09:53:39 -07:00
bgp_community.h Merge branch 'master' of https://github.com/FRRouting/frr into community 2018-10-23 09:53:39 -07:00
bgp_damp.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_damp.h bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_debug.c lib: change M:A:C to X:X:X:X:X:X 2018-10-24 21:44:33 +00:00
bgp_debug.h bgpd: add pbr error flag for pbr errors 2018-04-30 11:56:23 +02:00
bgp_dump.c bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_dump.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_ecommunity.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_ecommunity.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_encap_tlv.c bgpd: Fix off by one error introduced by 8c9cc7bbf6 2017-10-18 18:37:38 -04:00
bgp_encap_tlv.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_encap_types.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgp_errors.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_errors.h bgpd: Try to notice when configuration changes during startup 2018-10-01 10:58:06 -04:00
bgp_evpn_private.h bgpd: check existing l3vni for any l2vni creation 2018-08-22 13:15:25 -07:00
bgp_evpn_vty.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_evpn_vty.h bgpd: get rid of afi_header_vty_out() & co. 2017-08-29 08:36:03 +02:00
bgp_evpn.c bgpd: use IP address as tie breaker if the MM seq number is the same 2018-10-31 06:23:32 -04:00
bgp_evpn.h bgpd: Add '[no] flood <disable|head-end-replication>' 2018-10-11 20:27:28 -04:00
bgp_filter.c bgpd: remove ip prefix from as-path, <large,ext>community-list 2018-10-04 21:50:44 -07:00
bgp_filter.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_flowspec_private.h bgpd: support for show bgp ipv4 flowspec 2018-03-30 14:01:05 +02:00
bgp_flowspec_util.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
bgp_flowspec_util.h bgpd: display more than one FS entre per IP 2018-07-24 12:17:57 +02:00
bgp_flowspec_vty.c bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_flowspec.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
bgp_flowspec.h bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_fsm.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_fsm.h bgpd: fix bgp_packet.c / bgp_fsm.c organization 2017-11-30 16:18:02 -05:00
bgp_io.c lib: remove frr_pthread->id 2018-09-19 22:01:46 +02:00
bgp_io.h bgpd: update pthreads to use lib changes 2018-01-24 15:30:55 -05:00
bgp_keepalives.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_keepalives.h bgpd: update pthreads to use lib changes 2018-01-24 15:30:55 -05:00
bgp_label.c bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_label.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_labelpool.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
bgp_labelpool.h bgpd: dynamic mpls label pool 2018-04-11 23:18:28 -07:00
bgp_lcommunity.c Merge branch 'pull/3197' 2018-10-23 12:31:25 +02:00
bgp_lcommunity.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_main.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
bgp_memory.c *: support for evpn type-4 route 2018-05-30 07:48:20 -04:00
bgp_memory.h *: support for evpn type-4 route 2018-05-30 07:48:20 -04:00
bgp_mpath.c bgpd:Fixing the signature of community_free function 2018-10-23 09:52:32 -07:00
bgp_mpath.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_mplsvpn.c Merge pull request #3032 from donaldsharp/bgp_info 2018-10-11 09:17:31 -04:00
bgp_mplsvpn.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_network.c bgpd: Cleanup peer->su handling 2018-10-07 20:55:52 -04:00
bgp_network.h bgpd: server socket is created for all enabled VRF 2018-02-27 11:11:24 +01:00
bgp_nexthop.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_nexthop.h bgpd: Convert struct bgp_info to struct bgp_path_info 2018-10-09 14:14:25 -04:00
bgp_nht.c bgpd: Fix crash when using v4 route w/ v6 nexthop 2018-10-17 11:27:30 -04:00
bgp_nht.h bgpd: Fix crash when using v4 route w/ v6 nexthop 2018-10-17 11:27:30 -04:00
bgp_open.c bgpd: Extend RFC 5549 metaphor a bit more 2018-09-18 20:53:22 -04:00
bgp_open.h bgpd/ospfd: resolve warnings for bgp/ospf json commit 2018-08-30 15:54:46 +00:00
bgp_packet.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_packet.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgp_pbr.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_pbr.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_rd.c bgpd, lib, ospfd, zebra: all_digit moved to frrstr 2018-06-19 17:59:53 +02:00
bgp_rd.h bgpd: Auto RD definitions and encoding 2018-04-25 12:39:16 -04:00
bgp_regex.c *: reindent 2017-07-17 14:04:07 +02:00
bgp_regex.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_route.c bgpd: use IP address as tie breaker if the MM seq number is the same 2018-10-31 06:23:32 -04:00
bgp_route.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_routemap.c bgpd:Fixing the signature of community_free function 2018-10-23 09:52:32 -07:00
bgp_rpki.c bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_snmp.c bgpd: fix missed info->path rename in snmp 2018-10-16 18:17:26 +02:00
bgp_table.c bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_table.h bgpd, lib, zebra: Wrapper get/set of table->info pointer 2018-09-23 20:04:39 -04:00
bgp_updgrp_adv.c Revert "bgpd: Set attributes according route-maps if applied for default-originate" 2018-10-23 16:25:08 -04:00
bgp_updgrp_packet.c bgpd: When displaying default originate debugs don't print gibberish 2018-10-23 16:13:46 -04:00
bgp_updgrp.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
bgp_updgrp.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_vnc_types.h bgpd: Cleanup of bgp daemon code 2018-07-07 22:51:13 +02:00
bgp_vpn.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_vpn.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_vty.c bgpd: hidden commands to add/del a local mac 2018-10-31 06:23:32 -04:00
bgp_vty.h bgpd: hidden commands to add/del a local mac 2018-10-31 06:23:32 -04:00
bgp_zebra.c Merge pull request #3024 from ton31337/fix/validate_route-map 2018-10-14 08:48:48 -04:00
bgp_zebra.h Merge pull request #3024 from ton31337/fix/validate_route-map 2018-10-14 08:48:48 -04:00
bgpd.c Merge branch 'pull/3197' 2018-10-23 12:31:25 +02:00
bgpd.conf.sample bgpd: hide "router bgp" commands also under "address-family ipv4 unicast" 2017-05-04 17:06:13 +00:00
bgpd.conf.sample2 Initial revision 2002-12-13 20:15:29 +00:00
bgpd.conf.vnc.sample bgpd: hide "router bgp" commands also under "address-family ipv4 unicast" 2017-05-04 17:06:13 +00:00
bgpd.h Merge pull request #3024 from ton31337/fix/validate_route-map 2018-10-14 08:48:48 -04:00
IMPLEMENTATION.txt bgpd: Convert struct bgp_info to struct bgp_path_info 2018-10-09 14:14:25 -04:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am bgpd: Add '[no] flood <disable|head-end-replication>' 2018-10-11 20:27:28 -04:00