Merge pull request #206 from Arceliar/ckr

fix bug in recvPacket for packets coming from a subnet
This commit is contained in:
Arceliar 2018-11-11 00:04:47 -06:00 committed by GitHub
commit be3a7b3e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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