fd / go-nat

NAT port mapping library for Go
Apache License 2.0
43 stars 34 forks source link

Don't hardcode the gateway address as the first IP of the network range #1

Closed zorun closed 9 years ago

zorun commented 9 years ago

Currently, the code takes the assumption that the gateway is always the first IP address of the network range: https://github.com/fd/go-nat/blob/master/natpmp.go#L37

But this is not always the case, see https://github.com/ipfs/go-ipfs/issues/1090

Note that it would be better if the underlying lib found that itself: https://github.com/jackpal/go-nat-pmp/issues/1