]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should use ETHERMIN.
authorRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 00:49:34 +0000 (00:49 +0000)
committerRoy Marples <roy@marples.name>
Sat, 12 Jul 2008 00:49:34 +0000 (00:49 +0000)
net.c

diff --git a/net.c b/net.c
index f86bff283b8482aabe671e0da0e4e4dc0df80865..980011173441f8a010b95e4a2b73d9410a326982 100644 (file)
--- a/net.c
+++ b/net.c
@@ -624,8 +624,8 @@ send_arp(const struct interface *iface, int op, in_addr_t sip, in_addr_t tip)
 
        arpsize = sizeof(*arp) + 2 * iface->hwlen + 2 *sizeof(sip);
        /* Ensure that our packet is of the minimum size */
-       if (arpsize < ETHER_MIN_LEN - ETHER_HDR_LEN)
-               arpsize = ETHER_MIN_LEN - ETHER_HDR_LEN;
+       if (arpsize < ETHERMIN)
+               arpsize = ETHERMIN;
        arp = xmalloc(arpsize);
        arp->ar_hrd = htons(iface->family);
        arp->ar_pro = htons(ETHERTYPE_IP);