netfilter: nf_log: prepare net namespace support for loggers
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / netfilter / ip6_tables.c
index 341b54ade72cd045472e5957c33370c84d3338b0..8861b1ef420e8957282b520c90365bd5f33ad4a1 100644 (file)
@@ -284,6 +284,7 @@ static void trace_packet(const struct sk_buff *skb,
        const char *hookname, *chainname, *comment;
        const struct ip6t_entry *iter;
        unsigned int rulenum = 0;
+       struct net *net = dev_net(in ? in : out);
 
        table_base = private->entries[smp_processor_id()];
        root = get_entry(table_base, private->hook_entry[hook]);
@@ -296,7 +297,7 @@ static void trace_packet(const struct sk_buff *skb,
                    &chainname, &comment, &rulenum) != 0)
                        break;
 
-       nf_log_packet(AF_INET6, hook, skb, in, out, &trace_loginfo,
+       nf_log_packet(net, AF_INET6, hook, skb, in, out, &trace_loginfo,
                      "TRACE: %s:%s:%s:%u ",
                      tablename, chainname, comment, rulenum);
 }