Commit Graph

34041 Commits

Author SHA1 Message Date
Beniamino Galvani
f13aca1aba NEWS: update 2025-06-16 10:23:25 +02:00
Jan Vaclav
9abe5658cc merge: branch 'jv/systemd-merge'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2213
2025-06-10 09:23:34 +02:00
Beniamino Galvani
46e0d2b4e4 ovs: set the tun interface up before stage3
When using the netdev datapath, we wait that the tun link appears, we
call nm_device_set_ip_ifindex() (which also brings the link up) and
then we check that the link is ready, i.e. that udev has announced the
link and the MAC address is correct. After that, we schedule stage3
(ip-config).

In this, there is a race condition that occurs sometimes in NMCI test
ovs_datapath_type_netdev_with_cloned_mac. In rare conditions,
nm_device_set_ip_ifindex() bring the interface up but then ovs-vswitch
changes again the flags of the interface without IFF_UP. The result is
that the interface stays down, breaking communications.

To fix this, we need to always call nm_device_bring_up() after the tun
device is ready. The problem is that we can't do it in
_netdev_tun_link_cb() because that function is already invoked
synchronously from platform code.

Instead, simplify the handling of the netdev datapath. Every
"link-changed" event from platform is handled by
_netdev_tun_link_cb(), which always schedule a delayed function
_netdev_tun_link_cb_in_idle(). This function just assigns the
ip-ifindex to the device if missing, and starts stage3 if the link is
ready. While doing so, it also bring the interface up.

Fixes: 99a6c6eda6 ('ovs, dpdk: fix creating ovs-interface when the ovs-bridge is netdev')

https://issues.redhat.com/browse/RHEL-17358

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2218
2025-06-06 16:35:12 +02:00
Beniamino Galvani
b678ceab9f merge: branch 'wpa3_transition_fix'
core: fix WPA2 fallback for WPA3 transition APs

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2205
2025-06-05 16:15:49 +00:00
Conn O'Griofa
b00c6749d7 core: fix WPA2 fallback for WPA3 transition APs
When connecting to an AP configured for WPA3 transition mode, the
connection will fail if PMF is disabled on the client due to SAE and
FT-SAE being unconditionally added to the key_mgmt variable's
parameters.

By removing the "!is_ap ||" check, SAE and FT-SAE will no longer be
selected when PMF is disabled, allowing clients to connect via
WPA2/PSK mode as per the original intent of
a0988868ba.

Signed-off-by: Conn O'Griofa <connogriofa@gmail.com>
2025-06-05 11:54:16 +00:00
Jan Vaclav
eac9f828e8 tools/nm-in-container: add --skip-unavailable flag for installing debuginfo 2025-06-02 11:08:19 +00:00
Jan Vaclav
4be97207ed tools/nm-in-container: update package install list for fedora 42
- ausearch is part of audit package
- mlocate is not available anymore
- "openvswitch2*" packages are not available anymore
- ipsec-tools is not available anymore
2025-06-02 11:08:19 +00:00
Jan Vaclav
6a4e6fab40 merge: branch 'systemd' into jv/systemd-merge 2025-06-02 10:00:31 +02:00
Íñigo Huguet
b17a842e1a merge: branch 'manpages'
build: make manpages a mandatory part of the build

Closes #1653

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2068
2025-05-30 09:43:14 +00:00
Eli Schwartz
fe62ce6a4b ci: avoid building manpages on Fedora
It appears that xsltproc is not installed there. It is generally needed
for the docs build too, so as a crude CI heuristic, don't build anywhere
that docs are disabled.
2025-05-30 09:42:55 +00:00
Eli Schwartz
a11760ef39 build: make manpages a mandatory part of the build by default
Currently, both man pages and gtk-doc HTML documentation are enabled by
the same build option. It is common for users to want to choose whether
to build HTML docs, as not everyone cares about HTML developer docs, but
manpages are intended directly for end-user consumption and should
always be available. At the very least, there should be a separate
option to disable them to avoid accidentally disabling them while trying
to disable HTML developer docs.

