netfilter: log: Fix log-level processing
authorJoe Perches <joe@perches.com>
Wed, 12 Sep 2012 02:04:53 +0000 (02:04 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 12 Sep 2012 15:17:35 +0000 (17:17 +0200)
commit16af511a666827eaf5802144f09e2fb7b0942c99
treef1da89fc4df016932838ba591d24c504647831f1
parent4a70bbfaef0361d27272629d1a250a937edcafe4
netfilter: log: Fix log-level processing

auto75914331@hushmail.com reports that iptables does not correctly
output the KERN_<level>.

$IPTABLES -A RULE_0_in  -j LOG  --log-level notice --log-prefix "DENY  in: "

result with linux 3.6-rc5
Sep 12 06:37:29 xxxxx kernel: <5>DENY  in: IN=eth0 OUT= MAC=.......

result with linux 3.5.3 and older:
Sep  9 10:43:01 xxxxx kernel: DENY  in: IN=eth0 OUT= MAC......

commit 04d2c8c83d0
("printk: convert the format for KERN_<LEVEL> to a 2 byte pattern")
updated the syslog header style but did not update netfilter uses.

Do so.

Use KERN_SOH and string concatenation instead of "%c" KERN_SOH_ASCII
as suggested by Eric Dumazet.

Signed-off-by: Joe Perches <joe@perches.com>
cc: auto75914331@hushmail.com
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebt_log.c
net/netfilter/xt_LOG.c