Subject: [magma] About source IP address of IGMP Join sent on loopback interface

From: preetham B <[email-masked]>
Date: Mon, 22 Mar 2010 13:29:29 +0530

Hi,

I am running a host application which joins multicast group on
loopback interface.

But the source IP address of IGMPv3 report is not loopback address (127.0.0.1).
Its picking up first available N/W interface address.

Snippet:
 mreq.imr_multiaddr.s_addr = inet_addr("239.5.1.7");
 mreq.imr_address.s_addr = htonl(INADDR_LOOPBACK);
 mreq.imr_ifindex = 1; (Interface index of loopback)
 check(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) == 0);

Is there any reason why loopback address is not source IP address of
join message?

Regards,
Anupama