Commit graph

34212 commits

Author SHA1 Message Date
Lubomir Rintel
81f272babe contrib/build: ignore initial failure to set $SOURCE
More fallout from set -e patch, encountered during a release.

Fixes: 64f8ec6099 ('rpm/build*.sh: trap failures')
(cherry picked from commit aea231f489)
2025-02-28 09:43:38 +01:00
Íñigo Huguet
815b3f5885 NEWS: update for 1.52 release 2025-02-28 09:40:55 +01:00
Lubomir Rintel
a0779a9339 keyfile: don't crash on failure to write
The log statement ended up using wrong (always NULL) connection to get
ID from. Fix.

Resolves: https://issues.redhat.com/browse/RHEL-77157
(cherry picked from commit a7cf9d399f)
2025-02-28 09:18:26 +01:00
Lubomir Rintel
5c16bb1d26 Reapply "client/test: add test for VLANs on OCI"
This reverts commit a852b79cf5.

(cherry picked from commit 70872cbb38)
2025-02-26 13:30:08 +01:00
Lubomir Rintel
68d7e17737 Reapply "cloud-setup: create VLANs for multiple VNICs on OCI"
The idea is to create a pair of VLAN and MACVLAN with AddAndActivate if
they are not present, and otherwise follow the ordinary (GetApplied &
Reapply) procedure if the devices are already present.

This reverts commit 87d7ccc580.

(cherry picked from commit 7eee669217)
2025-02-26 13:30:04 +01:00
Lubomir Rintel
369db80086 Reapply "cloud-setup: lookup device by MAC + type instead of just MAC"
This will be useful for updating configuration of Vlans and MacVlans,
some of having same MAC addresses as devices of other type.

This reverts commit cee0515f13.

(cherry picked from commit 6cedd594b6)
2025-02-26 13:30:00 +01:00
Lubomir Rintel
fd6f4f86e4 Reapply "cloud-setup: parse OCI metadata related to VLAN config"
Baremetal instances in Oracle Cloud require special VLAN config. Parse
the metadata related to it.

This reverts commit 5eefd2d59c.

(cherry picked from commit 5c3efeef15)
2025-02-26 13:29:57 +01:00
Lubomir Rintel
b7114d00ed Reapply "manager: create virtual devices on AddAndActivate()"
This reverts commit ccae5dc0e2.

(cherry picked from commit 11045cfa00)
2025-02-26 13:29:53 +01:00
Lubomir Rintel
4a1c51317e manager: make system_create_virtual_device() return a GError
This is done so that AddAndActivate() will return sensible errors in a
future patch that makes it support creating virtual devices.

In effect, all errors are logged in one place, therefore the log levels
are different. I don't think we're losing anything of value by being
a little less verbose here.

(cherry picked from commit 45d82f720c)
2025-02-26 13:29:49 +01:00
Lubomir Rintel
4a8e672506 merge: branch 'lr/sw-device-cleanup'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2126
2025-02-26 11:06:13 +01:00
Lubomir Rintel
70872cbb38 Reapply "client/test: add test for VLANs on OCI"
This reverts commit a852b79cf5.
2025-02-26 11:05:19 +01:00
Lubomir Rintel
7eee669217 Reapply "cloud-setup: create VLANs for multiple VNICs on OCI"
The idea is to create a pair of VLAN and MACVLAN with AddAndActivate if
they are not present, and otherwise follow the ordinary (GetApplied &
Reapply) procedure if the devices are already present.

This reverts commit 87d7ccc580.
2025-02-26 11:05:19 +01:00
Lubomir Rintel
6cedd594b6 Reapply "cloud-setup: lookup device by MAC + type instead of just MAC"
This will be useful for updating configuration of Vlans and MacVlans,
some of having same MAC addresses as devices of other type.

This reverts commit cee0515f13.
2025-02-26 11:05:19 +01:00
Lubomir Rintel
5c3efeef15 Reapply "cloud-setup: parse OCI metadata related to VLAN config"
Baremetal instances in Oracle Cloud require special VLAN config. Parse
the metadata related to it.

This reverts commit 5eefd2d59c.
2025-02-26 11:05:08 +01:00
Lubomir Rintel
11045cfa00 Reapply "manager: create virtual devices on AddAndActivate()"
This reverts commit ccae5dc0e2.
2025-02-26 11:05:08 +01:00
Lubomir Rintel
45d82f720c manager: make system_create_virtual_device() return a GError
This is done so that AddAndActivate() will return sensible errors in a
future patch that makes it support creating virtual devices.

