Commit d4866805 authored by Andrei Vagin's avatar Andrei Vagin Committed by Pablo Neira Ayuso

netfilter: fix nf_l4proto_log_invalid to log invalid packets

It doesn't log a packet if sysctl_log_invalid isn't equal to protonum
OR sysctl_log_invalid isn't equal to IPPROTO_RAW. This sentence is
always true. I believe we need to replace OR to AND.

Cc: Florian Westphal <fw@strlen.de>
Fixes: c4f3db15 ("netfilter: conntrack: add and use nf_l4proto_log_invalid")
Signed-off-by: default avatarAndrei Vagin <avagin@gmail.com>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 916f6efa
...@@ -55,7 +55,7 @@ void nf_l4proto_log_invalid(const struct sk_buff *skb, ...@@ -55,7 +55,7 @@ void nf_l4proto_log_invalid(const struct sk_buff *skb,
struct va_format vaf; struct va_format vaf;
va_list args; va_list args;
if (net->ct.sysctl_log_invalid != protonum || if (net->ct.sysctl_log_invalid != protonum &&
net->ct.sysctl_log_invalid != IPPROTO_RAW) net->ct.sysctl_log_invalid != IPPROTO_RAW)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment