From b6c5e59e39e9513232c4e26faf30218e820f38a8 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 8 Oct 2009 21:46:28 +0300 Subject: [PATCH] Revert "bgpd: Implement BGP confederation error handling (RFC5065, Par. 5)" This reverts commit ca87e1d37b3c30648e9bacb476a3c89729512f6d. --- bgpd/bgp_aspath.c | 36 ------------------------------------ bgpd/bgp_aspath.h | 2 -- bgpd/bgp_attr.c | 11 ----------- 3 files changed, 0 insertions(+), 49 deletions(-) diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 440815b..e43d1f1 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1122,42 +1122,6 @@ aspath_private_as_check (struct aspath *aspath) return 1; } -/* AS path confed check. If aspath contains confed set or sequence then return 1. */ -int -aspath_confed_check (struct aspath *aspath) -{ - struct assegment *seg; - - if ( !(aspath && aspath->segments) ) - return 0; - - seg = aspath->segments; - - while (seg) - { - if (seg->type == AS_CONFED_SET || seg->type == AS_CONFED_SEQUENCE) - return 1; - seg = seg->next; - } - return 0; -} - -/* Leftmost AS path segment confed check. If leftmost AS segment is of type - AS_CONFED_SEQUENCE or AS_CONFED_SET then return 1. */ -int -aspath_left_confed_check (struct aspath *aspath) -{ - - if ( !(aspath && aspath->segments) ) - return 0; - - if ( (aspath->segments->type == AS_CONFED_SEQUENCE) - || (aspath->segments->type == AS_CONFED_SET) ) - return 1; - - return 0; -} - /* Merge as1 to as2. as2 should be uninterned aspath. */ static struct aspath * aspath_merge (struct aspath *as1, struct aspath *as2) diff --git a/bgpd/bgp_aspath.h b/bgpd/bgp_aspath.h index 9854d18..2b4625c 100644 --- a/bgpd/bgp_aspath.h +++ b/bgpd/bgp_aspath.h @@ -88,8 +88,6 @@ extern unsigned int aspath_key_make (void *); extern int aspath_loop_check (struct aspath *, as_t); extern int aspath_private_as_check (struct aspath *); extern int aspath_firstas_check (struct aspath *, as_t); -extern int aspath_confed_check (struct aspath *); -extern int aspath_left_confed_check (struct aspath *); extern unsigned long aspath_count (void); extern unsigned int aspath_count_hops (struct aspath *); extern unsigned int aspath_count_confeds (struct aspath *); diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 5e7536a..0668e9a 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -872,17 +872,6 @@ static int bgp_attr_aspath_check( struct peer *peer, bgp = peer->bgp; - /* Confederation sanity check. */ - if ((peer_sort (peer) == BGP_PEER_CONFED && ! aspath_left_confed_check (attr->aspath)) || - (peer_sort (peer) == BGP_PEER_EBGP && aspath_confed_check (attr->aspath))) - { - zlog (peer->log, LOG_ERR, "Malformed AS path from %s", peer->host); - bgp_notify_send (peer, - BGP_NOTIFY_UPDATE_ERR, - BGP_NOTIFY_UPDATE_MAL_AS_PATH); - return -1; - } - /* First AS check for EBGP. */ if (bgp != NULL && bgp_flag_check (bgp, BGP_FLAG_ENFORCE_FIRST_AS)) { -- 1.6.0.4