mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
move sessionfirewall into the tuntap. this needs testing. the name is also slightly wrong, since a crypto session can still be set up, packets are just accepted/rejected at the tun/tap level instead
This commit is contained in:
@@ -93,6 +93,9 @@ func (tun *TunAdapter) write() {
|
||||
continue // bad local address/subnet
|
||||
}
|
||||
info := tun.store.update(ed25519.PublicKey(from.(iwt.Addr)))
|
||||
if info == nil {
|
||||
continue // Blocked by the gatekeeper
|
||||
}
|
||||
if srcAddr != info.address && srcSubnet != info.subnet {
|
||||
continue // bad remote address/subnet
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user