aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/nf_tables_ipv6.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-12-10 01:43:14 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-01-08 18:01:15 +0100
commit7a4473a31a6974c0fbf9afe80ef16ac5bc67cf79 (patch)
treec307be59c4027bcb5c85e4b9891df0205c899de5 /net/ipv6/netfilter/nf_tables_ipv6.c
parentnetfilter: nf_tables_arp: don't set forward chain (diff)
downloadlinux-dev-7a4473a31a6974c0fbf9afe80ef16ac5bc67cf79.tar.xz
linux-dev-7a4473a31a6974c0fbf9afe80ef16ac5bc67cf79.zip
netfilter: nf_tables: explicit nft_set_pktinfo() call from hook path
Instead of calling this function from the family specific variant, this reduces the code size in the fast path for the netdev, bridge and inet families. After this change, we must call nft_set_pktinfo() upfront from the chain hook indirection. Before: text data bss dec hex filename 2145 208 0 2353 931 net/netfilter/nf_tables_netdev.o After: text data bss dec hex filename 2125 208 0 2333 91d net/netfilter/nf_tables_netdev.o Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/nf_tables_ipv6.c')
-rw-r--r--net/ipv6/netfilter/nf_tables_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_tables_ipv6.c b/net/ipv6/netfilter/nf_tables_ipv6.c
index d6e4ba5de916..71bac94770dd 100644
--- a/net/ipv6/netfilter/nf_tables_ipv6.c
+++ b/net/ipv6/netfilter/nf_tables_ipv6.c
@@ -22,7 +22,8 @@ static unsigned int nft_do_chain_ipv6(void *priv,
{
struct nft_pktinfo pkt;
- nft_set_pktinfo_ipv6(&pkt, skb, state);
+ nft_set_pktinfo(&pkt, skb, state);
+ nft_set_pktinfo_ipv6(&pkt, skb);
return nft_do_chain(&pkt, priv);
}