]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Splitting Route Refresh and Enhanced Route Refresh toggles
authorMaria Matejka <mq@ucw.cz>
Wed, 27 Sep 2023 10:51:55 +0000 (12:51 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 3 Oct 2023 09:27:49 +0000 (11:27 +0200)
doc/bird.sgml
proto/bgp/bgp.h
proto/bgp/config.Y
proto/bgp/packets.c

index 0da616c700c0265c8c70a53c811a4bd3e934bf49..3fdb1535378a8d2fc3eec1f10f2002b04af5ab19 100644 (file)
@@ -2706,14 +2706,20 @@ using the following configuration parameters:
        changes its import filter, or if there is suspicion of inconsistency) it
        is necessary to do a new complete route exchange. BGP protocol extension
        Route Refresh (<rfc id="2918">) allows BGP speaker to request
-       re-advertisement of all routes from its neighbor. BGP protocol
-       extension Enhanced Route Refresh (<rfc id="7313">) specifies explicit
-       begin and end for such exchanges, therefore the receiver can remove
-       stale routes that were not advertised during the exchange. This option
-       specifies whether BIRD advertises these capabilities and supports
+       re-advertisement of all routes from its neighbor. This option
+       specifies whether BIRD advertises this capability and supports
        related procedures. Note that even when disabled, BIRD can send route
        refresh requests.  Default: on.
 
+       <tag><label id="bgp-enable-enhanced-route-refresh">enable enhanced route refresh <m/switch/</tag>
+       BGP protocol extension Enhanced Route Refresh (<rfc id="7313">) specifies explicit
+       begin and end for Route Refresh (see previous option),
+       therefore the receiver can remove
+       stale routes that were not advertised during the exchange. This option
+       specifies whether BIRD advertises this capability and supports
+       related procedures.
+       Default: on.
+
        <tag><label id="bgp-graceful-restart">graceful restart <m/switch/|aware</tag>
        When a BGP speaker restarts or crashes, neighbors will discard all
        received paths from the speaker, which disrupts packet forwarding even
index bae7055a981cc9af6a905b0b958b89bdd12b30be..959e9961a721df5f99a4e1c766a7a31426eb5ff0 100644 (file)
@@ -96,6 +96,7 @@ struct bgp_config {
   u32 default_med;                     /* Default value for MULTI_EXIT_DISC attribute */
   int capabilities;                    /* Enable capability handshake [RFC 5492] */
   int enable_refresh;                  /* Enable local support for route refresh [RFC 2918] */
+  int enable_enhanced_refresh;         /* Enable local support for enhanced route refresh [RFC 7313] */
   int enable_as4;                      /* Enable local support for 4B AS numbers [RFC 6793] */
   int enable_extended_messages;                /* Enable local support for extended messages [RFC 8654] */
   int enable_hostname;                 /* Enable local support for hostname [draft] */
index a37bb27a926378131297c9dbf3f8ab423b8c7397..71081e230bde89f935dbfeef0b56cc2f893a131d 100644 (file)
@@ -23,7 +23,7 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
        BGP_LOCAL_PREF, BGP_MED, 
        SOURCE, ADDRESS, PASSWORD, RR, RS, CLIENT, CLUSTER, ID, AS4, ADVERTISE,
        IPV4, CAPABILITIES, LIMIT, PASSIVE, PREFER, OLDER, MISSING, LLADDR,
-       DROP, IGNORE, ROUTE, REFRESH, INTERPRET, COMMUNITIES,
+       DROP, IGNORE, ENHANCED, ROUTE, REFRESH, INTERPRET, COMMUNITIES,
        IGP, TABLE, GATEWAY, DIRECT, RECURSIVE, MED, TTL,
        SECURITY, DETERMINISTIC, SECONDARY, ALLOW, BFD, ADD, PATHS, RX, TX,
        GRACEFUL, RESTART, AWARE, CHECK, LINK, PORT, EXTENDED, MESSAGES, SETKEY,
@@ -66,6 +66,7 @@ bgp_proto_start: proto_start BGP {
      BGP_CFG->error_delay_time_min = 60;
      BGP_CFG->error_delay_time_max = 300;
      BGP_CFG->enable_refresh = 1;
+     BGP_CFG->enable_enhanced_refresh = 1;
      BGP_CFG->enable_as4 = 1;
      BGP_CFG->enable_hostname = 0;
      BGP_CFG->capabilities = 2;
@@ -189,6 +190,7 @@ bgp_proto:
  | bgp_proto DISABLE AFTER ERROR bool ';' { BGP_CFG->disable_after_error = $5; }
  | bgp_proto DISABLE AFTER CEASE bgp_cease_mask ';' { BGP_CFG->disable_after_cease = $5; }
  | bgp_proto ENABLE ROUTE REFRESH bool ';' { BGP_CFG->enable_refresh = $5; }
+ | bgp_proto ENABLE ENHANCED ROUTE REFRESH bool ';' { BGP_CFG->enable_enhanced_refresh = $6; }
  | bgp_proto ENABLE AS4 bool ';' { BGP_CFG->enable_as4 = $4; }
  | bgp_proto ENABLE EXTENDED MESSAGES bool ';' { BGP_CFG->enable_extended_messages = $5; }
  | bgp_proto ADVERTISE HOSTNAME bool ';' { BGP_CFG->enable_hostname = $4; }
index 406d210589474d47cf8c963453effb30b5b82e4f..2b74a103c45e084cabf0c7e03379bde320d02987 100644 (file)
@@ -237,7 +237,7 @@ bgp_prepare_capabilities(struct bgp_conn *conn)
   caps->as4_support = p->cf->enable_as4;
   caps->ext_messages = p->cf->enable_extended_messages;
   caps->route_refresh = p->cf->enable_refresh;
-  caps->enhanced_refresh = p->cf->enable_refresh;
+  caps->enhanced_refresh = p->cf->enable_enhanced_refresh;
   caps->role = p->cf->local_role;
 
   if (caps->as4_support)