summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-04-18 17:01:10 +0100
committerRoy Marples <roy@marples.name>2019-04-18 17:01:10 +0100
commitf6c81bc59d932b558543c941ec6da3a58939e53f (patch)
tree515ad5b2f9ae78eb0b1b281fe2aaa703757df046
parent1e78fa81dc3e06ffac539d051636c45d61394748 (diff)
downloaddhcpcd-f6c81bc59d932b558543c941ec6da3a58939e53f.tar.xz
ARP: Ignore Unicast Poll messages, RFC1122.
-rw-r--r--src/arp.c6
1 files changed, 4 insertions, 2 deletions
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);
}
}