Skip to content

Commit 3cd740b

Browse files
tomhughesummakynes
authored andcommitted
netfilter: allow ipv6 fragments to arrive on different devices
Commit 264640f ("ipv6: distinguish frag queues by device for multicast and link-local packets") modified the ipv6 fragment reassembly logic to distinguish frag queues by device for multicast and link-local packets but in fact only the main reassembly code limits the use of the device to those address types and the netfilter reassembly code uses the device for all packets. This means that if fragments of a packet arrive on different interfaces then netfilter will fail to reassemble them and the fragments will be expired without going any further through the filters. Fixes: 648700f ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Tom Hughes <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent a2cbb16 commit 3cd740b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/ipv6/netfilter/nf_conntrack_reasm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
154154
};
155155
struct inet_frag_queue *q;
156156

157+
if (!(ipv6_addr_type(&hdr->daddr) & (IPV6_ADDR_MULTICAST |
158+
IPV6_ADDR_LINKLOCAL)))
159+
key.iif = 0;
160+
157161
q = inet_frag_find(nf_frag->fqdir, &key);
158162
if (!q)
159163
return NULL;

0 commit comments

Comments
 (0)