Commit 1978c43450 for frr
commit 1978c43450403b1c150c147cf7c54bf674bf8c48
Author: Lee Clements <lclements0@gmail.com>
Date: Wed Sep 16 02:00:33 2026 -0400
eigrpd: fix teardown when a same-subnet secondary address is deleted
eigrp_interface_address_delete() resolves the running instance by
interface and then gates teardown on
prefix_cmp(&ei->address, c->address) == 0
prefix_cmp() compares only the first prefixlen bits, so for two
addresses in the same subnet -- 10.0.1.1/24 and 10.0.1.2/24 -- it
returns 0. eigrp_network_run_interface() skips ZEBRA_IFA_SECONDARY, so
only the primary address ever has an instance; deleting a same-subnet
secondary therefore tore EIGRP down on an interface whose primary was
still configured, and nothing restarted it.
Compare the full address with prefix_same() instead.
Signed-off-by: Lee Clements <lclements0@gmail.com>
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index 5021bb8c86..0b43be7880 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -172,8 +172,16 @@ static int eigrp_interface_address_delete(ZAPI_CALLBACK_ARGS)
ifp = c->ifp;
ei = eigrp_if_lookup_by_ifp(ifp);
- /* Call interface hook functions to clean up */
- if (ei && prefix_cmp(&ei->address, c->address) == 0)
+ /*
+ * Call interface hook functions to clean up.
+ *
+ * prefix_cmp() compares only the first prefixlen bits, so it reports
+ * two addresses in the same subnet as equal. Deleting a secondary
+ * address therefore tore EIGRP down on an interface whose primary
+ * address was still configured, and nothing restarted it. Compare
+ * the full address instead.
+ */
+ if (ei && prefix_same(&ei->address, c->address))
eigrp_if_free(ei, INTERFACE_DOWN_BY_ZEBRA);
/*