From b285231a8e030f980f574b9bbd98a741cfec665b 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. (cherry picked from commit bacd3e14828b51d0016d06dffe3c8816b028a90c) (cherry picked from commit 6ad3694fc5f46f7be990a43e2f1eabc1edd128cc) --- 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 0884def35d..7955b8decd 100644 --- a/src/core/dhcp/nm-dhcp-systemd.c +++ b/src/core/dhcp/nm-dhcp-systemd.c @@ -983,11 +983,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) {