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
3b480426
Commit
3b480426
authored
Mar 04, 2005
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] NDISC: Ensure to send redirects even if we don't know target's lladdr.
parent
57f29988
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+11
-12
No files found.
net/ipv6/ndisc.c
View file @
3b480426
...
...
@@ -1332,6 +1332,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
int
rd_len
;
int
err
;
int
hlen
;
u8
ha_buf
[
MAX_ADDR_LEN
],
*
ha
=
NULL
;
dev
=
skb
->
dev
;
...
...
@@ -1368,16 +1369,14 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
}
if
(
dev
->
addr_len
)
{
if
(
neigh
->
nud_state
&
NUD_VALID
)
{
len
+=
ndisc_opt_addr_space
(
dev
);
}
else
{
/* If nexthop is not valid, do not redirect!
We will make it later, when will be sure,
that it is alive.
*/
dst_release
(
dst
);
return
;
}
read_lock_bh
(
&
neigh
->
lock
);
if
(
neigh
->
nud_state
&
NUD_VALID
)
{
memcpy
(
ha_buf
,
neigh
->
ha
,
dev
->
addr_len
);
read_unlock_bh
(
&
neigh
->
lock
);
ha
=
ha_buf
;
len
+=
ndisc_opt_addr_space
(
dev
);
}
else
read_unlock_bh
(
&
neigh
->
lock
);
}
rd_len
=
min_t
(
unsigned
int
,
...
...
@@ -1422,8 +1421,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
* include target_address option
*/
if
(
dev
->
addr_len
)
opt
=
ndisc_fill_addr_option
(
opt
,
ND_OPT_TARGET_LL_ADDR
,
neigh
->
ha
,
if
(
ha
)
opt
=
ndisc_fill_addr_option
(
opt
,
ND_OPT_TARGET_LL_ADDR
,
ha
,
dev
->
addr_len
,
dev
->
type
);
/*
...
...
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