Skip to content

nm-dispatcher: dispatch on reapply

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.

Edited by Dylan Van Assche

Merge request reports