Changes between Initial Version and Version 1 of Ticket #13338, comment 19


Ignore:
Timestamp:
Oct 31, 2014, 6:38:23 AM (5 years ago)
Author:
yawning
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13338, comment 19

    initial v1  
    2727> What happens in [https://github.com/Yawning/go-fw-helper/blob/4ffcbdde7063ac343e7f02a3e31c7243ec0f2bad/natclient/natpmp/getgateway_windows.go natclient/natpmp/getgateway_windows.go] if the primary route is IPv6? It looks like it at least won't crash; does it still do anything meaningful?
    2828
    29 I'm not sure here as MSDN doesn't say what happens.  I assume an error is returned since the function definition and data structures involved all specify IP addresses as `DWORDS`s.  NAT-PMP as a protocol explicitly does not support IPv6 (PCP does, but the protocol is more complex), so any behavior here including (unlikely) getting a garbage return address is ok since the actual discovery will fail.
     29I'm not sure here as MSDN doesn't say what happens.  I assume an error is returned since the function definition and data structures involved all specify IP addresses as `DWORD`s.  NAT-PMP as a protocol explicitly does not support IPv6 (PCP does, but the protocol is more complex), so any behavior here including (unlikely) getting a garbage return address is ok since the actual discovery will fail.
    3030
    3131> Technically, it seems like [https://github.com/Yawning/go-fw-helper/blob/4ffcbdde7063ac343e7f02a3e31c7243ec0f2bad/natclient/upnp/httpu/httpu.go httpu] should do [https://golang.org/pkg/net/http/#RoundTripper RoundTrip] rather than [https://golang.org/pkg/net/http/#Client.Do Do], because RoundTrip is for a single transaction and Do "follows policy (e.g. redirects, cookies, auth)." That is, you might have to do less HTTP if you introduce the UDP stuff at a lower layer (RoundTripper rather than Client). But if it's at all awkward to do, then it doesn't matter; I'm sure what's there will work perfectly well.