From 2c13299a05e5544a5e79c2a970256a21f488a3fa Mon Sep 17 00:00:00 2001 From: Pradosh Mohapatra Date: Sat, 7 Sep 2013 07:07:20 +0000 Subject: [PATCH] bgpd: don't compare next-hop to router-id While announcing a path to a peer, the code currently compares the path's next-hop with the peer's router-id. This can lead to problems as the router IDs are unique only within an AS. Suppose AS 1 sends route with next-hop 10.1.1.1. It is possible that the speaker has an established BGP peering with a router in AS 2 with router ID 10.1.1.1. The route will not be advertised to that peer in AS 2. The patch removes this check. Signed-off-by: Pradosh Mohapatra Reviewed-by: Dinesh G Dutt Reviewed-by: Shrijeet Mukherjee Signed-off-by: David Lamparter --- bgpd/bgp_route.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 46c0c85f66..a919b54e9c 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -823,16 +823,6 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, if (from == peer) return 0; - /* If peer's id and route's nexthop are same. draft-ietf-idr-bgp4-23 5.1.3 */ - if (p->family == AF_INET - && IPV4_ADDR_SAME(&peer->remote_id, &riattr->nexthop)) - return 0; -#ifdef HAVE_IPV6 - if (p->family == AF_INET6 - && IPV6_ADDR_SAME(&peer->remote_id, &riattr->nexthop)) - return 0; -#endif - /* Aggregate-address suppress check. */ if (ri->extra && ri->extra->suppress) if (! UNSUPPRESS_MAP_NAME (filter)) -- 2.39.5