mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-16 19:58:07 +02:00
Trigger a dispatcher event when a connection is reapplied on a NM device.
Some devices such as phones have already a DHCP client running for accepting
connections when they are plugged into USB to transfer data over SSH.
When NetworkManager switches the connection IP method to shared,
it spawns a dnsmasq process to handle DHCP and DNS for that connection.
However, a dispatcher event is needed to disable the external DHCP server
for these USB connections as NetworkManager's dnsmasq handles them now.
Moreover, when the connection method is switched to a different mode,
the external DHCP server needs to be spawned again to make sure that
SSH connections are still possible to the device.
To achieve this, add a new NetworkManager Dispatcher event
'reapply' which is triggered when a connection is reapplied on a NM
device. This way, a dispatcher script can handle the case above by
inspecting the IP method in the dispatcher script.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| meson.build | ||
| nm-dispatcher-api.h | ||
| nm-libnm-core-aux.c | ||
| nm-libnm-core-aux.h | ||
| README.md | ||
libnm-core-aux-extern
libnm-core-aux-extern is a static library that is similar to
libnm-core-aux-intern.
The only difference is that libnm-core-aux-extern is not used by
libnm-core-impl itself. So you must not
use it there.
Otherwise, it's the same and has the same usage.