make stop tear down correct namespace
authorIan Kelling <iank@fsf.org>
Fri, 28 Jun 2019 19:31:45 +0000 (15:31 -0400)
committerIan Kelling <iank@fsf.org>
Fri, 28 Jun 2019 19:31:45 +0000 (15:31 -0400)
newns

diff --git a/newns b/newns
index 9c9ee67111601ddbedd152d80959462293d22126..dbc922198a5e4e2ee820d70e0e9365cb3c85c036 100755 (executable)
--- a/newns
+++ b/newns
@@ -332,7 +332,7 @@ stop() {
     if nat -C &>/dev/null; then nat -D; fi
   fi
   dexec iptables -D FORWARD -i $v0 -j ACCEPT ||:
-  if $create && [[ -e /var/run/netns/client ]]; then
+  if $create && [[ -e /var/run/netns/$nn ]]; then
     ip netns del $nn
   fi