netfilter: nf_tables: Use pkt->net instead of computing net from the passed net_devices
[linux-2.6-microblaze.git] / net / netfilter / nft_reject_inet.c
index dea6750..0bc19f9 100644 (file)
@@ -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;