summaryrefslogtreecommitdiffstats
path: root/main/quagga/quagga-revert-confed-check.patch
blob: 3c76d1dd1581faab4f4960217f83c0abc828d5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From b6c5e59e39e9513232c4e26faf30218e820f38a8 Mon Sep 17 00:00:00 2001
From: Timo Teras <timo.teras@iki.fi>
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