diff options
author | Thomas Haller <thaller@redhat.com> | 2022-05-11 08:23:14 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-05-11 19:03:45 +0200 |
commit | bacd3e14828b51d0016d06dffe3c8816b028a90c (patch) | |
tree | 14ac32e2902512f38f60bf172e015d4901649906 | |
parent | 265a4a07bd4e3a9146023248fff7e5e117ec3078 (diff) |
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.
-rw-r--r-- | src/core/dhcp/nm-dhcp-systemd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/dhcp/nm-dhcp-systemd.c b/src/core/dhcp/nm-dhcp-systemd.c index e70bc23216..2c72353109 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) { |