aboutgitcodebugslistschat
path: root/test/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'test/dhcp')
-rw-r--r--test/dhcp/passt3
-rw-r--r--test/dhcp/pasta3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/dhcp/passt b/test/dhcp/passt
index f45227a..11e0eb3 100644
--- a/test/dhcp/passt
+++ b/test/dhcp/passt
@@ -17,6 +17,7 @@ htools ip jq sed tr head
test Interface name
gout IFNAME ip -j link show | jq -rM '.[] | select(.link_type == "ether").ifname'
hout HOST_IFNAME ip -j -4 route show|jq -rM '[.[] | select(.dst == "default").dev] | .[0]'
+hout HOST_IFNAME6 ip -j -6 route show|jq -rM '[.[] | select(.dst == "default").dev] | .[0]'
check [ -n "__IFNAME__" ]
test DHCP: address
@@ -49,7 +50,7 @@ check [ "__SEARCH__" = "__HOST_SEARCH__" ]
test DHCPv6: address
guest /sbin/dhclient -6 __IFNAME__
gout ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.prefixlen == 128).local'
-hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[] | select(.scope == "global").local'
+hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME6__").addr_info[] | select(.scope == "global").local'
check [ "__ADDR6__" = "__HOST_ADDR6__" ]
test DHCPv6: route
diff --git a/test/dhcp/pasta b/test/dhcp/pasta
index 65b1d42..076ec8d 100644
--- a/test/dhcp/pasta
+++ b/test/dhcp/pasta
@@ -35,8 +35,9 @@ check [ __MTU__ = 65520 ]
test DHCPv6: address
ns /sbin/dhclient -6 --no-pid __IFNAME__
+hout HOST_IFNAME6 ip -j -6 route show|jq -rM '[.[] | select(.dst == "default").dev] | .[0]'
nsout ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.prefixlen == 128).local'
-hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope == "global").local'
+hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME6__").addr_info[] | select(.scope == "global").local'
check [ __ADDR6__ = __HOST_ADDR6__ ]
test DHCPv6: route