aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-07-22 15:52:47 -0400
committerDavid S. Miller <davem@davemloft.net>2005-07-22 15:52:47 -0400
commitd3984a6b6abac6203868f0e9095c0ed9e33ece03 (patch)
treea46aa663c646cfc93067c837407ead4357f0b955 /net/ipv6
parent74bb421da7f39e70ab636ad46ef85ea1178786c5 (diff)
[NETFILTER]: Fix ip6t_LOG MAC format
I broke this in the patch that consolidated MAC logging. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index c44685e391b7..a692e26a4fa3 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -373,9 +373,10 @@ ip6t_log_packet(unsigned int hooknum,
373 in ? in->name : "", 373 in ? in->name : "",
374 out ? out->name : ""); 374 out ? out->name : "");
375 if (in && !out) { 375 if (in && !out) {
376 unsigned int len;
376 /* MAC logging for input chain only. */ 377 /* MAC logging for input chain only. */
377 printk("MAC="); 378 printk("MAC=");
378 if (skb->dev && skb->dev->hard_header_len && 379 if (skb->dev && (len = skb->dev->hard_header_len) &&
379 skb->mac.raw != skb->nh.raw) { 380 skb->mac.raw != skb->nh.raw) {
380 unsigned char *p = skb->mac.raw; 381 unsigned char *p = skb->mac.raw;
381 int i; 382 int i;
@@ -384,9 +385,11 @@ ip6t_log_packet(unsigned int hooknum,
384 (p -= ETH_HLEN) < skb->head) 385 (p -= ETH_HLEN) < skb->head)
385 p = NULL; 386 p = NULL;
386 387
387 if (p != NULL) 388 if (p != NULL) {
388 for (i = 0; i < skb->dev->hard_header_len; i++) 389 for (i = 0; i < len; i++)
389 printk("%02x", p[i]); 390 printk("%02x%s", p[i],
391 i == len - 1 ? "" : ":");
392 }
390 printk(" "); 393 printk(" ");
391 394
392 if (skb->dev->type == ARPHRD_SIT) { 395 if (skb->dev->type == ARPHRD_SIT) {