mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
wgengine/magicsock: use relatively new netaddr.IPPort.IsZero method
This commit is contained in:
parent
4811236189
commit
3fa86a8b23
@ -1509,7 +1509,7 @@ func (c *Conn) ReceiveIPv4(b []byte) (n int, ep conn.Endpoint, err error) {
|
|||||||
var addr *net.UDPAddr
|
var addr *net.UDPAddr
|
||||||
Top:
|
Top:
|
||||||
// First, process any buffered packet from earlier.
|
// First, process any buffered packet from earlier.
|
||||||
if from := c.bufferedIPv4From; from != (netaddr.IPPort{}) {
|
if from := c.bufferedIPv4From; !from.IsZero() {
|
||||||
c.bufferedIPv4From = netaddr.IPPort{}
|
c.bufferedIPv4From = netaddr.IPPort{}
|
||||||
addr = from.UDPAddr()
|
addr = from.UDPAddr()
|
||||||
ep := c.findEndpoint(from, addr, c.bufferedIPv4Packet)
|
ep := c.findEndpoint(from, addr, c.bufferedIPv4Packet)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user