This replaces some local variable types and some function parameters from
signed to unsigned to fix gcc warnings.
Tested DHCP+TFTP on both IPv4 and IPv6.
The make command used to test:
make qemu WARNFLAGS=-Wextra
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
This restyles function prototypes:
- return types on the same line;
- opening brace is on the next line.
VIM configs used for this was:
set noexpandtab
set tabstop=8
set shiftwidth=4
set cino=:0,(0
This replaces [><]* with "*" as >< are also used to resolve merge
conflicts.
This removes trailing spaces.
This removes some redundant braces.
This should cause no behavioural change.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Generate a proper transaction ID before sending DHCPv4 packets
and check whether the DHCPv4 replies contain that correct XID, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
With module layer cleanup, and a fixed socket() call, start using the
fd across the network stack.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Include DHCPARCH define in the FLAG variable
Set the flag, so that dhcp request would contain DHCPARCH
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Added support for the DHCP request to include the code 93 architecture
code. This is needed so the responding dhcp server, knows what
filename it should return for the system to netboot. Set the
qemu-board DHCPARCH type to 0x0c which is the correct value for slof.
Signed-off-by: Blake Rouse <blake.rouse@canonical.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Sometimes the bootp reply message from a dhcp nak packet is passed to bootloader
(grub2) through "bootp-response" property. Grub2 does not verify if it is an
ack or nak packet and goes on picking up the server ip address from the message.
This makes grub2 unable to make further communication. The workaround here is
made to avoid this situation by copying the bootp reply message only when it is
from dhcp ack packet.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To boot from an IPv6 network user has to type "boot net:ipv6" from SLOF prompt. This
is inconvenient in auto-install environment. This patch addresses this issue by falling
back to IPv6 booting in case IPv4 booting fails (No DHCPv4 response).
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>