net/sched: act_ct: Fix ipv6 lookup of offloaded connections
authorPaul Blakey <paulb@mellanox.com>
Wed, 4 Mar 2020 11:49:38 +0000 (13:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2020 19:05:04 +0000 (11:05 -0800)
commit07ac9d16b4a5d1cf303215ad7e9829824246be55
tree4a189e449dccdebaa4cf1bd58306790bf0089b47
parent97ec3b21b207dc7713877f5ef2ae74c879be0c84
net/sched: act_ct: Fix ipv6 lookup of offloaded connections

When checking the protocol number tcf_ct_flow_table_lookup() handles
the flow as if it's always ipv4, while it can be ipv6.

Instead, refactor the code to fetch the tcp header, if available,
in the relevant family (ipv4/ipv6) filler function, and do the
check on the returned tcp header.

Fixes: 46475bb20f4b ("net/sched: act_ct: Software offload of established flows")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ct.c