Packets sent to non-connected components are processed by OutgoingSessionPromise

Description

The code that routes packets in RoutingTableImpl is structured as follows.

if ( addressee == domainname ) { // process stanzas that are addressed to the XMPP domain itself. } else if ( addressee is subdomain of domainname ) { // process stanzas that are addressed to components. } else { // process S2S packets }

The condition of the second block, however, is:

jid.getDomain().contains(serverName) && (hasComponentRoute(jid) || ExternalComponentManager.hasConfiguration(jid.getDomain())))

This will cause any stanza that is addressed to a non-existing subdomain to be processed by the S2S routines. In effect, they get queued forever, which causes a memory leak.

Many thanks to Lars Hoogweg for reporting this issue.

Environment

None

Activity

Show:

Guus der Kinderen November 7, 2009 at 5:38 PM

The code now checks the address of a packet first. Only after a processing routine has been picked, the validity of the address is checked.

I have split up the individual processes that were defined in routePacket(). Now, every process has its own method. This makes mistakes like the one that caused this issue very visible.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created November 7, 2009 at 4:57 PM
Updated February 1, 2010 at 3:15 AM
Resolved November 7, 2009 at 5:38 PM

Flag notifications