fix: bad udp behaviour

This commit is contained in:
mzz2017 2023-03-02 21:09:24 +08:00
parent 87c9b9d6a5
commit 1eaf4bb7f6

View File

@ -596,7 +596,8 @@ func (c *ControlPlane) Serve(readyChan chan<- bool, listener *Listener) (err err
c.log.Warnf("No AddrPort presented: %v, %v", lastErr, err)
return
}
copy(data, data[dataOffset:])
n := copy(data, data[dataOffset:])
data = data[:n]
routingResult = &addrHdr.RoutingResult
__ip := common.Ipv6Uint32ArrayToByteSlice(addrHdr.Ip)
_ip, _ := netip.AddrFromSlice(__ip)