Resolves: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1653
2025-05-30 09:42:55 +00:00
Eli Schwartz
f656675b57 build: install pre-disted manpages if available
When building from a release tarball of NetworkManager,
`meson.add_dist_script()` has copied various prebuilt manpages into the
tarball and building them again is not really necessary. We can just
install those directly.

This means that *all* manpages could be installed even without
introspection, even though some of them can only be *built* when
introspection is enabled.

It also means that manpages can be installed even when xsltproc is not
available at build time.
2025-05-30 09:42:55 +00:00
Eli Schwartz
ee078be745 build: remove outdated, commented-out configure.ac snippet
This was likely added during the port to meson. It's just a multiline
string, so it has no effect in meson, and it appears to be entirely for
things which are already implemented in meson, so there's no real point
in keeping it any longer.
2025-05-30 09:42:55 +00:00
Eli Schwartz
897eed184a build: only demand an xsltproc program when it is used
It's intrinsically used when building manpages, and also part of the
introspection-specific parts of the documentation build. There's no
particular guarantee either of those will actually be invoked during a
build, so don't unconditionally look it up.

This allows building with one fewer dependency in many cases.
2025-05-30 09:42:55 +00:00
Vladimír Beneš
872e626342 release: bump version to 1.55.0 (development) 2025-05-30 11:36:41 +02:00
Vladimír Beneš
20a660110b release: bump version to 1.53.90 (1.54-rc1) 2025-05-30 11:31:37 +02:00
Lubomir Rintel
7ee8d84a1e merge: branch 'lr/ovs-generic'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2207
2025-05-27 11:29:46 +02:00
Lubomir Rintel
dcf4bc9241 ovs/factory: fix manager-initiated device creation
The Open VSwitch interfaces have corresponding platform links. When an
Open VSwitch interface is created while NetworkManager is running, the
OVS factory usually sees an OVSDB entry appear first, then creates a
NMDevice. After that, when a platform link appears, the device is
already there.

Upon a (re-)start, the link might be seen first, and then things
go south. The OVS factory rejects the device, which results in Generic
device being created instead. Another device, this time of an
appropriate is created for the same link once the OVSDB entry is seen.

Needless to say, with two NMDevices for the same platform link existing,
no end of mayhem ensues (an assertion is tripped).

Resolves: https://issues.redhat.com/browse/NMT-1634

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2207
2025-05-27 11:29:01 +02:00
Lubomir Rintel
f680f23cba manager: note if we see an openvswitch link without a plugin
Add Open VSwitch to link types that are supported by a plugin.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2207
2025-05-27 11:29:01 +02:00
Lubomir Rintel
5ef3cfa4d0 ovs/factory: improve logging
Be clearer about the progress of creating the device and ways it can end
up failing.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2207
2025-05-27 11:29:01 +02:00
Beniamino Galvani
4ec06e1eaa merge: branch 'dnsconfd-port-fix'
dns: Fix port handling in Dnsconfd plugin

Closes #1765

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2211
2025-05-27 08:49:59 +00:00
Tomas Korbar
75b3f8496b dns: Fix port handling in Dnsconfd plugin
Fixes #1765
2025-05-27 08:24:22 +00:00
Lubomir Rintel
ccd9431e82 device: update L3 if connectivity changes in IP_CHECK/SECONDARIES
If connectivity goes from/to FULL, the penalization of default route metric
may change. For this reason we re-commit L3 configuration if the
connectivity changes while the device is ACTIVATED.

However, there are more device states that need consideration:
IP_CHECK and SECONDARIES, that happen between initial configuration on
IP_CONFIG and removal when the device goes DEACTIVATING.

This should fix the issue encountered here:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2070

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2212
2025-05-22 11:18:36 +02:00
Florian Schmaus
43bcfbcdf5 cli: drop _NMC_RL_STARTUPHOOK_ARGS
Fixes incompatible pointer types warning, which became an error in
newer compilers (e.g., https://bugs.gentoo.org/938249).

Modern libedit versions use the same type signature as readline for
rl_startup_hook, both declare

typedef int	 rl_hook_func_t(void)

This essentially reverts f47d55fc66 ("cli: Fix for rl_startup_hook
function signatures mismatch (-lreadline vs -ledit)").

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2082
2025-05-20 09:54:31 +02:00
Gris Ge
dd7252ff0c merge: branch 'bg/ip-config-crash'
ip-config: fix crash in DNS options evaluation

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2210
2025-05-16 15:36:08 +00:00
Beniamino Galvani
c1350f40bd ip-config: fix crash in DNS options evaluation
Fixes: 58287cbcc0 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
2025-05-16 09:41:03 +02:00
Beniamino Galvani
fd3eccfb16 device: update the external-down unmanaged flag on port attach/release
A device has the "external-down" unmanaged flag when:

  !is-created-by-nm AND (!is-up OR (!has-address AND !is-controller))

When the "is-up" or the "has-address" conditions change, we properly update
the unmanaged flag by calling _dev_unmanaged_check_external_down() in
_dev_l3_cfg_notify_cb(PLATFORM_CHANGE_ON_IDLE).

The "is-controller" condition changes when another link indicates the
current device as controller. We currently don't update the unmanaged flag
when that happens and so it's possible that the device stays unmanaged even
if it has a port. This can be easily reproduced by running this commands:

    ip link add veth0 type veth peer name veth1
    ip link add vrf0 type vrf table 10
    ip link set vrf0 up
    ip link set veth0 master vrf0

Sometimes, the device shows as "unmanaged" instead of "connected
(externally)".

Fix this by re-evaluating the "external-down" unmanaged flags on the
controller when a port is attached or detached.

Fixes: c3586ce01a ('device: consider a device with slaves configured')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2209
2025-05-15 17:22:39 +02:00
Jan Vaclav
3ae6505d7d systemd: update code from upstream (2025-05-05)
This is a direct dump from systemd git.

  $ git clean -fdx && \
    git cat-file -p HEAD | sed '1,/^======$/ d' | bash - && \
    git add .

======

SYSTEMD_DIR=../systemd
COMMIT=a50fa2a40f4a91d49503d3588a3dd29ea05e559b

(
  cd "$SYSTEMD_DIR"
  git checkout "$COMMIT"
  git reset --hard
  git clean -fdx
)

git ls-files -z :/src/libnm-systemd-core/src/ \
                :/src/libnm-systemd-shared/src/ \
                :/src/libnm-std-aux/unaligned-fundamental.h \
                :/src/libnm-std-aux/unaligned.h | \
  xargs -0 rm -f

nm_copy_sd_shared() {
    mkdir -p "./src/libnm-systemd-shared/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-shared/$1"
}

nm_copy_sd_core() {
    mkdir -p "./src/libnm-systemd-core/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-core/$1"
}

nm_copy_sd_stdaux() {
    mkdir -p "./src/libnm-std-aux/"
    cp "$SYSTEMD_DIR/$1" "./src/libnm-std-aux/${1##*/}"
}

nm_copy_sd_core "src/libsystemd-network/dhcp-duid-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-client-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-option.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd_core "src/libsystemd-network/network-common.c"
nm_copy_sd_core "src/libsystemd-network/network-common.h"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-duid.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd_core "src/libsystemd/sd-device/device-internal.h"
nm_copy_sd_core "src/libsystemd/sd-device/device-private.c"
nm_copy_sd_core "src/libsystemd/sd-device/device-private.h"
nm_copy_sd_core "src/libsystemd/sd-device/device-util.c"
nm_copy_sd_core "src/libsystemd/sd-device/device-util.h"
nm_copy_sd_core "src/libsystemd/sd-device/sd-device.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd_core "src/systemd/_sd-common.h"
nm_copy_sd_core "src/systemd/sd-device.h"
nm_copy_sd_core "src/systemd/sd-dhcp-duid.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-option.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-protocol.h"
nm_copy_sd_core "src/systemd/sd-event.h"
nm_copy_sd_core "src/systemd/sd-id128.h"
nm_copy_sd_core "src/systemd/sd-ndisc.h"
nm_copy_sd_shared "src/basic/alloc-util.c"
nm_copy_sd_shared "src/basic/alloc-util.h"
nm_copy_sd_shared "src/basic/arphrd-util.h"
nm_copy_sd_shared "src/basic/assert-util.h"
nm_copy_sd_shared "src/basic/bitfield.h"
nm_copy_sd_shared "src/basic/btrfs.c"
nm_copy_sd_shared "src/basic/btrfs.h"
nm_copy_sd_shared "src/basic/cgroup-util.h"
nm_copy_sd_shared "src/basic/chase.h"
nm_copy_sd_shared "src/basic/chattr-util.c"
nm_copy_sd_shared "src/basic/chattr-util.h"
nm_copy_sd_shared "src/basic/constants.h"
nm_copy_sd_shared "src/basic/devnum-util.c"
nm_copy_sd_shared "src/basic/devnum-util.h"
nm_copy_sd_shared "src/basic/dns-def.h"
nm_copy_sd_shared "src/basic/env-file.c"
nm_copy_sd_shared "src/basic/env-file.h"
nm_copy_sd_shared "src/basic/env-util.c"
nm_copy_sd_shared "src/basic/env-util.h"
nm_copy_sd_shared "src/basic/errno-util.h"
nm_copy_sd_shared "src/basic/escape.c"
nm_copy_sd_shared "src/basic/escape.h"
nm_copy_sd_shared "src/basic/ether-addr-util.c"
nm_copy_sd_shared "src/basic/ether-addr-util.h"
nm_copy_sd_shared "src/basic/extract-word.c"
nm_copy_sd_shared "src/basic/extract-word.h"
nm_copy_sd_shared "src/basic/fd-util.c"
nm_copy_sd_shared "src/basic/fd-util.h"
nm_copy_sd_shared "src/basic/fileio.c"
nm_copy_sd_shared "src/basic/fileio.h"
nm_copy_sd_shared "src/basic/format-ifname.c"
nm_copy_sd_shared "src/basic/format-ifname.h"
nm_copy_sd_shared "src/basic/format-util.c"
nm_copy_sd_shared "src/basic/format-util.h"
nm_copy_sd_shared "src/basic/fs-util.c"
nm_copy_sd_shared "src/basic/fs-util.h"
nm_copy_sd_shared "src/basic/glyph-util.c"
nm_copy_sd_shared "src/basic/glyph-util.h"
nm_copy_sd_shared "src/basic/hash-funcs.c"
nm_copy_sd_shared "src/basic/hash-funcs.h"
nm_copy_sd_shared "src/basic/hashmap.c"
nm_copy_sd_shared "src/basic/hashmap.h"
nm_copy_sd_shared "src/basic/hexdecoct.c"
nm_copy_sd_shared "src/basic/hexdecoct.h"
nm_copy_sd_shared "src/basic/hostname-util.c"
nm_copy_sd_shared "src/basic/hostname-util.h"
nm_copy_sd_shared "src/basic/in-addr-util.c"
nm_copy_sd_shared "src/basic/in-addr-util.h"
nm_copy_sd_shared "src/basic/inotify-util.c"
nm_copy_sd_shared "src/basic/inotify-util.h"
nm_copy_sd_shared "src/basic/io-util.c"
nm_copy_sd_shared "src/basic/io-util.h"
nm_copy_sd_shared "src/basic/iovec-util.h"
nm_copy_sd_shared "src/basic/label.c"
nm_copy_sd_shared "src/basic/label.h"
nm_copy_sd_shared "src/basic/list.h"
nm_copy_sd_shared "src/basic/locale-util.c"
nm_copy_sd_shared "src/basic/locale-util.h"
nm_copy_sd_shared "src/basic/lock-util.h"
nm_copy_sd_shared "src/basic/log.h"
nm_copy_sd_shared "src/basic/macro.h"
nm_copy_sd_shared "src/basic/memory-util.c"
nm_copy_sd_shared "src/basic/memory-util.h"
nm_copy_sd_shared "src/basic/mempool.c"
nm_copy_sd_shared "src/basic/mempool.h"
nm_copy_sd_shared "src/basic/missing_fcntl.h"
nm_copy_sd_shared "src/basic/missing_fs.h"
nm_copy_sd_shared "src/basic/missing_pidfd.h"
nm_copy_sd_shared "src/basic/missing_random.h"
nm_copy_sd_shared "src/basic/missing_socket.h"
nm_copy_sd_shared "src/basic/missing_syscall.h"
nm_copy_sd_shared "src/basic/missing_wait.h"
nm_copy_sd_shared "src/basic/mountpoint-util.c"
nm_copy_sd_shared "src/basic/mountpoint-util.h"
nm_copy_sd_shared "src/basic/namespace-util.h"
nm_copy_sd_shared "src/basic/ordered-set.c"
nm_copy_sd_shared "src/basic/ordered-set.h"
nm_copy_sd_shared "src/basic/origin-id.h"
nm_copy_sd_shared "src/basic/parse-util.c"
nm_copy_sd_shared "src/basic/parse-util.h"
nm_copy_sd_shared "src/basic/path-util.c"
nm_copy_sd_shared "src/basic/path-util.h"
nm_copy_sd_shared "src/basic/pidfd-util.c"
nm_copy_sd_shared "src/basic/pidfd-util.h"
nm_copy_sd_shared "src/basic/pidref.h"
nm_copy_sd_shared "src/basic/prioq.c"
nm_copy_sd_shared "src/basic/prioq.h"
nm_copy_sd_shared "src/basic/process-util.c"
nm_copy_sd_shared "src/basic/process-util.h"
nm_copy_sd_shared "src/basic/random-util.c"
nm_copy_sd_shared "src/basic/random-util.h"
nm_copy_sd_shared "src/basic/ratelimit.c"
nm_copy_sd_shared "src/basic/ratelimit.h"
nm_copy_sd_shared "src/basic/set.h"
nm_copy_sd_shared "src/basic/sha256.c"
nm_copy_sd_shared "src/basic/sha256.h"
nm_copy_sd_shared "src/basic/signal-util.c"
nm_copy_sd_shared "src/basic/signal-util.h"
nm_copy_sd_shared "src/basic/siphash24.h"
nm_copy_sd_shared "src/basic/socket-util.c"
nm_copy_sd_shared "src/basic/socket-util.h"
nm_copy_sd_shared "src/basic/sort-util.h"
nm_copy_sd_shared "src/basic/sparse-endian.h"
nm_copy_sd_shared "src/basic/stat-util.c"
nm_copy_sd_shared "src/basic/stat-util.h"
nm_copy_sd_shared "src/basic/stdio-util.h"
nm_copy_sd_shared "src/basic/string-table.c"
nm_copy_sd_shared "src/basic/string-table.h"
nm_copy_sd_shared "src/basic/string-util.c"
nm_copy_sd_shared "src/basic/string-util.h"
nm_copy_sd_shared "src/basic/strv.c"
nm_copy_sd_shared "src/basic/strv.h"
nm_copy_sd_shared "src/basic/strxcpyx.c"
nm_copy_sd_shared "src/basic/strxcpyx.h"
nm_copy_sd_shared "src/basic/time-util.c"
nm_copy_sd_shared "src/basic/time-util.h"
nm_copy_sd_shared "src/basic/tmpfile-util.c"
nm_copy_sd_shared "src/basic/tmpfile-util.h"
nm_copy_sd_shared "src/basic/umask-util.h"
nm_copy_sd_shared "src/basic/user-util.c"
nm_copy_sd_shared "src/basic/user-util.h"
nm_copy_sd_shared "src/basic/utf8.c"
nm_copy_sd_shared "src/basic/utf8.h"
nm_copy_sd_shared "src/basic/include/net/if.h"
nm_copy_sd_shared "src/basic/include/netinet/in.h"
nm_copy_sd_shared "src/fundamental/assert-fundamental.h"
nm_copy_sd_shared "src/fundamental/iovec-util-fundamental.h"
nm_copy_sd_shared "src/fundamental/logarithm.h"
nm_copy_sd_shared "src/fundamental/macro-fundamental.h"
nm_copy_sd_shared "src/fundamental/memory-util-fundamental.h"
nm_copy_sd_shared "src/fundamental/sha256-fundamental.c"
nm_copy_sd_shared "src/fundamental/sha256-fundamental.h"
nm_copy_sd_shared "src/fundamental/string-util-fundamental.c"
nm_copy_sd_shared "src/fundamental/string-util-fundamental.h"
nm_copy_sd_shared "src/shared/dns-domain.c"
nm_copy_sd_shared "src/shared/dns-domain.h"
nm_copy_sd_shared "src/shared/log-link.h"
nm_copy_sd_shared "src/shared/web-util.c"
nm_copy_sd_shared "src/shared/web-util.h"
nm_copy_sd_stdaux "src/basic/unaligned.h"
nm_copy_sd_stdaux "src/fundamental/unaligned-fundamental.h"
2025-05-14 12:37:33 +02:00
Íñigo Huguet
892e816a9d merge: branch 'ih/unrealized-parents'
core: virtual devices can be available without a parent

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2203
2025-05-14 05:42:36 +00:00
Íñigo Huguet
94595332c4 core: virtual devices can be available without a parent set
When calling to nm_device_is_available, the device types that requires a
parent like VLAN or MACVLAN checks that their parent exists.

nm_device_is_available is a function to check if the device is available
to activate a connection, so it makes sense that if the parent is not
present it can't be activated.

However, this is wrong for 2 reasons:
1. Most of they are virtual devices that might be unrealized when
   checking its availability. If they're unrealized, their parent hasn't
   been set yet.
2. Even if they're realized, their current parent might not be the one
   that is defined in the connection that is being activated.

This is causing that unrealized devices are not being activated as ports
because nm_manager_get_best_device_for_connection thinks that they are
not available.

Get rid of these checks for the parent in the is_available callbacks.

Fixes: ba86c208e0 ('Revert "core: prevent the activation of unavailable OVS interfaces only"')
Fixes: 774badb151 ('core: prevent the activation of unavailable devices')
2025-05-14 05:42:19 +00:00
Íñigo Huguet
34255b2692 merge: branch 'ih/initrd-fix-bond-ip6'
nm-initrd-generator: fix IPv6 with square brackets in bond options

Closes #1755 and #1731

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2197
2025-05-14 05:36:37 +00:00
Íñigo Huguet
6f6bb17a28 nm-initrd-generator: fix ignored prefix for IPv6 address with brackets
When defining an IPv6 address with square brackets and prefix, like
[dead::beef]/64, the prefix was silently ignored. The address was
accepted only accidentally, because get_word replaced ']' with '\0' so
it resulted in a valid IPv6 address string, but without the prefix.

The previous commit has fixed get_word with better logic to handle the
square brackets, uncovering this issue.

Fix it by explicitly splitting IP addresses and prefixes in
reader_parse_ip so we get a valid address and prefix.

Also, use a prefix different to 64 in the test test_if_ip6_manual. 64 is
the default one, making that the test passed despite the defined prefix
was actually ignored.

Fixes: ecc074b2f8 ('initrd: add command line parser')
2025-05-14 07:35:31 +02:00
Íñigo Huguet
aeaf8ca23c nm-initrd-generator: fix IPv6 with square brackets in bond options
If any bond option contains an IPv6 address it needs to be enclosed with
[]. Otherwise the ':' separators from the IP address can be confused
with the ':' separators from the 'bond=' cmdline arguments.

However, the square brackets were ignored:
    $ nm-initrd-generator -s "bond=bond0:eth0,eth1:ns_ip6_target=[FC08::789:1:0:0:3]"
    NetworkManager-Message: 08:46:55.114: <warn>  [1745498815.1146] cmdline-reader: Ignoring invalid bond option: "ns_ip6_target" = "[FC08": '[FC08' is not a valid IPv6 address for 'ns_ip6_target' option
    NetworkManager-Message: 08:46:55.114: <warn>  [1745498815.1148] cmdline-reader: Ignoring extra: '789:1:0:0:3]'.

The opening '[' was only being considered if it was the first character
in `get_word`. Fix it and consider it if it's in the middle too.

If the brackets are used first and last, directly remove them as it is what
most callers expect. However, if it's in the middle there is no reasonable
way to remove them, so don't do it. Instead, the caller will have to consider
this possibility when processing the content.

Fixes: ecc074b2f8 ('initrd: add command line parser')
Fixes https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1755
2025-05-14 07:35:31 +02:00
Íñigo Huguet
9e585b6cdc merge: branch 'ih/distros-update'
ci: update supported distros

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2202
2025-05-13 13:30:05 +00:00
Íñigo Huguet
bcbe386823 all: code format 2025-05-13 11:43:33 +02:00
Íñigo Huguet
3d1b55047b ci: update supported distros 2025-05-13 11:39:05 +02:00
Wen Liang
26d4bc9d32 merge: branch 'wl/ethtool_fec_backport_symbol'
libnm: add ethtool fec backported symbols from 1.50.4

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2198
2025-05-06 13:35:39 +00:00
Wen Liang
5b25bc4f9d libnm: add ethtool fec backported symbols from 1.46.8
Add to main branch ethtool fec symbols that were backported to 1.46.8 to
allow seamless upgrading from 1.46 to 1.54.
2025-05-06 13:33:30 +00:00
Wen Liang
799a7a432a libnm: add ethtool fec backported symbols from 1.48.18
Add to main branch ethtool fec symbols that were backported to 1.48.18 to
allow seamless upgrading from 1.48 to 1.54.
2025-05-06 13:33:30 +00:00
Wen Liang
6f1437b79e libnm: add ethtool fec backported symbols from 1.50.4
Add to main branch ethtool fec symbols that were backported to 1.50.4 to
allow seamless upgrading from 1.50 to 1.54.
2025-05-06 13:33:30 +00:00
Vladimír Beneš
64a4c2271a release: bump version to 1.53.4 (development) 2025-05-02 16:46:08 +02:00
Vladimír Beneš
f67ec0ddf4 Revert "release: bump version to 1.53.4 (development)"
This reverts commit 4f849c74b5
2025-05-02 14:43:12 +00:00
Vladimír Beneš
4f849c74b5 release: bump version to 1.53.4 (development) 2025-05-02 16:19:35 +02:00
Beniamino Galvani
d26714481d initrd: fix crash in the NBFT parser
The shared library handle is not initialized when there are no NBFT
entries.

Fixes: 1cb0635d08 ('initrd: add new NBFT parser')
2025-04-30 09:24:50 +02:00
Beniamino Galvani
39b38e5905 merge: branch 'bg/ovs-reapply'
ovs: allow reapplying ovs-bridge and ovs-port properties

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2194
2025-04-29 09:05:49 +00:00
Beniamino Galvani
32ab60f960 device: remove the "can_reapply_change_ovs_external_ids" device field
NMDevices have a special "can_reapply_change_ovs_external_ids" boolean
field indicating whether the device type supports reapplying the
ovs-external-ids and ovs-other-config settings.

Remove this field and use the standard can_reapply_change() method. No
change in behavior is expected.
2025-04-29 11:03:26 +02:00
Beniamino Galvani
4f577d677f ovs: allow reapplying ovs-bridge and ovs-port properties
Allow reapplying the following properties:

 - ovs-bridge.fail-mode
 - ovs-bridge.mcast-snooping-enable
 - ovs-bridge.rstp-enable
 - ovs-bridge.stp-enable
 - ovs-port.bond-downdelay
 - ovs-port.bond-mode
 - ovs-port.bond-updelay
 - ovs-port.lacp
 - ovs-port.tag
 - ovs-port.trunks
 - ovs-port.vlan-mode
2025-04-29 11:03:26 +02:00
Beniamino Galvani
e8e0d43f04 merge: branch 'bg/ovs-bridge-ext-port'
ovs: only keep bridges and ports with NM interfaces attached

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2193
2025-04-29 07:18:27 +00:00
Beniamino Galvani
476c89b6f2 ovs: only keep bridges and ports with NM interfaces attached
If a OVS bridge created via NM has a port created externally, when the
bridge connections goes down then NM detaches the NM-created
port. However, it finds that the bridge still has a port (the external
one) and so it doesn't remove the bridge from ovsdb.

This is a problem, because it means that an explicity deactivation of
the bridge leaves the bridge up. To fix this, only track the number of
port in the bridge actually created by NM. Also, leave alone bridges
not created by NM.
2025-04-29 09:10:52 +02:00
Beniamino Galvani
78a4e5cf3b ovs: slightly improve _delete_interface()
Add comments, and move variables inside the block where they are used.
2025-04-29 09:10:52 +02:00