]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
ARP: Fix defend time check
authorRoy Marples <roy@marples.name>
Wed, 22 Jan 2020 16:32:09 +0000 (16:32 +0000)
committerRoy Marples <roy@marples.name>
Wed, 22 Jan 2020 16:32:09 +0000 (16:32 +0000)
src/arp.c

index 32d59665e90724081b2c4346c83f7f7bbc4c09e8..72e0f7b6fd27bf9966672981407621ce5001460a 100644 (file)
--- a/src/arp.c
+++ b/src/arp.c
@@ -165,7 +165,7 @@ arp_found(struct arp_state *astate, const struct arp_msg *amsg)
         * then we must drop our address and negotiate a new one. */
        clock_gettime(CLOCK_MONOTONIC, &now);
        if (timespecisset(&astate->defend) &&
-           eloop_timespec_diff(&astate->defend, &now, NULL) < DEFEND_INTERVAL)
+           eloop_timespec_diff(&now, &astate->defend, NULL) < DEFEND_INTERVAL)
                logwarnx("%s: %d second defence failed for %s",
                    ifp->name, DEFEND_INTERVAL, inet_ntoa(astate->addr));
        else if (arp_request(ifp, &astate->addr, &astate->addr) == -1)