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
Kirill Smelkov
linux
Commits
1d8c72f0
Commit
1d8c72f0
authored
May 17, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Flush routing cache on sysctl_ip_default_ttl changes.
parent
8324c812
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
include/net/ip.h
include/net/ip.h
+11
-0
net/ipv4/devinet.c
net/ipv4/devinet.c
+7
-7
net/ipv4/sysctl_net_ipv4.c
net/ipv4/sysctl_net_ipv4.c
+2
-1
No files found.
include/net/ip.h
View file @
1d8c72f0
...
@@ -298,4 +298,15 @@ extern void ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport,
...
@@ -298,4 +298,15 @@ extern void ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport,
extern
int
ip_seq_release
(
struct
inode
*
inode
,
struct
file
*
file
);
extern
int
ip_seq_release
(
struct
inode
*
inode
,
struct
file
*
file
);
extern
int
ipv4_proc_init
(
void
);
extern
int
ipv4_proc_init
(
void
);
/* sysctl helpers - any sysctl which holds a value that ends up being
* fed into the routing cache should use these handlers.
*/
int
ipv4_doint_and_flush
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
);
int
ipv4_doint_and_flush_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
);
#endif
/* _IP_H */
#endif
/* _IP_H */
net/ipv4/devinet.c
View file @
1d8c72f0
...
@@ -1065,9 +1065,9 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
...
@@ -1065,9 +1065,9 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
return
ret
;
return
ret
;
}
}
static
int
ipv4_doint_and_flush
(
ctl_table
*
ctl
,
int
write
,
int
ipv4_doint_and_flush
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
size_t
*
lenp
)
{
{
int
*
valp
=
ctl
->
data
;
int
*
valp
=
ctl
->
data
;
int
val
=
*
valp
;
int
val
=
*
valp
;
...
@@ -1079,10 +1079,10 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write,
...
@@ -1079,10 +1079,10 @@ static int ipv4_doint_and_flush(ctl_table *ctl, int write,
return
ret
;
return
ret
;
}
}
static
int
ipv4_doint_and_flush_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
int
ipv4_doint_and_flush_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
void
**
context
)
{
{
int
*
valp
=
table
->
data
;
int
*
valp
=
table
->
data
;
int
new
;
int
new
;
...
...
net/ipv4/sysctl_net_ipv4.c
View file @
1d8c72f0
...
@@ -160,7 +160,8 @@ ctl_table ipv4_table[] = {
...
@@ -160,7 +160,8 @@ ctl_table ipv4_table[] = {
.
data
=
&
sysctl_ip_default_ttl
,
.
data
=
&
sysctl_ip_default_ttl
,
.
maxlen
=
sizeof
(
int
),
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
.
proc_handler
=
&
ipv4_doint_and_flush
,
.
strategy
=
&
ipv4_doint_and_flush_strategy
,
},
},
{
{
.
ctl_name
=
NET_IPV4_AUTOCONFIG
,
.
ctl_name
=
NET_IPV4_AUTOCONFIG
,
...
...
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