diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-03-24 15:30:35 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-24 15:30:35 +0000 |
| commit | 80f072e4a70419addbdfffa2076b3eadcf598c78 (patch) | |
| tree | c9ced97c64ac82d58c65cb3973ff7d062706f3c9 /scripts | |
| parent | b91b896d8028d4be878d653a5620c66549fadba5 (diff) | |
| parent | 1fa032a37cd7a8ee6dff899c6a298e665840cea6 (diff) | |
| download | vyos-build-80f072e4a70419addbdfffa2076b3eadcf598c78.tar.gz vyos-build-80f072e4a70419addbdfffa2076b3eadcf598c78.zip | |
Merge pull request #1145 from hedrok/T8273-fix-ospfv3-no-bdr
T8273: FRR ospfv3: fix LSA when no new BDR elected + remove already merged patch
Diffstat (limited to 'scripts')
2 files changed, 62 insertions, 83 deletions
diff --git a/scripts/package-build/frr/patches/frr/0018-zebra-Ensure-FRR-does-not-see-duplicate-local-routes.patch b/scripts/package-build/frr/patches/frr/0018-zebra-Ensure-FRR-does-not-see-duplicate-local-routes.patch deleted file mode 100644 index f6d033ae..00000000 --- a/scripts/package-build/frr/patches/frr/0018-zebra-Ensure-FRR-does-not-see-duplicate-local-routes.patch +++ /dev/null @@ -1,83 +0,0 @@ -From bf1312b8e9f65b7e4046760105dce9bace038fad Mon Sep 17 00:00:00 2001 -From: Donald Sharp <sharpd@nvidia.com> -Date: Thu, 12 Feb 2026 12:06:33 -0500 -Subject: [PATCH] zebra: Ensure FRR does not see duplicate local routes on - interface changes - -Currently when a interface is seeing multiple link up events in a row, -we are seeing multiple local routes in the rib: - -r9# show ip route vrf all nexthop-group -% 2026/02/08 23:18:00.371 - -Codes: K - kernel route, C - connected, L - local, S - static, - R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, - T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, - F - PBR, f - OpenFabric, t - Table-Direct, - > - selected route, * - FIB route, q - queued, r - rejected, b - backup - t - trapped, o - offload failure - -IPv4 unicast VRF default: -C>* 11.1.5.0/30 (7) is directly connected, r9-eth0, weight 1, 00:01:52 -L>* 11.1.5.2/32 (7) is directly connected, r9-eth0, weight 1, 00:01:52 -B>* 50.1.1.7/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51 -B>* 50.1.1.8/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51 -L * 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -C * 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -L>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -B>* 50.1.1.10/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:50 -L * 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -C * 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -L>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -B 198.10.1.1/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:46 - -Additionally FRR has made an improper choice about what route should also -be properly selected, because of this decision. The problem stems from -rib_compare_routes in zebra_rib.c already handling the multiple same -connected routes being passed for processing but not for local routes -to be considered the same. Modify the code to make local routes behave -the same here. This is the new result: - -r9# show ip route vrf all nexthop-group -% 2026/02/08 23:18:00.371 - -Codes: K - kernel route, C - connected, L - local, S - static, - R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, - T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, - F - PBR, f - OpenFabric, t - Table-Direct, - > - selected route, * - FIB route, q - queued, r - rejected, b - backup - t - trapped, o - offload failure - -IPv4 unicast VRF default: -C>* 11.1.5.0/30 (7) is directly connected, r9-eth0, weight 1, 00:01:52 -L>* 11.1.5.2/32 (7) is directly connected, r9-eth0, weight 1, 00:01:52 -B>* 50.1.1.7/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51 -B>* 50.1.1.8/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51 -C>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -L>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -B>* 50.1.1.10/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:50 -C>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 -L>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46 - -Fixes: #20337 -Signed-off-by: Donald Sharp <sharpd@nvidia.com> ---- - zebra/zebra_rib.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c -index dd18262554..f27c50e6fb 100644 ---- a/zebra/zebra_rib.c -+++ b/zebra/zebra_rib.c -@@ -1647,7 +1647,7 @@ static bool rib_compare_routes(const struct route_entry *re1, const struct route - * v6 link-locals, and we also support multiple addresses in the same - * subnet on a single interface. - */ -- if (re1->type == ZEBRA_ROUTE_CONNECT && -+ if ((re1->type == ZEBRA_ROUTE_CONNECT || re1->type == ZEBRA_ROUTE_LOCAL) && - (re1->nhe->nhg.nexthop->ifindex == re2->nhe->nhg.nexthop->ifindex)) - return true; - --- -2.39.5 - diff --git a/scripts/package-build/frr/patches/frr/0019-ospf6d-Fix-router-LSA-when-no-new-BDR-elected.patch b/scripts/package-build/frr/patches/frr/0019-ospf6d-Fix-router-LSA-when-no-new-BDR-elected.patch new file mode 100644 index 00000000..9fd57a97 --- /dev/null +++ b/scripts/package-build/frr/patches/frr/0019-ospf6d-Fix-router-LSA-when-no-new-BDR-elected.patch @@ -0,0 +1,62 @@ +From e439e12198474db79ceedfcb34685d6fdc372355 Mon Sep 17 00:00:00 2001 +From: Kyrylo Yatsenko <hedrok@gmail.com> +Date: Thu, 26 Feb 2026 14:38:17 +0200 +Subject: [PATCH] ospf6d: Fix router LSA when no new BDR elected + +When on broadcast network only two routers are eligible to become +Designated Routers, one of them becomes DR (R1), +other one becomes BDR (R2). + +If after that R1 goes down, R2 becomes DR and network has no BDR. + +In this case on all other routers when R1 went down +`ospf6_router_lsa_originate` originates router LSA without this network +description as it has no fully adjacent Designated Router yet (it is not +elected). + +But when R2 is elected as DR, no new router LSA is originated in +`neighbor_change`: it calls `ospf6_interface_state_change`, but state of +interface is unchanged, so it just returns -1. And for all other routers +network doesn't exist. + +Fix this by originating router LSA in `neighbor_change` for this +specific case. + +Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com> +--- + ospf6d/ospf6_interface.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c +index 101d47dd35..dc56ac56cd 100644 +--- a/ospf6d/ospf6_interface.c ++++ b/ospf6d/ospf6_interface.c +@@ -919,6 +919,7 @@ void backup_seen(struct event *thread) + void neighbor_change(struct event *thread) + { + struct ospf6_interface *oi; ++ int ret; + + oi = (struct ospf6_interface *)EVENT_ARG(thread); + assert(oi && oi->interface); +@@ -927,9 +928,14 @@ void neighbor_change(struct event *thread) + zlog_debug("Interface Event %s: [NeighborChange]", + oi->interface->name); + +- if (oi->state == OSPF6_INTERFACE_DROTHER || +- oi->state == OSPF6_INTERFACE_BDR || oi->state == OSPF6_INTERFACE_DR) +- ospf6_interface_state_change(dr_election(oi), oi); ++ if (oi->state == OSPF6_INTERFACE_DROTHER || oi->state == OSPF6_INTERFACE_BDR || ++ oi->state == OSPF6_INTERFACE_DR) { ++ ret = ospf6_interface_state_change(dr_election(oi), oi); ++ ++ /* In this case router LSA is not originated elsewhere */ ++ if (oi->type == OSPF_IFTYPE_BROADCAST && ret == -1 && oi->bdrouter == htonl(0)) ++ OSPF6_ROUTER_LSA_SCHEDULE(oi->area); ++ } + } + + void interface_down(struct event *thread) +-- +2.51.2 + |
