From bacd3e14828b51d0016d06dffe3c8816b028a90c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 11 May 2022 08:23:14 +0200 Subject: [PATCH] dhcp: always explicitly set request/information-request flags for internal DHCPv6 client It seems clearer to explicitly set this always, and not rely on the defaults. --- src/core/dhcp/nm-dhcp-systemd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/dhcp/nm-dhcp-systemd.c b/src/core/dhcp/nm-dhcp-systemd.c index e70bc2321..2c7235310 100644 --- a/src/core/dhcp/nm-dhcp-systemd.c +++ b/src/core/dhcp/nm-dhcp-systemd.c @@ -294,11 +294,10 @@ ip6_start(NMDhcpClient *client, const struct in6_addr *ll_addr, GError **error) _LOGT("dhcp-client6: set %p", sd_client); - if (client_config->v6.info_only) { - sd_dhcp6_client_set_address_request(sd_client, 0); - if (client_config->v6.needed_prefixes == 0) - sd_dhcp6_client_set_information_request(sd_client, 1); - } + sd_dhcp6_client_set_address_request(sd_client, !client_config->v6.info_only); + sd_dhcp6_client_set_information_request(sd_client, + client_config->v6.info_only + && client_config->v6.needed_prefixes == 0); r = sd_dhcp6_client_set_iaid(sd_client, client_config->v6.iaid); if (r < 0) {