mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 21:10:29 +00:00
Check destination address upon receive in router
This commit is contained in:
parent
2f75075da3
commit
cb7a5f17d9
@ -259,6 +259,12 @@ func (r *router) recvPacket(bs []byte, sinfo *sessionInfo) {
|
|||||||
util_putBytes(bs)
|
util_putBytes(bs)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
var dest address
|
||||||
|
copy(dest[:], bs[24:])
|
||||||
|
if !r.cryptokey.isValidSource(dest) {
|
||||||
|
util_putBytes(bs)
|
||||||
|
return
|
||||||
|
}
|
||||||
var source address
|
var source address
|
||||||
copy(source[:], bs[8:])
|
copy(source[:], bs[8:])
|
||||||
var snet subnet
|
var snet subnet
|
||||||
|
Loading…
Reference in New Issue
Block a user