From e3c0eca95642a846ab65261424a51dd99d954017 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 23 Aug 2023 15:55:31 +0200 Subject: Nest: Treat VRF interfaces as inside respective VRFs Despite not having defined 'master interface', VRF interfaces should be treated as being inside respective VRFs. They behave as a loopback for respective VRFs. Treating the VRF interface as inside the VRF allows e.g. OSPF to pick up IP addresses defined on the VRF interface. For this, we also need to tell apart VRF interfaces and regular interfaces. Extend Netlink code to parse interface type and mark VRF interfaces with IF_VRF flag. Based on the patch from Erin Shepherd, thanks! --- proto/babel/babel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proto/babel') diff --git a/proto/babel/babel.c b/proto/babel/babel.c index 7f0cca73..4187d258 100644 --- a/proto/babel/babel.c +++ b/proto/babel/babel.c @@ -2062,7 +2062,7 @@ 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) + if (p->p.vrf_set && !if_in_vrf(iface, p->p.vrf)) continue; if (!(iface->flags & IF_UP)) -- cgit v1.2.3