From f57c2a72e4cd2976000aa1caabeace340852d035 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 4 Aug 2021 01:22:27 +0200 Subject: [PATCH] doc/demo.sh: Pick IPv6 interface only if it has a nexthop route Signed-off-by: Stefano Brivio --- doc/demo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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#*/}; }