summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-19 08:33:12 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-20 19:57:07 +0100
commit7c5d1e355e6faa1551296c34aaced4ffe0b16d87 (patch)
tree89b5b0259ea2e6a31251a1a878c46b1bf30215ee /device/device.go
parenta86492a5673983fe7755631996a23c2dc510808f (diff)
device: remove unnecessary zeroing
Newly allocated objects are already zeroed. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/device/device.go b/device/device.go
index d18192e..58e996f 100644
--- a/device/device.go
+++ b/device/device.go
@@ -298,12 +298,7 @@ func (device *Device) SetPrivateKey(sk NoisePrivateKey) error {
func NewDevice(tunDevice tun.Device, logger *Logger) *Device {
device := new(Device)
-
- device.isUp.Set(false)
- device.isClosed.Set(false)
-
device.log = logger
-
device.tun.device = tunDevice
mtu, err := device.tun.device.MTU()
if err != nil {