]> git.itanic.dy.fi Git - linux-stable/commit
flow_dissector: do not dissect l4 ports for fragments
author배석진 <soukjin.bae@samsung.com>
Sat, 10 Nov 2018 00:53:06 +0000 (16:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:07:56 +0000 (16:07 +0100)
commit8c1741548937903b02e92b6fe2d14d90acedf14d
tree65b28b20e606c3e3bfc7028c2b49c5259340761b
parent8e592f4a26addb5d2008548787fbe3c9cc960fd5
flow_dissector: do not dissect l4 ports for fragments

[ Upstream commit 62230715fd2453b3ba948c9d83cfb3ada9169169 ]

Only first fragment has the sport/dport information,
not the following ones.

If we want consistent hash for all fragments, we need to
ignore ports even for first fragment.

This bug is visible for IPv6 traffic, if incoming fragments
do not have a flow label, since skb_get_hash() will give
different results for first fragment and following ones.

It is also visible if any routing rule wants dissection
and sport or dport.

See commit 5e5d6fed3741 ("ipv6: route: dissect flow
in input path if fib rules need it") for details.

[edumazet] rewrote the changelog completely.

Fixes: 06635a35d13d ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
Signed-off-by: 배석진 <soukjin.bae@samsung.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/flow_dissector.c