Commit 623e6c85 authored by Dave Cridland's avatar Dave Cridland Committed by daryl herzmann

OF-1188 Add remote domain access check in main thread (#709)

* OF-1188 Add remote domain access check in main thread

By adding an additional access check fo the remote domain in the main loop,
we avoid the need to tie up an OutgoignSessionPromise thread during S2S
initiation.

* OF-1188 Improve logging
parent 0eb282b5
......@@ -33,6 +33,7 @@ import org.jivesoftware.openfire.container.BasicModule;
import org.jivesoftware.openfire.forward.Forwarded;
import org.jivesoftware.openfire.handler.PresenceUpdateHandler;
import org.jivesoftware.openfire.server.OutgoingSessionPromise;
import org.jivesoftware.openfire.server.RemoteServerManager;
import org.jivesoftware.openfire.session.*;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.cache.Cache;
......@@ -477,7 +478,11 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
}
}
}
else {
else if (!RemoteServerManager.canAccess(jid.getDomain())) { // Check if the remote domain is in the blacklist
Log.info( "Will not route: Remote domain {} is not accessible according to our configuration (typical causes: server federation is disabled, or domain is blacklisted).", jid.getDomain() );
routed = false;
}
else {
// Return a promise of a remote session. This object will queue packets pending
// to be sent to remote servers
OutgoingSessionPromise.getInstance().process(packet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment