summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-08 17:00:47 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-08 17:04:59 +0100
commitdea9886454c1c0953b5977dd8a96718be465b962 (patch)
tree223b5b66f60699950778f44f4d1441747d06166e /proto/bgp/bgp.c
parent3e52d112d714545df3cd97119824ee94c27a0606 (diff)
BGP: Link check just for single-hop
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index a26c0cb9..f6d26639 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1621,6 +1621,10 @@ bgp_postconfig(struct proto_config *CF)
if (cf->multihop < 0)
cf->multihop = internal ? 64 : 0;
+ /* Link check for single-hop BGP by default */
+ if (cf->check_link < 0)
+ cf->check_link = !cf->multihop;
+
if (!cf->local_as)
cf_error("Local AS number must be set");