netfilter: nf_tables: Use pkt->net instead of computing net from the passed net_devices
[deliverable/linux.git] / net / ipv6 / netfilter / nft_reject_ipv6.c
index ffcac7d5da43aa08025b04d69144836e5c67a407..533cd5719c594e7664c162b59037bb43a10c717c 100644 (file)
@@ -24,14 +24,14 @@ static void nft_reject_ipv6_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 (priv->type) {
        case NFT_REJECT_ICMP_UNREACH:
-               nf_send_unreach6(net, pkt->skb, priv->icmp_code, pkt->hook);
+               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;
        default:
                break;
This page took 0.025846 seconds and 5 git commands to generate.