aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-08-04 01:22:27 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-08-04 01:22:27 +0200
commitf57c2a72e4cd2976000aa1caabeace340852d035 (patch)
tree8a2822527a57513ca50be3d70855b874aba45e4a
parentdc169643a45728d697fdce49cd45324e51c8eb01 (diff)
downloadpasst-f57c2a72e4cd2976000aa1caabeace340852d035.tar
passt-f57c2a72e4cd2976000aa1caabeace340852d035.tar.gz
passt-f57c2a72e4cd2976000aa1caabeace340852d035.tar.bz2
passt-f57c2a72e4cd2976000aa1caabeace340852d035.tar.lz
passt-f57c2a72e4cd2976000aa1caabeace340852d035.tar.xz
passt-f57c2a72e4cd2976000aa1caabeace340852d035.tar.zst
passt-f57c2a72e4cd2976000aa1caabeace340852d035.zip
doc/demo.sh: Pick IPv6 interface only if it has a nexthop route
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-xdoc/demo.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/demo.sh b/doc/demo.sh
index 83798ff..06a80b1 100755
--- a/doc/demo.sh
+++ b/doc/demo.sh
@@ -19,7 +19,7 @@ get_token() {
unset IFS
}
-ipv6_dev() { get_token "dev" $(ip -o -6 ro show default); }
+ipv6_dev() { get_token "dev" $(ip -o -6 ro show default | grep via); }
ipv6_devaddr() { get_token "inet6" $(ip -o -6 ad sh dev "${1}" scope global); }
ipv6_ll_addr() { get_token "inet6" $(ip -o -6 ad sh dev "${1}" scope link); }
ipv6_mask() { echo ${1#*/}; }