summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-05-01 14:02:36 +0000
committerRoy Marples <roy@marples.name>2015-05-01 14:02:36 +0000
commit26e5154f95c08a5e0a6d2e8863ae2d03c2f46e46 (patch)
tree2efd80db5fa89ce3bbf36cc93ea4dcd6efc23332 /dhcpcd.c
parentd88ecf0fa50b40bb5bba3593f9ba47c528771cc0 (diff)
downloaddhcpcd-26e5154f95c08a5e0a6d2e8863ae2d03c2f46e46.tar.xz
Delete duplicated addresses.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index a9fbc601..76205e20 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -638,7 +638,9 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *ctx, int carrier, unsigned int flags,
ifp->name);
ifp->carrier = LINK_DOWN;
script_runreason(ifp, "NOCARRIER");
-#ifndef NOCARRIER_PRESERVE_IP
+#ifdef NOCARRIER_PRESERVE_IP
+ arp_close(ifp);
+#else
dhcpcd_drop(ifp, 0);
#endif
}
@@ -1716,7 +1718,6 @@ main(int argc, char **argv)
}
}
-
if (ctx.options & DHCPCD_MASTER) {
if (control_start(&ctx, NULL) == -1)
logger(&ctx, LOG_ERR, "control_start: %m");