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 bacd3e1482)
(cherry picked from commit 6ad3694fc5)
This commit is contained in:
Thomas Haller 2022-05-11 08:23:14 +02:00
parent d0383937a2
commit b285231a8e
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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) {