Revision dbf3c4b4
b/slirp/slirp.c | ||
---|---|---|
599 | 599 |
{ |
600 | 600 |
struct ethhdr *eh = (struct ethhdr *)pkt; |
601 | 601 |
struct arphdr *ah = (struct arphdr *)(pkt + ETH_HLEN); |
602 |
uint8_t arp_reply[ETH_HLEN + sizeof(struct arphdr)];
|
|
602 |
uint8_t arp_reply[max(ETH_HLEN + sizeof(struct arphdr), 64)];
|
|
603 | 603 |
struct ethhdr *reh = (struct ethhdr *)arp_reply; |
604 | 604 |
struct arphdr *rah = (struct arphdr *)(arp_reply + ETH_HLEN); |
605 | 605 |
int ar_op; |
... | ... | |
619 | 619 |
} |
620 | 620 |
return; |
621 | 621 |
arp_ok: |
622 |
memset(arp_reply, 0, sizeof(arp_reply)); |
|
622 | 623 |
/* XXX: make an ARP request to have the client address */ |
623 | 624 |
memcpy(slirp->client_ethaddr, eh->h_source, ETH_ALEN); |
624 | 625 |
|
Also available in: Unified diff