]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix deleting from the wrong interface.
authorRoy Marples <roy@marples.name>
Fri, 17 Oct 2014 19:36:51 +0000 (19:36 +0000)
committerRoy Marples <roy@marples.name>
Fri, 17 Oct 2014 19:36:51 +0000 (19:36 +0000)
ipv4.c

diff --git a/ipv4.c b/ipv4.c
index e9d56d782c17a22d6f78bef861331ee64672f34e..28bc4019d69b72a1bfd52a7bcd3cd22233f78e3a 100644 (file)
--- a/ipv4.c
+++ b/ipv4.c
@@ -817,7 +817,7 @@ ipv4_applyaddr(void *arg)
        /* Does another interface already have the address from a prior boot? */
        if (ifn == NULL) {
                TAILQ_FOREACH(ifn, ifp->ctx->ifaces, next) {
-                       if (ifn == ifp)
+                       if (ifn == ifp || strcmp(ifn->name, ifp->name) == 0)
                                continue;
                        ap = ipv4_iffindaddr(ifn, &lease->addr, NULL);
                        if (ap)