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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <CFCF0BD4-80F5-48B1-AA03-D0066DEC6B11@darou.fr>
Date:	Tue, 28 Oct 2014 17:32:28 +0100
From:	Pierre Pfister <pierre@...ou.fr>
To:	netdev@...r.kernel.org
Subject: ipv6 mld: packets are not looped back to/from kernel/querier

Hello,

I’m implementing a dual-stack multicast querier (IGMPv3 and MLDv2) along with the PIM protocol.
So I’ve got two multicast sockets, one for each protocol.

I open the two sockets like this:

—————————————————— 
fd = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
val = 1;
setsockopt(fd, IPPROTO_IP, MRT_INIT, &val, sizeof(val));
setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &val, sizeof(val));
setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &val, sizeof(val));
val = 0xc0;
setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof(val));
setsockopt(fd, IPPROTO_IP, IP_OPTIONS, &ipv4_rtr_alert, sizeof(ipv4_rtr_alert))

fd = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
val = 1;
setsockopt(fd, IPPROTO_IPV6, MRT6_INIT, &val, sizeof(val));
setsockopt(fd, IPPROTO_IPV6, IPV6_RECVHOPOPTS, &val, sizeof(val));
setsockopt(fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &val, sizeof(val));
setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &val, sizeof(val));
val = 2;
setsockopt(fd, IPPROTO_RAW, IPV6_CHECKSUM, &val, sizeof(val));
setsockopt(fd, IPPROTO_IPV6, IPV6_HOPOPTS, &ipv6_rtr_alert, sizeof(ipv6_rtr_alert));
struct icmp6_filter flt;
ICMP6_FILTER_SETBLOCKALL(&flt);
ICMP6_FILTER_SETPASS(ICMPV6_MGM_QUERY, &flt);
ICMP6_FILTER_SETPASS(ICMPV6_MGM_REPORT, &flt);
ICMP6_FILTER_SETPASS(ICMPV6_MGM_REDUCTION, &flt);
ICMP6_FILTER_SETPASS(ICMPV6_MLD2_REPORT, &flt);
setsockopt(fd, IPPROTO_ICMPV6, ICMP6_FILTER, &flt, sizeof(flt));
—————————————————————— 

I’ve got two issues with the IPv6 socket.
When I send an MLD query, it is sent on the wire, but the kernel doesn’t interpret it (It doesn’t send MLD Reports as reply).
Similarly, when the kernel sends a Report, my MLD Querier socket doesn’t receive the message.

The resulting problem is that everything works fine as long as the router doesn’t want to join a group. When it does, my Querier can’t know it, and the kernel doesn’t reply to Querier’s requests.

It works well in IPv4.

I tried removing the ICMPV6 filter as well as using IPV6_MULTICAST_LOOP.

Am I doing something wrong or is it an actual bug ?
If you need more information, please ask.

Thanks, 


Pierre


--
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