]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
It seems that every arp application does not pad to 60 bytes. So either they are...
authorRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 12:51:04 +0000 (12:51 +0000)
committerRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 12:51:04 +0000 (12:51 +0000)
net.c

diff --git a/net.c b/net.c
index 980011173441f8a010b95e4a2b73d9410a326982..c3e82264a389b3c9b440f8c208546ed47ed2164b 100644 (file)
--- a/net.c
+++ b/net.c
@@ -623,9 +623,6 @@ send_arp(const struct interface *iface, int op, in_addr_t sip, in_addr_t tip)
        int retval;
 
        arpsize = sizeof(*arp) + 2 * iface->hwlen + 2 *sizeof(sip);
-       /* Ensure that our packet is of the minimum size */
-       if (arpsize < ETHERMIN)
-               arpsize = ETHERMIN;
        arp = xmalloc(arpsize);
        arp->ar_hrd = htons(iface->family);
        arp->ar_pro = htons(ETHERTYPE_IP);
@@ -644,9 +641,6 @@ send_arp(const struct interface *iface, int op, in_addr_t sip, in_addr_t tip)
                *p++ = '\0';
        memcpy(p, &tip, sizeof(tip));
        p += sizeof(tip);
-       /* Zero pad if needed */
-       while (p < (uint8_t *)arp + arpsize)
-               *p++ = '\0';
        retval = send_raw_packet(iface, ETHERTYPE_ARP, arp, arpsize);
        free(arp);
        return retval;