From 7e9091a5960f67a84787c03153324915220e4816 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 1 Aug 2025 19:15:13 +0200 Subject: New upstream version 1.54.0 --- .gitignore | 3 + .gitlab-ci.yml | 114 +- .gitlab-ci/config.yml | 7 +- .gitlab-ci/distros-info.yml | 20 +- NEWS | 40 +- README.md | 8 + config.h.meson | 5 + contrib/alpine/REQUIRED_PACKAGES | 1 + contrib/debian/REQUIRED_PACKAGES | 1 + contrib/fedora/REQUIRED_PACKAGES | 1 + contrib/fedora/rpm/NetworkManager.spec | 6 + contrib/fedora/rpm/build_clean.sh | 2 +- contrib/fedora/utils/makerepo.sh | 8 +- contrib/scripts/nm-ci-run.sh | 7 + data/NetworkManager-config-initrd.service.in | 27 + data/NetworkManager-initrd.service.in | 32 + data/NetworkManager-wait-online-initrd.service.in | 26 + data/meson.build | 3 + data/nm-priv-helper.service.in | 4 +- docs/libnm/libnm-docs.xml | 1 + examples/python/gi/gmaincontext.py | 2 +- examples/python/gi/secret-agent.py | 92 + .../org.freedesktop.NetworkManager.Device.xml | 4 +- man/NetworkManager.conf.xml | 19 +- man/nm-cloud-setup.xml | 6 +- man/nm-initrd-generator.xml | 1 + meson.build | 25 +- meson_options.txt | 1 + po/POTFILES.in | 3 + po/POTFILES.skip | 15 +- po/ka.po | 5740 +++++++++++--------- po/meson.build | 5 + po/sl.po | 4693 ++++++++-------- src/contrib/nm-vpn-editor-plugin-call.h | 2 +- src/core/NetworkManagerUtils.c | 13 +- src/core/devices/nm-device-bond.c | 16 +- src/core/devices/nm-device-bridge.c | 5 + src/core/devices/nm-device-hsr.c | 4 +- src/core/devices/nm-device-tun.c | 8 +- src/core/devices/nm-device-vrf.c | 2 +- src/core/devices/nm-device.c | 177 +- src/core/devices/nm-device.h | 12 +- src/core/devices/nm-lldp-listener.c | 2 +- src/core/devices/ovs/nm-device-ovs-bridge.c | 28 +- src/core/devices/ovs/nm-device-ovs-interface.c | 58 +- src/core/devices/ovs/nm-device-ovs-port.c | 28 +- src/core/devices/ovs/nm-ovs-factory.c | 27 +- src/core/devices/ovs/nm-ovsdb.c | 80 +- src/core/dhcp/nm-dhcp-options.c | 2 +- src/core/dhcp/nm-dhcp-systemd.c | 2 +- src/core/dhcp/nm-dhcp-utils.c | 2 +- src/core/dhcp/tests/test-dhcp-utils.c | 70 + src/core/dns/nm-dns-dnsconfd.c | 24 +- src/core/ndisc/nm-lndp-ndisc.c | 20 +- src/core/ndisc/nm-ndisc.c | 4 +- src/core/nm-bond-manager.c | 10 +- src/core/nm-core-utils.c | 10 +- src/core/nm-l3-config-data.c | 3 + src/core/nm-l3cfg.c | 9 +- src/core/nm-manager.c | 19 +- src/core/nm-netns.c | 2 +- src/core/nm-policy.c | 272 +- src/core/platform/nm-fake-platform.c | 2 +- src/core/platform/tests/test-common.c | 4 +- src/core/platform/tests/test-link.c | 75 +- src/core/platform/tests/test-route.c | 33 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 2 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 2 +- .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 14 +- .../plugins/keyfile/tests/test-keyfile-settings.c | 2 +- src/core/supplicant/nm-supplicant-interface.c | 2 +- src/libnm-client-impl/libnm.ver | 28 + src/libnm-client-impl/meson.build | 1 - src/libnm-client-impl/nm-client.c | 29 +- src/libnm-client-impl/nm-device.c | 4 +- src/libnm-client-public/NetworkManager.h | 1 + src/libnm-client-public/nm-autoptr.h | 1 + src/libnm-client-test/nm-test-utils-impl.c | 2 +- src/libnm-core-aux-intern/nm-libnm-core-utils.c | 30 +- src/libnm-core-aux-intern/nm-libnm-core-utils.h | 4 +- .../gen-metadata-nm-settings-libnm-core.xml.in | 24 + src/libnm-core-impl/meson.build | 1 + src/libnm-core-impl/nm-connection.c | 2 + src/libnm-core-impl/nm-keyfile.c | 2 +- src/libnm-core-impl/nm-meta-setting-base-impl.c | 9 + src/libnm-core-impl/nm-setting-bond.c | 2 +- src/libnm-core-impl/nm-setting-connection.c | 2 +- src/libnm-core-impl/nm-setting-infiniband.c | 1 + src/libnm-core-impl/nm-setting-ip-config.c | 53 +- src/libnm-core-impl/nm-setting-ipvlan.c | 13 + src/libnm-core-impl/nm-setting-match.c | 9 +- src/libnm-core-impl/nm-setting-ovs-dpdk.c | 46 +- src/libnm-core-impl/nm-setting-ovs-external-ids.c | 2 +- src/libnm-core-impl/nm-setting-ovs-other-config.c | 4 +- src/libnm-core-impl/nm-setting-prefix-delegation.c | 118 + src/libnm-core-impl/nm-setting-private.h | 3 +- src/libnm-core-impl/nm-setting-sriov.c | 47 + src/libnm-core-impl/nm-setting-tun.c | 4 +- src/libnm-core-impl/nm-setting-user.c | 2 +- src/libnm-core-impl/nm-setting-wired.c | 2 +- src/libnm-core-impl/nm-setting-wireless.c | 2 +- src/libnm-core-impl/nm-utils.c | 18 +- src/libnm-core-impl/tests/test-general.c | 61 +- src/libnm-core-intern/nm-core-internal.h | 1 + src/libnm-core-intern/nm-meta-setting-base-impl.h | 1 + src/libnm-core-public/meson.build | 1 + src/libnm-core-public/nm-core-types.h | 1 + src/libnm-core-public/nm-dbus-interface.h | 10 +- src/libnm-core-public/nm-setting-ip-config.h | 24 + src/libnm-core-public/nm-setting-ovs-dpdk.h | 28 +- .../nm-setting-prefix-delegation.h | 41 + src/libnm-core-public/nm-setting-sriov.h | 19 + src/libnm-core-public/nm-version-macros.h.in | 1 + src/libnm-core-public/nm-version.h | 14 + src/libnm-glib-aux/nm-dbus-aux.c | 2 +- src/libnm-glib-aux/nm-dedup-multi.c | 2 +- src/libnm-glib-aux/nm-dedup-multi.h | 2 +- src/libnm-glib-aux/nm-hash-utils.c | 21 + src/libnm-glib-aux/nm-hash-utils.h | 13 +- src/libnm-glib-aux/nm-inet-utils.c | 36 + src/libnm-glib-aux/nm-inet-utils.h | 2 + src/libnm-glib-aux/nm-macros-internal.h | 17 + src/libnm-glib-aux/nm-shared-utils.c | 22 +- src/libnm-glib-aux/nm-shared-utils.h | 3 +- src/libnm-glib-aux/nm-test-utils.h | 2 +- src/libnm-glib-aux/tests/test-shared-general.c | 48 + src/libnm-log-core/nm-logging.c | 2 +- src/libnm-platform/devlink/nm-devlink.c | 3 +- src/libnm-platform/meson.build | 2 + src/libnm-platform/nm-linux-platform.c | 146 +- src/libnm-platform/nm-linux-platform.h | 2 +- src/libnm-platform/nm-platform-utils.c | 1765 ------ src/libnm-platform/nm-platform-utils.h | 57 +- src/libnm-platform/nm-platform.c | 65 +- src/libnm-platform/nm-platform.h | 34 +- src/libnm-platform/nmp-ethtool-ioctl.c | 1603 ++++++ src/libnm-platform/nmp-ethtool-ioctl.h | 55 + src/libnm-platform/nmp-ethtool.c | 559 ++ src/libnm-platform/nmp-ethtool.h | 35 + src/libnm-platform/nmp-object.c | 7 +- src/libnm-std-aux/nm-std-aux.h | 2 +- .../src/libsystemd-network/sd-dhcp6-lease.c | 2 +- src/libnmc-setting/nm-meta-setting-base-impl.c | 9 + src/libnmc-setting/nm-meta-setting-base-impl.h | 1 + src/libnmc-setting/nm-meta-setting-desc.c | 46 +- src/libnmc-setting/nm-meta-setting-desc.h | 20 +- src/libnmc-setting/settings-docs.h.in | 11 +- src/nm-cloud-setup/nmcs-provider-oci.c | 14 +- src/nm-dispatcher/nm-dispatcher.c | 2 +- src/nm-initrd-generator/meson.build | 1 + src/nm-initrd-generator/nm-initrd-generator.h | 2 + src/nm-initrd-generator/nmi-cmdline-reader.c | 22 +- src/nm-initrd-generator/nmi-nbft-reader.c | 415 ++ src/nmcli/agent.c | 2 +- src/nmcli/common.c | 2 +- src/nmcli/common.h | 10 +- src/nmcli/connections.c | 570 +- src/nmcli/connections.h | 12 +- src/nmcli/devices.c | 2 +- src/nmcli/gen-metadata-nm-settings-nmcli.xml.in | 24 +- src/nmcli/general.c | 2 +- src/nmcli/nmcli-completion | 5 +- src/nmcli/settings.c | 23 +- src/nmtui/meson.build | 1 + src/nmtui/nm-editor-utils.c | 8 + src/nmtui/nmt-connect-connection-list.c | 1 + src/nmtui/nmt-editor.c | 45 +- src/nmtui/nmt-page-loopback.c | 68 + src/nmtui/nmt-page-loopback.h | 33 + src/tests/check-potfile-list.py | 137 + .../test-client.check-on-disk/test_003.expected | 538 +- .../test-client.check-on-disk/test_004.expected | 718 ++- src/tests/client/test-client.py | 107 + tools/generate-docs-nm-settings-docs-gir.py | 28 - tools/nm-in-container | 1 + tools/nm-in-vm | 2 +- tools/test-networkmanager-service.py | 1 + vapi/NM-1.0.metadata | 1 + 178 files changed, 11994 insertions(+), 8036 deletions(-) create mode 100644 data/NetworkManager-config-initrd.service.in create mode 100644 data/NetworkManager-initrd.service.in create mode 100644 data/NetworkManager-wait-online-initrd.service.in create mode 100755 examples/python/gi/secret-agent.py create mode 100644 src/libnm-core-impl/nm-setting-prefix-delegation.c create mode 100644 src/libnm-core-public/nm-setting-prefix-delegation.h create mode 100644 src/libnm-platform/nmp-ethtool-ioctl.c create mode 100644 src/libnm-platform/nmp-ethtool-ioctl.h create mode 100644 src/libnm-platform/nmp-ethtool.c create mode 100644 src/libnm-platform/nmp-ethtool.h create mode 100644 src/nm-initrd-generator/nmi-nbft-reader.c create mode 100644 src/nmtui/nmt-page-loopback.c create mode 100644 src/nmtui/nmt-page-loopback.h create mode 100755 src/tests/check-potfile-list.py diff --git a/.gitignore b/.gitignore index eff0e18c..bf962c8a 100644 --- a/.gitignore +++ b/.gitignore @@ -84,6 +84,9 @@ test-*.trs /data/org.freedesktop.NetworkManager.policy.in /data/nm-sudo.service /data/nm-priv-helper.service +/data/NetworkManager-config-initrd.service +/data/NetworkManager-initrd.service +/data/NetworkManager-wait-online-initrd.service /docs/api/version.xml /docs/api/settings-spec.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3c36ed8..a90f3e8b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,11 +60,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: 'tag-77ec3d923fd6' - CENTOS_TAG: 'tag-7a677f4838e1' - DEBIAN_TAG: 'tag-ecad19904683' - FEDORA_TAG: 'tag-7a677f4838e1' - UBUNTU_TAG: 'tag-ecad19904683' + ALPINE_TAG: 'tag-da1ae96102c6' + CENTOS_TAG: 'tag-c8df7d2b249f' + DEBIAN_TAG: 'tag-e68f538711ec' + FEDORA_TAG: 'tag-c8df7d2b249f' + UBUNTU_TAG: 'tag-e68f538711ec' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' @@ -102,13 +102,13 @@ variables: # Build a container for each distribution + version. The ci-templates # will re-use the containers if the tag doesn't change. -tier1:fedora:41@prep: +tier1:fedora:42@prep: extends: - .fdo.container-build@fedora stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: '42' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC rules: @@ -198,13 +198,13 @@ tier2:alpine:edge@prep: when: manual allow_failure: true -tier3:fedora:40@prep: +tier3:fedora:41@prep: extends: - .fdo.container-build@fedora stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '40' + FDO_DISTRIBUTION_VERSION: '41' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC rules: @@ -212,13 +212,13 @@ tier3:fedora:40@prep: when: manual allow_failure: true -tier3:ubuntu:24.10@prep: +tier3:ubuntu:25.04@prep: extends: - .fdo.container-build@ubuntu stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '24.10' + FDO_DISTRIBUTION_VERSION: '25.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC rules: @@ -226,13 +226,13 @@ tier3:ubuntu:24.10@prep: when: manual allow_failure: true -tier3:ubuntu:24.04@prep: +tier3:ubuntu:24.10@prep: extends: - .fdo.container-build@ubuntu stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '24.04' + FDO_DISTRIBUTION_VERSION: '24.10' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC rules: @@ -240,13 +240,13 @@ tier3:ubuntu:24.04@prep: when: manual allow_failure: true -tier3:ubuntu:22.04@prep: +tier3:ubuntu:24.04@prep: extends: - .fdo.container-build@ubuntu stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '22.04' + FDO_DISTRIBUTION_VERSION: '24.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC rules: @@ -254,13 +254,13 @@ tier3:ubuntu:22.04@prep: when: manual allow_failure: true -tier3:ubuntu:20.04@prep: +tier3:ubuntu:22.04@prep: extends: - .fdo.container-build@ubuntu stage: prep variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '20.04' + FDO_DISTRIBUTION_VERSION: '22.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC rules: @@ -324,20 +324,6 @@ tier3:alpine:3.19@prep: when: manual allow_failure: true -tier3:alpine:3.18@prep: - extends: - - .fdo.container-build@alpine - stage: prep - variables: - GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '3.18' - FDO_DISTRIBUTION_TAG: $ALPINE_TAG - FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC - rules: - - if: $CI_PIPELINE_SOURCE != 'schedule' - when: manual - allow_failure: true - ################################################################# # # # tierN stage # @@ -354,7 +340,7 @@ tier3:alpine:3.18@prep: dependencies: [] -t_fedora:41: +t_fedora:42: extends: - .build@template - .fdo.distribution-image@fedora @@ -370,10 +356,10 @@ t_fedora:41: - tarball - subtree variables: - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: '42' FDO_DISTRIBUTION_TAG: $FEDORA_TAG needs: - - "tier1:fedora:41@prep" + - "tier1:fedora:42@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' @@ -461,73 +447,73 @@ t_alpine:edge: rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_fedora:40: +t_fedora:41: extends: - .build@template - .fdo.distribution-image@fedora - .nm_artifacts_debug stage: tier3 variables: - FDO_DISTRIBUTION_VERSION: '40' + FDO_DISTRIBUTION_VERSION: '41' FDO_DISTRIBUTION_TAG: $FEDORA_TAG needs: - - "tier3:fedora:40@prep" + - "tier3:fedora:41@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_ubuntu:24.10: +t_ubuntu:25.04: extends: - .build@template - .fdo.distribution-image@ubuntu - .nm_artifacts_debug stage: tier3 variables: - FDO_DISTRIBUTION_VERSION: '24.10' + FDO_DISTRIBUTION_VERSION: '25.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG needs: - - "tier3:ubuntu:24.10@prep" + - "tier3:ubuntu:25.04@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_ubuntu:24.04: +t_ubuntu:24.10: extends: - .build@template - .fdo.distribution-image@ubuntu - .nm_artifacts_debug stage: tier3 variables: - FDO_DISTRIBUTION_VERSION: '24.04' + FDO_DISTRIBUTION_VERSION: '24.10' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG needs: - - "tier3:ubuntu:24.04@prep" + - "tier3:ubuntu:24.10@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_ubuntu:22.04: +t_ubuntu:24.04: extends: - .build@template - .fdo.distribution-image@ubuntu - .nm_artifacts_debug stage: tier3 variables: - FDO_DISTRIBUTION_VERSION: '22.04' + FDO_DISTRIBUTION_VERSION: '24.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG needs: - - "tier3:ubuntu:22.04@prep" + - "tier3:ubuntu:24.04@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_ubuntu:20.04: +t_ubuntu:22.04: extends: - .build@template - .fdo.distribution-image@ubuntu - .nm_artifacts_debug stage: tier3 variables: - FDO_DISTRIBUTION_VERSION: '20.04' + FDO_DISTRIBUTION_VERSION: '22.04' FDO_DISTRIBUTION_TAG: $UBUNTU_TAG needs: - - "tier3:ubuntu:20.04@prep" + - "tier3:ubuntu:22.04@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' @@ -587,20 +573,6 @@ t_alpine:3.19: rules: - if: $CI_PIPELINE_SOURCE != 'schedule' -t_alpine:3.18: - extends: - - .build@template - - .fdo.distribution-image@alpine - - .nm_artifacts_debug - stage: tier3 - variables: - FDO_DISTRIBUTION_VERSION: '3.18' - FDO_DISTRIBUTION_TAG: $ALPINE_TAG - needs: - - "tier3:alpine:3.18@prep" - rules: - - if: $CI_PIPELINE_SOURCE != 'schedule' - ################################################################# # # # specific jobs # @@ -611,10 +583,10 @@ check-patch: extends: - .fdo.distribution-image@fedora variables: - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: '42' FDO_DISTRIBUTION_TAG: $FEDORA_TAG needs: - - "tier1:fedora:41@prep" + - "tier1:fedora:42@prep" rules: - if: $CI_PIPELINE_SOURCE != 'schedule' stage: tier1 @@ -626,10 +598,10 @@ check-tree: extends: - .fdo.distribution-image@fedora variables: - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: '42' FDO_DISTRIBUTION_TAG: $FEDORA_TAG needs: - - "tier1:fedora:41@prep" + - "tier1:fedora:42@prep" rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH allow_failure: true @@ -659,9 +631,9 @@ pages: when: never - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main' dependencies: - - "t_fedora:41: [meson+gcc+docs+valgrind]" + - "t_fedora:42: [meson+gcc+docs+valgrind]" needs: - - "t_fedora:41: [meson+gcc+docs+valgrind]" + - "t_fedora:42: [meson+gcc+docs+valgrind]" triage:issues: stage: triage @@ -678,11 +650,11 @@ coverity: extends: - .fdo.distribution-image@fedora variables: - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: '42' FDO_DISTRIBUTION_TAG: $FEDORA_TAG stage: coverity needs: - - "tier1:fedora:41@prep" + - "tier1:fedora:42@prep" rules: - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly" script: diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 39607308..526339e2 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -23,7 +23,7 @@ distributions: - name: fedora tier: 1 versions: - - '41' + - '42' # TIER 2: distribution versions that will or might use the current NM version. # Run when doing a release. @@ -54,14 +54,14 @@ distributions: - name: fedora tier: 3 versions: - - '40' + - '41' - name: ubuntu tier: 3 versions: + - '25.04' - '24.10' - '24.04' - '22.04' - - '20.04' - name: debian tier: 3 versions: @@ -72,4 +72,3 @@ distributions: - '3.21' - '3.20' - '3.19' - - '3.18' \ No newline at end of file diff --git a/.gitlab-ci/distros-info.yml b/.gitlab-ci/distros-info.yml index d96ec125..90d23993 100644 --- a/.gitlab-ci/distros-info.yml +++ b/.gitlab-ci/distros-info.yml @@ -8,13 +8,13 @@ fedora: - version: rawhide support: yes nm: main +- version: 42 + support: 2026-05-13 + nm: 1.52 + tier1-default: yes - version: 41 support: 2025-11-19 nm: 1.50 - tier1-default: yes -- version: 40 - support: 2025-05-13 - nm: 1.46 # CentOS Stream centos: @@ -77,6 +77,10 @@ ubuntu: - version: devel support: yes nm: main +- version: 25.04 + name: plucky + support: 2026-01-15 + nm: 1.52 - version: 24.10 name: oracular support: 2025-07-10 @@ -91,11 +95,6 @@ ubuntu: support: 2027-06-01 extended-support: 2032-04-21 nm: 1.36 -- version: 20.04 - name: focal - support: 2025-05-29 - extended-support: 2030-04-23 - nm: 1.22 # Debian: # cadence: every 2 years @@ -140,6 +139,3 @@ alpine: - version: 3.19 support: 2025-11-01 nm: 1.44 -- version: 3.18 - support: 2025-05-09 - nm: 1.42 diff --git a/NEWS b/NEWS index b47b76b8..5b0a9813 100644 --- a/NEWS +++ b/NEWS @@ -1,13 +1,29 @@ ============================================= -NetworkManager-1.52.1 +NetworkManager-1.54 Overview of changes since NetworkManager-1.52 ============================================= -* Fail early if we cannot get current FEC - (Forward Error Correction) value. -* Allow reapplying ovs-bridge and ovs-port properties. + +* Add support for configuring per-device IPv4 forwarding via the + "ipv4.forwarding" connection property. +* Add a new "prefix-delegation" setting containing a "subnet-id" + property that specifies the subnet to choose on the downstream + interface when using IPv6 prefix delegation. +* Support OCI baremetal in nm-cloud-setup * When activating a WireGuard connection to an IPv6 endpoint, now NetworkManager creates firewall rules to ensure that the incoming packets are not dropped by kernel reverse path filtering. +* Add support for configuring the loopback interface in nmtui. +* Most of the properties of ovs-bridge and ovs-port connections can + now be reapplied at runtime without bringing the connection down. +* Add a new "sriov.preserve-on-down" property that controls whether + NetworkManager preserves the SR-IOV parameters set on the device + when the connection is deactivated, or whether it resets them to + their default value. +* Introduce a new "ovs-dpdk.lsc-interrupt" property to configure the + Link State Change (LSC) detection mode for OVS DPDK interfaces. +* The initrd-generator now can parse the NVMe Boot Firmware Table + (NBFT) to configure networking during early boot. +* Add systemd services to provide networking in the initrd. ============================================= NetworkManager-1.52 @@ -202,7 +218,7 @@ Overview of changes since NetworkManager-1.42 lead to unexpected behaviors in case of multiconnect profiles. * Set VLAN filtering options on bridge via netlink instead of sysfs. * nm-cloud-setup now supports IMDSv2 on Amazon EC2. -* nmtui now allows to enable or disable Wi-Fi and WWAN radios. +* nmtui now supports enabling/disabling Wi-Fi and WWAN radios. * Honor ignore-carrier=no for bond/bridge/team devices. * Add version mismatch warning when running nmcli commands. @@ -367,7 +383,7 @@ Overview of changes since NetworkManager-1.38 * NetworkManager reads the kernel command line "/proc/cmdline" for several purposes, including "nm.debug" for enabling debugging and the "match.kernel-command-line" setting in the profile. NetworkManager now - first looks now for "/run/NetworkManager/proc-cmdline", which allows to + first looks now for "/run/NetworkManager/proc-cmdline", which allows one to overwrite the command line. * Improve the reapply of non-bridge properties. * Honor adding a Bluetooth NAP connection with all available methods. @@ -440,7 +456,7 @@ Overview of changes since NetworkManager-1.36 * Workaround libcurl blocking NetworkManager while resolving DNS names. * nmcli: indicate missing Wi-Fi hardware when showing rfkill setting. * nmcli: add connection migrate command to move a profile to a specified - settings plugin. This allows to convert profiles in the deprecated ifcfg-rh + settings plugin. This allows one to convert profiles in the deprecated ifcfg-rh format to keyfile. * Set "src" attribute for routes from DHCPv4 to the leased address. This helps with source address selection. @@ -572,7 +588,7 @@ and 1.32.12 are also present in NetworkManager-1.34: * core: fix adding stale local routes when address changes. * initrd: tag generated profiles with origin in user data. * core: introduce "allowed-connections" option to disallow - profiles on a device. This allows to filter out profiles + profiles on a device. This allows one to filter out profiles that originate from initrd. * core: introduce "keep-configuration" device option to forcefully activate a profile on start. @@ -633,7 +649,7 @@ Overview of changes since NetworkManager-1.30 'nm-daemon-helper' binary is spawned to perform the lookup using the 'dns' NSS module. * dhcp: honor "ID_NET_DHCP_BROADCAST" udev attribute to set the broadcast flag. - This allows to configure devices in udev for which DHCPOFFER messages are to be + This allows one to configure devices in udev for which DHCPOFFER messages are to be broadcast. * firewall: add nftables firewall backend for configuring IPv4 NAT with shared mode. Now two backends are supported, "iptables" and "nftables". The default @@ -893,16 +909,16 @@ This is a new stable release of NetworkManager. Notable changes include: in allowed-ips. * Rework implementation of settings plugins and how profiles are presisted to disk. This is a large internal refactoring of the settings plugins that - allows to migrate a connection profile between plugins. + allows one to migrate a connection profile between plugins. * In-memory profiles are now only handled by keyfile plugin and will also be - persisted to /run directory. This allows to restart NetworkManager without + persisted to /run directory. This allows one to restart NetworkManager without loosing these profiles and it provides a file-system based API for creating in-memory profiles. * Keyfile plugin now supports a read-only directory of profiles under directory "/usr/lib/NetworkManager/system-connections". Such profiles still can be modified and deleted via D-Bus, which results in writing profiles to /etc or /run that shadow the read-only files. -* Add new D-Bus method AddConnection2() that allows to block autoconnect of +* Add new D-Bus method AddConnection2() that allows one to block autoconnect of the profile at the moment when creating the profile. Also add support for this API to libnm. * Add flag "no-reapply" to Update2() D-Bus method. Normally, when a connection diff --git a/README.md b/README.md index f536295a..0a56d783 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,14 @@ contrib/fedora/rpm/NetworkManager.conf for how to enable debug logging in NetworkManager. +Requirements +------------ + +NetworkManager requires: + +- Linux kernel >= 5.6 for some ethtool options (pause, eee, ring) + + Documentation ------------- diff --git a/config.h.meson b/config.h.meson index 9ae88b26..d41304db 100644 --- a/config.h.meson +++ b/config.h.meson @@ -280,3 +280,8 @@ /* Define to 1 if you have history support from -lreadline. */ #mesondefine HAVE_READLINE_HISTORY +/* Define if NBFT support is enabled */ +#mesondefine WITH_NBFT + +/* Define to 1 if dlvsym() is available */ +#mesondefine HAVE_DLVSYM diff --git a/contrib/alpine/REQUIRED_PACKAGES b/contrib/alpine/REQUIRED_PACKAGES index 358214fd..6f0e86fd 100755 --- a/contrib/alpine/REQUIRED_PACKAGES +++ b/contrib/alpine/REQUIRED_PACKAGES @@ -24,6 +24,7 @@ apk add \ 'jansson-dev' \ 'libgudev-dev' \ 'libndp-dev' \ + 'libnvme-dev' \ 'libnl3-dev' \ 'libpsl-dev' \ 'libsoup-dev' \ diff --git a/contrib/debian/REQUIRED_PACKAGES b/contrib/debian/REQUIRED_PACKAGES index fa73b21a..d91e54d2 100755 --- a/contrib/debian/REQUIRED_PACKAGES +++ b/contrib/debian/REQUIRED_PACKAGES @@ -56,6 +56,7 @@ install \ libndp-dev \ libnewt-dev \ libnss3-dev \ + libnvme-dev \ libpolkit-gobject-1-dev \ libpsl-dev \ libreadline-dev \ diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index 1bb7ec6b..38a2cbbf 100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -66,6 +66,7 @@ install \ jq \ libcurl-devel \ libndp-devel \ + libnvme-devel \ libselinux-devel \ libtool \ libuuid-devel \ diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 22a1a49c..788e9ead 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -307,6 +307,7 @@ BuildRequires: libubsan BuildRequires: firewalld-filesystem BuildRequires: iproute BuildRequires: iproute-tc +BuildRequires: libnvme-devel >= 1.5 Provides: %{name}-dispatcher%{?_isa} = %{epoch}:%{version}-%{release} @@ -761,6 +762,11 @@ rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/pppd/%{ppp_version}/*.la rm -f %{buildroot}%{nmplugindir}/*.la +# Don't use the *-initrd.service files yet, wait dracut to support them +rm -f %{buildroot}%{_unitdir}/NetworkManager-config-initrd.service +rm -f %{buildroot}%{_unitdir}/NetworkManager-initrd.service +rm -f %{buildroot}%{_unitdir}/NetworkManager-wait-online-initrd.service + # Ensure the documentation timestamps are constant to avoid multilib conflicts find %{buildroot}%{_datadir}/gtk-doc -exec touch --reference meson.build '{}' \+ diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh index 2dbca0e7..68599bda 100755 --- a/contrib/fedora/rpm/build_clean.sh +++ b/contrib/fedora/rpm/build_clean.sh @@ -143,7 +143,7 @@ while [[ $# -gt 0 ]]; do ;; --no-auto-with-test) # by default, the script adds "-w test" (unless the command line contains - # "-w test" or "-W test"). This flags allows to suppress that automatism. + # "-w test" or "-W test"). This flag suppresses that automatism. # It's really only useful to test the spec file's internal default for the # "test" option. Otherwise, you can always just explicitly select "-w test" # or "-W test". diff --git a/contrib/fedora/utils/makerepo.sh b/contrib/fedora/utils/makerepo.sh index e81c478b..25c42db5 100755 --- a/contrib/fedora/utils/makerepo.sh +++ b/contrib/fedora/utils/makerepo.sh @@ -265,9 +265,11 @@ detect_dirname() { # At some point FEDPKG changed the behavior of "prep" command # now it generates the directory with "-build" suffix and the # real directory inside. We just move it out. - rm -rf $D - mv $D-build/$D . - rm -rf $D-build + if [ -d "$D-build" ]; then + rm -rf "$D" + mv "$D-build/$D" . + rm -rf "$D-build" + fi [[ -d "$D" ]] && DIRS=("${DIRS[@]}" "$D") done done diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index 3864620f..4881d110 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -54,10 +54,15 @@ _WITH_WERROR=1 _WITH_LIBTEAM="true" _WITH_DOCS="true" _WITH_SYSTEMD_LOGIND="true" +_WITH_NBFT="true" if [ $IS_ALPINE = 1 ]; then _WITH_SYSTEMD_LOGIND="false" fi +if ! pkgconf 'libnvme >= 1.5'; then + _WITH_NBFT="false" +fi + if [ -z "${NMTST_SEED_RAND+x}" ]; then NMTST_SEED_RAND="$SRANDOM" if [ -z "$NMTST_SEED_RAND" ]; then @@ -181,6 +186,8 @@ meson setup build \ -D ifcfg_rh=false \ -D ifupdown=true \ \ + -D nbft=$_WITH_NBFT \ + \ #end export NM_TEST_CLIENT_CHECK_L10N=1 diff --git a/data/NetworkManager-config-initrd.service.in b/data/NetworkManager-config-initrd.service.in new file mode 100644 index 00000000..4baf0f64 --- /dev/null +++ b/data/NetworkManager-config-initrd.service.in @@ -0,0 +1,27 @@ +[Unit] +Description=NetworkManager Configuration (initrd) +DefaultDependencies=no +Wants=systemd-journald.socket +After=systemd-journald.socket +Before=systemd-udevd.service systemd-udev-trigger.service +ConditionPathExists=/etc/initrd-release + +[Service] +Type=oneshot +ExecStartPre=/bin/sh -c "rm -f /run/NetworkManager/system-connections/*" +ExecStart=/bin/sh -c "@libexecdir@/nm-initrd-generator -- $(cat /proc/cmdline)" +ExecStartPost=/bin/sh -c ' \ + for i in /{usr/lib,run,etc}/NetworkManager/system-connections/*; do \ + [ -f "$i" ] || continue; \ + mkdir -p /run/NetworkManager/initrd; \ + : > /run/NetworkManager/initrd/neednet; \ + break; \ + done; \ + if [ -s /run/NetworkManager/initrd/hostname ]; then \ + cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname; \ + fi \ +' +RemainAfterExit=yes + +[Install] +WantedBy=initrd.target diff --git a/data/NetworkManager-initrd.service.in b/data/NetworkManager-initrd.service.in new file mode 100644 index 00000000..aef73a57 --- /dev/null +++ b/data/NetworkManager-initrd.service.in @@ -0,0 +1,32 @@ +[Unit] +Description=NetworkManager (initrd) +DefaultDependencies=no +Wants=systemd-udev-trigger.service network.target +After=systemd-udev-trigger.service network-pre.target dbus.service NetworkManager-config-initrd.service +Before=network.target +BindsTo=dbus.service +ConditionPathExists=/etc/initrd-release +ConditionPathExists=/run/NetworkManager/initrd/neednet +ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/* +ConditionPathExistsGlob=|/run/NetworkManager/system-connections/* +ConditionPathExistsGlob=|/etc/NetworkManager/system-connections/* + +[Service] +Type=dbus +BusName=org.freedesktop.NetworkManager +ExecReload=/usr/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Reload u 0 +ExecStart=@sbindir@/NetworkManager +# NM doesn't want systemd to kill its children for it +KillMode=process +Environment=NM_CONFIG_ENABLE_TAG=initrd +Restart=on-failure +ProtectSystem=true +ProtectHome=read-only + +[Install] +WantedBy=initrd.target +# We want to enable NetworkManager-wait-online-initrd.service whenever this +# service is enabled. NetworkManager-wait-online-initrd.service has +# WantedBy=network-online.target, so enabling it only has an effect if +# network-online.target itself is enabled or pulled in by some other unit. +Also=NetworkManager-config-initrd.service NetworkManager-wait-online-initrd.service diff --git a/data/NetworkManager-wait-online-initrd.service.in b/data/NetworkManager-wait-online-initrd.service.in new file mode 100644 index 00000000..da4a2522 --- /dev/null +++ b/data/NetworkManager-wait-online-initrd.service.in @@ -0,0 +1,26 @@ +[Unit] +Description=NetworkManager Wait Online (initrd) +DefaultDependencies=no +Requires=NetworkManager-initrd.service +After=NetworkManager-initrd.service +Before=network-online.target +ConditionPathExists=/etc/initrd-release +ConditionPathExists=/run/NetworkManager/initrd/neednet + +[Service] +# `nm-online -s` waits until the point when NetworkManager logs +# "startup complete". That is when startup actions are settled and +# devices and profiles reached a conclusive activated or deactivated +# state. It depends on which profiles are configured to autoconnect and +# also depends on profile settings like ipv4.may-fail/ipv6.may-fail, +# which affect when a profile is considered fully activated. +# Check NetworkManager logs to find out why wait-online takes a certain +# time. + +Type=oneshot +ExecStart=@bindir@/nm-online -s -q +RemainAfterExit=yes +Environment=NM_ONLINE_TIMEOUT=3600 + +[Install] +WantedBy=initrd.target network-online.target diff --git a/data/meson.build b/data/meson.build index facdab8d..b77bf434 100644 --- a/data/meson.build +++ b/data/meson.build @@ -13,6 +13,9 @@ if install_systemdunitdir 'NetworkManager.service', 'nm-priv-helper.service', 'NetworkManager-wait-online.service', + 'NetworkManager-config-initrd.service', + 'NetworkManager-initrd.service', + 'NetworkManager-wait-online-initrd.service', ] foreach service: services diff --git a/data/nm-priv-helper.service.in b/data/nm-priv-helper.service.in index 7b083bbb..d4ff25d9 100644 --- a/data/nm-priv-helper.service.in +++ b/data/nm-priv-helper.service.in @@ -2,8 +2,8 @@ Description=NetworkManager Privileged Helper # -# nm-priv-helper exists for privilege separation. It allows to run -# NetworkManager without certain capabilities, and ask nm-priv-helper +# nm-priv-helper exists for privilege separation. It allows NetworkManager +# to run without certain capabilities, and ask nm-priv-helper # for special operations where more privileges are required. # diff --git a/docs/libnm/libnm-docs.xml b/docs/libnm/libnm-docs.xml index 4ed07939..39f62417 100644 --- a/docs/libnm/libnm-docs.xml +++ b/docs/libnm/libnm-docs.xml @@ -341,6 +341,7 @@ print ("NetworkManager version " + client.get_version())]]> + diff --git a/examples/python/gi/gmaincontext.py b/examples/python/gi/gmaincontext.py index fcbcd61b..da8c89c5 100755 --- a/examples/python/gi/gmaincontext.py +++ b/examples/python/gi/gmaincontext.py @@ -188,7 +188,7 @@ def create_nmc(dbus_connection): # which has an overhead. # # Also, split the GObject creation and the init_async() call in two. - # That allows to pass construct-only parameters, in particular like + # That allows one to pass construct-only parameters, in particular like # the instance_flags. # Create a separate context for the NMClient. The NMClient is strongly diff --git a/examples/python/gi/secret-agent.py b/examples/python/gi/secret-agent.py new file mode 100755 index 00000000..ed3272ab --- /dev/null +++ b/examples/python/gi/secret-agent.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python +# SPDX-License-Identifier: LGPL-2.1-or-later + +import gi + +gi.require_version("NM", "1.0") +from gi.repository import GLib, NM, Gio + +# This example shows how to implement a very simple secret agent for +# NetworkManager. The secret agent registers to the NM daemon and can +# provide missing secrets like Wi-Fi or VPN passwords. Set environment +# variable "LIBNM_CLIENT_DEBUG=trace" to enable libnm verbose logging. + + +class SecretAgent(NM.SecretAgentOld): + def __init__(self): + super().__init__(identifier="MySecretAgent") + super().init() + + def do_get_secrets( + self, + connection, + connection_path, + setting_name, + hints, + flags, + callback, + callback_data, + ): + print( + "get_secrets for '{}', interface '{}', setting '{}'".format( + connection.get_id(), connection.get_interface_name(), setting_name + ) + ) + + # Implement here the logic to retrieve the secrets. + # As an example, we return a hardcoded Wi-Fi PSK. + if ( + connection.get_connection_type() == "802-11-wireless" + and setting_name == "802-11-wireless-security" + ): + s_wifi = connection.get_setting_wireless() + ssid = NM.utils_ssid_to_utf8(s_wifi.get_ssid().get_data()) + + if ssid == "home": + secrets = GLib.Variant( + "a{sa{sv}}", + { + "802-11-wireless-security": { + "psk": GLib.Variant("s", "abcd1234") + } + }, + ) + print("Sending secrets {}".format(secrets)) + callback(self, connection, secrets, None) + return + + # We don't have the secret, NM will ask to another agent or fail + callback( + self, + connection, + None, + GLib.GError.new_literal( + NM.SecretAgentError.quark(), + "No secrets found", + NM.SecretAgentError.NOSECRETS, + ), + ) + + def do_cancel_get_secrets(self, connection_path, connection_name): + pass + + def do_save_secrets(self, connection, connection_path, callback, callback_data): + # Implement this if you want to store "agent-owned" secrets + callback(self, connection, None) + + def do_delete_secrets(self, connection, connection_path, callback, callback_data): + # Implement this if you want to store "agent-owned" secrets + callback(self, connection, None) + + +def main(): + agent = SecretAgent() + loop = GLib.MainLoop() + try: + loop.run() + except KeyboardInterrupt: + print("Exiting Secret Agent...") + + +if __name__ == "__main__": + main() diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml index 36f7f5d0..085d2a1f 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.xml @@ -321,7 +321,7 @@