]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '6a55359b1' into thread-next
authorMaria Matejka <mq@ucw.cz>
Mon, 10 Mar 2025 09:16:50 +0000 (10:16 +0100)
committerMaria Matejka <mq@ucw.cz>
Mon, 10 Mar 2025 09:16:50 +0000 (10:16 +0100)
1  2 
doc/bird.sgml
lib/birdlib.h
proto/bgp/attrs.c
proto/bgp/bgp.c
proto/bgp/bgp.h
proto/bgp/config.Y
proto/bgp/packets.c

diff --cc doc/bird.sgml
Simple merge
diff --cc lib/birdlib.h
Simple merge
Simple merge
diff --cc proto/bgp/bgp.c
index 859f7bc167712d67c0c9fd156fe93f63f580a8a0,c18a73feb21b63b5a90c6a401710b0f4938d3c40..0e610c9e0d268e667f500955db18accc48c7194a
@@@ -978,29 -806,13 +979,32 @@@ bgp_handle_graceful_restart(struct bgp_
    /* p->gr_ready -> at least one active channel is c->gr_ready */
    ASSERT(p->gr_active_num > 0);
  
+   uint gr_time = CLAMP(p->conn->remote_caps->gr_time,
+                      p->cf->min_gr_time, p->cf->max_gr_time);
    proto_notify_state(&p->p, PS_START);
-   tm_start_in(p->gr_timer, p->conn->remote_caps->gr_time S, p->p.loop);
 -  tm_start(p->gr_timer, gr_time S);
++  tm_start_in(p->gr_timer, gr_time S, p->p.loop);
 +}
 +
 +
 +static void
 +bgp_graceful_restart_feed(struct bgp_channel *c)
 +{
 +  c->stale_feed = (struct rt_export_feeder) {
 +    .name = mb_sprintf(c->c.proto->pool, "%s.%s.llgr", c->c.proto->name, c->c.name),
 +    .trace_routes = c->c.debug,
 +  };
 +  c->stale_event = (event) {
 +    .hook = bgp_rte_modify_stale,
 +    .data = c,
 +  };
 +
 +  rt_feeder_subscribe(&c->c.table->export_all, &c->stale_feed);
 +  proto_send_event(c->c.proto, &c->stale_event);
  }
  
 +
 +
  /**
   * bgp_graceful_restart_done - finish active BGP graceful restart
   * @c: BGP channel
diff --cc proto/bgp/bgp.h
index dac6e84eaa415792c0347bb07cc909dc999c84ef,bd6fe2de4b9033288a7a9485eac0f9bb821bb1ec..4b1f75ba6fa65722ce262f6034406fd52d7414b7
@@@ -145,8 -150,7 +149,8 @@@ struct bgp_config 
    int require_extended_messages;      /* Require remote support for extended messages [RFC 8654] */
    int require_hostname;                       /* Require remote support for hostname [draft] */
    int require_gr;                     /* Require remote support for graceful restart [RFC 4724] */
-   int require_llgr;                   /* Require remote support for long-lived graceful restart [draft] */
+   int require_llgr;                   /* Require remote support for long-lived graceful restart [RFC 9494] */
 +  uint tx_size_warning;                       /* The maximum amount of memory which is not logged as warning */
    struct bfd_options *bfd;            /* Use BFD for liveness detection */
  };
  
index aafd44ff75fe0e378345cd7112f9207ee9a41c4d,222879e94a8e29d539b2bc2ed4b549aa98897e90..4892eeaac198fe503b4aa55eb823d4ba1d841345
@@@ -29,11 -30,9 +29,12 @@@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, H
        GRACEFUL, RESTART, AWARE, CHECK, LINK, PORT, EXTENDED, MESSAGES, SETKEY,
        STRICT, BIND, CONFEDERATION, MEMBER, MULTICAST, FLOW4, FLOW6, LONG,
        LIVED, STALE, IMPORT, IBGP, EBGP, MANDATORY, INTERNAL, EXTERNAL, SETS,
 -      DYNAMIC, RANGE, NAME, DIGITS, BGP_AIGP, AIGP, ORIGINATE, COST, ENFORCE,
 +      DYNAMIC, RANGE, NAME, DIGITS, AIGP, ORIGINATE, COST, ENFORCE,
        FIRST, FREE, VALIDATE, BASE, ROLE, ROLES, PEER, PROVIDER, CUSTOMER,
-       RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, GLOBAL, SEND, TX, SIZE, WARNING)
 -      RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, GLOBAL, SEND, MIN, MAX)
++      RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, GLOBAL, SEND, TX, SIZE, WARNING,
++      MIN, MAX)
 +
 +CF_ENUM(T_ENUM_BGP_ORIGIN, ORIGIN_, IGP, EGP, INCOMPLETE)
  
  %type <i> bgp_nh
  %type <i32> bgp_afi
@@@ -267,8 -271,9 +276,10 @@@ bgp_channel_start: bgp_af
      BGP_CC->gr_able = 0xff;   /* undefined */
      BGP_CC->llgr_able = 0xff; /* undefined */
      BGP_CC->llgr_time = ~0U;  /* undefined */
+     BGP_CC->min_llgr_time = ~0U; /* undefined */
+     BGP_CC->max_llgr_time = ~0U; /* undefined */
      BGP_CC->aigp = 0xff;      /* undefined */
 +    BGP_CC->ptx_exporter_settle = (struct settle_config) { 10 MS_, 100 MS_ };
    }
  };
  
Simple merge