[Cerowrt-devel] fixing upnp
Dave Taht
dave.taht at gmail.com
Wed Feb 19 11:22:00 EST 2014
I have found and fixed at least two problems with upnp and natpmp.
Both of these fixes will be in 3.10.28-14...
1) upnp was not successfully creating a persistent lease file. This
meant whenever
the daemon was restarted (by a network reload for example, or a
reboot), upnp would
lose the leases.
I pushed the fix upstream to openwrt yesterday.
2) natpmp was not configured for the right interfaces.
I am a little confused as to how these two interoperate, and about the
role of minissdpd,
still.
To fix the first, edit /etc/init.d/miniupnpd to have this in it
[ -n "$upnp_lease_file" ] && { # add the {, kill the
\
echo "lease_file=$upnp_lease_file" >>$tmpconf
touch $upnp_lease_file # add this line
} # add a }
And restart or reboot. I tested it with transmission and this was the result:
root at dave:/tmp# cat upnp.leases
UDP:51413:172.30.42.20:51413:0:Transmission at 51413
TCP:51413:172.30.42.20:51413:1392826703:NAT-PMP 51413 tcp
the second:
root at dave:/tmp# cat /etc/config/natpmp
config natpmp
option outbound_interface ge00
option inbound_interfaces 'se00 sw00 sw10'
option iptables_chain natpmp
(restart or reboot, or do both fixes at the same time)
NOTE: The gui doesn't like editing the interfaces.
I didn't know that that upnp worked with ipv6 at all. I tested and made sure the
ipv6 addresses of the control ports were not available via the internet...
Wed Feb 19 03:31:47 2014 daemon.notice miniupnpd[21897]: Listening for
NAT-PMP traffic on port 5351
Wed Feb 19 03:33:15 2014 daemon.notice miniupnpd[21975]: HTTP
listening on port 5000
Wed Feb 19 03:33:15 2014 daemon.notice miniupnpd[21975]: HTTP IPv6
address given to control points : [2001:470:839d:f0f0::1]
Wed Feb 19 03:33:15 2014 daemon.notice miniupnpd[21975]: Listening for
NAT-PMP traffic on port 5351
--
Dave Täht
Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html
More information about the Cerowrt-devel
mailing list