NetworkManager/src/nmcli
Thomas Haller 56d0d35516
mptcp: rework "connection.mptcp-flags" for enabling MPTCP
1) The "enabled-on-global-iface" flag was odd. Instead, have only
and "enabled" flag and skip (by default) endpoints on interface
that have no default route. With the new flag "also-without-default-route",
this can be overruled. So previous "enabled-on-global-default" now is
the same as "enabled", and "enabled" from before behaves now like
"enabled,also-without-default-route".

2) What was also odd, as that the fallback default value for the flags
depends on "/proc/sys/net/mptcp/enabled". There was not one fixed
fallback default, instead the used fallback value was either
"enabled-on-global-iface,subflow" or "disabled".
Usually that is not a problem (e.g. the default value for
"ipv6.ip6-privacy" also depends on use_tempaddr sysctl). In this case
it is a problem, because the mptcp-flags (for better or worse) encode
different things at the same time.
Consider that the mptcp-flags can also have their default configured in
"NetworkManager.conf", a user who wants to switch the address flags
could previously do:

  [connection.mptcp]
  connection.mptcp-flags=0x32   # enabled-on-global-iface,signal,subflow

but then the global toggle "/proc/sys/net/mptcp/enabled" was no longer
honored. That means, MPTCP handling was always on, even if the sysctl was
disabled. Now, "enabled" means that it's only enabled if the sysctl
is enabled too. Now the user could write to "NetworkManager.conf"

  [connection.mptcp]
  connection.mptcp-flags=0x32   # enabled,signal,subflow

and MPTCP handling would still be disabled unless the sysctl
is enabled.

There is now also a new flag "also-without-sysctl", so if you want
to really enable MPTCP handling regardless of the sysctl, you can.
The point of that might be, that we still can configure endpoints,
even if kernel won't do anything with them. Then you could just flip
the sysctl, and it would start working (as NetworkManager configured
the endpoints already).

Fixes: eb083eece5 ('all: add NMMptcpFlags and connection.mptcp-flags property')
(cherry picked from commit c00873e08f)
2022-08-25 23:12:53 +02:00
..
agent.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
common.c nmcli: move an assignment down to where the value needed 2022-07-29 13:07:38 +02:00
common.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
connections.c libnm-client: Add public nm_conn_wireguard_import() func 2022-07-21 14:53:26 +02:00
connections.h nmcli/connections: export nmc_connection_check_deprecated() 2022-05-12 14:37:18 +02:00
devices.c nmcli/devices: fix a crash 2022-06-23 15:12:19 +02:00
devices.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
general.c nmcli: add nmcli gen reload usage 2022-06-15 08:16:33 +02:00
generate-docs-nm-settings-nmcli.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
generate-docs-nm-settings-nmcli.xml.in mptcp: rework "connection.mptcp-flags" for enabling MPTCP 2022-08-25 23:12:53 +02:00
meson.build build/meson: use "rename" directive for installing nmcli bash completion 2022-05-13 16:15:18 +02:00
nmcli-completion nmcli-completion: fix support for embedded quote characters 2022-08-04 08:59:01 +02:00
nmcli.c nmcli: add --offline option for "add" and "modify" 2022-04-19 14:12:42 +02:00
nmcli.h cli: reformat file to look better 2022-06-16 11:02:20 +02:00
polkit-agent.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
settings.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
utils.c clients: bulk removal of g_assert*() statements 2022-03-28 13:51:44 +02:00
utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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!