diff --git a/contrib/fedora/rpm/24-clat-auto.conf b/contrib/fedora/rpm/24-clat-auto.conf new file mode 100644 index 0000000000..668ec04e3a --- /dev/null +++ b/contrib/fedora/rpm/24-clat-auto.conf @@ -0,0 +1,32 @@ +# CLAT implements the client part of 464XLAT (RFC 6877), an +# architecture that provides IPv4 connectivity to hosts on IPv6-only +# networks. +# +# The default value for the connection property 'ipv4.clat' is still +# 'no'. Change it globally to 'auto' (1) so that CLAT gets enabled +# automatically when the network advertises a PREF64 and there is no +# native IPv4 configured (either because DHCPv4 option 108 was +# received or because there is no DHCPv4 server). +# +# See: https://fedoraproject.org/wiki/Changes/IPv6-Mostly_Support_In_NetworkManager + +# Do not modify this file. You can hide/overwrite this file by +# creating "/etc/NetworkManager/conf.d/24-clat-auto.conf". You can +# also add configuration snippets with higher priority that override +# this setting (see `man 5 NetworkManager.conf`). Most importantly, +# this snippet only sets default values for the profile. You can +# explicitly set the value for each profile, so that this default +# value is not used. + +# For example, on a particular profile/network set +# +# $ nmcli connection modify "$PROFILE" ipv4.clat no +# +# to disable CLAT. This prevents the default from this file to take +# effect. + +[connection-24-clat-auto] +ipv4.clat=1 + +[.config] +enable=nm-version-min:1.57 diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 43e8625149..ba12235ddf 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -170,6 +170,7 @@ Source6: 22-wifi-mac-addr.conf Source7: 70-nm-connectivity.conf Source8: readme-ifcfg-rh.txt Source9: readme-ifcfg-rh-migrated.txt +Source10: 24-clat-auto.conf #Patch1: 0001-some.patch @@ -726,6 +727,9 @@ cp %{SOURCE7} %{buildroot}%{_sysctldir} %if 0%{?fedora} >= 40 cp %{SOURCE6} %{buildroot}%{nmlibdir}/conf.d/ %endif +%if 0%{?fedora} >= 45 +cp %{SOURCE10} %{buildroot}%{nmlibdir}/conf.d/ +%endif %if %{with ifcfg_warning} cp %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts @@ -879,6 +883,9 @@ fi %if 0%{?fedora} >= 40 %{nmlibdir}/conf.d/22-wifi-mac-addr.conf %endif +%if 0%{?fedora} >= 45 +%{nmlibdir}/conf.d/24-clat-auto.conf +%endif %ghost %{_sysconfdir}/%{name}/VPN %{_bindir}/nm-online %{_libexecdir}/nm-dhcp-helper diff --git a/contrib/fedora/rpm/build.sh b/contrib/fedora/rpm/build.sh index 101805876c..9f988b6540 100755 --- a/contrib/fedora/rpm/build.sh +++ b/contrib/fedora/rpm/build.sh @@ -143,6 +143,7 @@ SOURCE_CONFIG_WIFI_MAC_ADDR="$(abs_path "$SOURCE_CONFIG_WIFI_MAC_ADDR" "$SCRIPTD SOURCE_SYSCTL_RP_FILTER_REDHAT="$(abs_path "$SOURCE_SYSCTL_RP_FILTER_REDHAT" "$SCRIPTDIR/70-nm-connectivity.conf")" || die "invalid \$SOURCE_SYSCTL_RP_FILTER_REDHAT argument" SOURCE_README_IFCFG_FILES="$(abs_path "$SOURCE_README_IFCFG_FILES" "$SCRIPTDIR/readme-ifcfg-rh.txt")" || die "invalid \$SOURCE_README_IFCFG_FILES argument" SOURCE_README_IFCFG_MIGRATED="$(abs_path "$SOURCE_README_IFCFG_MIGRATED" "$SCRIPTDIR/readme-ifcfg-rh-migrated.txt")" || die "invalid \$SOURCE_README_IFCFG_MIGRATED argument" +SOURCE_CONFIG_CLAT_AUTO="$(abs_path "$SOURCE_CONFIG_CLAT_AUTO" "$SCRIPTDIR/24-clat-auto.conf")" || die "invalid \$SOURCE_CONFIG_CLAT_AUTO argument" TEMP="$(mktemp -d "$SCRIPTDIR/NetworkManager.$DATE.XXXXXX")" TEMPBASE="$(basename "$TEMP")" @@ -202,6 +203,7 @@ cp "$SOURCE_CONFIG_WIFI_MAC_ADDR" "$TEMP/SOURCES/22-wifi-mac-addr.conf" || die " cp "$SOURCE_SYSCTL_RP_FILTER_REDHAT" "$TEMP/SOURCES/70-nm-connectivity.conf" || die "Could not copy source $SOURCE_SYSCTL_RP_FILTER_REDHAT to $TEMP/SOURCES" cp "$SOURCE_README_IFCFG_FILES" "$TEMP/SOURCES/readme-ifcfg-rh.txt" || die "Could not copy source $SOURCE_README_IFCFG_FILES to $TEMP/SOURCES" cp "$SOURCE_README_IFCFG_MIGRATED" "$TEMP/SOURCES/readme-ifcfg-rh-migrated.txt" || die "Could not copy source $SOURCE_README_IFCFG_MIGRATED to $TEMP/SOURCES" +cp "$SOURCE_CONFIG_CLAT_AUTO" "$TEMP/SOURCES/24-clat-auto.conf" || die "Could not copy source $SOURCE_CONFIG_CLAT_AUTO to $TEMP/SOURCES" write_changelog diff --git a/src/nmtui/nmt-page-bond.c b/src/nmtui/nmt-page-bond.c index 962a95096b..eeea0b0b73 100644 --- a/src/nmtui/nmt-page-bond.c +++ b/src/nmtui/nmt-page-bond.c @@ -87,8 +87,10 @@ _bond_update_other_options(NMSettingBond *s_bond, NmtList *list) for (i = 0; i < num_opts; i++) { const char *opt_name; const char *opt_value; + gboolean ret; - nm_assert(nm_setting_bond_get_option(s_bond, i, &opt_name, &opt_value)); + ret = nm_setting_bond_get_option(s_bond, i, &opt_name, &opt_value); + nm_assert(ret); if (_is_other_option(opt_name)) { g_ptr_array_add(arr, g_strdup_printf("%s=%s", opt_name, opt_value)); @@ -355,6 +357,7 @@ other_options_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_d NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); gs_strfreev char **other_options = NULL; const char *name; + gboolean ret; guint num; guint i; @@ -368,7 +371,8 @@ other_options_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_d again: num = nm_setting_bond_get_num_options(priv->s_bond); for (i = 0; i < num; i++) { - nm_assert(nm_setting_bond_get_option(priv->s_bond, i, &name, NULL)); + ret = nm_setting_bond_get_option(priv->s_bond, i, &name, NULL); + nm_assert(ret); if (_is_other_option(name)) { nm_setting_bond_remove_option(priv->s_bond, name);