ccding / go-stun

A go implementation of the STUN client (RFC 3489 and RFC 5389)
Apache License 2.0
675 stars 120 forks source link

Fix multiple bugs #7

Closed AudriusButkevicius closed 8 years ago

AudriusButkevicius commented 8 years ago
  1. Software name never set
  2. ID always 0's
  3. net.Dial("udp", ...) is not enough, as it's a different syscall (sendto vs bind) from net.ListenUDP, and the kernel filters out packets coming from tuples that we've never sent data to. Works on Windows without it though.
  4. LocalAddr() usually returns 0.0.0.0, because we don't explicitly bind to anything, resulting in a false report of a full-cone nat. Try harder, and even check network interfaces if needed.
ccding commented 8 years ago

lgtm