In effect, all errors are logged in one place, therefore the log levels
are different. I don't think we're losing anything of value by being
a little less verbose here.
2025-02-26 11:05:08 +01:00
Beniamino Galvani
1b4372a9be merge: branch 'initrd-services'
systemd: add initrd-specific services

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2089
2025-02-26 09:32:30 +00:00
Antonio Alvarez Feijoo
8640ea822f systemd: add initrd-specific services
Decouple from a specific initrd generator (dracut) the systemd services that
provide networking in the initrd using NM, thus allowing other systemd-based
initrd generators to take advantage of it.

These new services are:
- `NetworkManager-config-initrd.service`: it starts very early at boot, parses
the kernel command line using `nm-initrd-generator` and sets the
`/run/NetworkManager/initrd/neednet` flag to activate the other initrd services,
and also sets the hostname if needed.
- `NetworkManager-initrd.service`: it basically does the same job as the
`NetworkManager.service`, but in the initrd.
- `NetworkManager-wait-online-initrd.service`: ordered before
`network-online.target`, it will allow other services that require networking to
delay their start until NM has finished.
2025-02-26 09:31:05 +00:00
Íñigo Huguet
a90efe91ad merge: branch 'lr/skip-broken'
Various CI/build fixes

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2135
2025-02-25 09:55:08 +00:00
Lubomir Rintel
cafb841a29 CI: update images 2025-02-25 09:38:49 +00:00
Lubomir Rintel
979717df4e gitlab/fedora-install: use yum install --allowerasing
This allows us to drag in packages that replace something in the base
image. Notably, this fixes installing pppd on Fedora 42 that requires
systemd (whereas the image has conflicting systemd-standalone-sysusers).
2025-02-25 09:38:49 +00:00
Lubomir Rintel
39efc8a394 fedora/REQUIRED_PACKAGES: remove very old optional package names
Attempting to install these takes time and they are no longer there
since ancient times. CentOS 9 and later are fine.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
e2aa19a06c Revert "fedora/REQUIRED_PACKAGES: speed up optional packages installation"
dnf --skip-unavailable not available on CentOS 9.

This reverts commit 5409d4f5cd.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
054962aeea contrib: drop old gtkdoc patch
This has been integrated 6 years ago.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
aea231f489 contrib/build: ignore initial failure to set $SOURCE
More fallout from set -e patch, encountered during a release.

Fixes: 64f8ec6099 ('rpm/build*.sh: trap failures')
2025-02-25 09:38:49 +00:00
Íñigo Huguet
8f2f86e0f0 merge: branch 'main'
po: Update Georgian translation

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2140
2025-02-25 09:36:25 +00:00
NorwayFun
af8b74ab2a po: Update Georgian translation 2025-02-25 09:35:54 +00:00
Íñigo Huguet
26a5eb0d98 merge: branch 'bg/check-domain-utf8'
core: discard non UTF-8 search domains

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2145
2025-02-25 09:29:30 +00:00
Beniamino Galvani
14a521ac9b core: discard non UTF-8 search domains
Domains are exported via D-Bus and so they must be valid UTF-8.

RFC 1035 specifies that domain labels can contain any 8 bit values,
but also recommends that they follow the "preferred syntax" which only
allows letters, digits and hypens.

Don't introduce a strict validation of the preferred syntax, but at
least discard non UTF-8 search domains, as they will cause assertion
failures later when they are sent over D-Bus.
2025-02-25 09:29:05 +00:00
Íñigo Huguet
949c7b84a3 policy: fix unitialized variable
The variable 'change' may be used uninitialized.

Fixes: 7acc66699a ('policy: always reset retries when unblocking children or ports')
(cherry picked from commit af6aca3527)
2025-02-24 16:47:19 +01:00
Beniamino Galvani
bc6248a3eb merge: branch 'bg/mptcp-endpoints'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2141

(cherry picked from commit 472a7b48e8)
2025-02-24 09:07:54 +01:00
Beniamino Galvani
ceef38d9a5 l3cfg: only add MPTCP endpoints for non-tentative IPv6 addresses
An IPv6 endpoint is not usable until the address is non-tentative. Add
a mechanism to wait until the address is ready.

(cherry picked from commit 227cd6307b)
2025-02-24 09:07:54 +01:00
Beniamino Galvani
2c5a51201d l3cfg: wait for the address before configuring an MPTCP endpoint
Skip the configuration of the MPTCP endpoint when the address is in
the l3cd but is not yet configured in the platform. This typically
happens when IPv4 DAD is enabled and the address is being probed.

If we configure the endpoint without the address set, the kernel will
try to use the endpoint immediately but it will fail. Then, the
endpoint will not be used ever again after the address is added.

(cherry picked from commit 6bf859af79)
2025-02-24 09:07:54 +01:00
Beniamino Galvani
a301c259f2 core: split nm_netns_watcher_remove_all()
The name suggests that the function always removes all the watchers
with the given tag; instead it removes only "dirty" ones when the
"all" parameter is FALSE. Split the function in two variants.

