diff options
author | Thomas Huth <thuth@redhat.com> | 2019-04-05 17:58:09 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-04-10 16:03:00 +1000 |
commit | 273d9ce14b23ea42fb55fcd851f78abb0d9ec182 (patch) | |
tree | 482c6e4b06768a065ccf6c78d9e273eb93cc8308 /VERSION | |
parent | a5b428e1c1eae703bdd62a3f527223c291ee3fdc (diff) | |
download | SLOF-273d9ce14b23ea42fb55fcd851f78abb0d9ec182.zip SLOF-273d9ce14b23ea42fb55fcd851f78abb0d9ec182.tar.gz SLOF-273d9ce14b23ea42fb55fcd851f78abb0d9ec182.tar.bz2 |
libnet: Correctly re-initialize the "ip_version" variable each time
I recently noticed that if you start QEMU with two NICs, and only
want to boot from the second NIC, SLOF only tries to get an IP
address via DHCPv6 instead of trying both, DHCPv4 and DHCPv6. For
example:
$ qemu-system-ppc64 -nic hubport,hubid=1 \
-nic user,model=virtio,tftp=/.../tftp,bootfile=zImage.pseries
[...]
Trying to load: from: /vdevice/l-lan@71000002 ...
Initializing NIC
Reading MAC address from device: 52:54:00:12:34:56
Requesting information via DHCP: 007
Aborted
E3001 (net) Could not get IP address
Trying to load: from: /pci@800000020000000/ethernet@0 ...
Initializing NIC
Reading MAC address from device: 52:54:00:12:34:57
Requesting information via DHCPv6: done
Using IPv6 address: fec0::5254:ff:fe12:3457
The problem is that we never re-initialize the "ip_version" variable
anymore, so once it has been set to 6, it stays at 6 for the second
network boot attempt, too. Thus reset the variable to 4 at the beginning
of the netload() function.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions