diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-18 22:33:01 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-18 22:58:49 +0300 |
commit | 88182a0e0c665cbd2f01af743c7f88e494924246 (patch) | |
tree | a5ef48a51c49d06d1b78fd7544dc93f91a224a65 /net/netfilter/nft_reject_inet.c | |
parent | 46448d0093ba18a212e314fd9ea029e740baa476 (diff) | |
download | linux-88182a0e0c665cbd2f01af743c7f88e494924246.tar.xz |
netfilter: nf_tables: Use pkt->net instead of computing net from the passed net_devices
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_reject_inet.c')
-rw-r--r-- | net/netfilter/nft_reject_inet.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netfilter/nft_reject_inet.c b/net/netfilter/nft_reject_inet.c index dea6750af6ff..0bc19f97e238 100644 --- a/net/netfilter/nft_reject_inet.c +++ b/net/netfilter/nft_reject_inet.c @@ -22,7 +22,6 @@ static void nft_reject_inet_eval(const struct nft_expr *expr, const struct nft_pktinfo *pkt) { struct nft_reject *priv = nft_expr_priv(expr); - struct net *net = dev_net((pkt->in != NULL) ? pkt->in : pkt->out); switch (pkt->pf) { case NFPROTO_IPV4: @@ -44,14 +43,14 @@ static void nft_reject_inet_eval(const struct nft_expr *expr, case NFPROTO_IPV6: switch (priv->type) { case NFT_REJECT_ICMP_UNREACH: - nf_send_unreach6(net, pkt->skb, priv->icmp_code, + nf_send_unreach6(pkt->net, pkt->skb, priv->icmp_code, pkt->hook); break; case NFT_REJECT_TCP_RST: - nf_send_reset6(net, pkt->skb, pkt->hook); + nf_send_reset6(pkt->net, pkt->skb, pkt->hook); break; case NFT_REJECT_ICMPX_UNREACH: - nf_send_unreach6(net, pkt->skb, + nf_send_unreach6(pkt->net, pkt->skb, nft_reject_icmpv6_code(priv->icmp_code), pkt->hook); break; |