summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-07-22 12:52:47 -0700
committerDavid S. Miller <davem@davemloft.net>2005-07-22 12:52:47 -0700
commitd3984a6b6abac6203868f0e9095c0ed9e33ece03 (patch)
treea46aa663c646cfc93067c837407ead4357f0b955 /net
parent74bb421da7f39e70ab636ad46ef85ea1178786c5 (diff)
downloadop-kernel-dev-d3984a6b6abac6203868f0e9095c0ed9e33ece03.zip
op-kernel-dev-d3984a6b6abac6203868f0e9095c0ed9e33ece03.tar.gz
[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')
-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 c44685e..a692e26 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,
in ? in->name : "",
out ? out->name : "");
if (in && !out) {
+ unsigned int len;
/* MAC logging for input chain only. */
printk("MAC=");
- if (skb->dev && skb->dev->hard_header_len &&
+ if (skb->dev && (len = skb->dev->hard_header_len) &&
skb->mac.raw != skb->nh.raw) {
unsigned char *p = skb->mac.raw;
int i;
@@ -384,9 +385,11 @@ ip6t_log_packet(unsigned int hooknum,
(p -= ETH_HLEN) < skb->head)
p = NULL;
- if (p != NULL)
- for (i = 0; i < skb->dev->hard_header_len; i++)
- printk("%02x", p[i]);
+ if (p != NULL) {
+ for (i = 0; i < len; i++)
+ printk("%02x%s", p[i],
+ i == len - 1 ? "" : ":");
+ }
printk(" ");
if (skb->dev->type == ARPHRD_SIT) {
OpenPOWER on IntegriCloud