From b1e624ef040159a72b0d57309818bb13f377329d Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Mon, 19 Apr 2021 16:06:49 -0700 Subject: [PATCH] wgengine/magicsock: remove unnecessary type assertions Signed-off-by: Josh Bleecher Snyder --- wgengine/magicsock/magicsock.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index c8cb99c4c..5864bb897 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2663,7 +2663,7 @@ func (c *Conn) Rebind() { } else { c.logf("magicsock: link change rebound port from %d to %d", oldPort, c.port) } - c.pconn4.pconn = packetConn.(*net.UDPConn) + c.pconn4.pconn = packetConn c.pconn4.mu.Unlock() } else { c.logf("magicsock: link change, binding new port") @@ -2672,7 +2672,7 @@ func (c *Conn) Rebind() { c.logf("magicsock: link change failed to bind new port: %v", err) return } - c.pconn4.Reset(packetConn.(*net.UDPConn)) + c.pconn4.Reset(packetConn) } c.portMapper.SetLocalPort(c.LocalPort())