The rest of iwd logs info, warn, and errors by default so this patch
just copies that behavior for the DHCP client. Debug logging is enabled
via the IWD_DHCP_DEBUG env as before.
---
src/netconfig.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/netconfig.c b/src/netconfig.c
index 6694a0e9..91f2b9ff 100644
--- a/src/netconfig.c
+++ b/src/netconfig.c
@@ -1621,6 +1621,7 @@ struct netconfig *netconfig_new(uint32_t ifindex)
struct netdev *netdev = netdev_find(ifindex);
struct netconfig *netconfig;
struct l_icmp6_client *icmp6;
+ int dhcp_debug = L_LOG_INFO;
if (!netconfig_list)
return NULL;
@@ -1641,8 +1642,10 @@ struct netconfig *netconfig_new(uint32_t ifindex)
netconfig, NULL);
if (getenv("IWD_DHCP_DEBUG"))
- l_dhcp_client_set_debug(netconfig->dhcp_client, do_debug,
- "[DHCPv4] ", NULL);
+ dhcp_debug = L_LOG_DEBUG;
+
+ l_dhcp_client_set_debug(netconfig->dhcp_client, do_debug,
+ "[DHCPv4] ", NULL, dhcp_debug);
netconfig->dhcp6_client = l_dhcp6_client_new(ifindex);
l_dhcp6_client_set_event_handler(netconfig->dhcp6_client,
--
2.25.1
Show replies by date