]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
netfilter: ip6t_LOG: fix a flaw in printing the MAC
authorJoerg Marx <joerg.marx@secunet.com>
Thu, 17 Feb 2011 15:23:40 +0000 (16:23 +0100)
committerPatrick McHardy <kaber@trash.net>
Thu, 17 Feb 2011 15:23:40 +0000 (16:23 +0100)
The flaw was in skipping the second byte in MAC header due to increasing
the pointer AND indexed access starting at '1'.

Signed-off-by: Joerg Marx <joerg.marx@secunet.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv6/netfilter/ip6t_LOG.c

index 09c88891a753e725d8594edc68941b293d171100..de338037a7362cf55255b35f8653d21a219b6915 100644 (file)
@@ -410,7 +410,7 @@ fallback:
                if (p != NULL) {
                        sb_add(m, "%02x", *p++);
                        for (i = 1; i < len; i++)
-                               sb_add(m, ":%02x", p[i]);
+                               sb_add(m, ":%02x", *p++);
                }
                sb_add(m, " ");