Merge ../linux-2.6
[powerpc.git] / net / ipv6 / netfilter / ip6t_LOG.c
index fc19d8a..6b930ef 100644 (file)
@@ -63,9 +63,8 @@ static void dump_packet(const struct nf_loginfo *info,
                return;
        }
 
-       /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000" */
-       printk("SRC=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(ih->saddr));
-       printk("DST=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x ", NIP6(ih->daddr));
+       /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000 " */
+       printk("SRC=" NIP6_FMT " DST=" NIP6_FMT " ", NIP6(ih->saddr), NIP6(ih->daddr));
 
        /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */
        printk("LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
@@ -437,7 +436,12 @@ ip6t_log_target(struct sk_buff **pskb,
        li.u.log.level = loginfo->level;
        li.u.log.logflags = loginfo->logflags;
 
-       nf_log_packet(PF_INET6, hooknum, *pskb, in, out, &li, loginfo->prefix);
+       if (loginfo->logflags & IP6T_LOG_NFLOG)
+               nf_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
+                             loginfo->prefix);
+       else
+               ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li,
+                               loginfo->prefix);
 
        return IP6T_CONTINUE;
 }