Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: "cerowrt-devel@lists.bufferbloat.net"
	<cerowrt-devel@lists.bufferbloat.net>
Subject: [Cerowrt-devel] fixing upnp
Date: Wed, 19 Feb 2014 11:22:00 -0500	[thread overview]
Message-ID: <CAA93jw55UTVuHcXOdA0RcwCrmdZS2eQ812HBSwfAdQ-1kr8JGg@mail.gmail.com> (raw)

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@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@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

                 reply	other threads:[~2014-02-19 16:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA93jw55UTVuHcXOdA0RcwCrmdZS2eQ812HBSwfAdQ-1kr8JGg@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=cerowrt-devel@lists.bufferbloat.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox