From: Roy Marples Date: Sat, 12 Jul 2008 12:51:04 +0000 (+0000) Subject: It seems that every arp application does not pad to 60 bytes. So either they are... X-Git-Tag: v4.0.2~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cb2d1e701b8fc64cdf471bfca56f3dc668ce9f1;p=thirdparty%2Fdhcpcd.git It seems that every arp application does not pad to 60 bytes. So either they are all not RFC conformant (doubtful) or their leaving it to something else. As such, dhcpcd will not pad either, so it's less code :) --- diff --git a/net.c b/net.c index 98001117..c3e82264 100644 --- 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;