]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Link check just for single-hop
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 8 Dec 2017 16:00:47 +0000 (17:00 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 8 Dec 2017 16:04:59 +0000 (17:04 +0100)
proto/bgp/bgp.c
proto/bgp/config.Y

index a26c0cb992651bc14189d7c011506ca376598c74..f6d266397223af2f6854e7ad07590107c042108c 100644 (file)
@@ -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");
index 0bd4c55431db0f3b5d3e9ba8e2fe8f3d65006704..6ce0f1aacbca766a819b7b95608741e69cd686a2 100644 (file)
@@ -58,7 +58,7 @@ bgp_proto_start: proto_start BGP {
      BGP_CFG->gr_mode = BGP_GR_AWARE;
      BGP_CFG->gr_time = 120;
      BGP_CFG->setkey = 1;
-     BGP_CFG->check_link = 1;
+     BGP_CFG->check_link = -1;
    }
  ;