mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 14:10:28 +00:00
Only apply session firewall to pings for sessions we don't already have
This commit is contained in:
parent
2e2c58bfef
commit
3f237372c9
@ -390,7 +390,7 @@ func (ss *sessions) handlePing(ping *sessionPing) {
|
|||||||
// Get the corresponding session (or create a new session)
|
// Get the corresponding session (or create a new session)
|
||||||
sinfo, isIn := ss.getByTheirPerm(&ping.SendPermPub)
|
sinfo, isIn := ss.getByTheirPerm(&ping.SendPermPub)
|
||||||
// Check the session firewall
|
// Check the session firewall
|
||||||
if ss.sessionFirewallEnabled {
|
if !isIn && ss.sessionFirewallEnabled {
|
||||||
if !ss.isSessionAllowed(&ping.SendPermPub) {
|
if !ss.isSessionAllowed(&ping.SendPermPub) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user