netfilter: nf_log: prepare net namespace support for loggers
[cascardo/linux.git] / net / bridge / netfilter / ebt_log.c
index 92de5e5..08e5ea5 100644 (file)
@@ -176,17 +176,18 @@ ebt_log_tg(struct sk_buff *skb, const struct xt_action_param *par)
 {
        const struct ebt_log_info *info = par->targinfo;
        struct nf_loginfo li;
+       struct net *net = dev_net(par->in ? par->in : par->out);
 
        li.type = NF_LOG_TYPE_LOG;
        li.u.log.level = info->loglevel;
        li.u.log.logflags = info->bitmask;
 
        if (info->bitmask & EBT_LOG_NFLOG)
-               nf_log_packet(NFPROTO_BRIDGE, par->hooknum, skb, par->in,
-                             par->out, &li, "%s", info->prefix);
+               nf_log_packet(net, NFPROTO_BRIDGE, par->hooknum, skb,
+                             par->in, par->out, &li, "%s", info->prefix);
        else
                ebt_log_packet(NFPROTO_BRIDGE, par->hooknum, skb, par->in,
-                              par->out, &li, info->prefix);
+                              par->out, &li, info->prefix);
        return EBT_CONTINUE;
 }