tailscale/net
David Crawshaw d139fa9c92 net/interfaces: use a uint32_t for ipv4 address
The code was using a C "int", which is a signed 32-bit integer.
That means some valid IP addresses were negative numbers.
(In particular, the default router address handed out by AT&T
fiber: 192.168.1.254. No I don't know why they do that.)
A negative number is < 255, and so was treated by the Go code
as an error.

This fixes the unit test failure:

	$ go test -v -run=TestLikelyHomeRouterIPSyscallExec ./net/interfaces
	=== RUN   TestLikelyHomeRouterIPSyscallExec
	    interfaces_darwin_cgo_test.go:15: syscall() = invalid IP, false, netstat = 192.168.1.254, true
	--- FAIL: TestLikelyHomeRouterIPSyscallExec (0.00s)

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2021-02-02 13:32:58 -08:00
..
dnscache net/dnscache: work on IPv6-only hosts (again) 2021-01-06 19:53:13 -08:00
flowtrack net/flowtrack: add Tuple.String method 2021-01-11 22:09:09 -08:00
interfaces net/interfaces: use a uint32_t for ipv4 address 2021-02-02 13:32:58 -08:00
netcheck netcheck: use reflect in sortRegions test. 2021-01-12 04:29:28 -08:00
netns net/netns: remove use of unsafe on Windows 2020-11-14 19:53:10 -08:00
netstat net/netstat: remove a bit more unsafe 2020-11-17 13:49:24 -08:00
nettest net/nettest: de-flake tests on Windows 2021-01-15 18:21:56 -08:00
packet net/packet, wgengine, tstun: add inter-node TSMP protocol for connect errors 2021-01-15 14:03:57 -08:00
stun net/stun: Fix STUN attribute padding (#710) 2020-08-24 12:52:13 -07:00
tlsdial net/tlsdial, derp/derphttp: finish DERPNode.CertName validation 2020-06-01 09:01:37 -07:00
tsaddr net/tsaddr: add ChromeOS contains tests 2020-12-28 16:48:43 -08:00
tshttpproxy net/tshttpproxy: aggressively rate-limit error logs in Transport.Proxy path 2020-11-03 09:23:57 -08:00