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 for one sender, and 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);
Here is notional code from the receiver:
Java Code:
MulticastSocket s = new MulticastSocket(port); //port = 64000
s.joinGroup(InetAddress.getByName(group)); // for one, and for another

byte buf[] = new byte[1024];
DatagramPacket pack = new DatagramPacket(buf, buf.length);
The problem is, if I join, I still get messages targeted for, 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?