summaryrefslogtreecommitdiff
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-24 12:37:24 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-24 12:37:24 +0100
commitf3e59178506dab9d54cf19ec701f8d9a7fe283f9 (patch)
treef87f859d42c03ca85f2a47d01e9aa695e8edb209 /proto/bgp/config.Y
parent52e030e14666ff00a4bb0c700d2c027fbeb87d04 (diff)
Enables multihop mode for IBGP by default.
This is more consistent with common usage and also with the behavior of other implementations (Cisco, Juniper). Also changes the default for gw mode to be based solely on direct/multihop.
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r--proto/bgp/config.Y2
1 files changed, 2 insertions, 0 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 185b1bda..e93501d3 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -34,6 +34,7 @@ CF_ADDTO(proto, bgp_proto '}' { bgp_check_config(BGP_CFG); } )
bgp_proto_start: proto_start BGP {
this_proto = proto_config_new(&proto_bgp, sizeof(struct bgp_config), $1);
+ BGP_CFG->multihop = -1; /* undefined */
BGP_CFG->hold_time = 240;
BGP_CFG->connect_retry_time = 120;
BGP_CFG->initial_hold_time = 240;
@@ -74,6 +75,7 @@ bgp_proto:
| bgp_proto STARTUP HOLD TIME expr ';' { BGP_CFG->initial_hold_time = $5; }
| bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
| bgp_proto KEEPALIVE TIME expr ';' { BGP_CFG->keepalive_time = $4; }
+ | bgp_proto DIRECT ';' { BGP_CFG->multihop = 0; }
| bgp_proto MULTIHOP ';' { BGP_CFG->multihop = 64; }
| bgp_proto MULTIHOP expr ';' { BGP_CFG->multihop = $3; if (($3<1) || ($3>255)) cf_error("Multihop must be in range 1-255"); }
| bgp_proto NEXT HOP SELF ';' { BGP_CFG->next_hop_self = 1; BGP_CFG->next_hop_keep = 0; }