summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-10-25 10:56:54 +0000
committerRoy Marples <roy@marples.name>2009-10-25 10:56:54 +0000
commit2f389f528230a24d1356b7c86ec1f15c327f0a13 (patch)
tree604802f856e6b1dbbccd88e7698783bb5524e377 /dhcpcd.c
parent730c69e8588e2365c89c72d5f777a7de5d50f27b (diff)
downloaddhcpcd-2f389f528230a24d1356b7c86ec1f15c327f0a13.tar.xz
We need to enable waitip when running on a single interface to retain
compat with older dhcpcd versions.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 7dec827a..6988be17 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1770,6 +1770,11 @@ main(int argc, char **argv)
ifc = argc - optind;
ifv = argv + optind;
+ /* When running dhcpcd against a single interface, we need to retain
+ * the old behaviour of waiting for an IP address */
+ if (ifc == 1)
+ options |= DHCPCD_WAITIP;
+
ifaces = discover_interfaces(ifc, ifv);
for (i = 0; i < ifc; i++) {
for (iface = ifaces; iface; iface = iface->next)