summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml98
-rw-r--r--.gitlab-ci/ci.template12
-rw-r--r--.gitlab-ci/config.yml13
-rwxr-xr-x.gitlab-ci/fedora-install.sh16
-rwxr-xr-x.gitlab-ci/run-test.sh58
-rw-r--r--.gitlab/issue_templates/Security_Vulnerability.md26
-rw-r--r--MAINTAINERS.md106
-rw-r--r--NEWS7
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec15
-rwxr-xr-xcontrib/fedora/rpm/configure-for-system.sh41
-rwxr-xr-xcontrib/fedora/rpm/release.sh28
-rw-r--r--man/NetworkManager.conf.xml2
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/ca.po2
-rw-r--r--po/de.po2
-rw-r--r--po/ka.po2
-rw-r--r--po/ru.po2
-rw-r--r--po/sv.po2
-rw-r--r--po/tr.po2
-rw-r--r--po/uk.po2
-rw-r--r--src/core/devices/nm-device-bridge.c12
-rw-r--r--src/core/devices/nm-device.c8
-rw-r--r--src/core/devices/nm-device.h3
-rw-r--r--src/core/devices/wifi/nm-device-iwd.c4
-rw-r--r--src/core/dhcp/nm-dhcp-options.c8
-rw-r--r--src/core/nm-active-connection.c62
-rw-r--r--src/core/nm-active-connection.h1
-rw-r--r--src/core/nm-config-data.c2
-rw-r--r--src/core/nm-l3-config-data.c83
-rw-r--r--src/core/nm-l3-config-data.h7
-rw-r--r--src/core/nm-l3cfg.c9
-rw-r--r--src/core/nm-manager.c24
-rw-r--r--src/core/platform/tests/test-common.c6
-rw-r--r--src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c7
-rw-r--r--src/core/supplicant/nm-supplicant-settings-verify.c33
-rw-r--r--src/core/vpn/nm-vpn-connection.c48
-rw-r--r--src/libnm-client-impl/nm-libnm-utils.h17
-rw-r--r--src/libnm-client-impl/tests/test-libnm.c8
-rw-r--r--src/libnm-core-impl/nm-setting-ip6-config.c2
-rw-r--r--src/libnm-core-impl/nm-setting-private.h5
-rw-r--r--src/libnm-core-impl/nm-utils.c7
-rw-r--r--src/libnm-glib-aux/nm-prioq.h11
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.h39
-rw-r--r--src/libnm-platform/nm-platform-utils.c16
-rw-r--r--src/libnm-platform/nmp-object.c3
-rw-r--r--src/libnm-platform/nmp-object.h11
-rw-r--r--src/libnmc-setting/settings-docs.h.in2
-rw-r--r--src/nmcli/gen-metadata-nm-settings-nmcli.xml.in2
-rw-r--r--src/nmcli/nmcli.c87
49 files changed, 589 insertions, 375 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d47903aa77..baf4ac1c95 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,11 +59,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
- ALPINE_TAG: 'tag-ed94fd969369'
- CENTOS_TAG: 'tag-dc93a9c129f8'
- DEBIAN_TAG: 'tag-3766b6cf1e7d'
- FEDORA_TAG: 'tag-dc93a9c129f8'
- UBUNTU_TAG: 'tag-3766b6cf1e7d'
+ ALPINE_TAG: 'tag-4cf5505b3b7d'
+ CENTOS_TAG: 'tag-f78e39f6e045'
+ DEBIAN_TAG: 'tag-f7bdc50d0819'
+ FEDORA_TAG: 'tag-f78e39f6e045'
+ UBUNTU_TAG: 'tag-f7bdc50d0819'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
@@ -111,29 +111,33 @@ tier1:fedora:40@prep:
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
-tier1:fedora:rawhide@prep:
+tier2:centos:stream9@prep:
extends:
- - .fdo.container-build@fedora
+ - .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
- FDO_DISTRIBUTION_VERSION: 'rawhide'
- FDO_DISTRIBUTION_TAG: $FEDORA_TAG
- FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
+ FDO_DISTRIBUTION_VERSION: 'stream9'
+ FDO_DISTRIBUTION_TAG: $CENTOS_TAG
+ FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
+ when: manual
+ allow_failure: true
-tier1:centos:stream9@prep:
+tier2:fedora:rawhide@prep:
extends:
- - .fdo.container-build@centos
+ - .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
- FDO_DISTRIBUTION_VERSION: 'stream9'
- FDO_DISTRIBUTION_TAG: $CENTOS_TAG
- FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
+ FDO_DISTRIBUTION_VERSION: 'rawhide'
+ FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+ FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
+ when: manual
+ allow_failure: true
tier2:debian:sid@prep:
extends:
@@ -342,13 +346,9 @@ t_fedora:40:
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- - autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- - autotools+clang
- meson+clang
- - rpm+autotools
- rpm+meson
- - tarball+autotools
- tarball+meson
- tarball
- subtree
@@ -360,57 +360,31 @@ t_fedora:40:
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
-t_fedora:rawhide:
+t_centos:stream9:
extends:
- .build@template
- - .fdo.distribution-image@fedora
- - .nm_artifacts
- stage: tier1
- parallel:
- matrix:
- - NM_TEST_SELECT_RUN:
- - autotools+gcc+docs+valgrind
- - meson+gcc+docs+valgrind
- - autotools+clang
- - meson+clang
- - rpm+autotools
- - rpm+meson
- - tarball+autotools
- - tarball+meson
- - tarball
- - subtree
+ - .fdo.distribution-image@centos
+ - .nm_artifacts_debug
+ stage: tier2
variables:
- FDO_DISTRIBUTION_VERSION: 'rawhide'
- FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+ FDO_DISTRIBUTION_VERSION: 'stream9'
+ FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- - "tier1:fedora:rawhide@prep"
+ - "tier2:centos:stream9@prep"
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
-t_centos:stream9:
+t_fedora:rawhide:
extends:
- .build@template
- - .fdo.distribution-image@centos
+ - .fdo.distribution-image@fedora
- .nm_artifacts_debug
- stage: tier1
- parallel:
- matrix:
- - NM_TEST_SELECT_RUN:
- - autotools+gcc+docs+valgrind
- - meson+gcc+docs+valgrind
- - autotools+clang
- - meson+clang
- - rpm+autotools
- - rpm+meson
- - tarball+autotools
- - tarball+meson
- - tarball
- - subtree
+ stage: tier2
variables:
- FDO_DISTRIBUTION_VERSION: 'stream9'
- FDO_DISTRIBUTION_TAG: $CENTOS_TAG
+ FDO_DISTRIBUTION_VERSION: 'rawhide'
+ FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- - "tier1:centos:stream9@prep"
+ - "tier2:fedora:rawhide@prep"
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
@@ -650,9 +624,9 @@ pages:
when: never
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
dependencies:
- - "t_fedora:40: [autotools+gcc+docs+valgrind]"
+ - "t_fedora:40: [meson+gcc+docs+valgrind]"
needs:
- - "t_fedora:40: [autotools+gcc+docs+valgrind]"
+ - "t_fedora:40: [meson+gcc+docs+valgrind]"
# triage:issues:
# stage: triage
@@ -680,5 +654,7 @@ clean-images:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- - if: $CI_PIPELINE_SOURCE == 'push'
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+ when: never
+ - if: $CI_COMMIT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'schedule'
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template
index 28e4ca25e3..c6776406e3 100644
--- a/.gitlab-ci/ci.template
+++ b/.gitlab-ci/ci.template
@@ -156,13 +156,9 @@ t_{{distro.name}}:{{version}}:
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- - autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- - autotools+clang
- meson+clang
- - rpm+autotools
- rpm+meson
- - tarball+autotools
- tarball+meson
- tarball
- subtree
@@ -237,9 +233,9 @@ pages:
when: never
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
dependencies:
- - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]"
+ - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
needs:
- - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]"
+ - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
# triage:issues:
# stage: triage
@@ -267,5 +263,7 @@ clean-images:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- - if: $CI_PIPELINE_SOURCE == 'push'
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+ when: never
+ - if: $CI_COMMIT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'schedule'
diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml
index 4e97ecf187..c0f3538342 100644
--- a/.gitlab-ci/config.yml
+++ b/.gitlab-ci/config.yml
@@ -24,14 +24,17 @@ distributions:
tier: 1
versions:
- '40'
- - rawhide
- - name: centos
- tier: 1
- versions:
- - 'stream9'
# TIER 2: distribution versions that will or might use the current NM version.
# Run when doing a release.
+ - name: centos
+ tier: 2
+ versions:
+ - 'stream9'
+ - name: fedora
+ tier: 2
+ versions:
+ - rawhide
- name: debian
tier: 2
versions:
diff --git a/.gitlab-ci/fedora-install.sh b/.gitlab-ci/fedora-install.sh
index 5ffb461c5e..3bd4698366 100755
--- a/.gitlab-ci/fedora-install.sh
+++ b/.gitlab-ci/fedora-install.sh
@@ -5,6 +5,7 @@ set -ex
IS_FEDORA=0
IS_CENTOS=0
CENTOS_VERSION=0
+FEDORA_VERSION=0
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
if [ $IS_CENTOS = 1 ]; then
@@ -45,9 +46,22 @@ yum install -y glibc-langpack-pl ccache clang
# to generate proper documentation.
yum reinstall -y --setopt='tsflags=' glib2-doc
+if [ $IS_FEDORA = 1 ]; then
+ FEDORA_VERSION=$(cat /etc/os-release | grep '^VERSION_ID=' | sed s\/"VERSION_ID="\/\/)
+fi
+
if command -v dnf &>/dev/null; then
dnf install -y python3-dnf-plugins-core
- dnf debuginfo-install -y glib2
+ # Fedora 41 migrated to DNF5 and the debuginfo-install plugin is not implemented yet
+ # therefore we need to enable the repo and install the debuginfo subpackage manually
+ if [ $FEDORA_VERSION -lt "41" ]; then
+ dnf debuginfo-install -y glib2
+ else
+ dnf install -y dnf5-plugins
+ dnf config-manager setopt fedora-debuginfo.enabled=1
+ dnf config-manager setopt rawhide-debuginfo.enabled=1 || true
+ dnf install -y glib2-debuginfo
+ fi
else
debuginfo-install -y glib2
fi
diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh
index cd12220315..4091cdd40a 100755
--- a/.gitlab-ci/run-test.sh
+++ b/.gitlab-ci/run-test.sh
@@ -40,7 +40,7 @@ uname -a
meson --version
! command -v dpkg &>/dev/null || dpkg -l
-! command -v yum &>/dev/null || yum list installed
+! command -v dnf &>/dev/null || dnf list --installed
! command -v apk &>/dev/null || apk -v info
# We have a unit test that check that `ci-fairy generate-template`
@@ -57,13 +57,9 @@ check_run_assert() {
# These are the supported $NM_TEST_SELECT_RUN values.
local _CHECK_RUN_LIST=(
- autotools+gcc+docs+valgrind
meson+gcc+docs+valgrind
- autotools+clang
meson+clang
- rpm+autotools
rpm+meson
- tarball+autotools
tarball+meson
tarball
subtree
@@ -110,17 +106,13 @@ check_run_clean() {
return 0
}
-if check_run_clean autotools+gcc+docs+valgrind ; then
- BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
- mv build/INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
+if check_run_clean meson+gcc+docs+valgrind ; then
+ BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
+ mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
fi
-check_run_clean meson+gcc+docs+valgrind && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
-check_run_clean autotools+clang && BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
-check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
-
-check_run_clean rpm+autotools && test $IS_FEDORA = 1 -o $IS_CENTOS = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson
-check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
+check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
+check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r
@@ -129,41 +121,7 @@ if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
do_clean
fi
-if check_run_clean tarball+autotools; then
- BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
- pushd ./build
- # dist & build with autotools
- make distcheck -j$(nproc)
-
- # build with meson
- DISTSRC="./distsrc-$RANDOM"
- mkdir $DISTSRC
- tar xvf ./NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
- pushd $DISTSRC
- BUILD_TYPE=meson CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
- popd
- popd
- do_clean
-fi
-
-if check_run_clean tarball+meson; then
- BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
- pushd ./build
- # dist with meson/ninja
- ninja dist
-
- # build with autotools
- DISTSRC="./distsrc-$RANDOM"
- mkdir $DISTSRC
- tar xvf ./meson-dist/NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
- pushd $DISTSRC
- BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
- popd
- rm -rf $DISTSRC
- popd
- do_clean
-fi
-
+check_run_clean tarball+meson && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
###############################################################################
@@ -202,7 +160,7 @@ fi
if [ "$NM_BUILD_TARBALL" = 1 ]; then
do_clean
- if check_run autotools+gcc+docs+valgrind ; then
+ if check_run meson+gcc+docs+valgrind ; then
mv "$ARTIFACT_DIR/docs-html/" ./
fi
if check_run tarball ; then
diff --git a/.gitlab/issue_templates/Security_Vulnerability.md b/.gitlab/issue_templates/Security_Vulnerability.md
new file mode 100644
index 0000000000..b8bb43b33e
--- /dev/null
+++ b/.gitlab/issue_templates/Security_Vulnerability.md
@@ -0,0 +1,26 @@
+/confidential
+/label ~"workflow::triage"
+
+## Summary
+
+(Summarize the security vulnerability encountered concisely)
+
+## Version affected
+
+(Which version of NetworkManager is affected (`nmcli --version`), which distro, and the version of any other relevant software involved)
+
+## Vulnerability details
+* **Type:** (e.g., Buffer overflow, injection flaws, ...)
+* **Severity:** (High/Medium/Low)
+* **Any other vulnerability details:**
+
+## Steps to reproduce
+
+## Actual result
+
+## Expected result
+
+## Relevant logs
+
+(Please see the DEBUGGING section of "[man NetworkManager](https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/NetworkManager.html)" and attach any relevant log)
+
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index 2eeb75b0ec..865cda3dbc 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -159,14 +159,114 @@ In practice when we want to backport new API from main we have two options:
19d7e66099ee43f47d6be0e740dc710fc365d200. Then, on main we add duplicate
symbols with commit 5eade4da11ee38a0e7faf4a87b2c2b5af07c5eeb.
-### Reimporting systemd
+
+NetworkManager release process
+------------------------------
+
+It's mostly automated by [release.sh](contrib/fedora/rpm/release.sh).
+
+Before running the script:
+- For stable releases, remember to backport all commits with "Fixes:" tag that
+ are applicable. Use the [find-backports](contrib/scripts/find-backports)
+ script to find them.
+- Start all the jobs in the latest Gitlab pipeline of the right branch. The
+ script checks that they ran successfully.
+ Tiers 1 and 2 must pass, failed Tier 3 jobs can be fixed after the release.
+
+The script also takes care of choosing the right version number depending on the
+release type that you specify, like devel, rc1, rc, major, major-post, etc.
+Run the script with `--help` to see all options.
+
+Notes:
+- You need access to master.gnome.org, see [here](https://handbook.gnome.org/infrastructure/accounts.html).
+- The GPG key used to sign the tags must be exported to a keyserver.
+
+Versioning scheme, automatically handled by the script (version numbers are
+called MAJOR.MINOR.MICRO):
+- Development releases has an odd MINOR version number (i.e. `1.47.2`).
+- Stable releases has an even MINOR version number (i.e. `1.48.1`).
+- Release candidates (RC) are tagged like `1.48-rc1`, `1.48-rc2`, etc. But in
+ NM's internal code they looks like `1.47.90`, `1.47.91`, etc. (MINOR is one
+ number less, and MICRO is >= 90).
+
+The main differences between the different kind of releases are:
+- Development releases: for depelopment and testing purposes only.
+- Release candidates (RC): stabilization phase before a stable release. Normally
+ there are one or two RCs with ~2 weeks cadence. More RCs can be releases if
+ they are needed.
+- Stable releases: Releases within the same stable branch should remain very
+ stable while fixing important bugs, backported from `main`. New features are
+ added very rarely.
+
+Stable branches are branched out from `main` to prepare the first release
+candidate (RC) of the next stable branch. These branches are called `nm-MAJOR-MINOR`
+(i.e. `nm-1-48`). As they are used to release stable versions, the last number
+is always even.
+
+There are some additional tasks that the script doesn't handle:
+- For RC releases:
+ - The NEWS file should reflect a curated summary of the changes that the new
+ stable release will include.
+ - The release should be announced on the mailing list.
+- For stable releases:
+ - The official documentation must be updated on the website when there is a new
+ stable release. Use the [import-docs.sh](https://gitlab.freedesktop.org/NetworkManager/networkmanager.pages.freedesktop.org/-/blob/main/scripts/import-docs.sh)
+ script from the website's repo.
+ - The release should be announced on the mailing list.
+
+
+VPN plugins and nm-applet release process
+-----------------------------------------
+
+The same versioning scheme and release process is used for the VPN plugins,
+nm-applet (including nm-connection-editor) and libnma.
+
+Note that each of them is hosted in its own repository, but this is documented
+here to avoid duplication, as the process is the same for all (at least for
+those that we maintain).
+
+Also note that there are no stable branches or development versions. Everything
+is developed on main, and releases are done on main.
+
+Versioning scheme (version numbers are called MAJOR.MINOR.MICRO):
+- Small changes increments only the MICRO number.
+- Bigger changes or new features increments the MINOR number.
+- There is no strict criteria to define what change is small or big, but try to
+ adhere mostly to [semantic versioning](https://semver.org/).
+- Use only even numbers for MINOR, skipping odd ones. That way we use the same
+ versioning scheme than the main NM project despite there are no development
+ versions here.
+
+When doing a release, follow this process:
+1. Ensure that `NEWS` file is up to date.
+2. Increment the version in `configure.ac`, commit and tag the commit. Example:
+ `git tag -s 1.2.8 -m 'Tag 1.2.8'`.
+3. Ensure that you are on the right commit and create the tarball:
+ `git clean -fdx && ./autogen.sh && make distcheck`
+4. Upload the tarball: `scp ./*-*.tar.xz "$user@master.gnome.org:"`
+5. Login to `master.gnome.org` and run `ftpadmin install`.
+ Ensure the new tarballs show up at https://download.gnome.org/sources/
+ (happens after a short delay)
+6. Announce the release on the mailing list.
+
+Notes:
+- You need access to master.gnome.org, see [here](https://handbook.gnome.org/infrastructure/accounts.html).
+- The GPG key used to sign the tags must be exported to a keyserver.
+
+
+Reimporting systemd
+-------------------
See [here](src/libnm-systemd-shared/README.md#reimport-upstream-code).
-### Copr repository
+
+Copr repository
+---------------
See [here](contrib/scripts/nm-copr-build.sh).
-### gitlab-ci Pipelines
+
+Gitlab-ci Pipelines
+-------------------
See [here](.gitlab-ci/README.md).
diff --git a/NEWS b/NEWS
index baf5a7afd6..ac07735a64 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,11 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
when IPv6 device address was not explicitly passed on by ModemManager
* Fix a performance issue that was leading to 100% CPU usage by NetworkManager
if external programs were doing a big amount of routes updates.
+* Patch-level development releases (i.e. 1.48.1-dev) won't be used anymore.
+ From now on, all the patch releases whithin a stable branch will be normal
+ releases, like 1.48.0, 1.48.1, 1.48.2, 1.48.3 and so on.
+ Odd numbers in the minor version number still indicates if it's a development
+ branch like 1.49 or a stable one like 1.48.
=============================================
NetworkManager-1.46
@@ -791,7 +796,7 @@ This is a new stable release of NetworkManager. Notable changes include:
* The libnm-glib library, deprecated in favor of libnm since NetworkManager 1.0,
and disabled by default since NetworkManager 1.12, has now been removed.
-* The DHCP client now defaults to "internal". The default can be overriden
+* The DHCP client now defaults to "internal". The default can be overridden
at build time by using the --with-config-dhcp-default option of the
configure script or at run time by setting the main.dhcp option in the
configuration file.
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index e59e7c8008..ee67a05d3e 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -259,11 +259,26 @@ Obsoletes: NetworkManager < %{obsoletes_ifcfg_rh}
Requires: wpa_supplicant >= 1:1.1
%endif
+%if 0%{?rhel} && 0%{?rhel} >= 10
+%if 0%{without team}
+Obsoletes: NetworkManager-team < 1:1.47.5-3
+%endif
+Obsoletes: NetworkManager-initscripts-ifcfg-rh < 1:1.47.5-3
+Obsoletes: NetworkManager-dispatcher-routing-rules < 1:1.47.5-3
+%endif
+
Conflicts: NetworkManager-vpnc < 1:0.7.0.99-1
Conflicts: NetworkManager-openvpn < 1:0.7.0.99-1
Conflicts: NetworkManager-pptp < 1:0.7.0.99-1
Conflicts: NetworkManager-openconnect < 0:0.7.0.99-1
Conflicts: kde-plasma-networkmanagement < 1:0.9-0.49.20110527git.nm09
+%if 0%{?rhel} && 0%{?rhel} >= 10
+%if 0%{without team}
+Conflicts: NetworkManager-team <= 1:1.47.5-3
+%endif
+Conflicts: NetworkManager-initscripts-ifcfg-rh <= 1:1.47.5-3
+Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3
+%endif
BuildRequires: make
BuildRequires: gcc
diff --git a/contrib/fedora/rpm/configure-for-system.sh b/contrib/fedora/rpm/configure-for-system.sh
index 1af647d51c..37966ae40c 100755
--- a/contrib/fedora/rpm/configure-for-system.sh
+++ b/contrib/fedora/rpm/configure-for-system.sh
@@ -30,7 +30,7 @@ vars_with_vals() {
}
usage() {
- echo "$ $0 [-m|--meson] [-a|--autotools] [-s|--show] [-B|--no-build] [-h|--help]"
+ echo "$ $0 [-m|--meson <builddir>] [-a|--autotools] [-s|--show] [-B|--no-build] [-h|--help]"
echo ""
echo "Configure NetworkManager in a way that is similar to when building"
echo "RPMs of NetworkManager for Fedora/RHEL. The effect is that \`make install\`"
@@ -149,7 +149,9 @@ P_NOBUILD="${NOBUILD-0}"
P_DEBUG="${DEBUG-1}"
-P_BUILD_TYPE="${BUILD_TYPE-}"
+P_BUILD_TYPE="${BUILD_TYPE-meson}"
+P_MESON_BUILDDIR="${MESON_BUILDDIR-./build}"
+[ -n "$MESON_BUILDDIR" ] && P_MESON_BUILDDIR_FORCE=1
P_CFLAGS="${CFLAGS-}"
P_CC="${CC-$((! command -v gcc && command -v clang) &>/dev/null && echo clang || echo gcc)}"
@@ -306,22 +308,15 @@ else
P_CFLAGS="-g -O2 -fexceptions${P_CFLAGS:+ }$P_CFLAGS"
fi
-if [ -z "$P_BUILD_TYPE" ] ; then
- if [ -d ./build -a ! -f ./configure ] ; then
- P_BUILD_TYPE=meson
- elif [ ! -d ./build -a -f ./configure ] ; then
- P_BUILD_TYPE=autotools
- else
- P_BUILD_TYPE=autotools
- fi
-fi
-
while [[ $# -gt 0 ]] ; do
A="$1"
shift
case "$A" in
--meson|-m)
P_BUILD_TYPE=meson
+ P_MESON_BUILDDIR="$1"
+ P_MESON_BUILDDIR_FORCE=1
+ shift
;;
--autotools|-a)
P_BUILD_TYPE=autotools
@@ -343,11 +338,19 @@ while [[ $# -gt 0 ]] ; do
esac
done
+if [ "$P_BUILD_TYPE" = meson -a "$P_MESON_BUILDDIR_FORCE" != 1 ]; then
+ if [ -d "$P_MESON_BUILDDIR" ]; then
+ echo "Build directory '$P_MESON_BUILDDIR' chosen by default, but it exists and will be overwritten." \
+ "If you really want that, pass '--meson \"$P_MESON_BUILDDIR\"'." >&2
+ exit 1
+ fi
+fi
+
vars_with_vals
if [ "$P_BUILD_TYPE" == meson ] ; then
MESON_RECONFIGURE=
- if test -d "./build/" ; then
+ if test -d "$P_MESON_BUILDDIR" ; then
MESON_RECONFIGURE="--reconfigure"
fi
@@ -355,7 +358,8 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
env \
CC="$P_CC" \
CFLAGS="$P_CFLAGS" \
- meson \
+ meson setup\
+ $MESON_RECONFIGURE \
--buildtype=plain \
--prefix="$D_PREFIX" \
--libdir="$D_LIBDIR" \
@@ -372,11 +376,6 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
--sharedstatedir="$D_SHAREDSTATEDIR" \
--wrap-mode=nodownload \
--auto-features=enabled \
- \
- build \
- \
- $MESON_RECONFIGURE \
- \
-Db_ndebug=false \
--warnlevel 2 \
$(args_enable "$P_TEST" --werror) \
@@ -429,6 +428,8 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
-Dnetconfig=no \
-Dconfig_dns_rc_manager_default="$P_DNS_RC_MANAGER_DEFAULT" \
-Dconfig_logging_backend_default="$P_LOGGING_BACKEND_DEFAULT" \
+ \
+ "$P_MESON_BUILDDIR" \
;
else
if ! test -x ./configure ; then
@@ -520,7 +521,7 @@ fi
if ! bool "$P_NOBUILD" ; then
if [ "$P_BUILD_TYPE" == meson ] ; then
- $SHOW_CMD ninja -C build
+ $SHOW_CMD ninja -C "$P_MESON_BUILDDIR"
else
$SHOW_CMD make -j 10
fi
diff --git a/contrib/fedora/rpm/release.sh b/contrib/fedora/rpm/release.sh
index 809810f097..fd48f487d4 100755
--- a/contrib/fedora/rpm/release.sh
+++ b/contrib/fedora/rpm/release.sh
@@ -14,12 +14,11 @@
# - "rc" : further release candidates on RC branch (e.g. from "nm-1-26" branch
# tag "1.26-rc2" with version number 1.25.91).
# - "major" : on stable branch do a major release (e.g. on "nm-1-26" branch
-# release "1.26.0", followed by "1.26.1-dev").
+# release "1.26.0").
# You should do a "major-post" release right a "major" release.
# - "major-post": after a "major" release, merge the release branch with main and
# do another devel snapshot on main (e.g. do "1.27.1-dev" release).
-# - "minor" : on a stable branch do a minor release (e.g. "1.26.4" on "nm-1-26"
-# branch and bump to "1.26.5-dev").
+# - "minor" : on a stable branch do a minor release (e.g. "1.26.4" on "nm-1-26").
#
# Requisites:
#
@@ -296,8 +295,7 @@ RC_VERSION=
RELEASE_BRANCH=
case "$RELEASE_MODE" in
minor)
- number_is_even "${VERSION_ARR[1]}" &&
- number_is_odd "${VERSION_ARR[2]}" || die "cannot do minor release on top of version $VERSION_STR"
+ number_is_even "${VERSION_ARR[1]}" || die "cannot do minor release on top of version $VERSION_STR"
[ "$CUR_BRANCH" != main ] || die "cannot do a minor release on main"
;;
devel)
@@ -431,19 +429,13 @@ case "$RELEASE_MODE" in
minor)
set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 1))
git commit -m "release: bump version to ${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 1))" -a || die "failed to commit release"
- set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 2))
- git commit -m "release: bump version to ${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 2)) (development)" -a || die "failed to commit devel version bump"
b="${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 1))"
- git tag -s -a -m "Tag $b" "$b" HEAD~ || die "failed to tag release"
+ git tag -s -a -m "Tag $b" "$b" HEAD || die "failed to tag release"
BRANCHES+=("$b")
CLEANUP_REFS+=("refs/tags/$b")
BUILD_TAG="$b"
- b="${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 2))"
- git tag -s -a -m "Tag $b (development)" "$b-dev" HEAD || die "failed to tag devel version"
- BRANCHES+=("$b-dev")
- CLEANUP_REFS+=("refs/tags/$b-dev")
- TAR_VERSION="$BUILD_TAG"
+ TAR_VERSION="$b"
;;
devel)
set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 1))
@@ -482,20 +474,12 @@ case "$RELEASE_MODE" in
;;
major)
b="${VERSION_ARR[0]}.$((${VERSION_ARR[1]} + 1)).0"
- b2="${VERSION_ARR[0]}.$((${VERSION_ARR[1]} + 1)).1"
-
set_version_number "${VERSION_ARR[0]}" "$((${VERSION_ARR[1]} + 1))" 0
git commit -m "release: bump version to $b" -a || die "failed to commit major version bump"
+
git tag -s -a -m "Tag $b" "$b" HEAD || die "failed to tag release"
BRANCHES+=("$b")
CLEANUP_REFS+=("refs/tags/$b")
-
- set_version_number "${VERSION_ARR[0]}" "$((${VERSION_ARR[1]} + 1))" 1
- git commit -m "release: bump version to $b2 (development)" -a || die "failed to commit another bump after major version bump"
- git tag -s -a -m "Tag $b (development)" "$b2-dev" HEAD || die "failed to tag release"
- BRANCHES+=("$b2-dev")
- CLEANUP_REFS+=("refs/tags/$b2-dev")
-
BUILD_TAG="$b"
TAR_VERSION="$b"
;;
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
index d86523c139..36e10061de 100644
--- a/man/NetworkManager.conf.xml
+++ b/man/NetworkManager.conf.xml
@@ -492,7 +492,7 @@ no-auto-default=*
files without preserving their contents.
</para>
<para>
- The path can also be overriden by pointing to a specific
+ The path can also be overridden by pointing to a specific
existing and writable directory. On the other hand setting
this to an empty string or any other value disables the
profile conversion mechanism.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3fe753c98c..d751aef3b7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -89,6 +89,7 @@ src/libnm-core-impl/nm-setting-cdma.c
src/libnm-core-impl/nm-setting-connection.c
src/libnm-core-impl/nm-setting-dcb.c
src/libnm-core-impl/nm-setting-ethtool.c
+src/libnm-core-impl/nm-setting-generic.c
src/libnm-core-impl/nm-setting-gsm.c
src/libnm-core-impl/nm-setting-hsr.c
src/libnm-core-impl/nm-setting-infiniband.c
diff --git a/po/ca.po b/po/ca.po
index 476101788f..828a201627 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -7801,7 +7801,7 @@ msgstr ""
#: src/libnmc-setting/settings-docs.h.in:190
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), "
"\"default\" (3) or \"default-or-eui64\" (2). If the property is set to "
diff --git a/po/de.po b/po/de.po
index 53b82b8d26..5616c7c190 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8278,7 +8278,7 @@ msgstr ""
#: src/libnmc-setting/settings-docs.h.in:192
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The "
"permitted values are: \"eui64\" (0), \"stable-privacy\" (1), \"default\" (3) "
"or \"default-or-eui64\" (2). If the property is set to \"eui64\", the "
diff --git a/po/ka.po b/po/ka.po
index 9245b74c32..577fa66cd7 100644
--- a/po/ka.po
+++ b/po/ka.po
@@ -7259,7 +7259,7 @@ msgstr ""
#: src/libnmc-setting/settings-docs.h.in:190
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), "
"\"default\" (3) or \"default-or-eui64\" (2). If the property is set to "
diff --git a/po/ru.po b/po/ru.po
index 2844510ec0..8688e7ee2c 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8634,7 +8634,7 @@ msgstr "Список, через запятую, правил маршрутиз
#: src/libnmc-setting/settings-docs.h.in:191
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), "
"\"default\" (3) or \"default-or-eui64\" (2). If the property is set to "
diff --git a/po/sv.po b/po/sv.po
index cafc42dca5..ea74c7b479 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8600,7 +8600,7 @@ msgstr "En kommaseparerad lista med routingregler för policyrouting."
#: src/libnmc-setting/settings-docs.h.in:195
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), "
"\"default\" (3) or \"default-or-eui64\" (2). If the property is set to "
diff --git a/po/tr.po b/po/tr.po
index afc3a6cf6c..603bd35caa 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7839,7 +7839,7 @@ msgstr ""
#: src/libnmc-setting/settings-docs.h.in:197
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), "
"\"default\" (3) or \"default-or-eui64\" (2). If the property is set to "
diff --git a/po/uk.po b/po/uk.po
index a8d14a7de3..02ff3f9d76 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8535,7 +8535,7 @@ msgstr "Список відокремлених комами правил мар
#: src/libnmc-setting/settings-docs.h.in:190
msgid ""
-"Configure method for creating the IPv6 interface identifer of addresses with "
+"Configure method for creating the IPv6 interface identifier of addresses with "
"RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. "
"The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), \"default"
"\" (3) or \"default-or-eui64\" (2). If the property is set to \"eui64\", the "
diff --git a/src/core/devices/nm-device-bridge.c b/src/core/devices/nm-device-bridge.c
index 2405beeaed..82314f1364 100644
--- a/src/core/devices/nm-device-bridge.c
+++ b/src/core/devices/nm-device-bridge.c
@@ -299,13 +299,11 @@ typedef struct {
} Option;
#define OPTION(_name, _sysname, ...) \
- { \
- .name = ""_name \
- "", \
- .sysname = ""_sysname \
- "", \
- __VA_ARGS__ \
- }
+ {.name = ""_name \
+ "", \
+ .sysname = ""_sysname \
+ "", \
+ __VA_ARGS__}
#define OPTION_TYPE_INT(min, max, def) .nm_min = (min), .nm_max = (max), .nm_default = (def)
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index b96adefbd0..f3441508ab 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -17205,6 +17205,14 @@ nm_device_get_state(NMDevice *self)
return NM_DEVICE_GET_PRIVATE(self)->state;
}
+NMDeviceStateReason
+nm_device_get_state_reason(NMDevice *self)
+{
+ g_return_val_if_fail(NM_IS_DEVICE(self), NM_DEVICE_STATE_REASON_NONE);
+
+ return NM_DEVICE_GET_PRIVATE(self)->state_reason;
+}
+
/*****************************************************************************/
/**
diff --git a/src/core/devices/nm-device.h b/src/core/devices/nm-device.h
index ffe6b1af99..ba45497ce2 100644
--- a/src/core/devices/nm-device.h
+++ b/src/core/devices/nm-device.h
@@ -561,7 +561,8 @@ int nm_device_spec_match_list_full(NMDevice *self, const GSList *specs, int
gboolean nm_device_is_activating(NMDevice *dev);
gboolean nm_device_autoconnect_allowed(NMDevice *self);
-NMDeviceState nm_device_get_state(NMDevice *device);
+NMDeviceState nm_device_get_state(NMDevice *device);
+NMDeviceStateReason nm_device_get_state_reason(NMDevice *device);
gboolean nm_device_get_enabled(NMDevice *device);
diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c
index 89444640f8..d6e3ed0808 100644
--- a/src/core/devices/wifi/nm-device-iwd.c
+++ b/src/core/devices/wifi/nm-device-iwd.c
@@ -3483,7 +3483,7 @@ nm_device_iwd_parse_netconfig(NMDeviceIwd *self, int addr_family, GVariantIter *
/* Use SOURCE_DHCP as shorthand for the various autoconfiguration protocols */
source = NM_IP_CONFIG_SOURCE_DHCP;
else
- _LOGW(LOGD_WIFI, "iwd_parse_netconfig: Uknown Method value \"%s\"", str_value);
+ _LOGW(LOGD_WIFI, "iwd_parse_netconfig: Unknown Method value \"%s\"", str_value);
}
if (nm_streq(key, "Addresses")) {
@@ -3527,7 +3527,7 @@ nm_device_iwd_parse_netconfig(NMDeviceIwd *self, int addr_family, GVariantIter *
else if (nm_streq(str_value, "resolve"))
mdns = NM_SETTING_CONNECTION_MDNS_RESOLVE;
else
- _LOGW(LOGD_WIFI, "iwd_parse_netconfig: Uknown MDNS value \"%s\"", str_value);
+ _LOGW(LOGD_WIFI, "iwd_parse_netconfig: Unknown MDNS value \"%s\"", str_value);
}
}
diff --git a/src/core/dhcp/nm-dhcp-options.c b/src/core/dhcp/nm-dhcp-options.c
index 7c47c82e05..f89237c51f 100644
--- a/src/core/dhcp/nm-dhcp-options.c
+++ b/src/core/dhcp/nm-dhcp-options.c
@@ -11,9 +11,11 @@
/*****************************************************************************/
-#define REQ(_num, _name, _include) \
- { \
- .name = NM_DHCP_OPTION_REQPREFIX ""_name, .option_num = _num, .include = _include, \
+#define REQ(_num, _name, _include) \
+ { \
+ .name = NM_DHCP_OPTION_REQPREFIX ""_name, \
+ .option_num = _num, \
+ .include = _include, \
}
const NMDhcpOption _nm_dhcp_option_dhcp4_options[] = {
diff --git a/src/core/nm-active-connection.c b/src/core/nm-active-connection.c
index b08d26c28b..7d89251caa 100644
--- a/src/core/nm-active-connection.c
+++ b/src/core/nm-active-connection.c
@@ -50,6 +50,7 @@ typedef struct _NMActiveConnectionPrivate {
NMAuthSubject *subject;
NMActiveConnection *controller;
+ NMDevice *controller_dev;
NMActiveConnection *parent;
@@ -826,6 +827,31 @@ master_state_cb(NMActiveConnection *master, GParamSpec *pspec, gpointer user_dat
}
}
+static void
+controller_dev_state_cb(NMDevice *controller_dev,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ NMActiveConnection *self = NM_ACTIVE_CONNECTION(user_data);
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE(self);
+ NMActRequest *controller_act_request;
+ NMActiveConnection *controller_ac;
+
+ if (new_state >= NM_DEVICE_STATE_PREPARE && new_state <= NM_DEVICE_STATE_ACTIVATED) {
+ controller_act_request = nm_device_get_act_request(controller_dev);
+ if (controller_act_request) {
+ controller_ac = NM_ACTIVE_CONNECTION(controller_act_request);
+ g_signal_handlers_disconnect_by_func(controller_dev,
+ G_CALLBACK(controller_dev_state_cb),
+ self);
+ g_clear_object(&priv->controller_dev);
+ nm_active_connection_set_controller(self, controller_ac);
+ }
+ }
+}
+
/**
* nm_active_connection_set_controller:
* @self: the #NMActiveConnection
@@ -867,6 +893,36 @@ nm_active_connection_set_controller(NMActiveConnection *self, NMActiveConnection
check_controller_ready(self);
}
+void
+nm_active_connection_set_controller_dev(NMActiveConnection *self, NMDevice *controller_dev)
+{
+ NMActiveConnectionPrivate *priv;
+
+ g_return_if_fail(NM_IS_ACTIVE_CONNECTION(self));
+ g_return_if_fail(NM_IS_DEVICE(controller_dev));
+
+ priv = NM_ACTIVE_CONNECTION_GET_PRIVATE(self);
+
+ /* Controller device is write-once, and must be set before exporting the object */
+ g_return_if_fail(priv->controller_dev == NULL);
+ g_return_if_fail(!nm_dbus_object_is_exported(NM_DBUS_OBJECT(self)));
+ if (priv->device) {
+ g_return_if_fail(priv->device != controller_dev);
+ }
+
+ _LOGD("set controller device %p, %s(%s), state %s",
+ controller_dev,
+ nm_device_get_iface(controller_dev),
+ nm_device_get_type_desc(controller_dev),
+ nm_device_state_to_string(nm_device_get_state(controller_dev)));
+
+ priv->controller_dev = g_object_ref(controller_dev);
+ g_signal_connect(priv->controller_dev,
+ NM_DEVICE_STATE_CHANGED,
+ G_CALLBACK(controller_dev_state_cb),
+ self);
+}
+
NMActivationType
nm_active_connection_get_activation_type(NMActiveConnection *self)
{
@@ -1533,7 +1589,13 @@ dispose(GObject *object)
if (priv->controller) {
g_signal_handlers_disconnect_by_func(priv->controller, G_CALLBACK(master_state_cb), self);
}
+ if (priv->controller_dev) {
+ g_signal_handlers_disconnect_by_func(priv->controller_dev,
+ G_CALLBACK(controller_dev_state_cb),
+ self);
+ }
g_clear_object(&priv->controller);
+ g_clear_object(&priv->controller_dev);
if (priv->parent)
unwatch_parent(self, TRUE);
diff --git a/src/core/nm-active-connection.h b/src/core/nm-active-connection.h
index 12cb311c97..ba32830257 100644
--- a/src/core/nm-active-connection.h
+++ b/src/core/nm-active-connection.h
@@ -175,6 +175,7 @@ NMActiveConnection *nm_active_connection_get_controller(NMActiveConnection *self
gboolean nm_active_connection_get_controller_ready(NMActiveConnection *self);
void nm_active_connection_set_controller(NMActiveConnection *self, NMActiveConnection *controller);
+void nm_active_connection_set_controller_dev(NMActiveConnection *self, NMDevice *controller_dev);
void nm_active_connection_set_parent(NMActiveConnection *self, NMActiveConnection *parent);
diff --git a/src/core/nm-config-data.c b/src/core/nm-config-data.c
index d4498edd88..5b330f24d6 100644
--- a/src/core/nm-config-data.c
+++ b/src/core/nm-config-data.c
@@ -849,7 +849,7 @@ nm_config_data_log(const NMConfigData *self,
/* We require that the default values are grouped by their "group".
* That is, all default values for a certain "group" are close to
* each other in the list. Assert for that. */
- for (g2 = g + 1; g2 < groups_full->len; g2++) {
+ for (g2 = g + 1; g2 < G_N_ELEMENTS(default_values); g2++) {
nm_assert(!nm_streq(default_values[g - 1].group, default_values[g2].group));
}
}
diff --git a/src/core/nm-l3-config-data.c b/src/core/nm-l3-config-data.c
index a4647116a9..908c4d65d5 100644
--- a/src/core/nm-l3-config-data.c
+++ b/src/core/nm-l3-config-data.c
@@ -157,8 +157,8 @@ struct _NML3ConfigData {
bool has_routes_with_type_local_6_set : 1;
bool has_routes_with_type_local_4_val : 1;
bool has_routes_with_type_local_6_val : 1;
- bool dhcp_enabled_4 : 1;
- bool dhcp_enabled_6 : 1;
+ bool allow_routes_without_address_4 : 1;
+ bool allow_routes_without_address_6 : 1;
bool ndisc_hop_limit_set : 1;
bool ndisc_reachable_time_msec_set : 1;
@@ -678,26 +678,28 @@ nm_l3_config_data_new(NMDedupMultiIndex *multi_idx, int ifindex, NMIPConfigSourc
self = g_slice_new(NML3ConfigData);
*self = (NML3ConfigData){
- .ref_count = 1,
- .ifindex = ifindex,
- .multi_idx = nm_dedup_multi_index_ref(multi_idx),
- .mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT,
- .llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT,
- .dns_over_tls = NM_SETTING_CONNECTION_DNS_OVER_TLS_DEFAULT,
- .flags = NM_L3_CONFIG_DAT_FLAGS_NONE,
- .metered = NM_TERNARY_DEFAULT,
- .proxy_browser_only = NM_TERNARY_DEFAULT,
- .proxy_method = NM_PROXY_CONFIG_METHOD_UNKNOWN,
- .route_table_sync_4 = NM_IP_ROUTE_TABLE_SYNC_MODE_NONE,
- .route_table_sync_6 = NM_IP_ROUTE_TABLE_SYNC_MODE_NONE,
- .never_default_6 = NM_OPTION_BOOL_DEFAULT,
- .never_default_4 = NM_OPTION_BOOL_DEFAULT,
- .source = source,
- .ip6_privacy = NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN,
- .mptcp_flags = NM_MPTCP_FLAGS_NONE,
- .ndisc_hop_limit_set = FALSE,
- .ndisc_reachable_time_msec_set = FALSE,
- .ndisc_retrans_timer_msec_set = FALSE,
+ .ref_count = 1,
+ .ifindex = ifindex,
+ .multi_idx = nm_dedup_multi_index_ref(multi_idx),
+ .mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT,
+ .llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT,
+ .dns_over_tls = NM_SETTING_CONNECTION_DNS_OVER_TLS_DEFAULT,
+ .flags = NM_L3_CONFIG_DAT_FLAGS_NONE,
+ .metered = NM_TERNARY_DEFAULT,
+ .proxy_browser_only = NM_TERNARY_DEFAULT,
+ .proxy_method = NM_PROXY_CONFIG_METHOD_UNKNOWN,
+ .route_table_sync_4 = NM_IP_ROUTE_TABLE_SYNC_MODE_NONE,
+ .route_table_sync_6 = NM_IP_ROUTE_TABLE_SYNC_MODE_NONE,
+ .never_default_6 = NM_OPTION_BOOL_DEFAULT,
+ .never_default_4 = NM_OPTION_BOOL_DEFAULT,
+ .source = source,
+ .ip6_privacy = NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN,
+ .mptcp_flags = NM_MPTCP_FLAGS_NONE,
+ .ndisc_hop_limit_set = FALSE,
+ .ndisc_reachable_time_msec_set = FALSE,
+ .ndisc_retrans_timer_msec_set = FALSE,
+ .allow_routes_without_address_4 = TRUE,
+ .allow_routes_without_address_6 = TRUE,
};
_idx_type_init(&self->idx_addresses_4, NMP_OBJECT_TYPE_IP4_ADDRESS);
@@ -1936,15 +1938,30 @@ nm_l3_config_data_set_mptcp_flags(NML3ConfigData *self, NMMptcpFlags mptcp_flags
}
gboolean
-nm_l3_config_data_get_dhcp_enabled(const NML3ConfigData *self, int addr_family)
+nm_l3_config_data_get_allow_routes_without_address(const NML3ConfigData *self, int addr_family)
{
const int IS_IPv4 = NM_IS_IPv4(addr_family);
nm_assert(_NM_IS_L3_CONFIG_DATA(self, TRUE));
if (IS_IPv4) {
- return self->dhcp_enabled_4;
+ return self->allow_routes_without_address_4;
} else {
- return self->dhcp_enabled_6;
+ return self->allow_routes_without_address_6;
+ }
+}
+
+void
+nm_l3_config_data_set_allow_routes_without_address(NML3ConfigData *self,
+ int addr_family,
+ gboolean value)
+{
+ const int IS_IPv4 = NM_IS_IPv4(addr_family);
+
+ nm_assert(_NM_IS_L3_CONFIG_DATA(self, FALSE));
+ if (IS_IPv4) {
+ self->allow_routes_without_address_4 = value;
+ } else {
+ self->allow_routes_without_address_6 = value;
}
}
@@ -2758,18 +2775,18 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co
method = nm_setting_ip_config_get_method(s_ip);
if (IS_IPv4) {
if (nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
- self->dhcp_enabled_4 = TRUE;
+ self->allow_routes_without_address_4 = FALSE;
} else {
- self->dhcp_enabled_4 = FALSE;
+ self->allow_routes_without_address_4 = TRUE;
}
} else {
method = nm_setting_ip_config_get_method(s_ip);
if (NM_IN_STRSET(method,
NM_SETTING_IP6_CONFIG_METHOD_AUTO,
NM_SETTING_IP6_CONFIG_METHOD_DHCP)) {
- self->dhcp_enabled_6 = TRUE;
+ self->allow_routes_without_address_6 = FALSE;
} else {
- self->dhcp_enabled_6 = FALSE;
+ self->allow_routes_without_address_6 = TRUE;
}
}
@@ -3456,11 +3473,11 @@ nm_l3_config_data_merge(NML3ConfigData *self,
self->dhcp_lease_x[0] = nm_dhcp_lease_ref(self->dhcp_lease_x[0]);
self->dhcp_lease_x[1] = nm_dhcp_lease_ref(self->dhcp_lease_x[1]);
}
- if (src->dhcp_enabled_4)
- self->dhcp_enabled_4 = TRUE;
+ if (!src->allow_routes_without_address_4)
+ self->allow_routes_without_address_4 = FALSE;
- if (src->dhcp_enabled_6)
- self->dhcp_enabled_6 = TRUE;
+ if (!src->allow_routes_without_address_6)
+ self->allow_routes_without_address_6 = FALSE;
}
NML3ConfigData *
diff --git a/src/core/nm-l3-config-data.h b/src/core/nm-l3-config-data.h
index b55b2f4194..faf4f0bfa9 100644
--- a/src/core/nm-l3-config-data.h
+++ b/src/core/nm-l3-config-data.h
@@ -554,7 +554,12 @@ NMSettingIP6ConfigPrivacy nm_l3_config_data_get_ip6_privacy(const NML3ConfigData
gboolean nm_l3_config_data_set_ip6_privacy(NML3ConfigData *self,
NMSettingIP6ConfigPrivacy ip6_privacy);
-gboolean nm_l3_config_data_get_dhcp_enabled(const NML3ConfigData *self, int addr_family);
+gboolean nm_l3_config_data_get_allow_routes_without_address(const NML3ConfigData *self,
+ int addr_family);
+
+void nm_l3_config_data_set_allow_routes_without_address(NML3ConfigData *self,
+ int addr_family,
+ gboolean value);
NMProxyConfigMethod nm_l3_config_data_get_proxy_method(const NML3ConfigData *self);
diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c
index 12357fba12..57baeac25d 100644
--- a/src/core/nm-l3cfg.c
+++ b/src/core/nm-l3cfg.c
@@ -1301,7 +1301,6 @@ _commit_collect_routes(NML3Cfg *self,
const int IS_IPv4 = NM_IS_IPv4(addr_family);
const NMDedupMultiHeadEntry *head_entry;
const NMDedupMultiEntry *entry;
- gboolean is_dhcp_enabled;
nm_assert(routes && !*routes);
nm_assert(routes_nodev && !*routes_nodev);
@@ -1321,10 +1320,10 @@ _commit_collect_routes(NML3Cfg *self,
else {
nm_assert(NMP_OBJECT_CAST_IP_ROUTE(obj)->ifindex == self->priv.ifindex);
- is_dhcp_enabled =
- nm_l3_config_data_get_dhcp_enabled(self->priv.p->combined_l3cd_commited,
- addr_family);
- if (!any_addrs && is_dhcp_enabled) {
+ if (!any_addrs
+ && !nm_l3_config_data_get_allow_routes_without_address(
+ self->priv.p->combined_l3cd_commited,
+ addr_family)) {
/* This is a unicast route (or a similar route, which has an
* ifindex).
*
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c
index b2a827e38b..ddbd20218b 100644
--- a/src/core/nm-manager.c
+++ b/src/core/nm-manager.c
@@ -5943,7 +5943,20 @@ _internal_activate_device(NMManager *self, NMActiveConnection *active, GError **
NM_DEVICE_STATE_REASON_USER_REQUESTED);
}
- nm_active_connection_set_controller(active, master_ac);
+ /* If controller NMActiveConnection is deactivating, we should wait on
+ * controller's NMDevice to have new NMActiveConnection after
+ * controller device state change to between NM_DEVICE_STATE_PREPARE and
+ * NM_DEVICE_STATE_ACTIVATED.
+ */
+ if ((nm_active_connection_get_state(master_ac) >= NM_ACTIVE_CONNECTION_STATE_DEACTIVATING)
+ && master_device
+ && (nm_device_get_state_reason(master_device)
+ == NM_DEVICE_STATE_REASON_NEW_ACTIVATION)) {
+ nm_active_connection_set_controller_dev(active, master_device);
+ } else {
+ nm_active_connection_set_controller(active, master_ac);
+ }
+
_LOGD(LOGD_CORE,
"Activation of '%s' depends on active connection %p %s",
nm_settings_connection_get_id(sett_conn),
@@ -7947,6 +7960,7 @@ nm_manager_write_device_state_all(NMManager *self)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE(self);
gs_unref_hashtable GHashTable *preserve_ifindexes = NULL;
NMDevice *device;
+ NMActiveConnection *ac;
preserve_ifindexes = g_hash_table_new(nm_direct_hash, NULL);
@@ -7958,6 +7972,14 @@ nm_manager_write_device_state_all(NMManager *self)
}
}
+ /* Save to disk the timestamps of active connections as if we were bringing them down.
+ * Otherwise they will be wrong on next start and affect the activation order.
+ */
+ c_list_for_each_entry (ac, &priv->active_connections_lst_head, active_connections_lst) {
+ NMSettingsConnection *sett = nm_active_connection_get_settings_connection(ac);
+ nm_settings_connection_update_timestamp(sett, (guint64) time(NULL));
+ }
+
nm_config_device_state_prune_stale(preserve_ifindexes, NULL);
}
diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c
index fde7dc0de7..99b8bc45fe 100644
--- a/src/core/platform/tests/test-common.c
+++ b/src/core/platform/tests/test-common.c
@@ -59,10 +59,8 @@ typedef struct {
} IPTunnelModInfo;
-#define INF(_module_name, _iftype, _ifname, ...) \
- { \
- .module_name = ""_module_name, .iftype = _iftype, .ifname = ""_ifname, __VA_ARGS__ \
- }
+#define INF(_module_name, _iftype, _ifname, ...) \
+ {.module_name = ""_module_name, .iftype = _iftype, .ifname = ""_ifname, __VA_ARGS__}
static const IPTunnelModInfo ip_tunnel_mod_infos[] = {
INF("ip_gre", NM_LINK_TYPE_GRE, "gre0"),
diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
index 277d0d5fab..50484405b8 100644
--- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
+++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
@@ -700,9 +700,10 @@ nms_ifcfg_rh_utils_is_numbered_tag_impl(const char *key,
/*****************************************************************************/
-#define _KEY_TYPE(key, flags) \
- { \
- .key_name = "" key "", .key_flags = ((NMS_IFCFG_KEY_TYPE_WELL_KNOWN) | (flags)), \
+#define _KEY_TYPE(key, flags) \
+ { \
+ .key_name = "" key "", \
+ .key_flags = ((NMS_IFCFG_KEY_TYPE_WELL_KNOWN) | (flags)), \
}
const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = {
diff --git a/src/core/supplicant/nm-supplicant-settings-verify.c b/src/core/supplicant/nm-supplicant-settings-verify.c
index c7aaf47d9f..7632854153 100644
--- a/src/core/supplicant/nm-supplicant-settings-verify.c
+++ b/src/core/supplicant/nm-supplicant-settings-verify.c
@@ -20,21 +20,30 @@ struct Opt {
typedef gboolean (*validate_func)(const struct Opt *, const char *, const guint32);
-#define OPT_INT(_key, _int_low, _int_high) \
- { \
- .key = _key, .type = NM_SUPPL_OPT_TYPE_INT, .int_high = _int_high, .int_low = _int_low, \
+#define OPT_INT(_key, _int_low, _int_high) \
+ { \
+ .key = _key, \
+ .type = NM_SUPPL_OPT_TYPE_INT, \
+ .int_high = _int_high, \
+ .int_low = _int_low, \
}
-#define OPT_BYTES(_key, _int_high) \
- { \
- .key = _key, .type = NM_SUPPL_OPT_TYPE_BYTES, .int_high = _int_high, \
+#define OPT_BYTES(_key, _int_high) \
+ { \
+ .key = _key, \
+ .type = NM_SUPPL_OPT_TYPE_BYTES, \
+ .int_high = _int_high, \
}
-#define OPT_UTF8(_key, _int_high) \
- { \
- .key = _key, .type = NM_SUPPL_OPT_TYPE_UTF8, .int_high = _int_high, \
+#define OPT_UTF8(_key, _int_high) \
+ { \
+ .key = _key, \
+ .type = NM_SUPPL_OPT_TYPE_UTF8, \
+ .int_high = _int_high, \
}
-#define OPT_KEYWORD(_key, _str_allowed) \
- { \
- .key = _key, .type = NM_SUPPL_OPT_TYPE_KEYWORD, .str_allowed = _str_allowed, \
+#define OPT_KEYWORD(_key, _str_allowed) \
+ { \
+ .key = _key, \
+ .type = NM_SUPPL_OPT_TYPE_KEYWORD, \
+ .str_allowed = _str_allowed, \
}
static const struct Opt opt_table[] = {
diff --git a/src/core/vpn/nm-vpn-connection.c b/src/core/vpn/nm-vpn-connection.c
index de0c9f7104..b5a7fc4c29 100644
--- a/src/core/vpn/nm-vpn-connection.c
+++ b/src/core/vpn/nm-vpn-connection.c
@@ -1433,6 +1433,10 @@ _check_complete(NMVpnConnection *self, gboolean success)
l3cd = nm_l3_config_data_new_from_connection(nm_netns_get_multi_idx(priv->netns),
nm_vpn_connection_get_ip_ifindex(self, TRUE),
connection);
+
+ nm_l3_config_data_set_allow_routes_without_address(l3cd, AF_INET, TRUE);
+ nm_l3_config_data_set_allow_routes_without_address(l3cd, AF_INET6, TRUE);
+
_l3cfg_l3cd_set(self, L3CD_TYPE_STATIC, l3cd);
_l3cfg_l3cd_gw_extern_update(self);
@@ -1988,6 +1992,12 @@ _dbus_signal_ip_config_cb(NMVpnConnection *self, int addr_family, GVariant *dict
nm_l3_config_data_set_dns_priority(l3cd, AF_INET, NM_DNS_PRIORITY_DEFAULT_VPN);
+ _vardict_to_addr(addr_family,
+ dict,
+ IS_IPv4 ? NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY
+ : NM_VPN_PLUGIN_IP6_CONFIG_INT_GATEWAY,
+ &priv->ip_data_x[IS_IPv4].gw_internal);
+
if (IS_IPv4) {
address.a4 = (NMPlatformIP4Address){
.plen = 24,
@@ -1998,16 +2008,17 @@ _dbus_signal_ip_config_cb(NMVpnConnection *self, int addr_family, GVariant *dict
};
}
- _vardict_to_addr(addr_family,
- dict,
- IS_IPv4 ? NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY
- : NM_VPN_PLUGIN_IP6_CONFIG_INT_GATEWAY,
- &priv->ip_data_x[IS_IPv4].gw_internal);
-
- _vardict_to_addr(addr_family,
- dict,
- IS_IPv4 ? NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS : NM_VPN_PLUGIN_IP6_CONFIG_ADDRESS,
- address.ax.address_ptr);
+ if (_vardict_to_addr(addr_family,
+ dict,
+ IS_IPv4 ? NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS
+ : NM_VPN_PLUGIN_IP6_CONFIG_ADDRESS,
+ address.ax.address_ptr)
+ && nm_ip_addr_is_null(addr_family, &address.ax.address_ptr)) {
+ _LOGW("invalid IP%c config received: address is zero",
+ nm_utils_addr_family_to_char(addr_family));
+ _check_complete(self, FALSE);
+ return;
+ }
if (!_vardict_to_addr(addr_family,
dict,
@@ -2024,17 +2035,20 @@ _dbus_signal_ip_config_cb(NMVpnConnection *self, int addr_family, GVariant *dict
&u32))
address.ax.plen = u32;
- if (address.ax.plen > 0 && address.ax.plen <= (IS_IPv4 ? 32 : 128)
- && !nm_ip_addr_is_null(addr_family, &address.ax.address_ptr)) {
- address.ax.addr_source = NM_IP_CONFIG_SOURCE_VPN;
- nm_l3_config_data_add_address(l3cd, addr_family, NULL, &address.ax);
- } else {
- _LOGW("invalid IP%c config received: no valid IP address/prefix",
- nm_utils_addr_family_to_char(addr_family));
+ if (!nm_ip_addr_is_null(addr_family, &address.ax.address_ptr)
+ && (address.ax.plen == 0 || address.ax.plen > (IS_IPv4 ? 32 : 128))) {
+ _LOGW("invalid IP%c config received: invalid prefix %u",
+ nm_utils_addr_family_to_char(addr_family),
+ address.ax.plen);
_check_complete(self, FALSE);
return;
}
+ if (!nm_ip_addr_is_null(addr_family, &address.ax.address_ptr)) {
+ address.ax.addr_source = NM_IP_CONFIG_SOURCE_VPN;
+ nm_l3_config_data_add_address(l3cd, addr_family, NULL, &address.ax);
+ }
+
if (IS_IPv4) {
if (g_variant_lookup(dict, NM_VPN_PLUGIN_IP4_CONFIG_DNS, "au", &var_iter)) {
while (g_variant_iter_next(var_iter, "u", &u32))
diff --git a/src/libnm-client-impl/nm-libnm-utils.h b/src/libnm-client-impl/nm-libnm-utils.h
index d56d0fc136..53fa36be18 100644
--- a/src/libnm-client-impl/nm-libnm-utils.h
+++ b/src/libnm-client-impl/nm-libnm-utils.h
@@ -379,11 +379,10 @@ typedef struct {
} NMLDBusMetaProperty;
#define NML_DBUS_META_PROPERTY_INIT(v_dbus_property_name, v_dbus_type, v_obj_properties_idx, ...) \
- { \
- .dbus_property_name = "" v_dbus_property_name "", \
- .dbus_type = NM_G_VARIANT_TYPE("" v_dbus_type ""), \
- .obj_properties_idx = v_obj_properties_idx, ##__VA_ARGS__ \
- }
+ {.dbus_property_name = "" v_dbus_property_name "", \
+ .dbus_type = NM_G_VARIANT_TYPE("" v_dbus_type ""), \
+ .obj_properties_idx = v_obj_properties_idx, \
+ ##__VA_ARGS__}
#define _NML_DBUS_META_PROPERTY_INIT_DEFAULT(v_dbus_type, \
v_exp_type, \
@@ -568,10 +567,10 @@ struct _NMLDBusMetaIface {
(sizeof((const NMLDBusMetaProperty[]){__VA_ARGS__}) / sizeof(NMLDBusMetaProperty))
#define NML_DBUS_META_IFACE_INIT(v_dbus_iface_name, v_get_type_fcn, v_interface_prio, ...) \
- { \
- .dbus_iface_name = "" v_dbus_iface_name "", .get_type_fcn = v_get_type_fcn, \
- .interface_prio = v_interface_prio, ##__VA_ARGS__ \
- }
+ {.dbus_iface_name = "" v_dbus_iface_name "", \
+ .get_type_fcn = v_get_type_fcn, \
+ .interface_prio = v_interface_prio, \
+ ##__VA_ARGS__}
#define NML_DBUS_META_IFACE_INIT_PROP(v_dbus_iface_name, v_get_type_fcn, v_interface_prio, ...) \
NML_DBUS_META_IFACE_INIT(v_dbus_iface_name, \
diff --git a/src/libnm-client-impl/tests/test-libnm.c b/src/libnm-client-impl/tests/test-libnm.c
index 687e6c1717..f677ad8e6a 100644
--- a/src/libnm-client-impl/tests/test-libnm.c
+++ b/src/libnm-client-impl/tests/test-libnm.c
@@ -57,9 +57,11 @@ _test_fixup_string(const TestFixupData *data, guint n_data, char *(*func)(const
}
}
-#define T_DATA(_desc, _expected) \
- { \
- .desc = _desc, .expected = _expected, .line = __LINE__, \
+#define T_DATA(_desc, _expected) \
+ { \
+ .desc = _desc, \
+ .expected = _expected, \
+ .line = __LINE__, \
}
static void
diff --git a/src/libnm-core-impl/nm-setting-ip6-config.c b/src/libnm-core-impl/nm-setting-ip6-config.c
index 2dbf7a3493..eddac9f103 100644
--- a/src/libnm-core-impl/nm-setting-ip6-config.c
+++ b/src/libnm-core-impl/nm-setting-ip6-config.c
@@ -1097,7 +1097,7 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
* property: addr-gen-mode
* format: one of "eui64" (0), "stable-privacy" (1), "default" (3) or "default-or-eui64" (2)
* description: Configure method for creating the
- * IPv6 interface identifer of addresses with RFC4862 IPv6 Stateless
+ * IPv6 interface identifier of addresses with RFC4862 IPv6 Stateless
* Address Autoconfiguration and Link Local addresses.
*
* The permitted values are: "eui64" (0), "stable-privacy" (1), "default"
diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h
index a1ae6825ed..7d49324845 100644
--- a/src/libnm-core-impl/nm-setting-private.h
+++ b/src/libnm-core-impl/nm-setting-private.h
@@ -484,10 +484,7 @@ void _nm_setting_class_commit(NMSettingClass *setting_class,
#define NM_SETT_INFO_SETT_DETAIL(...) (&((const NMSettInfoSettDetail){__VA_ARGS__}))
-#define NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(_dbus_type, ...) \
- { \
- .dbus_type = _dbus_type, __VA_ARGS__ \
- }
+#define NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(_dbus_type, ...) {.dbus_type = _dbus_type, __VA_ARGS__}
#define NM_SETT_INFO_PROPERT_TYPE_GPROP_INIT(_dbus_type, ...) \
NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(_dbus_type, \
diff --git a/src/libnm-core-impl/nm-utils.c b/src/libnm-core-impl/nm-utils.c
index b6e2414106..745b1f3322 100644
--- a/src/libnm-core-impl/nm-utils.c
+++ b/src/libnm-core-impl/nm-utils.c
@@ -329,9 +329,10 @@ good:
typedef const char *const StrvArray4Type[4];
-#define LL(l, ...) \
- { \
- .name = l, .value = {__VA_ARGS__, NULL}, \
+#define LL(l, ...) \
+ { \
+ .name = l, \
+ .value = {__VA_ARGS__, NULL}, \
}
/* 5-letter language codes */
diff --git a/src/libnm-glib-aux/nm-prioq.h b/src/libnm-glib-aux/nm-prioq.h
index 51e5b059fb..1c16452baa 100644
--- a/src/libnm-glib-aux/nm-prioq.h
+++ b/src/libnm-glib-aux/nm-prioq.h
@@ -25,11 +25,12 @@ typedef struct {
} _priv;
} NMPrioq;
-#define NM_PRIOQ_ZERO \
- { \
- ._priv = { \
- .compare_func = NULL, \
- }, \
+#define NM_PRIOQ_ZERO \
+ { \
+ ._priv = \
+ { \
+ .compare_func = NULL, \
+ }, \
}
void nm_prioq_init(NMPrioq *q, GCompareFunc compare_func);
diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h
index 804034d237..d350d32e41 100644
--- a/src/libnm-glib-aux/nm-shared-utils.h
+++ b/src/libnm-glib-aux/nm-shared-utils.h
@@ -198,14 +198,15 @@ typedef struct {
#define _NM_ETHER_ADDR_INIT(a0, a1, a2, a3, a4, a5) \
{ \
- .ether_addr_octet = { \
- (a0), \
- (a1), \
- (a2), \
- (a3), \
- (a4), \
- (a5), \
- }, \
+ .ether_addr_octet = \
+ { \
+ (a0), \
+ (a1), \
+ (a2), \
+ (a3), \
+ (a4), \
+ (a5), \
+ }, \
}
#define NM_ETHER_ADDR_INIT(...) ((NMEtherAddr) _NM_ETHER_ADDR_INIT(__VA_ARGS__))
@@ -806,7 +807,8 @@ typedef struct {
#define NM_UTILS_FLAGS2STR(f, n) \
{ \
- .flag = f, .name = "" n, \
+ .flag = f, \
+ .name = "" n, \
}
#define NM_UTILS_FLAGS2STR_DEFINE(fcn_name, flags_type, ...) \
@@ -1749,10 +1751,7 @@ typedef struct {
};
} NMUtilsNamedValue;
-#define NM_UTILS_NAMED_VALUE_INIT(n, v) \
- { \
- .name = (n), .value_ptr = (v) \
- }
+#define NM_UTILS_NAMED_VALUE_INIT(n, v) {.name = (n), .value_ptr = (v)}
NMUtilsNamedValue *nm_utils_hash_to_array_full(GHashTable *hash,
guint *out_len,
@@ -2444,10 +2443,7 @@ int nm_utils_fd_read_loop_exact(int fd, void *buf, size_t nbytes, bool do_po
__VA_ARGS__ NULL, \
}))
-#define NM_DEFINE_GDBUS_SIGNAL_INFO_INIT(name_, ...) \
- { \
- .ref_count = -1, .name = name_, __VA_ARGS__ \
- }
+#define NM_DEFINE_GDBUS_SIGNAL_INFO_INIT(name_, ...) {.ref_count = -1, .name = name_, __VA_ARGS__}
#define NM_DEFINE_GDBUS_SIGNAL_INFO(name_, ...) \
((GDBusSignalInfo *) (&( \
@@ -2458,10 +2454,7 @@ int nm_utils_fd_read_loop_exact(int fd, void *buf, size_t nbytes, bool do_po
__VA_ARGS__ NULL, \
}))
-#define NM_DEFINE_GDBUS_METHOD_INFO_INIT(name_, ...) \
- { \
- .ref_count = -1, .name = name_, __VA_ARGS__ \
- }
+#define NM_DEFINE_GDBUS_METHOD_INFO_INIT(name_, ...) {.ref_count = -1, .name = name_, __VA_ARGS__}
#define NM_DEFINE_GDBUS_METHOD_INFO(name_, ...) \
((GDBusMethodInfo *) (&( \
@@ -2473,9 +2466,7 @@ int nm_utils_fd_read_loop_exact(int fd, void *buf, size_t nbytes, bool do_po
}))
#define NM_DEFINE_GDBUS_INTERFACE_INFO_INIT(name_, ...) \
- { \
- .ref_count = -1, .name = name_, __VA_ARGS__ \
- }
+ {.ref_count = -1, .name = name_, __VA_ARGS__}
#define NM_DEFINE_GDBUS_INTERFACE_INFO(name_, ...) \
((GDBusInterfaceInfo *) (&( \
diff --git a/src/libnm-platform/nm-platform-utils.c b/src/libnm-platform/nm-platform-utils.c
index 6074c3421f..6f3ad05c94 100644
--- a/src/libnm-platform/nm-platform-utils.c
+++ b/src/libnm-platform/nm-platform-utils.c
@@ -68,9 +68,10 @@ typedef struct {
char ifname[IFNAMSIZ];
} SocketHandle;
-#define SOCKET_HANDLE_INIT(_ifindex) \
- { \
- .fd = -1, .ifindex = (_ifindex), \
+#define SOCKET_HANDLE_INIT(_ifindex) \
+ { \
+ .fd = -1, \
+ .ifindex = (_ifindex), \
}
static void
@@ -430,10 +431,11 @@ ethtool_get_stringset_index(SocketHandle *shandle, int stringset_id, const char
/*****************************************************************************/
static const NMEthtoolFeatureInfo _ethtool_feature_infos[_NM_ETHTOOL_ID_FEATURE_NUM] = {
-#define ETHT_FEAT(eid, ...) \
- { \
- .ethtool_id = eid, .n_kernel_names = NM_NARG(__VA_ARGS__), \
- .kernel_names = ((const char *const[]){__VA_ARGS__}), \
+#define ETHT_FEAT(eid, ...) \
+ { \
+ .ethtool_id = eid, \
+ .n_kernel_names = NM_NARG(__VA_ARGS__), \
+ .kernel_names = ((const char *const[]){__VA_ARGS__}), \
}
/* the order does only matter for one thing: if it happens that more than one NMEthtoolID
diff --git a/src/libnm-platform/nmp-object.c b/src/libnm-platform/nmp-object.c
index cb4e9764d1..4ba9773c2c 100644
--- a/src/libnm-platform/nmp-object.c
+++ b/src/libnm-platform/nmp-object.c
@@ -2002,7 +2002,8 @@ _vt_dedup_obj_clone(const NMDedupMultiObj *obj)
#define DEDUP_MULTI_OBJ_CLASS_INIT() \
{ \
- .obj_clone = _vt_dedup_obj_clone, .obj_destroy = _vt_dedup_obj_destroy, \
+ .obj_clone = _vt_dedup_obj_clone, \
+ .obj_destroy = _vt_dedup_obj_destroy, \
.obj_full_hash_update = \
(void (*)(const NMDedupMultiObj *obj, NMHashState *h)) nmp_object_hash_update, \
.obj_full_equal = (gboolean(*)(const NMDedupMultiObj *obj_a, \
diff --git a/src/libnm-platform/nmp-object.h b/src/libnm-platform/nmp-object.h
index 19cace3de8..9406f65161 100644
--- a/src/libnm-platform/nmp-object.h
+++ b/src/libnm-platform/nmp-object.h
@@ -38,11 +38,12 @@ G_STATIC_ASSERT(sizeof(NMSockAddrUnion) == sizeof(((NMSockAddrUnion *) NULL)->in
/* we initialize the largest union member, to ensure that all fields are initialized. */
-#define NM_SOCK_ADDR_UNION_INIT_UNSPEC \
- { \
- .in6 = { \
- .sin6_family = AF_UNSPEC, \
- }, \
+#define NM_SOCK_ADDR_UNION_INIT_UNSPEC \
+ { \
+ .in6 = \
+ { \
+ .sin6_family = AF_UNSPEC, \
+ }, \
}
int nm_sock_addr_union_cmp(const NMSockAddrUnion *a, const NMSockAddrUnion *b);
diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in
index f83cfd437f..8d08faa023 100644
--- a/src/libnmc-setting/settings-docs.h.in
+++ b/src/libnmc-setting/settings-docs.h.in
@@ -195,7 +195,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.")
#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 IPv6 interface identifer of addresses with RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), \"default\" (3) or \"default-or-eui64\" (2). If the property is set to \"eui64\", the addresses will be generated using the interface token derived from hardware address. This makes the host part of the address to stay constant, making it possible to track the host's presence when it changes networks. The address changes when the interface hardware is replaced. If a duplicate address is detected, there is also no fallback to generate another address. When configured, the \"ipv6.token\" is used instead of the MAC address to generate addresses for stateless autoconfiguration. If the property is set to \"stable-privacy\", the interface identifier is generated as specified by RFC7217. This works by hashing a host specific key (see NetworkManager(8) manual), the interface name, the connection's \"connection.stable-id\" property and the address prefix. This improves privacy by making it harder to use the address to track the host's presence and the address is stable when the network interface hardware is replaced. The special values \"default\" and \"default-or-eui64\" will fallback to the global connection default as documented in the NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is \"stable-privacy\" or \"eui64\", respectively. If not specified, when creating a new profile the default is \"default\". 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.")
+#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE N_("Configure method for creating the IPv6 interface identifier of addresses with RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), \"default\" (3) or \"default-or-eui64\" (2). If the property is set to \"eui64\", the addresses will be generated using the interface token derived from hardware address. This makes the host part of the address to stay constant, making it possible to track the host's presence when it changes networks. The address changes when the interface hardware is replaced. If a duplicate address is detected, there is also no fallback to generate another address. When configured, the \"ipv6.token\" is used instead of the MAC address to generate addresses for stateless autoconfiguration. If the property is set to \"stable-privacy\", the interface identifier is generated as specified by RFC7217. This works by hashing a host specific key (see NetworkManager(8) manual), the interface name, the connection's \"connection.stable-id\" property and the address prefix. This improves privacy by making it harder to use the address to track the host's presence and the address is stable when the network interface hardware is replaced. The special values \"default\" and \"default-or-eui64\" will fallback to the global connection default as documented in the NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is \"stable-privacy\" or \"eui64\", respectively. If not specified, when creating a new profile the default is \"default\". 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.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ADDRESSES N_("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\". The addresses are listed in decreasing priority, meaning the first address will be the primary address. This can make a difference with IPv6 source address selection (RFC 6724, section 5).")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_AUTO_ROUTE_EXT_GW N_("VPN connections will default to add the route automatically unless this setting is set to FALSE. For other connection types, adding such an automatic route is currently not supported and setting this to TRUE has no effect.")
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DAD_TIMEOUT N_("Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4. A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or 200ms). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.")
diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in
index 7ac049fc3c..27de789302 100644
--- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in
+++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in
@@ -1468,7 +1468,7 @@
values="0 - 2147483647"
special-values="default (0)" />
<property name="addr-gen-mode"
- nmcli-description="Configure method for creating the IPv6 interface identifer of addresses with RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The permitted values are: &quot;eui64&quot; (0), &quot;stable-privacy&quot; (1), &quot;default&quot; (3) or &quot;default-or-eui64&quot; (2). If the property is set to &quot;eui64&quot;, the addresses will be generated using the interface token derived from hardware address. This makes the host part of the address to stay constant, making it possible to track the host&apos;s presence when it changes networks. The address changes when the interface hardware is replaced. If a duplicate address is detected, there is also no fallback to generate another address. When configured, the &quot;ipv6.token&quot; is used instead of the MAC address to generate addresses for stateless autoconfiguration. If the property is set to &quot;stable-privacy&quot;, the interface identifier is generated as specified by RFC7217. This works by hashing a host specific key (see NetworkManager(8) manual), the interface name, the connection&apos;s &quot;connection.stable-id&quot; property and the address prefix. This improves privacy by making it harder to use the address to track the host&apos;s presence and the address is stable when the network interface hardware is replaced. The special values &quot;default&quot; and &quot;default-or-eui64&quot; will fallback to the global connection default as documented in the NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is &quot;stable-privacy&quot; or &quot;eui64&quot;, respectively. If not specified, when creating a new profile the default is &quot;default&quot;. Note that this setting is distinct from the Privacy Extensions as configured by &quot;ip6-privacy&quot; property and it does not affect the temporary addresses configured with this option."
+ nmcli-description="Configure method for creating the IPv6 interface identifier of addresses with RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The permitted values are: &quot;eui64&quot; (0), &quot;stable-privacy&quot; (1), &quot;default&quot; (3) or &quot;default-or-eui64&quot; (2). If the property is set to &quot;eui64&quot;, the addresses will be generated using the interface token derived from hardware address. This makes the host part of the address to stay constant, making it possible to track the host&apos;s presence when it changes networks. The address changes when the interface hardware is replaced. If a duplicate address is detected, there is also no fallback to generate another address. When configured, the &quot;ipv6.token&quot; is used instead of the MAC address to generate addresses for stateless autoconfiguration. If the property is set to &quot;stable-privacy&quot;, the interface identifier is generated as specified by RFC7217. This works by hashing a host specific key (see NetworkManager(8) manual), the interface name, the connection&apos;s &quot;connection.stable-id&quot; property and the address prefix. This improves privacy by making it harder to use the address to track the host&apos;s presence and the address is stable when the network interface hardware is replaced. The special values &quot;default&quot; and &quot;default-or-eui64&quot; will fallback to the global connection default as documented in the NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is &quot;stable-privacy&quot; or &quot;eui64&quot;, respectively. If not specified, when creating a new profile the default is &quot;default&quot;. Note that this setting is distinct from the Privacy Extensions as configured by &quot;ip6-privacy&quot; property and it does not affect the temporary addresses configured with this option."
format="choice (NMSettingIP6ConfigAddrGenMode)"
values="eui64 (0), stable-privacy (1), default-or-eui64 (2), default (3)" />
<property name="ra-timeout"
diff --git a/src/nmcli/nmcli.c b/src/nmcli/nmcli.c
index 6de42faa00..a8eb732c53 100644
--- a/src/nmcli/nmcli.c
+++ b/src/nmcli/nmcli.c
@@ -35,49 +35,50 @@
#define NMCLI_VERSION VERSION
#endif
-#define _NMC_COLOR_PALETTE_INIT() \
- { \
- .ansi_seq = { \
- [NM_META_COLOR_CONNECTION_ACTIVATED] = "32", \
- [NM_META_COLOR_CONNECTION_ACTIVATING] = "33", \
- [NM_META_COLOR_CONNECTION_DISCONNECTING] = "31", \
- [NM_META_COLOR_CONNECTION_INVISIBLE] = "2", \
- [NM_META_COLOR_CONNECTION_EXTERNAL] = "32;2", \
- [NM_META_COLOR_CONNECTION_DEPRECATED] = "2", \
- [NM_META_COLOR_CONNECTIVITY_FULL] = "32", \
- [NM_META_COLOR_CONNECTIVITY_LIMITED] = "33", \
- [NM_META_COLOR_CONNECTIVITY_NONE] = "31", \
- [NM_META_COLOR_CONNECTIVITY_PORTAL] = "33", \
- [NM_META_COLOR_DEVICE_ACTIVATED] = "32", \
- [NM_META_COLOR_DEVICE_ACTIVATING] = "33", \
- [NM_META_COLOR_DEVICE_DISCONNECTED] = "31", \
- [NM_META_COLOR_DEVICE_FIRMWARE_MISSING] = "31", \
- [NM_META_COLOR_DEVICE_PLUGIN_MISSING] = "31", \
- [NM_META_COLOR_DEVICE_UNAVAILABLE] = "2", \
- [NM_META_COLOR_DEVICE_DISABLED] = "31", \
- [NM_META_COLOR_DEVICE_EXTERNAL] = "32;2", \
- [NM_META_COLOR_MANAGER_RUNNING] = "32", \
- [NM_META_COLOR_MANAGER_STARTING] = "33", \
- [NM_META_COLOR_MANAGER_STOPPED] = "31", \
- [NM_META_COLOR_PERMISSION_AUTH] = "33", \
- [NM_META_COLOR_PERMISSION_NO] = "31", \
- [NM_META_COLOR_PERMISSION_YES] = "32", \
- [NM_META_COLOR_STATE_ASLEEP] = "31", \
- [NM_META_COLOR_STATE_CONNECTED_GLOBAL] = "32", \
- [NM_META_COLOR_STATE_CONNECTED_LOCAL] = "32", \
- [NM_META_COLOR_STATE_CONNECTED_SITE] = "32", \
- [NM_META_COLOR_STATE_CONNECTING] = "33", \
- [NM_META_COLOR_STATE_DISCONNECTED] = "31", \
- [NM_META_COLOR_STATE_DISCONNECTING] = "33", \
- [NM_META_COLOR_WIFI_SIGNAL_EXCELLENT] = "32", \
- [NM_META_COLOR_WIFI_SIGNAL_FAIR] = "35", \
- [NM_META_COLOR_WIFI_SIGNAL_GOOD] = "33", \
- [NM_META_COLOR_WIFI_SIGNAL_POOR] = "36", \
- [NM_META_COLOR_WIFI_SIGNAL_UNKNOWN] = "2", \
- [NM_META_COLOR_WIFI_DEPRECATED] = "2", \
- [NM_META_COLOR_ENABLED] = "32", \
- [NM_META_COLOR_DISABLED] = "31", \
- }, \
+#define _NMC_COLOR_PALETTE_INIT() \
+ { \
+ .ansi_seq = \
+ { \
+ [NM_META_COLOR_CONNECTION_ACTIVATED] = "32", \
+ [NM_META_COLOR_CONNECTION_ACTIVATING] = "33", \
+ [NM_META_COLOR_CONNECTION_DISCONNECTING] = "31", \
+ [NM_META_COLOR_CONNECTION_INVISIBLE] = "2", \
+ [NM_META_COLOR_CONNECTION_EXTERNAL] = "32;2", \
+ [NM_META_COLOR_CONNECTION_DEPRECATED] = "2", \
+ [NM_META_COLOR_CONNECTIVITY_FULL] = "32", \
+ [NM_META_COLOR_CONNECTIVITY_LIMITED] = "33", \
+ [NM_META_COLOR_CONNECTIVITY_NONE] = "31", \
+ [NM_META_COLOR_CONNECTIVITY_PORTAL] = "33", \
+ [NM_META_COLOR_DEVICE_ACTIVATED] = "32", \
+ [NM_META_COLOR_DEVICE_ACTIVATING] = "33", \
+ [NM_META_COLOR_DEVICE_DISCONNECTED] = "31", \
+ [NM_META_COLOR_DEVICE_FIRMWARE_MISSING] = "31", \
+ [NM_META_COLOR_DEVICE_PLUGIN_MISSING] = "31", \
+ [NM_META_COLOR_DEVICE_UNAVAILABLE] = "2", \
+ [NM_META_COLOR_DEVICE_DISABLED] = "31", \
+ [NM_META_COLOR_DEVICE_EXTERNAL] = "32;2", \
+ [NM_META_COLOR_MANAGER_RUNNING] = "32", \
+ [NM_META_COLOR_MANAGER_STARTING] = "33", \
+ [NM_META_COLOR_MANAGER_STOPPED] = "31", \
+ [NM_META_COLOR_PERMISSION_AUTH] = "33", \
+ [NM_META_COLOR_PERMISSION_NO] = "31", \
+ [NM_META_COLOR_PERMISSION_YES] = "32", \
+ [NM_META_COLOR_STATE_ASLEEP] = "31", \
+ [NM_META_COLOR_STATE_CONNECTED_GLOBAL] = "32", \
+ [NM_META_COLOR_STATE_CONNECTED_LOCAL] = "32", \
+ [NM_META_COLOR_STATE_CONNECTED_SITE] = "32", \
+ [NM_META_COLOR_STATE_CONNECTING] = "33", \
+ [NM_META_COLOR_STATE_DISCONNECTED] = "31", \
+ [NM_META_COLOR_STATE_DISCONNECTING] = "33", \
+ [NM_META_COLOR_WIFI_SIGNAL_EXCELLENT] = "32", \
+ [NM_META_COLOR_WIFI_SIGNAL_FAIR] = "35", \
+ [NM_META_COLOR_WIFI_SIGNAL_GOOD] = "33", \
+ [NM_META_COLOR_WIFI_SIGNAL_POOR] = "36", \
+ [NM_META_COLOR_WIFI_SIGNAL_UNKNOWN] = "2", \
+ [NM_META_COLOR_WIFI_DEPRECATED] = "2", \
+ [NM_META_COLOR_ENABLED] = "32", \
+ [NM_META_COLOR_DISABLED] = "31", \
+ }, \
}
static NmCli nm_cli = {