Merge pull request #5219 from pguibert6WIND/interface_same_name

staticd: check tuple (vrf, name) when interface events received
This commit is contained in:
Donatas Abraitis 2019-10-24 17:01:56 +03:00 committed by GitHub
commit 3f8aebe012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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