[ovs-dev] [PATCH] linux: disable netns support for tap.

Ben Pfaff blp at ovn.org
Thu Jun 14 22:58:21 UTC 2018


On Thu, Jun 07, 2018 at 04:33:39PM +0200, Eelco Chaudron wrote:
> On 07/06/18 16:11, Flavio Leitner wrote:
> >Tap device is not added to the kernel datapath, so there is
> >no way to get netns information.
> >
> >Reported-by: Eelco Chaudron <echaudro at redhat.com>
> >Signed-off-by: Flavio Leitner <fbl at redhat.com>
> >---
> >  lib/netdev-linux.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> >diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
> >index 10c1e4386..4c37d945a 100644
> >--- a/lib/netdev-linux.c
> >+++ b/lib/netdev-linux.c
> >@@ -604,7 +604,11 @@ static int
> >  netdev_linux_netnsid_update(struct netdev_linux *netdev)
> >  {
> >      if (netnsid_is_unset(netdev->netnsid)) {
> >-        return netdev_linux_netnsid_update__(netdev);
> >+        if (netdev_get_class(&netdev->up) == &netdev_tap_class) {
> >+            netnsid_set_local(&netdev->netnsid);
> >+        } else {
> >+            return netdev_linux_netnsid_update__(netdev);
> >+        }
> >      }
> >      return 0;
> 
> Acked-by: Eelco Chaudron <echaudro at redhat.com>
> Tested-by: Eelco Chaudron <echaudro at redhat.com>

Thanks Flavio (and Eelco).  I applied this to master. 


More information about the dev mailing list