]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Nov 2018 04:01:21 +0000 (20:01 -0800)
commit7584dcbfdd049a8dff6ac4384ba6b1fcd1367db3
tree661b09b8456959419d4be214b59a2772804ec7e0
parent3bb20ed399dac05aa48cdef2209d994aa4d5fb36
flow_dissector: do not dissect l4 ports for fragments

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 66dac02e5ee1 ("ipv6: route: dissect flow
in input path if fib rules need it") for details.

[edumazet] rewrote the changelog completely.

Fixes: fdde81c6252f ("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>
net/core/flow_dissector.c