mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[NETFILTER]: x_tables: add NFLOG target
Add new NFLOG target to allow use of nfnetlink_log for both IPv4 and IPv6. Currently we have two (unsupported by userspace) hacks in the LOG and ULOG targets to optionally call to the nflog API. They lack a few features, namely the IPv4 and IPv6 LOG targets can not specify a number of arguments related to nfnetlink_log, while the ULOG target is only available for IPv4. Remove those hacks and add a clean way to use nfnetlink_log. Signed-off-by: Patrick McHardy <[email protected]>
This commit is contained in:
parent
39b46fc6f0
commit
baf7b1e112
9 changed files with 123 additions and 16 deletions
|
|
@ -430,13 +430,8 @@ ipt_log_target(struct sk_buff **pskb,
|
|||
li.u.log.level = loginfo->level;
|
||||
li.u.log.logflags = loginfo->logflags;
|
||||
|
||||
if (loginfo->logflags & IPT_LOG_NFLOG)
|
||||
nf_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
|
||||
"%s", loginfo->prefix);
|
||||
else
|
||||
ipt_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
|
||||
loginfo->prefix);
|
||||
|
||||
ipt_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
|
||||
loginfo->prefix);
|
||||
return IPT_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue