/**
- batadv_mutual_parents - check if two devices are each others parent
- @dev1: 1st net_device
- @dev2: 2nd net_device
- veth devices come in pairs and each is the parent of the other!
- Return: true if the devices are each others parent, otherwise false
- */
+static bool batadv_mutual_parents(const struct net_device *dev1,
const struct net_device *dev2)
+{
- int dev1_parent_iflink = dev_get_iflink(dev1);
- int dev2_parent_iflink = dev_get_iflink(dev2);
- if (!dev1_parent_iflink || !dev2_parent_iflink)
return false;
- return (dev1_parent_iflink == dev2->ifindex) &&
(dev2_parent_iflink == dev1->ifindex);
+}
Hi Sven, et al,
So this is fine for the non netns case.
But what about the netns case? This is mainly a backward compatible issue. It sounds like some of the older kernels you have via compat.h are going to have issues with netns support. What do the maintainers what to do about this? NACK my patches, drop support for some of the older kernels? Something else?
Thanks Andrew