diff --git a/configure.ac b/configure.ac index 5c87c7e507..57919cc863 100644 --- a/configure.ac +++ b/configure.ac @@ -685,10 +685,10 @@ fi if test "$with_dhcpcd" = "yes"; then AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin) if test "$with_dhcpcd" != "no"; then - if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[456789]]\."; then + if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [456789]\."; then AC_MSG_WARN([Cannot use dhcpcd, version 4.x or higher is required]) with_dhcpcd=no - elif $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[6789]]\."; then + elif $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [6789]\."; then AC_DEFINE(DHCPCD_SUPPORTS_IPV6, 1, [Define if dhcpcd supports IPv6 (6.x+)]) fi fi diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 47fa53171f..951674953a 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -767,7 +767,13 @@ nm_dhcp_client_handle_event (gpointer unused, str_options, priv->priority); } - g_warn_if_fail (ip_config != NULL); + + /* Fail if no valid IP config was received */ + if (ip_config == NULL) { + nm_log_warn (LOGD_DHCP, "(%s): DHCP client bound but IP config not received", iface); + new_state = NM_DHCP_STATE_FAIL; + g_clear_pointer (&str_options, g_hash_table_unref); + } } }