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
ee6b0c61
Commit
ee6b0c61
authored
Aug 09, 2003
by
Hideaki Yoshifuji
Committed by
David S. Miller
Aug 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: strategy handler for net.ipv6.conf.* forwarding.
parent
19459a38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+48
-0
No files found.
net/ipv6/addrconf.c
View file @
ee6b0c61
...
...
@@ -2593,6 +2593,53 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
return
ret
;
}
static
int
addrconf_sysctl_forward_strategy
(
ctl_table
*
table
,
int
*
name
,
int
nlen
,
void
*
oldval
,
size_t
*
oldlenp
,
void
*
newval
,
size_t
newlen
,
void
**
context
)
{
int
*
valp
=
table
->
data
;
int
new
;
if
(
!
newval
||
!
newlen
)
return
0
;
if
(
newlen
!=
sizeof
(
int
))
return
-
EINVAL
;
if
(
get_user
(
new
,
(
int
*
)
newval
))
return
-
EFAULT
;
if
(
new
==
*
valp
)
return
0
;
if
(
oldval
&&
oldlenp
)
{
size_t
len
;
if
(
get_user
(
len
,
oldlenp
))
return
-
EFAULT
;
if
(
len
)
{
if
(
len
>
table
->
maxlen
)
len
=
table
->
maxlen
;
if
(
copy_to_user
(
oldval
,
valp
,
len
))
return
-
EFAULT
;
if
(
put_user
(
len
,
oldlenp
))
return
-
EFAULT
;
}
}
if
(
valp
!=
&
ipv6_devconf_dflt
.
forwarding
)
{
struct
inet6_dev
*
idev
;
if
(
valp
!=
&
ipv6_devconf
.
forwarding
)
{
idev
=
(
struct
inet6_dev
*
)
table
->
extra1
;
if
(
unlikely
(
idev
==
NULL
))
return
-
ENODEV
;
}
else
idev
=
NULL
;
*
valp
=
new
;
addrconf_forward_change
(
idev
);
}
else
*
valp
=
new
;
return
1
;
}
static
struct
addrconf_sysctl_table
{
struct
ctl_table_header
*
sysctl_header
;
...
...
@@ -2611,6 +2658,7 @@ static struct addrconf_sysctl_table
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
addrconf_sysctl_forward
,
.
strategy
=
&
addrconf_sysctl_forward_strategy
,
},
{
.
ctl_name
=
NET_IPV6_HOP_LIMIT
,
...
...
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