]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8b3f2dc6ea69cbeb13f6adae18521f0932461025
tree4a189e449dccdebaa4cf1bd58306790bf0089b47
parentd76b535be14dc218558c56fe996b2b3739dd69c0
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: c936b1fcf91e ("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