blob: f38522950ac373dfaa8333c4d8380e9e4b7136ca (
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
|
From 43b861e1322c492970dcb83db880c27427b13b51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Wed, 19 Oct 2016 13:45:13 +0300
Subject: [PATCH] bgpd: allow using ebgp-multihop for ibgp connections
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Allow setting ebgp-multihop for iBGP. It will basically only set
TTL for iBGP connections as the other features of ebgp-multihop
affect only eBGP. This improves compatibility with other
implementations that allow setting TTL for all connections.
Enabling this has similar reasoning as for enabling gtsm for ibgp
(see commit 5d804b439a4138c77).
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
---
bgpd/bgp_vty.c | 3 ---
bgpd/bgpd.c | 3 ---
bgpd/bgpd.h | 5 ++---
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 8eeaff9..332ce21 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -276,9 +276,6 @@ bgp_vty_return (struct vty *vty, int ret)
case BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK:
str = "ebgp-multihop and ttl-security cannot be configured together";
break;
- case BGP_ERR_NO_IBGP_WITH_TTLHACK:
- str = "ttl-security only allowed for EBGP peers";
- break;
}
if (str)
{
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 56e4322..68ddfc4 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2865,9 +2865,6 @@ peer_ebgp_multihop_set (struct peer *peer, int ttl)
struct listnode *node, *nnode;
struct peer *peer1;
- if (peer->sort == BGP_PEER_IBGP)
- return BGP_ERR_NO_IBGP_WITH_TTLHACK;
-
if (peer->gtsm_hops != 0)
return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK;
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index a4c608d..dbdcfa1 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -831,9 +831,8 @@ enum bgp_clear_type
#define BGP_ERR_CANNOT_HAVE_LOCAL_AS_SAME_AS -28
#define BGP_ERR_TCPSIG_FAILED -29
#define BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK -30
-#define BGP_ERR_NO_IBGP_WITH_TTLHACK -31
-#define BGP_ERR_CANNOT_HAVE_LOCAL_AS_SAME_AS_REMOTE_AS -32
-#define BGP_ERR_MAX -33
+#define BGP_ERR_CANNOT_HAVE_LOCAL_AS_SAME_AS_REMOTE_AS -31
+#define BGP_ERR_MAX -32
extern struct bgp_master *bm;
--
2.10.1
|