On Friday 12 February 2016 16:25:36 Andrew Lunn wrote:
/**
- 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.
This basically has nothing to do with your original patchset. It is only to fix the problem reported some time ago and nothing else. I have extracted this part of the patch only because you suggested this approach and Antonio wanted to submit it to net.git
Lets discuss the rest in the correct thread.
Kind regards, Sven