miniupnpd started too early in boot process?

Started by dinguz, November 10, 2023, 08:41:38 AM

Previous topic - Next topic
After a reboot, I see this message in the logs. Apparently, miniupnpd is started before all network interfaces are up and running, and it doesn't like that. If I manually restart it after boot, all seems well.
Would it be possible to set a slightly delayed start, or make starting conditional on all configured network interfaces being up?

2023-11-10T08:29:23 Error miniupnpd PCPSendUnsolicitedAnnounce(sockets[0]) sendto(): No route to host
2023-11-10T08:29:23 Error miniupnpd SendNATPMPPublicAddressChangeNotification: sendto(s_udp=12, port=5351): No route to host
2023-11-10T08:29:21 Error miniupnpd PCPSendUnsolicitedAnnounce(sockets[0]) sendto(): No route to host
2023-11-10T08:29:21 Notice miniupnpd Listening for NAT-PMP/PCP traffic on port 5351
2023-11-10T08:29:21 Warning miniupnpd no HTTP IPv6 address, disabling IPv6
2023-11-10T08:29:21 Notice miniupnpd HTTP listening on port 2189
2023-11-10T08:29:21 Warning miniupnpd Cannot get IP address for ext interface pppoe0. Network is down
2023-11-10T08:29:21 Error miniupnpd ioctl(s, SIOCGIFADDR, ...): Can't assign requested address
In theory there is no difference between theory and practice. In practice there is.

The 'bootup' facility the plugin uses is rather late in the boot process, but will likely not cover dynamic addressing like PPPoE. I'm not aware of anyone trying miniupnpd on non-static interfaces?


Cheers,
Franco

November 10, 2023, 09:09:56 AM #2 Last Edit: November 10, 2023, 09:12:52 AM by dinguz
Well, the IP addresses are static as in they don't change, but they are assigned by my ISP via DHCP, so they are acquired late in the boot process. The startup script doesn't really need to accommodate changing addresses, it just needs to delay the start until all interfaces are up.

Edit: igmpproxy seems to have the same issue
In theory there is no difference between theory and practice. In practice there is.

But but... why do you run these services on a WAN?

The case of igmp-proxy that's not even true as it does have a 'newwanip' hook. I'm not saying it's perfect, but "same" issue it is not.

November 10, 2023, 09:23:06 AM #4 Last Edit: November 10, 2023, 07:40:06 PM by dinguz
Igmpproxy is needed for IPTV, and UPnP for my children playing online games and peer-to-peer stuff. I am not aware of doing something odd though :o

Edit: you are right about igmpproxy. So maybe miniupnpd should have the 'newwanip' hook as well?
In theory there is no difference between theory and practice. In practice there is.

I have tested with adding miniupnpd to the newwanip hook, and this - although not perfect, as you already said - seems to work fine as a 'solution'.
So could this please be implemented in the package, so I don't have to manually edit it in each time after an upgrade?
In theory there is no difference between theory and practice. In practice there is.


Thanks!
In theory there is no difference between theory and practice. In practice there is.