diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-11-12 02:29:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-13 06:42:26 +0300 |
commit | f1363e058b84e61d39f9796fa806090ad7a28ebd (patch) | |
tree | 975cba24c002cdaf74c3c01e76a1c479f39b9edb /net/netfilter/nft_flow_offload.c | |
parent | 62248df88a406a443b838a3633a7f60a716f999e (diff) | |
download | linux-f1363e058b84e61d39f9796fa806090ad7a28ebd.tar.xz |
netfilter: nf_flow_table: detach routing information from flow description
This patch adds the infrastructure to support for flow entry types.
The initial type is NF_FLOW_OFFLOAD_ROUTE that stores the routing
information into the flow entry to define a fastpath for the classic
forwarding path.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nft_flow_offload.c')
-rw-r--r-- | net/netfilter/nft_flow_offload.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c index f29bbc74c4bf..dd82ff2ee19f 100644 --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c @@ -115,10 +115,13 @@ static void nft_flow_offload_eval(const struct nft_expr *expr, if (nft_flow_route(pkt, ct, &route, dir) < 0) goto err_flow_route; - flow = flow_offload_alloc(ct, &route); + flow = flow_offload_alloc(ct); if (!flow) goto err_flow_alloc; + if (flow_offload_route_init(flow, &route) < 0) + goto err_flow_add; + if (tcph) { ct->proto.tcp.seen[0].flags |= IP_CT_TCP_FLAG_BE_LIBERAL; ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL; |