diff -urN netfilter/userspace/patch-o-matic/extra.old/log-tunnel-fix.patch.ipv6 netfilter/userspace/patch-o-matic/extra/log-tunnel-fix.patch.ipv6 --- netfilter/userspace/patch-o-matic/extra.old/log-tunnel-fix.patch.ipv6 Thu Jan 1 01:00:00 1970 +++ netfilter/userspace/patch-o-matic/extra/log-tunnel-fix.patch.ipv6 Wed Apr 10 17:55:17 2002 @@ -0,0 +1,44 @@ +--- linux-2.4.18.hoi.1.1/net/ipv6/netfilter/ip6t_LOG.c Sat Mar 23 17:31:38 2002 ++++ linux/net/ipv6/netfilter/ip6t_LOG.c Wed Apr 10 17:52:22 2002 +@@ -289,12 +289,36 @@ + /* MAC logging for input chain only. */ + printk("MAC="); + if ((*pskb)->dev && (*pskb)->dev->hard_header_len && (*pskb)->mac.raw != (void*)ipv6h) { +- int i; +- unsigned char *p = (*pskb)->mac.raw; +- for (i = 0; i < (*pskb)->dev->hard_header_len; i++,p++) ++ if ((*pskb)->dev->type != ARPHRD_SIT){ ++ int i; ++ unsigned char *p = (*pskb)->mac.raw; ++ for (i = 0; i < (*pskb)->dev->hard_header_len; i++,p++) + printk("%02x%c", *p, +- i==(*pskb)->dev->hard_header_len - 1 +- ? ' ':':'); ++ i==(*pskb)->dev->hard_header_len - 1 ++ ? ' ':':'); ++ } else { ++ int i; ++ unsigned char *p = (*pskb)->mac.raw; ++ if ( p - (ETH_ALEN*2+2) > (*pskb)->head ){ ++ p -= (ETH_ALEN*2+2); ++ for (i = 0; i < (ETH_ALEN*2+2); i++,p++) ++ printk("%02x%c", *p, ++ i == ETH_ALEN*2+1 ? ' ' : ':'); ++ } ++ ++ if (((*pskb)->dev->addr_len == 4) && ++ (*pskb)->dev->hard_header_len > 20){ ++ printk("SITSRC="); ++ p = (*pskb)->mac.raw + 12; ++ for (i = 0; i < 4; i++,p++) ++ printk("%d%s", *p, ++ i == 3 ? " " : "."); ++ printk("SITDST="); ++ for (i = 0; i < 4; i++,p++) ++ printk("%d%c", *p, ++ i == 3 ? ' ' : '.'); ++ } ++ } + } else + printk(" "); + } diff -urN netfilter/userspace/patch-o-matic/extra.old/log-tunnel-fix.patch.ipv6.help netfilter/userspace/patch-o-matic/extra/log-tunnel-fix.patch.ipv6.help --- netfilter/userspace/patch-o-matic/extra.old/log-tunnel-fix.patch.ipv6.help Thu Jan 1 01:00:00 1970 +++ netfilter/userspace/patch-o-matic/extra/log-tunnel-fix.patch.ipv6.help Wed Apr 10 17:54:53 2002 @@ -0,0 +1,9 @@ +Author: Andras Kis-Szabo +Status: It works 4 me! + + When the LOG target used with a tunnel device, it prints out the encapsulator + header instead of the MAC addresses. + This patch is a quick workaround for the SIT-class devices. It prints out the + MAC addresses and the tunnel information. The offsets are hardcoded in this + patch! + .