qemu-e2k/slirp
David Gibson 90d7416ab1 slirp: Fix assertion failure on rejected DHCP requests
The guest network stack might DHCPREQUEST an address that the slirp built
in dhcp server can't let it have - for example if the guest has an old
leases file from another network configuration.  In this case the dhcp
server should and does reject the request and prepares to send a DHCPNAK
to the client.

However, in this case the daddr variable in bootp_reply() is set to
0.0.0.0.  Shortly afterwards, it unconditionally attempts to pre-insert the
new client address into the ARP table.  This causes an assertion failure in
arp_address_add() because of the 0.0.0.0 address.

According to RFC2131, DHCPNAK messages for clients on the same subnet
must be sent to the broadcast address (S3.2, subpoint 2).

Cc: Jan Kiszka <jan.kiszka@siemens.com>

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-02-27 14:55:07 +01:00
..
arp_table.c
bootp.c slirp: Fix assertion failure on rejected DHCP requests 2012-02-27 14:55:07 +01:00
bootp.h
cksum.c
COPYRIGHT
debug.h
if.c slirp: Refactor if_start 2012-02-27 14:54:49 +01:00
if.h slirp: Clean up ifs_init 2012-02-27 14:54:49 +01:00
ip_icmp.c slirp: Prevent sending ICMP error replies to source-only addresses 2012-02-08 10:07:54 +01:00
ip_icmp.h
ip_input.c
ip_output.c
ip.h
libslirp.h main-loop: create main-loop.c 2011-10-21 18:14:30 +02:00
main.h
mbuf.c
mbuf.h slirp: Clean up ifs_init 2012-02-27 14:54:49 +01:00
misc.c slirp/misc: fix gcc __warn_memset_zero_len warnings 2012-02-24 13:24:42 +00:00
misc.h
sbuf.c
sbuf.h
slirp_config.h
slirp.c
slirp.h
socket.c
socket.h
tcp_input.c slirp: Fix use after release on tcp_input 2011-09-28 13:10:22 +02:00
tcp_output.c
tcp_subr.c Remove blanks before \n in output strings 2011-09-16 08:25:56 -05:00
tcp_timer.c
tcp_timer.h
tcp_var.h
tcp.h
tcpip.h
tftp.c
tftp.h
udp.c
udp.h