mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-10 07:20:39 +03:00
fix bug in recvPacket for packets coming from a subnet
This commit is contained in:
parent
3b8cd0a8d6
commit
8cf8b0ec41
@ -323,7 +323,7 @@ func (r *router) recvPacket(bs []byte, sinfo *sessionInfo) {
|
|||||||
addrlen = 16
|
addrlen = 16
|
||||||
copy(sourceAddr[:addrlen], bs[8:])
|
copy(sourceAddr[:addrlen], bs[8:])
|
||||||
copy(dest[:addrlen], bs[24:])
|
copy(dest[:addrlen], bs[24:])
|
||||||
copy(snet[:addrlen/2], bs[24:])
|
copy(snet[:addrlen/2], bs[8:])
|
||||||
} else if bs[0]&0xf0 == 0x40 {
|
} else if bs[0]&0xf0 == 0x40 {
|
||||||
// IPv4 address
|
// IPv4 address
|
||||||
addrlen = 4
|
addrlen = 4
|
||||||
|
Loading…
Reference in New Issue
Block a user