mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-12-02 22:45:04 +08:00
Save a few bytes here. Also, fill with 0 so that we mirror the BSD gratuitous ARP when adding an address.
This commit is contained in:
parent
da2080fd82
commit
0e94b2aca5
8
net.c
8
net.c
@ -638,10 +638,10 @@ send_arp(const struct interface *iface, int op, in_addr_t sip, in_addr_t tip)
|
||||
p += iface->hwlen;
|
||||
memcpy(p, &sip, sizeof(sip));
|
||||
p += sizeof(sip);
|
||||
/* ARP requests should ignore this, but we fill with 0xff
|
||||
* for broadcast. */
|
||||
memset(p, 0xff, iface->hwlen);
|
||||
p += iface->hwlen;
|
||||
/* ARP requests should ignore this */
|
||||
retval = iface->hwlen;
|
||||
while (retval--)
|
||||
*p++ = '\0';
|
||||
memcpy(p, &tip, sizeof(tip));
|
||||
p += sizeof(tip);
|
||||
/* Zero pad if needed */
|
||||
|
Loading…
Reference in New Issue
Block a user