You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine/wgcfg
Josh Bleecher Snyder c467ed0b62 wgengine/wgcfg: always close io.Pipe
In DeviceConfig, we did not close r after calling FromUAPI.
If FromUAPI returned early due to an error, then it might
not have read all the data that IpcGetOperation wanted to write.
As a result, IpcGetOperation could hang, as in #3220.

We were also closing the wrong end of the pipe after IpcSetOperation
in ReconfigDevice.

To ensure that we get all available information to diagnose
such a situation, include all errors anytime something goes wrong.

This should fix the immediate crashing problem in #3220.
We'll then need to figure out why IpcGetOperation was failing.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
3 years ago
..
nmcfg tailcfg: use key.NodePublic in wire protocol types. 3 years ago
clone.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 3 years ago
config.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 3 years ago
device.go wgengine/wgcfg: always close io.Pipe 3 years ago
device_test.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 3 years ago
parser.go wgengine/wgcfg: remove unused helper function. 3 years ago
parser_test.go wgengine/wgcfg: convert to use new node key type. 3 years ago
writer.go wgengine/wgcfg: convert to use new node key type. 3 years ago