From: Ian Kelling Date: Tue, 29 Dec 2020 22:24:55 +0000 (-0500) Subject: fix for gateway change X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=06e6cf7edb4f03cd47ebe21d4e7f83912a7b9eaf;p=newns fix for gateway change --- diff --git a/newns b/newns index 894ac31..7e3bf2b 100755 --- a/newns +++ b/newns @@ -176,25 +176,12 @@ dexec() { ip netns exec default "$@"; } mexec() { /usr/bin/nsenter --mount=/root/mount_namespaces/$nn "$@"; } -# background: head -n1 is defensive. Not sure if there is some weird feature -# for 2 routes to be 0/0. -gateway_ifs=($(ipd route list exact 0/0 | head -n1| sed -r 's/.*dev\s+(\S+).*/\1/')) - -if [[ ! $gateway_ifs ]]; then - cat >&2 <