[jboss-jira] [JBoss JIRA] Created: (JGRP-1088) TP: loopback=true does not discard multicast messages from self

Bela Ban (JIRA) jira-events at lists.jboss.org
Tue Nov 3 06:29:05 EST 2009


TP: loopback=true does not discard multicast messages from self
---------------------------------------------------------------

                 Key: JGRP-1088
                 URL: https://jira.jboss.org/jira/browse/JGRP-1088
             Project: JGroups
          Issue Type: Bug
            Reporter: Bela Ban
            Assignee: Bela Ban
             Fix For: 2.8


In TP.handleMyMessage(), we have this code:
 if(loopback && multicast && msg.isFlagSet(Message.LOOPBACK)) {
         return; // drop message that was already looped back and delivered
  }

Because LOOPBACK is *never* set in Message, a multicast message sent by A will always (1) get looped back to A and (2) get received but *not* discarded to to the above code.

The correct code should check whether the sender and receiver are identical, e.g.
if(loopback && multicast) {
          if(!isSingleton()) {
              if(local_addr != null && local_addr.equals(msg.getSrc()))
                   return; // drop message that was already looped back and delivered
             }
}

The added twist is that we need to handle the case where the shared transport doesn't have a local_addr. In this case, TP.ProtocolAdapter.up() needs to run the same check and discard the message if needed.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list