diff --git a/.gitignore b/.gitignore
index 3d2c7b4..11f127c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/NetworkManager-1.39.10.tar.xz
/NetworkManager-1.39.12.tar.xz
/NetworkManager-1.39.90.tar.xz
+/NetworkManager-1.40.0.tar.xz
diff --git a/0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch b/0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch
index 8d4e50b..40aea35 100644
--- a/0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch
+++ b/0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch
@@ -10,10 +10,10 @@ always default to "iptables" to preserve behavior.
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/core/nm-firewall-utils.c b/src/core/nm-firewall-utils.c
-index a2446553b76f..5525a677cb1d 100644
+index 1311f5039910..3284b5ebaa4b 100644
--- a/src/core/nm-firewall-utils.c
+++ b/src/core/nm-firewall-utils.c
-@@ -744,12 +744,9 @@ nm_firewall_config_apply(NMFirewallConfig *self, gboolean shared)
+@@ -743,12 +743,9 @@ nm_firewall_config_apply(NMFirewallConfig *self, gboolean shared)
static NMFirewallBackend
_firewall_backend_detect(void)
{
diff --git a/0003-order-ipv6-addresses.patch b/0003-order-ipv6-addresses.patch
index 2f43aa1..73c44b1 100644
--- a/0003-order-ipv6-addresses.patch
+++ b/0003-order-ipv6-addresses.patch
@@ -18,10 +18,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=2097270
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/core/nm-l3-config-data.c b/src/core/nm-l3-config-data.c
-index 87cb87bf2b4e..ba3bb19f57ce 100644
+index bcd0b62a8488..4640acad3796 100644
--- a/src/core/nm-l3-config-data.c
+++ b/src/core/nm-l3-config-data.c
-@@ -2715,7 +2715,8 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co
+@@ -2753,7 +2753,8 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co
naddresses = nm_setting_ip_config_get_num_addresses(s_ip);
for (i = 0; i < naddresses; i++) {
@@ -32,10 +32,10 @@ index 87cb87bf2b4e..ba3bb19f57ce 100644
NMIPAddr addr_bin;
GVariant *label;
diff --git a/src/libnm-core-impl/nm-setting-ip6-config.c b/src/libnm-core-impl/nm-setting-ip6-config.c
-index 4f2e7f94154a..9f45b19fba88 100644
+index 8b593b97336a..0356888da324 100644
--- a/src/libnm-core-impl/nm-setting-ip6-config.c
+++ b/src/libnm-core-impl/nm-setting-ip6-config.c
-@@ -986,7 +986,7 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
+@@ -998,7 +998,7 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
* format: a comma separated list of addresses
* description: A list of IPv6 addresses and their prefix length. Multiple addresses
* can be separated by comma. For example "2001:db8:85a3::8a2e:370:7334/64, 2001:db8:85a3::5/64".
@@ -45,10 +45,10 @@ index 4f2e7f94154a..9f45b19fba88 100644
* (RFC 6724, section 5).
* ---end---
diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in
-index 2bd275949669..8147f28735c5 100644
+index 1ed2f134196b..18e1ed28fc39 100644
--- a/src/libnmc-setting/settings-docs.h.in
+++ b/src/libnmc-setting/settings-docs.h.in
-@@ -256,7 +256,7 @@
+@@ -184,7 +184,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTES N_("A list of IPv4 destination addresses, prefix length, optional IPv4 next hop addresses, optional route metric, optional attribute. The valid syntax is: \"ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]\". For example \"192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24\".")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTING_RULES N_("A comma separated list of routing rules for policy routing.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE N_("Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 (0), NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_DEFAULT_OR_EUI64 (2) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_DEFAULT (3). If the property is set to EUI64, the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of stable-privacy enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. The special values \"default\" and \"default-or-eui64\" will fallback to the global connection default in as documented in NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is \"stable-privacy\" or \"eui64\", respectively. For libnm, the property defaults to \"default\" since 1.40. Previously it defaulted to \"stable-privacy\". On D-Bus, the absence of an addr-gen-mode setting equals \"default\". For keyfile plugin, the absence of the setting on disk means \"default-or-eui64\" so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by \"ip6-privacy\" property and it does not affect the temporary addresses configured with this option.")
@@ -58,10 +58,10 @@ index 2bd275949669..8147f28735c5 100644
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_DUID N_("A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried in the Client Identifier option. If the property is a hex string ('aa:bb:cc') it is interpreted as a binary DUID and filled as an opaque value in the Client Identifier option. The special value \"lease\" will retrieve the DUID previously used from the lease file belonging to the connection. If no DUID is found and \"dhclient\" is the configured dhcp client, the DUID is searched in the system-wide dhclient lease file. If still no DUID is found, or another dhcp client is used, a global and permanent DUID-UUID (RFC 6355) will be generated based on the machine-id. The special values \"llt\" and \"ll\" will generate a DUID of type LLT or LL (see RFC 3315) based on the current MAC address of the device. In order to try providing a stable DUID-LLT, the time field will contain a constant timestamp that is used globally (for all profiles) and persisted to disk. The special values \"stable-llt\", \"stable-ll\" and \"stable-uuid\" will generate a DUID of the corresponding type, derived from the connection's stable-id and a per-host unique key. You may want to include the \"${DEVICE}\" or \"${MAC}\" specifier in the stable-id, in case this profile gets activated on multiple devices. So, the link-layer address of \"stable-ll\" and \"stable-llt\" will be a generated address derived from the stable id. The DUID-LLT time value in the \"stable-llt\" option will be picked among a static timespan of three years (the upper bound of the interval is the same constant timestamp used in \"llt\"). When the property is unset, the global value provided for \"ipv6.dhcp-duid\" is used. If no global value is provided, the default \"lease\" value is assumed.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_HOSTNAME N_("If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time.")
diff --git a/src/nmcli/generate-docs-nm-settings-nmcli.xml.in b/src/nmcli/generate-docs-nm-settings-nmcli.xml.in
-index bd9310e9593d..4e5af28d90d7 100644
+index 371081b0e0da..5c036ab60149 100644
--- a/src/nmcli/generate-docs-nm-settings-nmcli.xml.in
+++ b/src/nmcli/generate-docs-nm-settings-nmcli.xml.in
-@@ -714,7 +714,7 @@
+@@ -718,7 +718,7 @@
description="DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the "rotate" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured." />
+ description="The gateway associated with this configuration. This is only meaningful if "addresses" is also set. Setting the gateway causes NetworkManager to configure a standard default route with the gateway as next hop. This is ignored if "never-default" is set. An alternative is to configure the default route explicitly with a manual route and /0 as prefix length. Note that the gateway usually conflicts with routing that NetworkManager configures for WireGuard interfaces, so usually it should not be set in that case. See "ip4-auto-default-route"." />
--
2.36.1
diff --git a/NetworkManager.spec b/NetworkManager.spec
index c906628..6b52376 100644
--- a/NetworkManager.spec
+++ b/NetworkManager.spec
@@ -4,13 +4,13 @@
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
%global epoch_version 1
-%global real_version 1.39.90
+%global real_version 1.40.0
%global rpm_version %{real_version}
%global release_version 1
%global snapshot %{nil}
%global git_sha %{nil}
%global bcond_default_debug 0
-%global bcond_default_test 1
+%global bcond_default_test 0
%global obsoletes_device_plugins 1:0.9.9.95-1
%global obsoletes_ppp_plugin 1:1.5.3
@@ -71,12 +71,12 @@
%else
%bcond_with connectivity_fedora
%endif
-%if 0%{?rhel} && 0%{?rhel} > 7
+%if 0%{?rhel} && 0%{?rhel} >= 8
%bcond_without connectivity_redhat
%else
%bcond_with connectivity_redhat
%endif
-%if 0%{?fedora} > 28 || 0%{?rhel} > 7
+%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
%bcond_without crypto_gnutls
%else
%bcond_with crypto_gnutls
@@ -86,7 +86,7 @@
%else
%bcond_without iwd
%endif
-%if 0%{?fedora} > 31 || 0%{?rhel} > 7
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8
%bcond_without firewalld_zone
%else
%bcond_with firewalld_zone
@@ -94,7 +94,7 @@
###############################################################################
-%if 0%{?fedora} || 0%{?rhel} > 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
%global dbus_version 1.9.18
%global dbus_sys_dir %{_datadir}/dbus-1/system.d
%else
@@ -116,15 +116,15 @@
%global with_modem_manager_1 0
%endif
-%if 0%{?fedora} >= 31 || 0%{?rhel} > 7
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8
%global dhcp_default internal
%else
%global dhcp_default dhclient
%endif
-%if 0%{?fedora} || 0%{?rhel} > 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
%global logging_backend_default journal
-%if 0%{?fedora} || 0%{?rhel} > 8
+%if 0%{?fedora} || 0%{?rhel} >= 9
%global dns_rc_manager_default auto
%else
%global dns_rc_manager_default symlink
@@ -134,19 +134,19 @@
%global dns_rc_manager_default file
%endif
-%if 0%{?rhel} > 8 || 0%{?fedora} > 32
+%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%global config_plugins_default_ifcfg_rh 0
%else
%global config_plugins_default_ifcfg_rh 1
%endif
-%if 0%{?rhel} > 9 || 0%{?fedora} > 35
+%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
%global split_ifcfg_rh 1
%else
%global split_ifcfg_rh 0
%endif
-%if 0%{?rhel} > 8 || 0%{?fedora} > 35
+%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9
%global ifcfg_warning 1
%else
%global ifcfg_warning 0
@@ -198,7 +198,7 @@ Patch3: 0003-order-ipv6-addresses.patch
# Patch1001: 1001-some.patch
Requires(post): systemd
-%if 0%{?fedora} || 0%{?rhel} > 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
Requires(post): systemd-udev
%endif
Requires(post): /usr/sbin/update-alternatives
@@ -286,7 +286,7 @@ BuildRequires: mobile-broadband-provider-info-devel
BuildRequires: newt-devel
%endif
BuildRequires: /usr/bin/dbus-launch
-%if 0%{?fedora} > 27 || 0%{?rhel} > 7
+%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
BuildRequires: python3
BuildRequires: python3-gobject-base
BuildRequires: python3-dbus
@@ -310,7 +310,7 @@ BuildRequires: libubsan
BuildRequires: firewalld-filesystem
%endif
BuildRequires: iproute
-%if 0%{?fedora} || 0%{?rhel} > 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: iproute-tc
%endif
@@ -399,7 +399,7 @@ Requires: wireless-regdb
Requires: crda
%endif
-%if %{with iwd} && (0%{?fedora} > 24 || 0%{?rhel} > 7)
+%if %{with iwd} && (0%{?fedora} >= 25 || 0%{?rhel} >= 8)
Requires: (wpa_supplicant >= %{wpa_supplicant_version} or iwd)
Suggests: wpa_supplicant
%else
@@ -739,8 +739,8 @@ gtkdocize
autoreconf --install --force
%configure \
--with-runstatedir=%{_rundir} \
- --disable-silent-rules \
- --disable-static \
+ --enable-silent-rules=no \
+ --enable-static=no \
--with-nft=/usr/sbin/nft \
--with-iptables=/usr/sbin/iptables \
--with-dhclient=yes \
@@ -755,26 +755,26 @@ autoreconf --install --force
%if %{with sanitizer}
--with-address-sanitizer=exec \
%if 0%{?fedora} || 0%{?rhel} >= 8
- --enable-undefined-sanitizer \
+ --enable-undefined-sanitizer=yes \
%else
- --disable-undefined-sanitizer \
+ --enable-undefined-sanitizer=no \
%endif
%else
--with-address-sanitizer=no \
- --disable-undefined-sanitizer \
+ --enable-undefined-sanitizer=no \
%endif
%if %{with debug}
- --enable-more-logging \
+ --enable-more-logging=yes \
--with-more-asserts=10000 \
%else
- --disable-more-logging \
- --without-more-asserts \
+ --enable-more-logging=no \
+ --with-more-asserts=0 \
%endif
- --enable-ld-gc \
+ --enable-ld-gc=yes \
%if %{with lto}
- --enable-lto \
+ --enable-lto=yes \
%else
- --disable-lto \
+ --enable-lto=no \
%endif
--with-libaudit=yes-disabled-by-default \
%if 0%{?with_modem_manager_1}
@@ -813,11 +813,11 @@ autoreconf --install --force
--with-nm-cloud-setup=no \
%endif
--enable-vala=yes \
- --enable-introspection \
+ --enable-introspection=yes \
%if %{with regen_docs}
- --enable-gtk-doc \
+ --enable-gtk-doc=yes \
%else
- --disable-gtk-doc \
+ --enable-gtk-doc=no \
%endif
%if %{with team}
--enable-teamdctl=yes \
@@ -832,11 +832,11 @@ autoreconf --install --force
--with-selinux=yes \
--enable-polkit=yes \
--enable-modify-system=yes \
- --enable-concheck \
+ --enable-concheck=yes \
%if 0%{?fedora}
- --with-libpsl \
+ --with-libpsl=yes \
%else
- --without-libpsl \
+ --with-libpsl=no \
%endif
--with-ebpf=%{ebpf_enabled} \
--with-session-tracking=systemd \
@@ -857,9 +857,9 @@ autoreconf --install --force
--enable-ppp=yes \
%endif
%if %{with firewalld_zone}
- --enable-firewalld-zone \
+ --enable-firewalld-zone=yes \
%else
- --disable-firewalld-zone \
+ --enable-firewalld-zone=no \
%endif
--with-dist-version=%{version}-%{release} \
%if %{?config_plugins_default_ifcfg_rh}
@@ -1231,6 +1231,9 @@ fi
%changelog
+* Fri Aug 26 2022 Ana Cabral - 1:1.40.0-1
+- Update to 1.40.0 release
+
* Tue Aug 16 2022 Ana Cabral - 1:1.39.90-1
- Update to 1.39.90 release (release candidate)
- bridge: fix reapply of non-bridge properties (rh #2092762)
diff --git a/sources b/sources
index b872c78..bc08a4d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (NetworkManager-1.39.90.tar.xz) = e21a8fe9862f6a43423dc026bf67255f6030124c3179a2e21cbc9ae422ae0a98b5a13d12ca26fc726a2379c4f643feb7715cfb5f7fc057aa63694f5179d1b8e5
+SHA512 (NetworkManager-1.40.0.tar.xz) = 2e51a70a6ef5c0c7ba9af400b9af8e6956c9a23dd93566a7c07efe531bb6253bf3544ac2a61e147fc17145eaaeeb25d7e58c1cb7daf7e7bf7b8ae6742545417e