MiniUPnP error message flooding syslog

I recently had to restart my network (/etc/init.d/network restart) after setting up an ipv6 tunnel. I noticed that MiniUPnP stopped working after this and it is flooding the syslog with some error messages.

I did some Google search and found out that:

miniupnpd doesn’t support LAN interfaces being removed (or not present at startup)
You should kill miniupnpd when br0 is removed, and restart it whe, br0 is up again.

I had to manually restart MiniUPnP to fix it. Is there any way to automatically restart MiniUPnP at network restart? Maybe some type of hotplug script?

Writting a hotplug script is the best solution. You can put the script to /etc/hotplug.d/iface/ folder.

If you don’t know the variable for hotplug, please reter to [OpenWrt Wiki] docs:guide-user:base-system:hotplug_lede.