]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Save a few bytes here. Also, fill with 0 so that we mirror the BSD gratuitous ARP...
authorRoy Marples <roy@marples.name>
Fri, 11 Jul 2008 10:13:23 +0000 (10:13 +0000)
committerRoy Marples <roy@marples.name>
Fri, 11 Jul 2008 10:13:23 +0000 (10:13 +0000)
net.c

diff --git a/net.c b/net.c
index 4dae17b53f7f6d6e7be12407c80494f88ced0e79..f86bff283b8482aabe671e0da0e4e4dc0df80865 100644 (file)
--- a/net.c
+++ b/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 */