mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-15 03:18:28 +01:00
dont call writeTo4 if writing to ipv6
This commit is contained in:
@@ -192,7 +192,7 @@ func (u *StdConn) ReadMulti(msgs []rawMessage) (int, error) {
|
||||
}
|
||||
|
||||
func (u *StdConn) WriteTo(b []byte, ip netip.AddrPort) error {
|
||||
if u.isV4 {
|
||||
if u.isV4 && ip.Addr().Is4() {
|
||||
return u.writeTo4(b, ip)
|
||||
}
|
||||
return u.writeTo6(b, ip)
|
||||
|
||||
Reference in New Issue
Block a user