ipv6: distinguish frag queues by device for multicast and link-local packets
authorMichal Kubeček <mkubecek@suse.cz>
Tue, 24 Nov 2015 14:07:11 +0000 (15:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2016 04:34:49 +0000 (20:34 -0800)
commitf4ce575c5d5bcce5d4d03a24baa4308cf3409ab3
tree0ba9539de42749f5fba8c6836c1dae3a77d9f180
parentad7a4964af681230e3fafc5a5b023ffbcbeed184
ipv6: distinguish frag queues by device for multicast and link-local packets

[ Upstream commit 264640fc2c5f4f913db5c73fa3eb1ead2c45e9d7 ]

If a fragmented multicast packet is received on an ethernet device which
has an active macvlan on top of it, each fragment is duplicated and
received both on the underlying device and the macvlan. If some
fragments for macvlan are processed before the whole packet for the
underlying device is reassembled, the "overlapping fragments" test in
ip6_frag_queue() discards the whole fragment queue.

To resolve this, add device ifindex to the search key and require it to
match reassembling multicast packets and packets to link-local
addresses.

Note: similar patch has been already submitted by Yoshifuji Hideaki in

  http://patchwork.ozlabs.org/patch/220979/

but got lost and forgotten for some reason.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ipv6.h
net/ipv6/netfilter/nf_conntrack_reasm.c
net/ipv6/reassembly.c