Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
b82f11be
Commit
b82f11be
authored
9 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
gnrc_ndp: only lookup non-link-local addresses in FIB
parent
2206e877
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/net/network_layer/ng_ndp/node/ng_ndp_node.c
+14
-11
14 additions, 11 deletions
sys/net/network_layer/ng_ndp/node/ng_ndp_node.c
with
14 additions
and
11 deletions
sys/net/network_layer/ng_ndp/node/ng_ndp_node.c
+
14
−
11
View file @
b82f11be
...
...
@@ -59,24 +59,27 @@ kernel_pid_t ng_ndp_node_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len,
kernel_pid_t
iface
,
ipv6_addr_t
*
dst
,
ng_pktsnip_t
*
pkt
)
{
ng_ipv6_nc_t
*
nc_entry
;
ipv6_addr_t
*
next_hop_ip
=
NULL
,
*
prefix
=
NULL
;
#ifdef MODULE_NG_IPV6_EXT_RH
next_hop_ip
=
ng_ipv6_ext_rh_next_hop
(
hdr
);
#endif
#ifdef MODULE_FIB
size_t
next_hop_size
=
sizeof
(
ipv6_addr_t
);
uint32_t
next_hop_flags
=
0
;
ipv6_addr_t
next_hop_actual
;
/* FIB copies address into this variable */
if
((
next_hop_ip
==
NULL
)
&&
(
fib_get_next_hop
(
&
iface
,
next_hop_actual
.
u8
,
&
next_hop_size
,
&
next_hop_flags
,
(
uint8_t
*
)
dst
,
sizeof
(
ipv6_addr_t
),
0
)
>=
0
)
&&
(
next_hop_size
==
sizeof
(
ipv6_addr_t
)))
{
next_hop_ip
=
&
next_hop_actual
;
/* don't look-up link local addresses in FIB */
if
(
!
ipv6_addr_is_link_local
(
dst
))
{
size_t
next_hop_size
=
sizeof
(
ipv6_addr_t
);
uint32_t
next_hop_flags
=
0
;
ipv6_addr_t
next_hop_actual
;
/* FIB copies address into this variable */
if
((
next_hop_ip
==
NULL
)
&&
(
fib_get_next_hop
(
&
iface
,
next_hop_actual
.
u8
,
&
next_hop_size
,
&
next_hop_flags
,
(
uint8_t
*
)
dst
,
sizeof
(
ipv6_addr_t
),
0
)
>=
0
)
&&
(
next_hop_size
==
sizeof
(
ipv6_addr_t
)))
{
next_hop_ip
=
&
next_hop_actual
;
}
}
#endif
if
((
next_hop_ip
==
NULL
))
{
/* no route to host */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment