From 566af1516a903c2d2c80e21d6dbc07737383a03f Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Sat, 13 Oct 2012 21:05:25 +0000 Subject: [PATCH] LIBLWIP - ARP fix - does not crash KVM anymore --- lib/liblwip/netif/etharp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/liblwip/netif/etharp.c b/lib/liblwip/netif/etharp.c index 1b7eb9883..86060a19c 100644 --- a/lib/liblwip/netif/etharp.c +++ b/lib/liblwip/netif/etharp.c @@ -1189,6 +1189,11 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, LWIP_ASSERT("netif != NULL", netif != NULL); + /* Do not send ARP if the source IP is not set. This may cause various + * problems, for instance, triggers an assert in qemu-kvm */ + if (ipsrc_addr->addr == 0) + return ERR_OK; + /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM); /* could allocate a pbuf for an ARP request? */ -- 2.44.0