From: Roy Marples Date: Thu, 18 Apr 2019 16:01:10 +0000 (+0100) Subject: ARP: Ignore Unicast Poll messages, RFC1122. X-Git-Tag: v8.0.0~46^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96e645ba493d8e3db86f61596a4cd55cac8cc164;p=thirdparty%2Fdhcpcd.git ARP: Ignore Unicast Poll messages, RFC1122. --- diff --git a/src/arp.c b/src/arp.c index faf8be1c..a501edeb 100644 --- a/src/arp.c +++ b/src/arp.c @@ -239,12 +239,14 @@ arp_packet(struct interface *ifp, uint8_t *data, size_t len) memcpy(&arm.tha, hw_t, ar.ar_hln); memcpy(&arm.tip.s_addr, hw_t + ar.ar_hln, ar.ar_pln); - /* Match the ARP probe to our states */ + /* Match the ARP probe to our states. + * Ignore Unicast Poll, RFC1122. */ state = ARP_CSTATE(ifp); TAILQ_FOREACH_SAFE(astate, &state->arp_states, next, astaten) { if (IN_ARE_ADDR_EQUAL(&arm.sip, &astate->addr) || (IN_IS_ADDR_UNSPECIFIED(&arm.sip) && - IN_ARE_ADDR_EQUAL(&arm.tip, &astate->addr))) + IN_ARE_ADDR_EQUAL(&arm.tip, &astate->addr) && + state->bpf_flags & BPF_BCAST)) arp_found(astate, &arm); } }