From ac95e0a6935e8ebce78878c6d525cb0586abd409 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 May 2022 21:10:34 +0200 Subject: [PATCH] dhcp: remove assertion in nm_dhcp_client_handle_event() Technically, g_warn_if_reached() may not be an assertion, according to glib. However, there is G_DEBUG=fatal-warnings and we want to run with that. So this is an assertion to us. Also, logging to stderr/stdout is not a useful thing to the daemon. Don't do this. Especially, since it depends on user provided (untrusted) input. (cherry picked from commit 892cde1436ce18c1e767aecd668f2a0621a57e45) (cherry picked from commit 38b8fdb75c4a57d59d81d3a9fd22816630a1ce10) --- src/core/dhcp/nm-dhcp-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/dhcp/nm-dhcp-client.c b/src/core/dhcp/nm-dhcp-client.c index 0930bcdf0e..261a6162ea 100644 --- a/src/core/dhcp/nm-dhcp-client.c +++ b/src/core/dhcp/nm-dhcp-client.c @@ -977,8 +977,7 @@ nm_dhcp_client_handle_event(gpointer unused, str_options, priv->config.v6.info_only); } - } else - g_warn_if_reached(); + } if (l3cd) { nm_l3_config_data_set_dhcp_lease_from_options(l3cd,