5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 15:20:30 +00:00

Check destination address upon receive in router

This commit is contained in:
Neil Alexander 2018-11-06 19:23:20 +00:00
parent 2f75075da3
commit cb7a5f17d9
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -259,6 +259,12 @@ func (r *router) recvPacket(bs []byte, sinfo *sessionInfo) {
util_putBytes(bs)
return
}
var dest address
copy(dest[:], bs[24:])
if !r.cryptokey.isValidSource(dest) {
util_putBytes(bs)
return
}
var source address
copy(source[:], bs[8:])
var snet subnet