* ip6t_LOG.c: patch killing spaces on ouput of IPv4 address on TUNNEL=
@ 2005-03-05 16:01 Peter Bieringer
2005-03-14 8:06 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Peter Bieringer @ 2005-03-05 16:01 UTC (permalink / raw)
To: Maillist netdev
[-- Attachment #1: Type: text/plain, Size: 1739 bytes --]
Hi,
I'm still wondering that this was never fixed since 3 years:
--- linux-2.6.11/net/ipv6/netfilter/ip6t_LOG.c.orig 2005-03-05
16:39:41.390675372 +0100
+++ linux-2.6.11/net/ipv6/netfilter/ip6t_LOG.c 2005-03-05
16:56:53.975208199 +0100
@@ -404,10 +404,10 @@
printk("TUNNEL=");
p = skb->mac.raw + 12;
for (i = 0; i < 4; i++,p++)
- printk("%3d%s", *p,
+ printk("%d%s", *p,
i == 3 ? "->" : ".");
for (i = 0; i < 4; i++,p++)
- printk("%3d%c", *p,
+ printk("%d%c", *p,
i == 3 ? ' ' : '.');
}
}
This will fix the really not nice output like shown below and avoid simple
parsers for becoming in trouble:
Mar 5 16:47:31 host kernel: FW6-default-DROP-extIN:
IN=sit1
OUT=
MAC=01:23:45:67:89:ab->01:23:45:47:89:ac
TUNNEL=123.123. 0.123-> 12.123. 6.123
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
SRC=fe80:0000:0000:0000:0000:0000:0123:4567
DST=ff3e:0012:3456:789a:0000:0000:0000:1234
LEN=72 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=131 CODE=0
I've nowhere else in netfilter log lines such empty space in IPv4 addresses
See also:
<https://lists.netfilter.org/pipermail/netfilter-devel/2002-April/007366.html>
Here, at least trailing "0" were printed.
Peter
--
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
[-- Attachment #2: ip6t_LOG.c.diff --]
[-- Type: application/octet-stream, Size: 490 bytes --]
--- linux-2.6.11/net/ipv6/netfilter/ip6t_LOG.c.orig 2005-03-05 16:39:41.390675372 +0100
+++ linux-2.6.11/net/ipv6/netfilter/ip6t_LOG.c 2005-03-05 16:56:53.975208199 +0100
@@ -404,10 +404,10 @@
printk("TUNNEL=");
p = skb->mac.raw + 12;
for (i = 0; i < 4; i++,p++)
- printk("%3d%s", *p,
+ printk("%d%s", *p,
i == 3 ? "->" : ".");
for (i = 0; i < 4; i++,p++)
- printk("%3d%c", *p,
+ printk("%d%c", *p,
i == 3 ? ' ' : '.');
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ip6t_LOG.c: patch killing spaces on ouput of IPv4 address on TUNNEL=
2005-03-05 16:01 ip6t_LOG.c: patch killing spaces on ouput of IPv4 address on TUNNEL= Peter Bieringer
@ 2005-03-14 8:06 ` Harald Welte
2005-03-14 19:52 ` Peter Bieringer
0 siblings, 1 reply; 3+ messages in thread
From: Harald Welte @ 2005-03-14 8:06 UTC (permalink / raw)
To: Peter Bieringer; +Cc: Maillist netdev, David Miller
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
On Sat, Mar 05, 2005 at 05:01:53PM +0100, Peter Bieringer wrote:
> Hi,
>
> I'm still wondering that this was never fixed since 3 years:
Because it presumably breaks existing scripts that expect it to be in
the broken (speced) format.
I'm not particularly for or against that change... but whatever I do,
somebody will always be complaining. To make you happy and have someone
else complain next time ;)
Signed-off-by: Harald Welte <laforge@netfilter.org>
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ip6t_LOG.c: patch killing spaces on ouput of IPv4 address on TUNNEL=
2005-03-14 8:06 ` Harald Welte
@ 2005-03-14 19:52 ` Peter Bieringer
0 siblings, 0 replies; 3+ messages in thread
From: Peter Bieringer @ 2005-03-14 19:52 UTC (permalink / raw)
To: Harald Welte; +Cc: Maillist netdev, David Miller
--On Monday, March 14, 2005 09:06:28 AM +0100 Harald Welte
<laforge@gnumonks.org> wrote:
> On Sat, Mar 05, 2005 at 05:01:53PM +0100, Peter Bieringer wrote:
>> Hi,
>>
>> I'm still wondering that this was never fixed since 3 years:
>
> Because it presumably breaks existing scripts that expect it to be in
> the broken (speced) format.
How many scripts are already parsing IPv6 log lines? Show me one, please. I
believe I'm the only one who really looked into the logs because I saw
nobody else ever claiming about the broken printout.
> I'm not particularly for or against that change... but whatever I do,
> somebody will always be complaining. To make you happy and have someone
> else complain next time ;)
I don't believe that it is a good idea to let broken log output long time
in the kernel, especially in IPv6 world, where changes still ongoing in
current Linux kernel. How longer you wait the more will ran (perhaps) into
temporary trouble.
For all the script writers, add a module option like "broken_log_lines=yes"
;-)
Regards,
Peter
--
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
>
> Signed-off-by: Harald Welte <laforge@netfilter.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-14 19:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-05 16:01 ip6t_LOG.c: patch killing spaces on ouput of IPv4 address on TUNNEL= Peter Bieringer
2005-03-14 8:06 ` Harald Welte
2005-03-14 19:52 ` Peter Bieringer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).