tap: Fix tap create with ns 94/33794/3
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>
Wed, 22 Sep 2021 15:46:02 +0000 (17:46 +0200)
committerBeno�t Ganne <bganne@cisco.com>
Wed, 29 Sep 2021 14:01:29 +0000 (14:01 +0000)
commit979545e79579bdc6fe3cb2d3cfd0036c588acb32
treee83d87436506d081a5c1e78c1fa2fe3368de2b3c
parent814eee55faa81252e50b7e4108d93bbb67aa4c3a
tap: Fix tap create with ns

This fixes the interface creation passing
a netns. [0] made the renaming of the new
tuntap interface before switching netns
Thus, preventing creating an interface in
another netns if one exists in VPP's netns
with the same name.
This also fixes restore netns on errors

Type: fix

[0] https://gerrit.fd.io/r/c/vpp/+/33696

Change-Id: I5c83bb37d664057bcf231cd0c636f0e51aa542ad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
src/vnet/devices/tap/tap.c