diff options
| author | Roy Marples <roy@marples.name> | 2019-04-18 17:01:10 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-04-18 17:01:10 +0100 |
| commit | f6c81bc59d932b558543c941ec6da3a58939e53f (patch) | |
| tree | 515ad5b2f9ae78eb0b1b281fe2aaa703757df046 | |
| parent | 1e78fa81dc3e06ffac539d051636c45d61394748 (diff) | |
| download | dhcpcd-f6c81bc59d932b558543c941ec6da3a58939e53f.tar.xz | |
ARP: Ignore Unicast Poll messages, RFC1122.
| -rw-r--r-- | src/arp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } } |
