netd: setting a proper size of ARP response
authorAdam Turowski <adam.turowski@inf.ethz.ch>
Tue, 18 Oct 2016 11:44:10 +0000 (13:44 +0200)
committerAdam Turowski <adam.turowski@inf.ethz.ch>
Tue, 18 Oct 2016 11:45:52 +0000 (13:45 +0200)
Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

lib/lwip/src/netif/etharp.c

index 007b60b..05dfaab 100644 (file)
@@ -764,6 +764,7 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
                 /* Re-use pbuf to send ARP reply.
                    Since we are re-using an existing pbuf, we can't call etharp_raw since
                    that would allocate a new pbuf. */
+                pbuf_realloc(p, sizeof(struct etharp_hdr));
                 hdr->opcode = htons(ARP_REPLY);
 
                 hdr->dipaddr = hdr->sipaddr;