From: Maria Matejka Date: Mon, 7 Nov 2022 09:24:56 +0000 (+0100) Subject: Merge commit '8f79e6b9' into thread-next X-Git-Tag: v3.0-alpha1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54179a1ab38542e7087db37bfe3de9d32886c78e;p=thirdparty%2Fbird.git Merge commit '8f79e6b9' into thread-next --- 54179a1ab38542e7087db37bfe3de9d32886c78e diff --cc nest/rt-table.c index 8980f147f,cb8c56a61..f4ca91707 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@@ -4727,19 -3594,16 +4727,20 @@@ rt_update_hostcache(void *data } if (rt_update_hostentry(tab, he)) - rt_schedule_nhu(he->tab); + nhu_pending[he->tab->id] = he->tab; } + } - tab->hcu_scheduled = 0; + for (uint i=0; ihostcache) diff --cc proto/bgp/config.Y index 9f0d23066,2294119ea..b4edf2c5f --- a/proto/bgp/config.Y +++ b/proto/bgp/config.Y @@@ -29,9 -30,9 +29,9 @@@ 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) + RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, PREFER, GLOBAL) %type bgp_nh %type bgp_afi diff --cc proto/bgp/packets.c index f9c1da413,c464e9c7e..506268c96 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@@ -1028,13 -1020,13 +1028,15 @@@ bgp_apply_next_hop(struct bgp_parse_sta WITHDRAW(BAD_NEXT_HOP " - zero address"); rtable *tab = ipa_is_ip4(gw) ? c->igp_table_ip4 : c->igp_table_ip6; + ip_addr lla = (c->cf->next_hop_prefer == NHP_LOCAL) ? ll : IPA_NONE; - s->hostentry = rt_get_hostentry(tab, gw, lla, c->c.table); - - if (!s->mpls) - rta_apply_hostentry(a, s->hostentry, NULL); + - /* With MPLS, hostentry is applied later in bgp_apply_mpls_labels() */ + if (s->mpls) + { + u32 labels[BGP_MPLS_MAX]; - ea_set_hostentry(to, c->c.table, tab, gw, ll, BGP_MPLS_MAX, labels); ++ ea_set_hostentry(to, c->c.table, tab, gw, lla, BGP_MPLS_MAX, labels); + } + else - ea_set_hostentry(to, c->c.table, tab, gw, ll, 0, NULL); ++ ea_set_hostentry(to, c->c.table, tab, gw, lla, 0, NULL); } }