diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-03 10:56:26 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-03 11:52:34 +0100 |
commit | 0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72 (patch) | |
tree | a86f5800f72eb0606dc38759af952acb49f8e6d7 /net/netfilter/nft_rt.c | |
parent | 613dbd95723aee7abd16860745691b6c7bda20dc (diff) | |
download | op-kernel-dev-0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72.zip op-kernel-dev-0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72.tar.gz |
netfilter: nf_tables: use hook state from xt_action_param structure
Don't copy relevant fields from hook state structure, instead use the
one that is already available in struct xt_action_param.
This patch also adds a set of new wrapper functions to fetch relevant
hook state structure fields.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_rt.c')
-rw-r--r-- | net/netfilter/nft_rt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_rt.c b/net/netfilter/nft_rt.c index 9e5ec1f..d3eb640 100644 --- a/net/netfilter/nft_rt.c +++ b/net/netfilter/nft_rt.c @@ -43,14 +43,14 @@ void nft_rt_get_eval(const struct nft_expr *expr, break; #endif case NFT_RT_NEXTHOP4: - if (pkt->pf != NFPROTO_IPV4) + if (nft_pf(pkt) != NFPROTO_IPV4) goto err; *dest = rt_nexthop((const struct rtable *)dst, ip_hdr(skb)->daddr); break; case NFT_RT_NEXTHOP6: - if (pkt->pf != NFPROTO_IPV6) + if (nft_pf(pkt) != NFPROTO_IPV6) goto err; memcpy(dest, rt6_nexthop((struct rt6_info *)dst, |