From: Roy Marples Date: Fri, 10 Mar 2017 10:10:44 +0000 (+0000) Subject: Only run ARP conflicts for the state if either sip or tip X-Git-Tag: v7.0.0-beta1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212ff7246969c19b1634cfa2fcf1f6a42b9784b2;p=thirdparty%2Fdhcpcd.git Only run ARP conflicts for the state if either sip or tip match the ARP state address. --- diff --git a/arp.c b/arp.c index 63cb7cf8..b737d8fe 100644 --- a/arp.c +++ b/arp.c @@ -165,6 +165,9 @@ arp_packet(struct interface *ifp, uint8_t *data, size_t len) /* Run the conflicts */ state = ARP_CSTATE(ifp); TAILQ_FOREACH_SAFE(astate, &state->arp_states, next, astaten) { + if (arm.sip.s_addr != astate->addr.s_addr && + arm.tip.s_addr != astate->addr.s_addr) + continue; if (astate->conflicted_cb) astate->conflicted_cb(astate, &arm); }