Modify

Opened 7 years ago

Closed 3 years ago

#9473 closed defect (moved_to_github)

miniupnpd error when wan interface is not active

Reported by: duvi Owned by: cshore
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

I have a pppoe internet connection, and use miniupnpd.
Sometimes the pppoe connection is not active yet after router reboot, when miniupnpd starts.
This results in generating a bad miniupnpd config:

ext_ifname=eth0
listening_ip=192.168.1.1
port=5000
enable_natpmp=yes
enable_upnp=yes
secure_mode=yes
system_uptime=yes
bitrate_down=8388608
bitrate_up=4194304
uuid=d5881b61-c00c-41d1-852c-1be922f0c147
allow 1024-65535 0.0.0.0/0 1024-65535
deny 0-65535 0.0.0.0/0 0-65535

But ext_ifname should be pppoe-wan.

This results in upnp not working, even after the pppoe connection gets active, and also produces errors in the log:

May 28 10:52:57 OpenWrt daemon.err miniupnpd[1687]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: Failed to get ip address for interface eth0
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
May 28 10:53:06 OpenWrt daemon.err miniupnpd[1687]: Failed to get ip address for interface eth0

Miniupnpd daemon should stop, rewrite the config and restart, when the pppoe connection actually starts.

Attachments (1)

miniupnpd.init.diff (262 bytes) - added by anonymous 6 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by cshore

  • Owner changed from developers to cshore
  • Status changed from new to accepted

comment:2 follow-up: Changed 6 years ago by anonymous

This bug can be fixed by replacing the iface hotplugd script with this:

#!/bin/sh                                                                       
                                                                                
/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && [ "$ACTION" = "if
        local extif
        for extif in $(uci_get upnpd config external_iface); do
                [ "$INTERFACE" = "$extif" ] && /etc/init.d/miniupnpd restart
        done
}     

It doesn't make any sense to restart miniupnpd when the lan interface goes up, which is what the old script is asking for.

Changed 6 years ago by anonymous

comment:3 in reply to: ↑ 2 Changed 6 years ago by anonymous

Replying to anonymous:

This bug can be fixed by replacing the iface hotplugd script with this:

#!/bin/sh                                                                       
                                                                                
/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && [ "$ACTION" = "if
        local extif
        for extif in $(uci_get upnpd config external_iface); do
                [ "$INTERFACE" = "$extif" ] && /etc/init.d/miniupnpd restart
        done
}     

It doesn't make any sense to restart miniupnpd when the lan interface goes up, which is what the old script is asking for.

I have attached a patch that resolves this issue. Unlike the solution proposed above, this patch will allow the rules in the MINIUPNPD chain to be preserved when the wan interface goes down (due to manual or automatic reconnection).

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:5 Changed 3 years ago by jogo

  • Resolution set to moved_to_github
  • Status changed from accepted to closed

miniupnpd has been moved to https://www.github.com/openwrt/packages. If this is still an issue, please open a ticket there.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.