Browse Source

netfilter: ip6t_LOG: fix a flaw in printing the MAC

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>
Joerg Marx 14 years ago
parent
commit
0af320fb46
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/ipv6/netfilter/ip6t_LOG.c

+ 1 - 1
net/ipv6/netfilter/ip6t_LOG.c

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