0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-04-19 21:44:37 +00:00

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.
This commit is contained in:
Ondrej Zajicek 2023-01-22 18:12:04 +01:00 committed by Igor Putovny
parent 279e239210
commit 084f5381f1
4 changed files with 15 additions and 0 deletions
proto

@ -1946,6 +1946,9 @@ babel_reconfigure_ifaces(struct babel_proto *p, struct babel_config *cf)
WALK_LIST(iface, iface_list)
{
if (p->p.vrf_set && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))
continue;

@ -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;

@ -663,6 +663,9 @@ radv_reconfigure(struct proto *P, struct proto_config *CF)
struct iface *iface;
WALK_LIST(iface, iface_list)
{
if (p->p.vrf_set && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))
continue;

@ -797,6 +797,9 @@ rip_reconfigure_ifaces(struct rip_proto *p, struct rip_config *cf)
WALK_LIST(iface, iface_list)
{
if (p->p.vrf_set && p->p.vrf != iface->master)
continue;
if (!(iface->flags & IF_UP))
continue;