]> git.proxmox.com Git - mirror_frr.git/commit
lib: Make if_lookup_by_index understand if VRF is backed by netns or not
authorDinesh G Dutt <5016467+ddutt@users.noreply.github.com>
Mon, 26 Aug 2019 12:38:28 +0000 (12:38 +0000)
committerDinesh G Dutt <5016467+ddutt@users.noreply.github.com>
Mon, 26 Aug 2019 12:38:28 +0000 (12:38 +0000)
commit47b474b57e8ea740e7adf1438ccaae8c93553385
treedd95ce4bc025086156f903510c0cba2ebb5e3604
parent3eb0d26717d86f232e8aa686af292d31ada9f2b1
lib: Make if_lookup_by_index understand if VRF is backed by netns or not

FRR has two implementations of VRF, one backed by netns and the other by
the proper VRF implementation in the Linux kernel. In certain places, the
code assumes that a VRF is netns and so lookups fail. One example of this
is in IPv6 RA code. This causes functionality such as Unnumbered BGP to
fail. To fix this, this patch makes if_lookup_by_index handle the
behavior based on the backend, similar to if_get_by_index. For the two
places in if.c that were calling if_lookup_by_index to be specific to
the VRF, I renamed the existing code, if_lookup_by_ifindex and made it a
static function that is never exposed or called by any routine outside of
if.c.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
lib/if.c