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
4709b4fd
Commit
4709b4fd
authored
Nov 24, 2004
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] Stop DAD during shutting down the interface.
Signed-off-by:
Hideaki YOSHIFUJI
<
yoshfuji@linux-ipv6.org
>
parent
fed20f2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+20
-8
No files found.
net/ipv6/addrconf.c
View file @
4709b4fd
...
...
@@ -2130,11 +2130,10 @@ static void addrconf_rs_timer(unsigned long data)
*/
static
void
addrconf_dad_start
(
struct
inet6_ifaddr
*
ifp
,
int
flags
)
{
struct
net_device
*
dev
;
struct
inet6_dev
*
idev
=
ifp
->
idev
;
struct
net_device
*
dev
=
idev
->
dev
;
unsigned
long
rand_num
;
dev
=
ifp
->
idev
->
dev
;
addrconf_join_solict
(
dev
,
&
ifp
->
addr
);
if
(
ifp
->
prefix_len
!=
128
&&
(
ifp
->
flags
&
IFA_F_PERMANENT
))
...
...
@@ -2142,31 +2141,43 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, int flags)
flags
);
net_srandom
(
ifp
->
addr
.
s6_addr32
[
3
]);
rand_num
=
net_random
()
%
(
i
fp
->
i
dev
->
cnf
.
rtr_solicit_delay
?
:
1
);
rand_num
=
net_random
()
%
(
idev
->
cnf
.
rtr_solicit_delay
?
:
1
);
read_lock_bh
(
&
idev
->
lock
);
if
(
ifp
->
dead
)
goto
out
;
spin_lock_bh
(
&
ifp
->
lock
);
if
(
dev
->
flags
&
(
IFF_NOARP
|
IFF_LOOPBACK
)
||
!
(
ifp
->
flags
&
IFA_F_TENTATIVE
))
{
ifp
->
flags
&=
~
IFA_F_TENTATIVE
;
spin_unlock_bh
(
&
ifp
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
addrconf_dad_completed
(
ifp
);
return
;
}
ifp
->
probes
=
i
fp
->
i
dev
->
cnf
.
dad_transmits
;
ifp
->
probes
=
idev
->
cnf
.
dad_transmits
;
addrconf_mod_timer
(
ifp
,
AC_DAD
,
rand_num
);
spin_unlock_bh
(
&
ifp
->
lock
);
out:
read_unlock_bh
(
&
idev
->
lock
);
}
static
void
addrconf_dad_timer
(
unsigned
long
data
)
{
struct
inet6_ifaddr
*
ifp
=
(
struct
inet6_ifaddr
*
)
data
;
struct
inet6_dev
*
idev
=
ifp
->
idev
;
struct
in6_addr
unspec
;
struct
in6_addr
mcaddr
;
read_lock_bh
(
&
idev
->
lock
);
if
(
idev
->
dead
)
{
read_unlock_bh
(
&
idev
->
lock
);
goto
out
;
}
spin_lock_bh
(
&
ifp
->
lock
);
if
(
ifp
->
probes
==
0
)
{
/*
...
...
@@ -2175,22 +2186,23 @@ static void addrconf_dad_timer(unsigned long data)
ifp
->
flags
&=
~
IFA_F_TENTATIVE
;
spin_unlock_bh
(
&
ifp
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
addrconf_dad_completed
(
ifp
);
in6_ifa_put
(
ifp
);
return
;
goto
out
;
}
ifp
->
probes
--
;
addrconf_mod_timer
(
ifp
,
AC_DAD
,
ifp
->
idev
->
nd_parms
->
retrans_time
);
spin_unlock_bh
(
&
ifp
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
/* send a neighbour solicitation for our addr */
memset
(
&
unspec
,
0
,
sizeof
(
unspec
));
addrconf_addr_solict_mult
(
&
ifp
->
addr
,
&
mcaddr
);
ndisc_send_ns
(
ifp
->
idev
->
dev
,
NULL
,
&
ifp
->
addr
,
&
mcaddr
,
&
unspec
);
out:
in6_ifa_put
(
ifp
);
}
...
...
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