(cherry picked from commit b6e67c6abc)
2025-02-24 09:07:53 +01:00
Beniamino Galvani
472a7b48e8 merge: branch 'bg/mptcp-endpoints'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2141
2025-02-24 08:56:27 +01:00
Beniamino Galvani
227cd6307b l3cfg: only add MPTCP endpoints for non-tentative IPv6 addresses
An IPv6 endpoint is not usable until the address is non-tentative. Add
a mechanism to wait until the address is ready.
2025-02-24 08:55:53 +01:00
Beniamino Galvani
6bf859af79 l3cfg: wait for the address before configuring an MPTCP endpoint
Skip the configuration of the MPTCP endpoint when the address is in
the l3cd but is not yet configured in the platform. This typically
happens when IPv4 DAD is enabled and the address is being probed.

If we configure the endpoint without the address set, the kernel will
try to use the endpoint immediately but it will fail. Then, the
endpoint will not be used ever again after the address is added.
2025-02-24 08:55:53 +01:00
Beniamino Galvani
b6e67c6abc core: split nm_netns_watcher_remove_all()
The name suggests that the function always removes all the watchers
with the given tag; instead it removes only "dirty" ones when the
"all" parameter is FALSE. Split the function in two variants.
2025-02-24 08:55:53 +01:00
Lubomir Rintel
a7cf9d399f keyfile: don't crash on failure to write
The log statement ended up using wrong (always NULL) connection to get
ID from. Fix.

Resolves: https://issues.redhat.com/browse/RHEL-77157
2025-02-24 06:52:35 +01:00
Tomas Korbar
39b7a8df91 dns: fix Dnsconfd autostart
When Dnsconfd service is enabled but not started, NetworkManager
should attempt to start it through DBus at least once.

Fixes: c6e1925dec ('dns: Add dnsconfd DNS plugin')
(cherry picked from commit 1463b1c0a3)
2025-02-20 19:02:25 +01:00
Beniamino Galvani
2ee54e66c3 merge: branch 'dnsconfd_autostart_fix'
Fix Dnsconfd autostart

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2144
2025-02-20 18:01:39 +00:00
Tomas Korbar
1463b1c0a3 dns: fix Dnsconfd autostart
When Dnsconfd service is enabled but not started, NetworkManager
should attempt to start it through DBus at least once.

Fixes: c6e1925dec ('dns: Add dnsconfd DNS plugin')
2025-02-20 17:55:41 +00:00
Beniamino Galvani
5aafbb9bf8 NEWS: update for 1.54 (development) 2025-02-20 14:15:28 +01:00
Jan Vaclav
4f6a057a09 nmcli: print to stderr where appropriate
Currently, nmcli logs a lot of error messages to stdout rather
than stderr. Make it so that stderr is used whenever it makes
sense.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2108
2025-02-20 09:13:01 +00:00
Íñigo Huguet
462b4172b2 merge: branch 'ih/autocon_ports_uninit'
policy: fix unitialized variable

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2143
2025-02-20 06:42:20 +00:00
Íñigo Huguet
af6aca3527 policy: fix unitialized variable
The variable 'change' may be used uninitialized.

Fixes: 7acc66699a ('policy: always reset retries when unblocking children or ports')
2025-02-20 06:41:50 +00:00
Kyle Ouellette
42b95fad79 ndisc: ignore IPv6 RA PIOs if preferred lifetime > valid lifetime
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2117
2025-02-18 15:56:04 +01:00
Fernando Fernandez Mancera
b8ef2a551e core: prevent the activation of unavailable OVS interfaces only
Preventing the activation of unavailable devices for all device types is
too aggresive and leads to race conditions, e.g when a non-virtual bond
port gets a carrier, preventing the device to be a good candidate for
the connection.

Instead, enforce this check only on OVS interfaces as NetworkManager
just makes sure that ovsdb->ready is set to TRUE.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2139

Fixes: 774badb151 ('core: prevent the activation of unavailable devices')
(cherry picked from commit a1c05d2ce6)
2025-02-18 12:29:19 +01:00
Jan Vaclav
8e78a8c28f nmtui/ipv6: add "shared" method to ipv6 options
It was previously only available for IPv4, and the option
was missing from the IPv6 methods.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2138
(cherry picked from commit e983e8a46f)
2025-02-18 12:11:28 +01:00
Jan Vaclav
e983e8a46f nmtui/ipv6: add "shared" method to ipv6 options
It was previously only available for IPv4, and the option
was missing from the IPv6 methods.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2138
2025-02-18 12:09:03 +01:00