It can be useful to choose a different "ipv6.addr-gen-mode". And it can be
useful to override the default for a set of profiles.
For example, in cloud or in a data center, stable-privacy might not be
the best choice. Add a mechanism to override the default via global defaults
in NetworkManager.conf:
# /etc/NetworkManager/conf.d/90-ipv6-addr-gen-mode-override.conf
[connection-90-ipv6-addr-gen-mode-override]
match-device=type:ethernet
ipv6.addr-gen-mode=0
"ipv6.addr-gen-mode" is a special property, because its default depends on
the component that configures the profile.
- when read from disk (keyfile and ifcfg-rh), a missing addr-gen-mode
key means to default to "eui64".
- when configured via D-Bus, a missing addr-gen-mode property means to
default to "stable-privacy".
- libnm's ip6-config::addr-gen-mode property defaults to
"stable-privacy".
- when some tool creates a profile, they either can explicitly
set the mode, or they get the default of the underlying mechanisms
above.
- nm-initrd-generator explicitly sets "eui64" for profiles it creates.
- nmcli doesn' explicitly set it, but inherits the default form
libnm's ip6-config::addr-gen-mode.
- when NM creates a auto-default-connection for ethernet ("Wired connection 1"),
it inherits the default from libnm's ip6-config::addr-gen-mode.
Global connection defaults only take effect when the per-profile
value is set to a special default/unset value. To account for the
different cases above, we add two such special values: "default" and
"default-or-eui64". That's something we didn't do before, but it seams
useful and easy to understand.
Also, this neatly expresses the current behaviors we already have. E.g.
if you don't specify the "addr-gen-mode" in a keyfile, "default-or-eui64"
is a pretty clear thing.
Note that usually we cannot change default values, in particular not for
libnm's properties. That is because we don't serialize the default
values to D-Bus/keyfile, so if we change the default, we change
behavior. Here we change from "stable-privacy" to "default" and
from "eui64" to "default-or-eui64". That means, the user only experiences
a change in behavior, if they have a ".conf" file that overrides the default.
https://bugzilla.redhat.com/show_bug.cgi?id=1743161
https://bugzilla.redhat.com/show_bug.cgi?id=2082682
See-also: https://github.com/coreos/fedora-coreos-tracker/issues/907
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1213
|
||
|---|---|---|
| .. | ||
| meson.build | ||
| nm-connection.h | ||
| nm-core-types.h | ||
| nm-dbus-interface.h | ||
| nm-errors.h | ||
| nm-keyfile.h | ||
| nm-setting-6lowpan.h | ||
| nm-setting-8021x.h | ||
| nm-setting-adsl.h | ||
| nm-setting-bluetooth.h | ||
| nm-setting-bond-port.h | ||
| nm-setting-bond.h | ||
| nm-setting-bridge-port.h | ||
| nm-setting-bridge.h | ||
| nm-setting-cdma.h | ||
| nm-setting-connection.h | ||
| nm-setting-dcb.h | ||
| nm-setting-dummy.h | ||
| nm-setting-ethtool.h | ||
| nm-setting-generic.h | ||
| nm-setting-gsm.h | ||
| nm-setting-hostname.h | ||
| nm-setting-infiniband.h | ||
| nm-setting-ip-config.h | ||
| nm-setting-ip-tunnel.h | ||
| nm-setting-ip4-config.h | ||
| nm-setting-ip6-config.h | ||
| nm-setting-macsec.h | ||
| nm-setting-macvlan.h | ||
| nm-setting-match.h | ||
| nm-setting-olpc-mesh.h | ||
| nm-setting-ovs-bridge.h | ||
| nm-setting-ovs-dpdk.h | ||
| nm-setting-ovs-external-ids.h | ||
| nm-setting-ovs-interface.h | ||
| nm-setting-ovs-patch.h | ||
| nm-setting-ovs-port.h | ||
| nm-setting-ppp.h | ||
| nm-setting-pppoe.h | ||
| nm-setting-proxy.h | ||
| nm-setting-serial.h | ||
| nm-setting-sriov.h | ||
| nm-setting-tc-config.h | ||
| nm-setting-team-port.h | ||
| nm-setting-team.h | ||
| nm-setting-tun.h | ||
| nm-setting-user.h | ||
| nm-setting-veth.h | ||
| nm-setting-vlan.h | ||
| nm-setting-vpn.h | ||
| nm-setting-vrf.h | ||
| nm-setting-vxlan.h | ||
| nm-setting-wifi-p2p.h | ||
| nm-setting-wimax.h | ||
| nm-setting-wired.h | ||
| nm-setting-wireguard.h | ||
| nm-setting-wireless-security.h | ||
| nm-setting-wireless.h | ||
| nm-setting-wpan.h | ||
| nm-setting.h | ||
| nm-simple-connection.h | ||
| nm-utils.h | ||
| nm-version-macros.h.in | ||
| nm-version.h | ||
| nm-vpn-dbus-interface.h | ||
| nm-vpn-editor-plugin.h | ||
| nm-vpn-plugin-info.h | ||
| README.md | ||
libnm-core-public
This contains (mostly) header files only, which are also part of
the public API of libnm.
Also, this API is implemented by the static library libnm-core-impl,
which in turn is statically linked into NetworkManager core and libnm.
These headers can be used by anybody who either:
- links (statically) against
libnm-core-impl. - links dynamically against
libnm.
Note that there is also one source file: nm-core-enum-types.c.
This source file really belongs to libnm-core-impl but it is here
because it's a generated file and so far I couldn't figure out how
to generate nm-core-enum-types.h here while moving nm-core-enum-types.c
to libnm-core-impl.
Aside nm-core-enum-types.c, this directory only provides header files.
Users should add this directory (both srcdir and builddir) to the include
search path, because libnm users are used to include these headers unqualified
(like #include "nm-setting.h).