summaryrefslogtreecommitdiff
path: root/scripts/package-build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package-build')
-rw-r--r--scripts/package-build/frr/patches/frr/0019-ospf6d-Fix-router-LSA-when-no-new-BDR-elected.patch62
1 files changed, 62 insertions, 0 deletions
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
+