summaryrefslogtreecommitdiff
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2023-01-22 18:12:04 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2023-01-22 18:21:08 +0100
commita82683694da23799f247b3392a00efdd342afdfc (patch)
tree0dab0d2f8d39a56f14bd989912d2364db124e4d9 /proto/ospf/iface.c
parent3186ffe79714a48542d5ad61a94c81216b522fd0 (diff)
VRF: Fix issues with reconfiguration
Protocols receive if_notify() announcements that are filtered according to their VRF setting, but during reconfiguration, they access iface_list directly and forgot to check VRF setting here, which leads to all interfaces be addedd. Fix this issue for Babel, OSPF, RAdv and RIP protocols. Thanks to Marcel Menzel for the bugreport.
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 4cd45033..87e3d95e 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -1227,6 +1227,9 @@ ospf_reconfigure_ifaces2(struct ospf_proto *p)
WALK_LIST(iface, iface_list)
{
+ if (p->p.vrf_set && p->p.vrf != iface->master)
+ continue;
+
if (! (iface->flags & IF_UP))
continue;
@@ -1273,6 +1276,9 @@ ospf_reconfigure_ifaces3(struct ospf_proto *p)
WALK_LIST(iface, iface_list)
{
+ if (p->p.vrf_set && p->p.vrf != iface->master)
+ continue;
+
if (! (iface->flags & IF_UP))
continue;