Commit Graph

11 Commits

Author SHA1 Message Date
Alexey Kardashevskiy f344ef9b22 net-snk: Fix gcc warnings
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>
2016-01-29 17:10:35 +11:00
Alexey Kardashevskiy 253298295e net-snk: Fix coding style
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>
2016-01-29 17:09:58 +11:00
Thomas Huth 33c9899c77 net-snk: Use transaction IDs in DHCPv4, too
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>
2015-12-23 13:01:34 +11:00
Nikunj A Dadhania 8e6f2bba50 net-snk: use socket descriptor in the network stack
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>
2014-10-29 16:17:10 +05:30
Nikunj A Dadhania 7fb8bdae84 dhcparch define missing in compilation
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>
2014-06-12 23:57:12 +05:30
Blake Rouse 37826933b2 dhcp: support client architecture code 93
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>
2014-04-25 15:40:13 +05:30
Avik Sil 259f8bcba8 Workaround to make grub2 assign server ip from dhcp ack packet only
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>
2014-03-18 17:06:49 +11:00
Avik Sil d81ffe71db Enable seamless netboot on IPv6 network
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>
2014-01-20 17:19:47 +05:30
Avik Sil 10bf23ea7c Enable IPv6 support in dns
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-18 06:50:16 +05:30
Stefan Weil d070068574 Spelling fixes in comments and debug messages
Most of these errors were found by codespell:

controler -> controller
appropiate -> appropriate
devide -> divide
comming -> coming
seperate -> separate
reponsible -> responsible
initialization -> initialization
successfull -> successful
whithin -> within
recieve -> receive
wich -> which
occurence -> occurrence
beggining -> beginning
accessable -> accessible
proccess -> process
succesfuly -> successfully
immediatly -> immediately
prefered -> preferred
avaliable -> available
threshhold -> threshold
statistsics -> statistics
endianess -> endianness
positon -> position
writen -> written
occurence -> occurrence
upto -> up to
overwriten -> overwritten
availabe -> available
enviroment -> environment
intruction -> instruction
thru -> through
substract -> subtract
occured -> occurred
begining -> beginning
lenght -> length
atributes -> attributes
preceeding -> preceding
defintion -> definition
decriptor -> descriptor

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-01-04 10:12:48 +05:30
Benjamin Herrenschmidt aaad509cdc Initial import of slof-JX-1.7.0-4
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-12-01 09:51:44 +11:00