Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8a15a6c8
Commit
8a15a6c8
authored
May 27, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Add sysctl to control ipfrag_secret_interval.
parent
acbd911d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
include/linux/sysctl.h
include/linux/sysctl.h
+2
-1
net/ipv4/ip_fragment.c
net/ipv4/ip_fragment.c
+3
-3
net/ipv4/sysctl_net_ipv4.c
net/ipv4/sysctl_net_ipv4.c
+10
-0
No files found.
include/linux/sysctl.h
View file @
8a15a6c8
...
...
@@ -307,7 +307,8 @@ enum
NET_IPV4_ICMP_RATEMASK
=
90
,
NET_TCP_TW_REUSE
=
91
,
NET_TCP_FRTO
=
92
,
NET_TCP_LOW_LATENCY
=
93
NET_TCP_LOW_LATENCY
=
93
,
NET_IPV4_IPFRAG_SECRET_INTERVAL
=
94
,
};
enum
{
...
...
net/ipv4/ip_fragment.c
View file @
8a15a6c8
...
...
@@ -126,7 +126,7 @@ static unsigned int ipqhashfn(u16 id, u32 saddr, u32 daddr, u8 prot)
}
static
struct
timer_list
ipfrag_secret_timer
;
static
int
ipfrag_secret_interval
=
10
*
60
*
HZ
;
int
sysctl_
ipfrag_secret_interval
=
10
*
60
*
HZ
;
static
void
ipfrag_secret_rebuild
(
unsigned
long
dummy
)
{
...
...
@@ -162,7 +162,7 @@ static void ipfrag_secret_rebuild(unsigned long dummy)
}
write_unlock
(
&
ipfrag_lock
);
mod_timer
(
&
ipfrag_secret_timer
,
now
+
ipfrag_secret_interval
);
mod_timer
(
&
ipfrag_secret_timer
,
now
+
sysctl_
ipfrag_secret_interval
);
}
atomic_t
ip_frag_mem
=
ATOMIC_INIT
(
0
);
/* Memory used for fragments */
...
...
@@ -672,6 +672,6 @@ void ipfrag_init(void)
init_timer
(
&
ipfrag_secret_timer
);
ipfrag_secret_timer
.
function
=
ipfrag_secret_rebuild
;
ipfrag_secret_timer
.
expires
=
jiffies
+
ipfrag_secret_interval
;
ipfrag_secret_timer
.
expires
=
jiffies
+
sysctl_
ipfrag_secret_interval
;
add_timer
(
&
ipfrag_secret_timer
);
}
net/ipv4/sysctl_net_ipv4.c
View file @
8a15a6c8
...
...
@@ -27,6 +27,7 @@ extern int sysctl_icmp_ignore_bogus_error_responses;
extern
int
sysctl_ipfrag_low_thresh
;
extern
int
sysctl_ipfrag_high_thresh
;
extern
int
sysctl_ipfrag_time
;
extern
int
sysctl_ipfrag_secret_interval
;
/* From ip_output.c */
extern
int
sysctl_ip_dynaddr
;
...
...
@@ -572,6 +573,15 @@ ctl_table ipv4_table[] = {
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
},
{
.
ctl_name
=
NET_IPV4_IPFRAG_SECRET_INTERVAL
,
.
procname
=
"ipfrag_secret_interval"
,
.
data
=
&
sysctl_ipfrag_secret_interval
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
},
{
.
ctl_name
=
0
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment