* [PATCH nf-next] netfilter: nf_conntrack: make nf_conntrack_max as an unsigned int knob
@ 2017-04-08 9:32 Liping Zhang
2017-04-13 22:06 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Liping Zhang @ 2017-04-08 9:32 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, Liping Zhang
From: Liping Zhang <zlpnobody@gmail.com>
It doesn't work when we set a large value to the nf_conntrack_max, as
well as the nf_conntrack_expect_max:
# echo 4294967295 > /proc/sys/net/nf_conntrack_max
bash: echo: write error: Invalid argument
So convert to use proc_douintvec.
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
---
net/netfilter/nf_conntrack_standalone.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 2256147..7f131a3 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -479,9 +479,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
{
.procname = "nf_conntrack_max",
.data = &nf_conntrack_max,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_douintvec,
},
{
.procname = "nf_conntrack_count",
@@ -516,9 +516,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
{
.procname = "nf_conntrack_expect_max",
.data = &nf_ct_expect_max,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_douintvec,
},
{
.procname = "nf_conntrack_default_on",
@@ -534,9 +534,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
{
.procname = "nf_conntrack_max",
.data = &nf_conntrack_max,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_douintvec,
},
{ }
};
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf-next] netfilter: nf_conntrack: make nf_conntrack_max as an unsigned int knob
2017-04-08 9:32 [PATCH nf-next] netfilter: nf_conntrack: make nf_conntrack_max as an unsigned int knob Liping Zhang
@ 2017-04-13 22:06 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-13 22:06 UTC (permalink / raw)
To: Liping Zhang; +Cc: netfilter-devel, Liping Zhang
On Sat, Apr 08, 2017 at 05:32:25PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
>
> It doesn't work when we set a large value to the nf_conntrack_max, as
> well as the nf_conntrack_expect_max:
> # echo 4294967295 > /proc/sys/net/nf_conntrack_max
> bash: echo: write error: Invalid argument
>
> So convert to use proc_douintvec.
Why do you want such an large amount of entries?
I'm not applying this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-13 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-08 9:32 [PATCH nf-next] netfilter: nf_conntrack: make nf_conntrack_max as an unsigned int knob Liping Zhang
2017-04-13 22:06 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.