diff options
author | Christof Efkemann <christof@efkemann.net> | 2020-11-15 20:08:39 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-08 18:08:31 +0100 |
commit | 00ee73348ad788380de9de572468447de2def2ff (patch) | |
tree | bfd2c83295b5f777550c7e1941f42f6ae758b2a7 | |
parent | c5805e39c51d3a922930f21cff2ebe2277bf0ac4 (diff) | |
download | systemd-00ee73348ad788380de9de572468447de2def2ff.tar.gz |
networkd: fix default value of DHCPv6Client
The configuration of networkd has a DHCPv6Client setting in its
[IPv6AcceptRA] section, which, according to the man page, can be
a boolean, or the special value "always". The man page states
that "true" is the default.
The default value is implemented in src/network/networkd-network.c
by setting field ipv6_accept_ra_start_dhcp6_client of network to
true. However, this field is not a boolean, but an enum type
IPv6AcceptRAStartDHCP6Client (src/network/networkd-ndisc.h).
Setting ipv6_accept_ra_start_dhcp6_client to true effectively
corresponds to the enum value IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS,
resulting in the DHCPv6Client setting having the default value
"always".
This patch changes the initialisation to the correct enum value
IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES.
(cherry picked from commit cabe57119f07a9f86ab281f6260bbb006b89a854)
-rw-r--r-- | src/network/networkd-network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 50931660bc..6ae2dff34b 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -477,7 +477,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi .ipv6_accept_ra_use_onlink_prefix = true, .ipv6_accept_ra_route_table = RT_TABLE_MAIN, .ipv6_accept_ra_route_table_set = false, - .ipv6_accept_ra_start_dhcp6_client = true, + .ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES, .configure_without_carrier = false, .ignore_carrier_loss = -1, |