mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: SA4001 for net.UDPAddr copy
This commit is contained in:
parent
dcccdaddaf
commit
6a2ac83da1
|
@ -46,7 +46,8 @@ func handleUDPToLocal(packet C.UDPPacket, pc net.PacketConn, key string, oAddr,
|
|||
}
|
||||
|
||||
fromUDPAddr := from.(*net.UDPAddr)
|
||||
fromUDPAddr = &(*fromUDPAddr) // make a copy
|
||||
_fromUDPAddr := *fromUDPAddr
|
||||
fromUDPAddr = &_fromUDPAddr // make a copy
|
||||
if fromAddr, ok := netip.AddrFromSlice(fromUDPAddr.IP); ok {
|
||||
if fAddr.IsValid() && (oAddr.Unmap() == fromAddr.Unmap()) {
|
||||
fromUDPAddr.IP = fAddr.Unmap().AsSlice()
|
||||
|
|
Loading…
Reference in New Issue
Block a user