lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:  <loom.20080813T082132-707@post.gmane.org>
Date:	Wed, 13 Aug 2008 08:21:58 +0000 (UTC)
From:	Daniel Ng <daniel_ng11@...os.com>
To:	netdev@...r.kernel.org
Subject:  Multicast socket behaviour?

Hi,

The below C code registers the socket with the multicast group 'HELLO_GROUP':

    mreq.imr_multiaddr.s_addr=inet_addr(HELLO_GROUP);
    mreq.imr_address.s_addr=htonl(INADDR_ANY);

    mreq.imr_ifindex = if_nametoindex("ppp1");

    if (setsockopt(fd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)) < 0) {
        perror("setsockopt");
        exit(1);
    }

I understand that if 'INADDR_ANY' is used, it is up to the kernel to decide 
what action to take.

>From my experiments, it seems that the interface corresponding to the 
highest '224.0.0.0' entry in the routing table is used.

Would someone please explain why this is so? 

How difficult would it be to have the kernel join the HELLO_GROUP on *all* 
available multicast-capable interfaces? Why isn't this currently implemented?

I'm using 2.6.14.

Cheers,
Daniel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