summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorpaul <paul>2004-05-01 18:17:04 +0000
committerpaul <paul>2004-05-01 18:17:04 +0000
commita7c8e445b5dfd3bff4dd81a664905aa21a55049f (patch)
treeedc045b86f78613fa2612790951c4de0119b0370 /bgpd/bgp_route.c
parent76ee28f428aff6210030602a6cf59a7eae71d41e (diff)
downloadquagga-a7c8e445b5dfd3bff4dd81a664905aa21a55049f.tar.bz2
quagga-a7c8e445b5dfd3bff4dd81a664905aa21a55049f.tar.xz
2004-05-01 rivo nurges <rix@estpak.ee>
* bgp_route.c: fix UNH IOL BGP-4.1.12f
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 32227cbb..97636eff 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -480,6 +480,16 @@ 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, &ri->attr->nexthop))
+ return 0;
+#ifdef HAVE_IPV6
+ if (p->family == AF_INET6
+ && IPV6_ADDR_SAME(&peer->remote_id, &ri->attr->nexthop))
+ return 0;
+#endif
+
/* Aggregate-address suppress check. */
if (ri->suppress)
if (! UNSUPPRESS_MAP_NAME (filter))