Commit b346c0c8 authored by Paolo Pisati's avatar Paolo Pisati Committed by David S. Miller

selftest: txtimestamp: fix net ns entry logic

According to 'man 8 ip-netns', if `ip netns identify` returns an empty string,
there's no net namespace associated with current PID: fix the net ns entrance
logic.
Signed-off-by: default avatarPaolo Pisati <paolo.pisati@canonical.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 785ed9c3
......@@ -75,7 +75,7 @@ main() {
fi
}
if [[ "$(ip netns identify)" == "root" ]]; then
if [[ -z "$(ip netns identify)" ]]; then
./in_netns.sh $0 $@
else
main $@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment