Skip to content

Fix growing number of tethering unudhcpd instances

/usr/lib/NetworkManager/dispatcher.d/50-tethering.sh had a typo in the killall command in the disable_tethering function, leading to it never stopping any unudhcpd process. As a new instance is started each time a USB cable is connected, the number of instances kept growing until reboot. Fix the typo so any old unudhcpd instance is actually stopped before starting a new one.

To illustrate the bug, a sample with an uptime of 4 days:

$ ps w | grep unudhcpd
 2467 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
 5009 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
 5525 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
 6360 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
 7271 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
 9356 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
11045 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
14779 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
15696 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
17454 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
19119 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
24729 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
25565 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
25691 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
27417 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
30649 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
31690 root      0:00 unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2
Edited by Fiona Klute

Merge request reports

Loading