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
58c4fb86
Commit
58c4fb86
authored
Dec 21, 2005
by
YOSHIFUJI Hideaki
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Flag RTF_ANYCAST for anycast routes.
Signed-off-by:
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
parent
bb44f116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
include/linux/ipv6_route.h
include/linux/ipv6_route.h
+1
-0
net/ipv6/route.c
net/ipv6/route.c
+9
-4
No files found.
include/linux/ipv6_route.h
View file @
58c4fb86
...
...
@@ -18,6 +18,7 @@
fallback, no routers on link */
#define RTF_ADDRCONF 0x00040000
/* addrconf route - RA */
#define RTF_PREFIX_RT 0x00080000
/* A prefix only route - RA */
#define RTF_ANYCAST 0x00100000
/* Anycast */
#define RTF_NONEXTHOP 0x00200000
/* route with no nexthop */
#define RTF_EXPIRES 0x00400000
...
...
net/ipv6/route.c
View file @
58c4fb86
...
...
@@ -413,11 +413,14 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
rt
=
ip6_rt_copy
(
ort
);
if
(
rt
)
{
ipv6_addr_copy
(
&
rt
->
rt6i_dst
.
addr
,
daddr
);
if
(
!
(
rt
->
rt6i_flags
&
RTF_GATEWAY
))
if
(
!
(
rt
->
rt6i_flags
&
RTF_GATEWAY
))
{
if
(
rt
->
rt6i_dst
.
plen
!=
128
&&
ipv6_addr_equal
(
&
rt
->
rt6i_dst
.
addr
,
daddr
))
rt
->
rt6i_flags
|=
RTF_ANYCAST
;
ipv6_addr_copy
(
&
rt
->
rt6i_gateway
,
daddr
);
}
ipv6_addr_copy
(
&
rt
->
rt6i_dst
.
addr
,
daddr
);
rt
->
rt6i_dst
.
plen
=
128
;
rt
->
rt6i_flags
|=
RTF_CACHE
;
rt
->
u
.
dst
.
flags
|=
DST_HOST
;
...
...
@@ -1413,7 +1416,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
rt
->
u
.
dst
.
obsolete
=
-
1
;
rt
->
rt6i_flags
=
RTF_UP
|
RTF_NONEXTHOP
;
if
(
!
anycast
)
if
(
anycast
)
rt
->
rt6i_flags
|=
RTF_ANYCAST
;
else
rt
->
rt6i_flags
|=
RTF_LOCAL
;
rt
->
rt6i_nexthop
=
ndisc_get_neigh
(
rt
->
rt6i_dev
,
&
rt
->
rt6i_gateway
);
if
(
rt
->
rt6i_nexthop
==
NULL
)
{
...
...
Kirill Smelkov
@kirr
mentioned in commit
4ee39733
·
Sep 27, 2017
mentioned in commit
4ee39733
mentioned in commit 4ee39733fbecf04cf9f346de2d64788c35028079
Toggle commit list
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