Reputation: 9
I have a multicast listener in C that is listening on 229.0.0.1, however is accepting UDP sockets destined for 224.0.0.1.
Can someone explain why this is occurring?
The process is bound (server)
to INADDR_ANY
, and the multicast struct is specified as 229.0.0.1; shouldn't
my "server" process drop UDP datagrams that are not selected for anything other
than what was explicitly configured?
Upvotes: 0
Views: 129
Reputation: 225352
224.0.0.1 is a reserved multicast address for addressing all hosts on the local segment. All network interfaces are always listening on this multicast address.
So if a packet is sent to 224.0.0.1 on the port your application is using, your app will receive the packet whether you asked to listen to that particular multicast address or not.
Upvotes: 2