]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only run ARP conflicts for the state if either sip or tip
authorRoy Marples <roy@marples.name>
Fri, 10 Mar 2017 10:10:44 +0000 (10:10 +0000)
committerRoy Marples <roy@marples.name>
Fri, 10 Mar 2017 10:10:44 +0000 (10:10 +0000)
match the ARP state address.

arp.c

diff --git a/arp.c b/arp.c
index 63cb7cf8317cbdadae22e7f4cddfcc267d5d91c4..b737d8fe8edc78962df11ee734a9cd12ade7bf52 100644 (file)
--- 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);
        }