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>
2021-11-02 17:50:15 -07:00
..
nmcfg tailcfg: use key.NodePublic in wire protocol types. 2021-11-02 09:11:43 -07:00
clone.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 2021-10-29 14:31:44 -07:00
config.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 2021-10-29 14:31:44 -07:00
device_test.go wgengine/magicsock: remove uses of tailcfg.DiscoKey. 2021-10-29 14:31:44 -07:00
device.go wgengine/wgcfg: always close io.Pipe 2021-11-02 17:50:15 -07:00
parser_test.go wgengine/wgcfg: convert to use new node key type. 2021-10-28 09:39:23 -07:00
parser.go wgengine/wgcfg: remove unused helper function. 2021-10-28 10:38:13 -07:00
writer.go wgengine/wgcfg: convert to use new node key type. 2021-10-28 09:39:23 -07:00