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
97d10a80
Commit
97d10a80
authored
Mar 02, 2003
by
Hideaki Yoshifuji
Committed by
David S. Miller
Mar 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Make sure temporary addresses are regenerated properly.
parent
506371b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+31
-0
No files found.
net/ipv6/addrconf.c
View file @
97d10a80
...
@@ -2015,6 +2015,9 @@ static void addrconf_verify(unsigned long foo)
...
@@ -2015,6 +2015,9 @@ static void addrconf_verify(unsigned long foo)
write_lock
(
&
addrconf_hash_lock
);
write_lock
(
&
addrconf_hash_lock
);
for
(
ifp
=
inet6_addr_lst
[
i
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
for
(
ifp
=
inet6_addr_lst
[
i
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
unsigned
long
age
;
unsigned
long
age
;
#ifdef CONFIG_IPV6_PRIVACY
unsigned
long
regen_advance
;
#endif
if
(
ifp
->
flags
&
IFA_F_PERMANENT
)
if
(
ifp
->
flags
&
IFA_F_PERMANENT
)
continue
;
continue
;
...
@@ -2022,6 +2025,12 @@ static void addrconf_verify(unsigned long foo)
...
@@ -2022,6 +2025,12 @@ static void addrconf_verify(unsigned long foo)
spin_lock
(
&
ifp
->
lock
);
spin_lock
(
&
ifp
->
lock
);
age
=
(
now
-
ifp
->
tstamp
)
/
HZ
;
age
=
(
now
-
ifp
->
tstamp
)
/
HZ
;
#ifdef CONFIG_IPV6_PRIVACY
regen_advance
=
ifp
->
idev
->
cnf
.
regen_max_retry
*
ifp
->
idev
->
cnf
.
dad_transmits
*
ifp
->
idev
->
nd_parms
->
retrans_time
/
HZ
;
#endif
if
(
age
>=
ifp
->
valid_lft
)
{
if
(
age
>=
ifp
->
valid_lft
)
{
spin_unlock
(
&
ifp
->
lock
);
spin_unlock
(
&
ifp
->
lock
);
in6_ifa_hold
(
ifp
);
in6_ifa_hold
(
ifp
);
...
@@ -2050,6 +2059,28 @@ static void addrconf_verify(unsigned long foo)
...
@@ -2050,6 +2059,28 @@ static void addrconf_verify(unsigned long foo)
in6_ifa_put
(
ifp
);
in6_ifa_put
(
ifp
);
goto
restart
;
goto
restart
;
}
}
#ifdef CONFIG_IPV6_PRIVACY
}
else
if
((
ifp
->
flags
&
IFA_F_TEMPORARY
)
&&
!
(
ifp
->
flags
&
IFA_F_TENTATIVE
))
{
if
(
age
>=
ifp
->
prefered_lft
-
regen_advance
)
{
struct
inet6_ifaddr
*
ifpub
=
ifp
->
ifpub
;
if
(
time_before
(
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
,
next
))
next
=
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
;
if
(
!
ifp
->
regen_count
&&
ifpub
)
{
ifp
->
regen_count
++
;
in6_ifa_hold
(
ifp
);
in6_ifa_hold
(
ifpub
);
spin_unlock
(
&
ifp
->
lock
);
write_unlock
(
&
addrconf_hash_lock
);
ipv6_create_tempaddr
(
ifpub
,
ifp
);
in6_ifa_put
(
ifpub
);
in6_ifa_put
(
ifp
);
goto
restart
;
}
}
else
if
(
time_before
(
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
-
regen_advance
*
HZ
,
next
))
next
=
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
-
regen_advance
*
HZ
;
spin_unlock
(
&
ifp
->
lock
);
#endif
}
else
{
}
else
{
/* ifp->prefered_lft <= ifp->valid_lft */
/* ifp->prefered_lft <= ifp->valid_lft */
if
(
time_before
(
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
,
next
))
if
(
time_before
(
ifp
->
tstamp
+
ifp
->
prefered_lft
*
HZ
,
next
))
...
...
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