I have written an application which uses multicast so that portions of the application can find eachother on a network without the need for a bunch of preconfiguration. The problem I'm seeing, is that the reciver code receives the Datagram packets for every group, rather than just the one it's joined. I'm using java 6_10.

Here's the notional snippet from the sender:
Java Code:
MulticastSocket s = new MulticastSocket();

byte buf[] = ... (my data buffer)

// Group is 225.192.3.3 for one sender, and 224.192.1.1 for another
// port = 64000 in both cases, although, sender does not need
// to join the group
DatagramPacket pack = new DatagramPacket(buf, buf.length, InetAddress.getByName(group), port);
   
s.send(pack);
s.close();
Here is notional code from the receiver:
Java Code:
MulticastSocket s = new MulticastSocket(port); //port = 64000
s.joinGroup(InetAddress.getByName(group)); //225.192.3.3 for one, and 224.192.1.1 for another

byte buf[] = new byte[1024];
DatagramPacket pack = new DatagramPacket(buf, buf.length);
s.receive(pack);
s.leaveGroup(InetAddress.getByName(group));
s.close();
The problem is, if I join 225.192.3.3, I still get messages targeted for 224.192.1.1, and vice versa.

Is this how multicast is supposed to work (seems kind of stupid since groups are totally irrelevant if so), is it a Java bug possibly, or are there dumb things a sys admin can do to configure things to cause this to happen?