When checking for a duplicate interface in an other NETNS, one may find
an interface in default VRF. That interface may have been moved to that
default VRF, for further action. Prevent from doing any action at this
point.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
other_ifp = if_lookup_by_name_not_ns(ns_id, ifp->name);
if (!other_ifp)
return;
+ /* because previous interface may be inactive,
+ * interface is moved back to default vrf
+ * then one may find the same pointer; ignore
+ */
+ if (other_ifp == ifp)
+ return;
if ((cmd == RTM_NEWLINK)
&& (CHECK_FLAG(other_ifp->status, ZEBRA_INTERFACE_ACTIVE)))
return;