[NETFILTER]: Restore {ipt,ip6t,ebt}_LOG compatibility
The nfnetlink_log infrastructure changes broke compatiblity of the LOG targets. They currently use whatever log backend was registered first, which means that if ipt_ULOG was loaded first, no messages will be printed to the ring buffer anymore. Restore compatiblity by using the old log functions by default and only use the nf_log backend if the user explicitly said so. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
45fe4dc08c
commit
bafac2a512
@@ -425,7 +425,12 @@ ipt_log_target(struct sk_buff **pskb,
|
||||
li.u.log.level = loginfo->level;
|
||||
li.u.log.logflags = loginfo->logflags;
|
||||
|
||||
nf_log_packet(PF_INET, hooknum, *pskb, in, out, &li, loginfo->prefix);
|
||||
if (loginfo->logflags & IPT_LOG_NFLOG)
|
||||
nf_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
|
||||
loginfo->prefix);
|
||||
else
|
||||
ipt_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
|
||||
loginfo->prefix);
|
||||
|
||||
return IPT_CONTINUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user