Skip to contentSkip to conversation

ipt_LOG: No space after prefix

DISCUSSION Richard Weinberger 2 participants 3 messages Jan 22, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi!

Is there no space after prefix for specific reason? ipt_log_packet() is using this format string:
"<%d>%sIN=%s OUT=%s "

Using a prefix leads to a broken log entry like this one (prefix is "foo"):
"fooIN=eth0 OUT= ..."
I'm sure this breaks log analyzers.
I've never noticed this because I'm using prefix very seldom.

Thanks,
//richard

#1 lore raw
Quoted 9 lines · Richard Weinberger

Hi!

Is there no space after prefix for specific reason? ipt_log_packet() is using this format string:
"<%d>%sIN=%s OUT=%s "

Using a prefix leads to a broken log entry like this one (prefix is "foo"):
"fooIN=eth0 OUT= ..."
I'm sure this breaks log analyzers.

Changing it now will break log analyzers as well. So you are better off leaving it as-is, because everybody who has observed that before you already knows about it.
(Also consider --log-prefix "", in which case I would not want to have a space.)

#2 lore raw

Am 22.01.2012 15:20, schrieb Jan Engelhardt:

Quoted 3 lines

Changing it now will break log analyzers as well. So you are better off leaving it as-is, because everybody who has observed that before you already knows about it.

Very true.

Thanks,
//richard