mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 04:25:43 +00:00
staticd: check tuple (vrf, name) when interface events received
with network namespace vrf backend, there is possibilities that the same interface name can be used across two different vrfs. Then, enforce the check when static daemon receives interface events. Adding to the interface name, check for the vrf id, too. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
3e6fd94f83
commit
9eb8b14c85
@ -310,10 +310,14 @@ static void static_ifindex_update_af(struct interface *ifp, bool up, afi_t afi,
|
||||
if (up) {
|
||||
if (strcmp(si->ifname, ifp->name))
|
||||
continue;
|
||||
if (si->nh_vrf_id != ifp->vrf_id)
|
||||
continue;
|
||||
si->ifindex = ifp->ifindex;
|
||||
} else {
|
||||
if (si->ifindex != ifp->ifindex)
|
||||
continue;
|
||||
if (si->nh_vrf_id != ifp->vrf_id)
|
||||
continue;
|
||||
si->ifindex = IFINDEX_INTERNAL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user