From 3fa86a8b23e757715fe6fd931fafba0fe50fa743 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 15 Jan 2021 19:21:10 -0800 Subject: [PATCH] wgengine/magicsock: use relatively new netaddr.IPPort.IsZero method --- wgengine/magicsock/magicsock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 4e1edcf33..fb00fb2b4 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -1509,7 +1509,7 @@ func (c *Conn) ReceiveIPv4(b []byte) (n int, ep conn.Endpoint, err error) { var addr *net.UDPAddr Top: // First, process any buffered packet from earlier. - if from := c.bufferedIPv4From; from != (netaddr.IPPort{}) { + if from := c.bufferedIPv4From; !from.IsZero() { c.bufferedIPv4From = netaddr.IPPort{} addr = from.UDPAddr() ep := c.findEndpoint(from, addr, c.bufferedIPv4Packet)