8 Commits

Author SHA1 Message Date
David Crawshaw
9bf2df1ab1 libtailscale: EBADF on bad tailscale_listener_close fd
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-11 16:53:35 -08:00
James Tucker
44ef74417c libtailscale: implement shutdown semantics for conns
On connections where it applies, signal to the peer connection that the
connection is shutting down/half closed, and only fully close once both
sides are complete.
2023-03-07 14:54:57 -08:00
James Tucker
acbc2e40b6 libtailscale: remove double-close on connections
If a client program receives the fd then it is responsible for closing
the fd, and we must not close the fd, as we may end up closing the wrong
object.
2023-03-07 14:54:57 -08:00
David Crawshaw
926893f68c libtailscale: take a C.int, not a Go int
This was compiling because of the implicit integer conversion on the C
side. But -1 was becoming INT32MAX. Which was an invalid fd, so the logs
were hidden just as if the fd were -1. But it filled strace with EBADF.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-07 12:36:29 -08:00
David Crawshaw
56cb66829f libtailscale: call hostinfo.SetApp
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-07 09:36:31 -08:00
David Crawshaw
843d93cb63 libtailscale: update tailscale_loopback
This brings it inline with the tsnet change to support proxies.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-06 11:58:20 -08:00
David Crawshaw
72c10539e2 libtailscale: add tailscale_loopback_api function
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2023-03-02 16:09:43 -08:00
David Crawshaw
0dc2f30930 libtailscale: Tailscale C library 2023-03-01 08:21:28 -08:00