miniupnpd: improve hotplug & interface handling
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Thu, 14 May 2020 10:30:12 +0000 (11:30 +0100)
committerKevin Darbyshire-Bryant <6500011+ldir-EDB0@users.noreply.github.com>
Mon, 25 May 2020 21:49:03 +0000 (22:49 +0100)
commit295d77943cd8ddb1b6eb73e900d5b5221ab138e7
treeaf84914ff586f6582988850fe43ea8c7d0b55a93
parentc2c91ea99e5fb7d4798116888b31f8fd9117d8ee
miniupnpd: improve hotplug & interface handling

The existing interface selection/detection code was incomprehensible at
worst and convoluted at best.  The uci config file suggested it
understood an external ipv6 interface but in reality the init script
took no notice.  Re-work it so it is at least comprehendible and takes
notice of ipv6 interface details if specified.

Update the hotplug script to use the same interface selection/detection
code as the init script and take note of ipv6 interface selection, only
restarting miniupnpd on interface up events and only if that interface
isn't already known (for that ip class) by miniupnpd.

For me this has solved numerous 'flaky' startup problems, especially
with regard to ipv6.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
net/miniupnpd/Makefile
net/miniupnpd/files/miniupnpd.hotplug
net/miniupnpd/files/miniupnpd.init