NetworkManager/src/nmcli
Beniamino Galvani 14106431fb libnm-core: set ovs-dpdk and ovs-patch as non-base settings
Settings "ovs-dpdk" and "ovs-patch" are currently marked with priority
NM_SETTING_PRIORITY_HW_BASE, which makes them "base" settings. This
means that they can be used as connection type, for example via "nmcli
connection add type ovs-dpdk ...".

This is wrong, as both settings can only belong to a connection of
type "ovs-interface". Decrease their priority and make them non-base
settings.

The problem was spotted when trying to add a ovs-patch connection via
nmcli:

  # nmcli connection add type ovs-patch ifname p con-name q ovs-patch.peer r controller s port-type ovs-port
  Warning: controller='s' doesn't refer to any existing profile.

  (process:4580): nm-CRITICAL **: 10:15:42.807: file ../src/libnm-core-impl/nm-connection.c: line 1682 (_normalize_ovs_interface_type): should not be reached

  (process:4580): nm-WARNING **: 10:15:42.807: connection did not verify after normalization: ??

  (process:4580): nm-CRITICAL **: 10:15:42.807: file ../src/libnm-core-impl/nm-connection.c: line 2170 (_connection_normalize): should not be reached
  Error: Failed to add 'q' connection: ovs-interface.type: A connection with 'ovs-patch' setting must be of connection.type "ovs-interface" but is "ovs-patch"

Fixes: d0ec501163 ('cli: assert that valid_parts are set for base types')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2178
2025-04-14 13:39:13 +02:00
..
agent.c nmcli: replace all uses of g_print()/g_printerr() with nmc_print()/nmc_printerr() 2023-02-08 10:11:18 +01:00
common.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
common.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
connections.c nmcli: improve the warning message about no controller found 2025-04-14 10:08:01 +00:00
connections.h nmcli: connection: process port-type, type and controller first 2025-04-14 10:08:01 +00:00
devices.c nmcli: connection: process port-type, type and controller first 2025-04-14 10:08:01 +00:00
devices.h src: drop most master references from the code 2024-08-09 15:47:32 +02:00
gen-metadata-nm-settings-nmcli.c ethtool: support Forward Error Correction(fec) 2024-11-07 17:38:04 +08:00
gen-metadata-nm-settings-nmcli.xml.in libnm-core: set ovs-dpdk and ovs-patch as non-base settings 2025-04-14 13:39:13 +02:00
general.c nmcli: print to stderr where appropriate 2025-02-20 09:13:01 +00:00
meson.build nmcli: rename "generate-docs-nm-settings-nmcli" to "gen-metadata-nm-settings-nmcli" 2022-10-31 09:11:30 +01:00
nmcli-completion nmcli: fix argument completion if nmcli is aliased 2025-03-24 14:29:19 +00:00
nmcli.c nmcli: fix bash completion for fields 2024-08-28 15:44:01 +02:00
nmcli.h nmcli: move offline flag from NmCli to NmcConfig struct 2023-07-17 12:56:03 +02:00
polkit-agent.c nmcli: replace all uses of g_print()/g_printerr() with nmc_print()/nmc_printerr() 2023-02-08 10:11:18 +01:00
polkit-agent.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
settings.c nmcli: print to stderr where appropriate 2025-02-20 09:13:01 +00:00
settings.h nmcli: convert everywhere dhcp-send-hostname <-> dhcp-send-hostname-v2 2024-10-24 17:03:10 -04:00
utils.c nmcli: convert everywhere dhcp-send-hostname <-> dhcp-send-hostname-v2 2024-10-24 17:03:10 -04:00
utils.h format: run nm-code-format 2024-10-04 11:07:35 +02:00

nmcli

The command line user interface of NetworkManager. It uses the D-Bus API of NetworkManager (via libnm).

See:

  • man 1 nmcli ([www])
  • man 7 nmcli-examples ([www])
  • man 5 nm-settings-nmcli ([www])

Try also with bash-completion!