Opened 13 years ago

Closed 11 years ago

#2191 closed Enhancement (fixed)

NAT-PMP and UPnP should also map UDP port

Reported by: jch Owned by: charles
Priority: Normal Milestone: 2.20
Component: libtransmission Version: 2.12
Severity: Normal Keywords:
Cc: jch@…, tiennou7@…, felipe.contreras@…

Description

Now that we have DHT, both NAT-PNP and uPNP should map the UDP port in addition to the TCP port.

Attachments (1)

upnp.patch (2.8 KB) - added by starix 11 years ago.
UDP upnp patch

Download all attachments as: .zip

Change History (13)

comment:1 Changed 13 years ago by charles

  • Version changed from 1.70+ to 1.70

comment:2 Changed 12 years ago by jch

I think that's an important issue, and one that should be trivial to think with somebody who understands the UPnP library we use.

Firewalled DHT nodes work, but they increase the load for other (un-firewalled) nodes. Hence, I'd be very happy to see this implemented ASAP.

--Juliusz

comment:3 Changed 12 years ago by Waldorf

  • Summary changed from NAT-PNP and uPNP should map UDP port to NAT-PMP and UPnP should also map UDP port

Note on NAT-PMP:

I'm seeing that others are reusing the natpmp_t in sendnewportmappingrequest(), so tr_natpmpPulse() should be updated to check both, but doesn't need to create .

ref. the TCMPortMapper framework

comment:4 Changed 12 years ago by jch

  • Cc jch@… added

comment:5 Changed 12 years ago by tiennou

  • Cc tiennou7@… added

I'm taking a look at this. TCMPortMapper is OSX-specific, so it's useless to libT, and is functionally equivalent to what we have in port-forwarding.c/h.

comment:6 Changed 12 years ago by felipec

  • Cc felipe.contreras@… added

Changed 11 years ago by starix

UDP upnp patch

comment:7 Changed 11 years ago by starix

  • Milestone changed from None Set to 2.13
  • Version changed from 1.70 to 2.12

comment:8 Changed 11 years ago by charles

  • Milestone changed from 2.13 to 2.20
  • Status changed from new to assigned

starix, thanks for the patch! :) The patch looks straightforward to me. Tentatively accepting for 2.20.

jch, what do you think?

comment:9 Changed 11 years ago by Waldorf

Quick thought though, how about the webui/rpc port? I would be a good addition to (optionally?) forward that port too.

comment:10 Changed 11 years ago by starix

Use same port that TCP use. Just simply add UDP forward. And may be it's goog to update miniupnpc sources?

comment:11 Changed 11 years ago by jch

While I don't understand UPnP, there's nothing obviously wrong. I'd say go ahead.

Thanks,

--jch

comment:12 Changed 11 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Patch added in r11680.

I modified the error logging so that the UDP and UTP forwarding commands can each log their own error messages if necessary.

starix, thanks for the patch!

Note: See TracTickets for help on using tickets.