Skip to contentSkip to conversation

netfilter: conntrack: limit sysctl setting for boolean options

PATCH Applied [email protected] 2 participants 2 messages Apr 9, 2019 – Apr 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: conntrack: limit sysctl setting for boolean options

From: Tonghao Zhang <[email protected]>

We use the zero and one to limit the boolean options setting. After this patch we only set 0 or 1 to boolean options for nf conntrack sysctl.

---
 include/net/netns/conntrack.h           |  6 ++---
 net/netfilter/nf_conntrack_standalone.c | 48 ++++++++++++++++++++++-----------
 2 files changed, 36 insertions(+), 18 deletions(-)
include/net/netns/conntrack.h +3 -3
index f19b531..806454e 100644
@@ -24,9 +24,9 @@ struct nf_generic_net {
 
 struct nf_tcp_net {
 	unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
-	unsigned int tcp_loose;
-	unsigned int tcp_be_liberal;
-	unsigned int tcp_max_retrans;
+	int tcp_loose;
+	int tcp_be_liberal;
+	int tcp_max_retrans;
 };
 
 enum udp_conntrack {
net/netfilter/nf_conntrack_standalone.c +33 -15

103 lines not on this page · raw message

Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 5 lines · On Sun, Apr 07, 2019 at 08:14:20AM -0700, [email protected] wrote:

From: Tonghao Zhang <[email protected]>

We use the zero and one to limit the boolean options setting. After this patch we only set 0 or 1 to boolean options for nf conntrack sysctl.

Applied.