diff options
author | Eric W. Biederman | 2015-09-18 21:32:57 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-09-18 21:58:01 +0200 |
commit | 6aa187f21ca2d8ade791f01fd8fab908b1f27673 (patch) | |
tree | 5bc4d4acfb4e4bd57976e87c9ab2a1a4d8b017e8 /net/ipv6/netfilter/nft_reject_ipv6.c | |
parent | inet netfilter: Prefer state->hook to ops->hooknum (diff) | |
download | kernel-qcow2-linux-6aa187f21ca2d8ade791f01fd8fab908b1f27673.tar.gz kernel-qcow2-linux-6aa187f21ca2d8ade791f01fd8fab908b1f27673.tar.xz kernel-qcow2-linux-6aa187f21ca2d8ade791f01fd8fab908b1f27673.zip |
netfilter: nf_tables: kill nft_pktinfo.ops
- Add nft_pktinfo.pf to replace ops->pf
- Add nft_pktinfo.hook to replace ops->hooknum
This simplifies the code, makes it more readable, and likely reduces
cache line misses. Maintainability is enhanced as the details of
nft_hook_ops are of no concern to the recpients of nft_pktinfo.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/nft_reject_ipv6.c')
-rw-r--r-- | net/ipv6/netfilter/nft_reject_ipv6.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/nft_reject_ipv6.c b/net/ipv6/netfilter/nft_reject_ipv6.c index d0d1540ecf87..ffcac7d5da43 100644 --- a/net/ipv6/netfilter/nft_reject_ipv6.c +++ b/net/ipv6/netfilter/nft_reject_ipv6.c @@ -28,11 +28,10 @@ static void nft_reject_ipv6_eval(const struct nft_expr *expr, switch (priv->type) { case NFT_REJECT_ICMP_UNREACH: - nf_send_unreach6(net, pkt->skb, priv->icmp_code, - pkt->ops->hooknum); + nf_send_unreach6(net, pkt->skb, priv->icmp_code, pkt->hook); break; case NFT_REJECT_TCP_RST: - nf_send_reset6(net, pkt->skb, pkt->ops->hooknum); + nf_send_reset6(net, pkt->skb, pkt->hook); break; default: break; |