Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: conntrack: fix ct-state for ICMPv6 Multicast Router Discovery

So far Multicast Router Advertisements and Multicast Router
Solicitations from the Multicast Router Discovery protocol (RFC4286)
would be marked as INVALID for IPv6, even if they are in fact intact
and adhering to RFC4286.

This broke MRA reception and by that multicast reception on
IPv6 multicast routers in a Proxmox managed setup, where Proxmox
would install a rule like "-m conntrack --ctstate INVALID -j DROP"
at the top of the FORWARD chain with br-nf-call-ip6tables enabled
by default.

Similar to as it's done for MLDv1, MLDv2 and IPv6 Neighbor Discovery
already, fix this issue by excluding MRD from connection tracking
handling as MRD always uses predefined multicast destinations
for its messages, too. This changes the ct-state for ICMPv6 MRD messages
from INVALID to UNTRACKED.

This issue was found and fixed with the help of the mrdisc tool
(https://github.com/troglobit/mrdisc).

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Linus Lüssing and committed by
Pablo Neira Ayuso
4a3540a8 6e20eef4

+4 -1
+1
include/uapi/linux/icmpv6.h
··· 112 112 #define ICMPV6_MOBILE_PREFIX_ADV 147 113 113 114 114 #define ICMPV6_MRDISC_ADV 151 115 + #define ICMPV6_MRDISC_SOL 152 115 116 116 117 #define ICMPV6_MSG_MAX 255 117 118
+3 -1
net/netfilter/nf_conntrack_proto_icmpv6.c
··· 62 62 [NDISC_ROUTER_ADVERTISEMENT - 130] = 1, 63 63 [NDISC_NEIGHBOUR_SOLICITATION - 130] = 1, 64 64 [NDISC_NEIGHBOUR_ADVERTISEMENT - 130] = 1, 65 - [ICMPV6_MLD2_REPORT - 130] = 1 65 + [ICMPV6_MLD2_REPORT - 130] = 1, 66 + [ICMPV6_MRDISC_ADV - 130] = 1, 67 + [ICMPV6_MRDISC_SOL - 130] = 1 66 68 }; 67 69 68 70 bool nf_conntrack_invert_icmpv6_tuple(struct nf_conntrack_tuple *tuple,