Project

General

Profile

Actions

Feature #1938

closed

Filter messages broken into multiple syslog messages

Added by Ted Lum over 12 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Logging
Target version:
Start date:
10/07/2011
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

The filter messages are being fragmented into multiple syslog message making filter log parsing difficult and unreliable.

BACKGROUND:
pf logs to a binary file. tcpdump is used to parse the binary into text log output. The tcpdump output is then sent to syslog. tcpdump likes to do some basic message formatting by adding new lines to its output. New lines in text sent to syslog causes syslog to fragment the message into multiple frames. Once fragmented, syslog messages do not necessarily arrive in order making reassembly of the multiple message fragments difficult and unreliable since there is no way to know what fragment goes with what message and in what order.

PROPOSED SOLUTION:
Strip new line characters from tcpdump output before presenting messages to syslog.

PATCH:

/etc/inc/filter.inc

Line 129, change

mwexec_bg("/usr/sbin/tcpdump -s 256 -v -l -n -e -ttt -i pflog0 | logger -t pf -p local0.info");
to
mwexec_bg("/usr/sbin/tcpdump -s 256 -v -l -n -e -ttt -i pflog0 | /usr/bin/sed -e 'N;s/\\n //;P;D;' | logger -t pf -p local0.info");
Actions

Also available in: Atom PDF