summaryrefslogtreecommitdiff
path: root/slirp/arp_table.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-11-19 09:27:24 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-19 09:27:24 -0600
commita36e9561283e91a17cbc451835b99db35424c34b (patch)
treef46f867344113793565efca2b3dd8b1572fec8e5 /slirp/arp_table.c
parent2954525b3b8474fa1d637dd3822ab35c95596856 (diff)
parent63d2960bc46f63137d7fbd5ff56b81e54710d195 (diff)
downloadqemu-a36e9561283e91a17cbc451835b99db35424c34b.tar.gz
qemu-a36e9561283e91a17cbc451835b99db35424c34b.tar.bz2
qemu-a36e9561283e91a17cbc451835b99db35424c34b.zip
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
* kiszka/queues/slirp: slirp: Add domain-search option to slirp's DHCP server slirp: Don't crash on packets from 0.0.0.0/8. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/arp_table.c')
-rw-r--r--slirp/arp_table.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/slirp/arp_table.c b/slirp/arp_table.c
index 5d7b8acd1d..bf698c1ac5 100644
--- a/slirp/arp_table.c
+++ b/slirp/arp_table.c
@@ -38,7 +38,9 @@ void arp_table_add(Slirp *slirp, uint32_t ip_addr, uint8_t ethaddr[ETH_ALEN])
ethaddr[3], ethaddr[4], ethaddr[5]));
/* Check 0.0.0.0/8 invalid source-only addresses */
- assert((ip_addr & htonl(~(0xf << 28))) != 0);
+ if ((ip_addr & htonl(~(0xf << 28))) == 0) {
+ return;
+ }
if (ip_addr == 0xffffffff || ip_addr == broadcast_addr) {
/* Do not register broadcast addresses */