]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: remove device.state.stopping from RoutineTUNEventReader
authorJosh Bleecher Snyder <josh@tailscale.com>
Mon, 8 Feb 2021 18:19:28 +0000 (10:19 -0800)
committerJosh Bleecher Snyder <josh@tailscale.com>
Mon, 8 Feb 2021 18:32:07 +0000 (10:32 -0800)
commit3516ccc1e226756c4ba6d431cbf7e3a3fe63c5f8
treefd9c3fbda6f16129969ae6091496ab3cb1102f01
parent0bcb822e5b4ee6408c5bcb5ad4d4e61b394a834e
device: remove device.state.stopping from RoutineTUNEventReader

The TUN event reader does three things: Change MTU, device up, and device down.
Changing the MTU after the device is closed does no harm.
Device up and device down don't make sense after the device is closed,
but we can check that condition before proceeding with changeState.
There's thus no reason to block device.Close on RoutineTUNEventReader exiting.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
device/device.go
device/tun.go