Skip to content

Commit 5e25389

Browse files
committed
ipn/wg: incorrect err when creating endpoint addr
1 parent e5a20ae commit 5e25389

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intra/ipn/wg/wgconn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ func (s *StdNetBind) asEndpoint(ap net.Addr) conn.Endpoint {
615615
} else if udp, ok := ap.(*net.UDPAddr); ok {
616616
ipp := udp.AddrPort()
617617
ep = StdNetEndpoint{ipp, udpaddr(ipp)} // copy udp addr
618-
} else if ipp, err := netip.ParseAddrPort(ap.String()); err != nil {
618+
} else if ipp, err := netip.ParseAddrPort(ap.String()); err == nil {
619619
ep = StdNetEndpoint{ipp, udpaddr(ipp)}
620620
}
621621
s.eps[ap] = ep // ep may be zero value

0 commit comments

Comments
 (0)