1
0
Fork 0
mirror of https://passt.top/passt synced 2025-05-25 02:25:34 +02:00

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>
This commit is contained in:
David Gibson 2022-06-10 12:32:44 +10:00 committed by Stefano Brivio
parent ca0c33ae5b
commit e48373382f
4 changed files with 8 additions and 16 deletions
test/lib

View file

@ -144,7 +144,7 @@ setup_passt_in_ns() {
pane_run NS "ip -j link show | jq -rM '.[] | select(.link_type == \"ether\").ifname'"
pane_wait NS
__ifname="$(pane_parse NS)"
pane_run NS "/sbin/udhcpc -i ${__ifname}"
pane_run NS "/sbin/dhclient -4 --no-pid ${__ifname}"
pane_status NS
sleep 2
pane_run NS "/sbin/dhclient -6 --no-pid ${__ifname}"
@ -232,8 +232,8 @@ setup_two_guests() {
pane_wait PASST_1
__ifname="$(pane_parse PASST_1)"
pane_run GUEST_1 "/sbin/udhcpc -i ${__ifname}"
pane_run GUEST_2 "/sbin/udhcpc -i ${__ifname}"
pane_run GUEST_1 "/sbin/dhclient -4 ${__ifname}"
pane_run GUEST_2 "/sbin/dhclient -4 ${__ifname}"
pane_status GUEST_1
pane_status GUEST_2
sleep 2