Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Paolo Pisati and committed by
David S. Miller
b346c0c8 785ed9c3

+1 -1
+1 -1
tools/testing/selftests/net/txtimestamp.sh
··· 75 75 fi 76 76 } 77 77 78 - if [[ "$(ip netns identify)" == "root" ]]; then 78 + if [[ -z "$(ip netns identify)" ]]; then 79 79 ./in_netns.sh $0 $@ 80 80 else 81 81 main $@