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
328bb78c
Commit
328bb78c
authored
Mar 04, 2005
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] NDISC: NEWLINK notification on change of Reachable Time
Signed-off-by:
Hideaki YOSHIFUJI
<
yoshfuji@linux-ipv6.org
>
parent
2ee7b6bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
2 deletions
+49
-2
net/core/neighbour.c
net/core/neighbour.c
+5
-0
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+44
-2
No files found.
net/core/neighbour.c
View file @
328bb78c
...
...
@@ -2215,9 +2215,14 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
t
->
neigh_vars
[
2
].
data
=
&
p
->
app_probes
;
t
->
neigh_vars
[
3
].
data
=
&
p
->
retrans_time
;
if
(
handler
||
strategy
)
{
/* RetransTime */
t
->
neigh_vars
[
3
].
proc_handler
=
handler
;
t
->
neigh_vars
[
3
].
strategy
=
strategy
;
t
->
neigh_vars
[
3
].
extra1
=
dev
;
/* ReachableTime */
t
->
neigh_vars
[
4
].
proc_handler
=
handler
;
t
->
neigh_vars
[
4
].
strategy
=
strategy
;
t
->
neigh_vars
[
4
].
extra1
=
dev
;
}
t
->
neigh_vars
[
4
].
data
=
&
p
->
base_reachable_time
;
t
->
neigh_vars
[
5
].
data
=
&
p
->
delay_probe_time
;
...
...
net/ipv6/ndisc.c
View file @
328bb78c
...
...
@@ -1542,7 +1542,17 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
struct
inet6_dev
*
idev
;
int
ret
;
ret
=
proc_dointvec
(
ctl
,
write
,
filp
,
buffer
,
lenp
,
ppos
);
switch
(
ctl
->
ctl_name
)
{
case
NET_NEIGH_RETRANS_TIME
:
ret
=
proc_dointvec
(
ctl
,
write
,
filp
,
buffer
,
lenp
,
ppos
);
break
;
case
NET_NEIGH_REACHABLE_TIME
:
ret
=
proc_dointvec_jiffies
(
ctl
,
write
,
filp
,
buffer
,
lenp
,
ppos
);
break
;
default:
ret
=
-
1
;
}
if
(
write
&&
ret
==
0
&&
dev
&&
(
idev
=
in6_dev_get
(
dev
))
!=
NULL
)
{
idev
->
tstamp
=
jiffies
;
...
...
@@ -1551,6 +1561,36 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
}
return
ret
;
}
int
ndisc_ifinfo_sysctl_strategy
(
ctl_table
*
ctl
,
int
__user
*
name
,
int
nlen
,
void
__user
*
oldval
,
size_t
__user
*
oldlenp
,
void
__user
*
newval
,
size_t
newlen
,
void
**
context
)
{
struct
net_device
*
dev
=
ctl
->
extra1
;
struct
inet6_dev
*
idev
;
int
ret
;
switch
(
ctl
->
ctl_name
)
{
case
NET_NEIGH_REACHABLE_TIME
:
ret
=
sysctl_jiffies
(
ctl
,
name
,
nlen
,
oldval
,
oldlenp
,
newval
,
newlen
,
context
);
break
;
default:
ret
=
0
;
}
if
(
newval
&&
newlen
&&
ret
>
0
&&
dev
&&
(
idev
=
in6_dev_get
(
dev
))
!=
NULL
)
{
idev
->
tstamp
=
jiffies
;
inet6_ifinfo_notify
(
RTM_NEWLINK
,
idev
);
in6_dev_put
(
idev
);
}
return
ret
;
}
#endif
int
__init
ndisc_init
(
struct
net_proto_family
*
ops
)
...
...
@@ -1584,7 +1624,9 @@ int __init ndisc_init(struct net_proto_family *ops)
#ifdef CONFIG_SYSCTL
neigh_sysctl_register
(
NULL
,
&
nd_tbl
.
parms
,
NET_IPV6
,
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
,
NULL
);
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
,
&
ndisc_ifinfo_sysctl_strategy
);
#endif
register_netdevice_notifier
(
&
ndisc_netdev_notifier
);
...
...
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