From: Tomas Hruby Date: Sat, 13 Oct 2012 21:05:25 +0000 (+0000) Subject: LIBLWIP - ARP fix X-Git-Tag: v3.3.0~1068 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch06.html?a=commitdiff_plain;h=566af1516a903c2d2c80e21d6dbc07737383a03f;p=minix.git LIBLWIP - ARP fix - does not crash KVM anymore --- 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? */