mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 09:30:28 +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)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user