summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-06-25 09:33:15 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-06-25 12:20:19 +0200
commita0b7cae5514426e279bddb14622332c6cd14c5a4 (patch)
treef81ae56dac4feda2379901e2e886f1d7eba1e398 /src/network/networkd-dhcp4.c
parentmkosi: add support for TEST_SAVE_JOURNAL to integration test wrapper (diff)
downloadsystemd-a0b7cae5514426e279bddb14622332c6cd14c5a4.tar.xz
systemd-a0b7cae5514426e279bddb14622332c6cd14c5a4.zip
network/ndisc: fix spurious log messages
- Fix swapped arguments: Before: veth99: Prefix 'in deny list' is 2002:da8:1::/64, ignoring After: veth99: Prefix '2002:da8:1::/64' is in deny list, ignoring. - Drop unnecessary DEBUG_LOGGING.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 4dd6044b18..b08d454d34 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -1137,14 +1137,12 @@ static int dhcp_server_is_filtered(Link *link, sd_dhcp_client *client) {
return log_link_debug_errno(link, r, "Failed to get DHCP server IP address: %m");
if (in4_address_is_filtered(&addr, link->network->dhcp_allow_listed_ip, link->network->dhcp_deny_listed_ip)) {
- if (DEBUG_LOGGING) {
- if (link->network->dhcp_allow_listed_ip)
- log_link_debug(link, "DHCPv4 server IP address "IPV4_ADDRESS_FMT_STR" not found in allow-list, ignoring offer.",
- IPV4_ADDRESS_FMT_VAL(addr));
- else
- log_link_debug(link, "DHCPv4 server IP address "IPV4_ADDRESS_FMT_STR" found in deny-list, ignoring offer.",
- IPV4_ADDRESS_FMT_VAL(addr));
- }
+ if (link->network->dhcp_allow_listed_ip)
+ log_link_debug(link, "DHCPv4 server IP address "IPV4_ADDRESS_FMT_STR" not found in allow-list, ignoring offer.",
+ IPV4_ADDRESS_FMT_VAL(addr));
+ else
+ log_link_debug(link, "DHCPv4 server IP address "IPV4_ADDRESS_FMT_STR" found in deny-list, ignoring offer.",
+ IPV4_ADDRESS_FMT_VAL(addr));
return true;
}