aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Vagin <[email protected]>2019-04-17 09:49:44 -0700
committerPablo Neira Ayuso <[email protected]>2019-04-22 10:38:50 +0200
commitd48668052b2603b6262459625c86108c493588dd (patch)
treead48077fde3d364f2d5ea783330ca5b35d2a98e6
parent916f6efae62305796e012e7c3a7884a267cbacbf (diff)
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 <[email protected]> Fixes: c4f3db1595827 ("netfilter: conntrack: add and use nf_l4proto_log_invalid") Signed-off-by: Andrei Vagin <[email protected]> Acked-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
-rw-r--r--net/netfilter/nf_conntrack_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index b9403a266a2e..37bb530d848f 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -55,7 +55,7 @@ void nf_l4proto_log_invalid(const struct sk_buff *skb,
struct va_format vaf;
va_list args;
- if (net->ct.sysctl_log_invalid != protonum ||
+ if (net->ct.sysctl_log_invalid != protonum &&
net->ct.sysctl_log_invalid != IPPROTO_RAW)
return;