diff options
| author | Roy Marples <roy@marples.name> | 2015-06-20 12:09:55 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-06-20 12:09:55 +0000 |
| commit | d821349e1e1ffdc107befed7b21539eaacc98aff (patch) | |
| tree | 074f50545df216e1a3852bbf2454f3c850887b05 /dhcpcd.c | |
| parent | 6901c20c984d63d0435b3f7ab8a2e72160f5cc20 (diff) | |
| download | dhcpcd-d821349e1e1ffdc107befed7b21539eaacc98aff.tar.xz | |
Ensure we have an IPv4 state before starting DHCP.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |
