NetworkManager/clients/common
Beniamino Galvani 87e79d214e
libnm-core: interpret ovs-patch.peer as an interface name
The 'peer' property of ovs-patch is inserted into the 'options' column
of the ovsdb 'Interface' table. The ovs-vswitchd.conf.db man page says
about it:

  options : peer: optional string
    The name of the Interface for the other side of the patch. The
    named Interface’s own peer option must specify this Interface’s
    name. That is, the two patch interfaces must have reversed name
    and peer values.

Therefore, it is wrong to validate the peer property as an IP address
and document it as such.

Backport: note that on nm-1-22, we have nm_utils_ifname_valid() function
for validating OVS interface names. We don't have that here, so we
re-implement the name validation differently.

Fixes: d4a7fe4679 ('libnm-core: add ovs-patch setting')
(cherry picked from commit beb1dba8c1)
(cherry picked from commit 5598c039e4)
(cherry picked from commit 9b82c62f33)
2020-09-04 16:38:15 +02:00
..
tests all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
meson.build shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-client-utils.c cli: don't treat empty string as valid number in nmc_string_to_uint_base() 2019-03-25 09:12:32 +01:00
nm-client-utils.h shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-meta-setting-access.c cli: allow completing filenames 2019-05-06 10:10:00 +02:00
nm-meta-setting-access.h cli: allow completing filenames 2019-05-06 10:10:00 +02:00
nm-meta-setting-desc.c cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:16:03 +02:00
nm-meta-setting-desc.h clients: add missing 'extern' keyword 2020-04-20 09:12:55 +02:00
nm-polkit-listener.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-polkit-listener.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent-simple.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent-simple.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-helpers.c ipv6: add 'disabled' method 2019-06-11 16:22:04 +02:00
nm-vpn-helpers.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
settings-docs.h.in libnm-core: interpret ovs-patch.peer as an interface name 2020-09-04 16:38:15 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00