summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-06-20 12:09:55 +0000
committerRoy Marples <roy@marples.name>2015-06-20 12:09:55 +0000
commitd821349e1e1ffdc107befed7b21539eaacc98aff (patch)
tree074f50545df216e1a3852bbf2454f3c850887b05 /dhcpcd.c
parent6901c20c984d63d0435b3f7ab8a2e72160f5cc20 (diff)
downloaddhcpcd-d821349e1e1ffdc107befed7b21539eaacc98aff.tar.xz
Ensure we have an IPv4 state before starting DHCP.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index f8827b8e..305eb2d8 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -891,8 +891,11 @@ dhcpcd_startinterface(void *arg)
}
}
- if (ifo->options & DHCPCD_IPV4)
- dhcp_start(ifp);
+ if (ifo->options & DHCPCD_IPV4) {
+ /* Ensure we have an IPv4 state before starting DHCP */
+ if (ipv4_getstate(ifp) != NULL)
+ dhcp_start(ifp);
+ }
}
static void