Problem with MAC-level multicasts in userspace protocoll
Hello!
I'm currently writing a userspace protocoll which makes use from MAC-level muticasts.
For implementing the protokol I use AF_PACKET sockets and
"setsockopt(socketfd, SOL_SOCKET, PACKET_ADD_MEMBERSHIP, ...)" respectively
"setsockopt(socketfd, SOL_SOCKET, PACKET_DROP_MEMBERSHIP, ...)" for registering the multicast groups.
I also define my own Ethernet protocoll type 0x1111 for the USpace protocol.
As I understand it, if I define two mcast groups 03:02:01:00:00:01 and 03:02:01:00:00:02 on two different sockets, then every socket should only receive frames of its own group.
But in my case both sockets receive all mcast frames arriving on the interface.
Even if it is a frame that even doesn't match any of the two groups.
I didn't configure the socket in promiscuous mode nor in 'allmulti' mode.
I also checked ioctl(socketfd, SIOCGIFFLAGS, ...).
IFF_MULTICAST is set,
IFF_ALLMULTI is not set,
IFF_PROMISC is not set.
I'm using the 3c59x driver for the 3Com 3c905 [Boomerang] cards
on two Debian Sarge systems with Kernel 2.6.9.
I hope someone can tell if and what I'm doing wrong.
Greetings,
elrusso
Last edited by elrusso; 02-01-2005 at 08:36 AM.
|