Commit Graph

5 Commits

Author SHA1 Message Date
Felix Lange
983f5a717a p2p/nat: fix concurrent access to autodisc Interface
Concurrent calls to Interface methods on autodisc could return a "not
discovered" error if the discovery did not finish before the call.
autodisc.wait expected the done channel to carry the found Interface
but it was closed instead.

The fix is to use sync.Once for now, which is easier to get right.
And there is a test. Finally.

This will have to change again when we introduce re-discovery.
2015-05-14 03:53:11 +02:00
Felix Lange
fd4b75cfa8 p2p/nat: less confusing error logging 2015-05-06 22:58:03 +02:00
obscuren
688d118c7e Updated logging 2015-04-07 14:57:04 +02:00
Felix Lange
f965f41b6e p2p/nat: switch to github.com/huin/goupnp
My temporary fix was merged upstream.
2015-02-17 13:10:11 +01:00
Felix Lange
1543833ca0 p2p/nat: new package for port mapping stuff
I have verified that UPnP and NAT-PMP work against an older version of
the MiniUPnP daemon running on pfSense. This code is kind of hard to
test automatically.
2015-02-13 11:39:31 +01:00