]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge branch '280-mq-nexthop' into HEAD thread-next
authorMaria Matejka <mq@ucw.cz>
Fri, 18 Jul 2025 11:18:36 +0000 (13:18 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 18 Jul 2025 11:18:36 +0000 (13:18 +0200)
1  2 
.gitlab-ci.yml
misc/gitlab/data.yml.j2
proto/bgp/bgp.c

diff --cc .gitlab-ci.yml
Simple merge
Simple merge
diff --cc proto/bgp/bgp.c
index 2c10737f21e8ab2d845e3e5da698e37197036422,5998a8482623d3329bdc70f242f66ff698ad25de..e4832475207a8fff88d0ecbc3747990e757c1559
@@@ -3224,31 -2839,31 +3224,34 @@@ bgp_channel_reconfigure(struct channel 
        (new->cost != old->cost) ||
        (new->c.preference != old->c.preference))
    {
 -    /* Route refresh needed, these attributes are set by BGP itself
 -     * and even if import table exists, we can't use it */
 -
 -    /* Route refresh impossible, restart is needed */
 -    if ((c->c.channel_state == CS_UP) && !p->route_refresh)
 -      return 0;
 -
 -    /* Force ROUTE_REFRESH with import table; otherwise
 -     * it will be forced by import_changed set to 1 later */
 -    if (c->c.in_table && (c->c.channel_state == CS_UP))
 -      bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);
 -
 -    /* Note that preference is already handled in channel_reconfigure(),
 -       but we need it handle again here for the ROUTE_REFRESH trigger */
 +    /* If import table is active we have to flush it */
 +    if ((c->c.in_keep & RIK_PREFILTER) == RIK_PREFILTER)
 +    {
 +      if (p->route_refresh)
 +      {
 +      if (c->c.channel_state == CS_UP)
 +      {
 +        bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);
 +        log(L_INFO "Reloading channel %s.%s for import by route refresh", p->p.name, c->c.name);
 +      }
 +      }
 +      else
 +      /* Route refresh not possible, restart needed */
 +      return 0;
 +    }
  
 -    *import_changed = 1;
 +    /* Otherwise we just do complete reload */
 +    else
 +      *import_changed = 1;
    }
  
+   /* Outgoing next hop setting is too complex to update, forcing restart. */
    if (!ipa_equal(new->next_hop_addr, old->next_hop_addr) ||
        (new->next_hop_self != old->next_hop_self) ||
-       (new->next_hop_keep != old->next_hop_keep) ||
-       (new->llnh_format != old->llnh_format) ||
+       (new->next_hop_keep != old->next_hop_keep))
+     return 0;
+   if ((new->llnh_format != old->llnh_format) ||
        (new->aigp != old->aigp) ||
        (new->aigp_originate != old->aigp_originate))
      *export_changed = 1;