u-boot-brain/net
Bernhard Kaindl 6dc809f407 net/dns.c: Fix endian conversion for big-endian in dns command
net/dns.c used endian conversion macros wrongly (shorts in reply
were put swapped into CPU, and then ntohs() was used to swap it
back, which broke on big-endian).

Fix this by using the correct linux conversion macro for reading
a unaligned short in network byte order: get_unaligned_be16()
Thanks to Mike Frysinger pointing at the best macro to use.

Tested on big and little endian qemu boards (mips and versatile)

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@thalesgroup.com>
Cc: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23 23:34:19 +02:00
..
bootp.c net: bootp: add PXE/RFC 4578 DHCP options support 2011-10-17 22:25:35 +02:00
bootp.h net: express the first argument to NetSetTimeout() in milliseconds 2008-10-18 21:54:00 +02:00
dns.c net/dns.c: Fix endian conversion for big-endian in dns command 2011-10-23 23:34:19 +02:00
dns.h Add DNS support 2009-07-22 22:53:44 -07:00
eth.c net: drop !NET_MULTI code 2011-10-05 22:22:16 +02:00
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
net.c net: drop !NET_MULTI code 2011-10-05 22:22:16 +02:00
nfs.c net: drop !NET_MULTI code 2011-10-05 22:22:16 +02:00
nfs.h nfs: accept CONFIG_NFS_READ_SIZE from config file 2009-08-25 13:35:54 -07:00
rarp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
rarp.h Initial revision 2002-07-20 20:14:13 +00:00
sntp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
sntp.h * Patch by Masami Komiya, 30 Mar 2005: 2005-04-01 00:25:43 +00:00
tftp.c net: drop !NET_MULTI code 2011-10-05 22:22:16 +02:00
tftp.h TFTP: net/tftp.c: add server mode receive 2011-05-19 21:38:26 +02:00