mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Check destination address upon receive in router
This commit is contained in:
parent
2f75075da3
commit
cb7a5f17d9
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue