diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-06-10 12:32:44 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-06-15 09:38:10 +0200 |
commit | e48373382f7c84175a0f61890e8f0164cdd2d329 (patch) | |
tree | 513610472a9536e965ecd7b8b8a1dbca7b8c568f /test/dhcp | |
parent | ca0c33ae5b8a68806dd1c766e2f58ce24867f334 (diff) | |
download | passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar.gz passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar.bz2 passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar.lz passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar.xz passt-e48373382f7c84175a0f61890e8f0164cdd2d329.tar.zst passt-e48373382f7c84175a0f61890e8f0164cdd2d329.zip |
Use dhclient instead of udhcpc
For some reason, the passt/pasta tests and examples use dhclient for
DHCPv6, but in most cases use udhcpc for DHCPv4. Change it to use dhclient
for both DHCPv4 and DHCPv6. This means one less tool we need for testing,
plus dhclient is easily available on Fedora whereas udhcpc is not.
Note that the passt tests still rely on udhcpc indirectly because mbuto
wants to put it into the guest images it generates.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/dhcp')
-rw-r--r-- | test/dhcp/pasta | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dhcp/pasta b/test/dhcp/pasta index e76454a..4652d09 100644 --- a/test/dhcp/pasta +++ b/test/dhcp/pasta @@ -12,7 +12,7 @@ # Author: Stefano Brivio <sbrivio@redhat.com> onlyfor pasta -nstools ip jq /sbin/udhcpc /sbin/dhclient +nstools ip jq /sbin/dhclient htools ip jq test Interface name @@ -20,7 +20,7 @@ nsout IFNAME ip -j link show | jq -rM '.[] | select(.link_type == "ether").ifnam check [ -n "__IFNAME__" ] test DHCP: address -ns /sbin/udhcpc -i __IFNAME__ +ns /sbin/dhclient -4 --no-pid __IFNAME__ nsout ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[0].local' hout HOST_ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[0].local' check [ __ADDR__ = __HOST_ADDR__ ] |