Skip to content

Commit d486680

Browse files
avaginummakynes
authored andcommitted
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: c4f3db1 ("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]>
1 parent 916f6ef commit d486680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_conntrack_proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void nf_l4proto_log_invalid(const struct sk_buff *skb,
5555
struct va_format vaf;
5656
va_list args;
5757

58-
if (net->ct.sysctl_log_invalid != protonum ||
58+
if (net->ct.sysctl_log_invalid != protonum &&
5959
net->ct.sysctl_log_invalid != IPPROTO_RAW)
6060
return;
6161

0 commit comments

Comments
 (0)