4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-03 09:37:47 +00:00

Add AlwaysAllowOutbound to session firewall

This commit is contained in:
Neil Alexander
2018-10-08 19:51:51 +01:00
parent 3f237372c9
commit 3ed63ede1e
4 changed files with 31 additions and 9 deletions

View File

@ -184,6 +184,10 @@ func (s *searches) checkDHTRes(info *searchInfo, res *dhtRes) bool {
sinfo, isIn := s.core.sessions.getByTheirPerm(&res.Key)
if !isIn {
sinfo = s.core.sessions.createSession(&res.Key)
if sinfo == nil {
// nil if the DHT search finished but the session wasn't allowed
return true
}
_, isIn := s.core.sessions.getByTheirPerm(&res.Key)
if !isIn {
panic("This should never happen")