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
fd69f2e6
Commit
fd69f2e6
authored
6 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
lwip_netdev: fix setting of link-local address for 6Lo
parent
9cced4e8
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
pkg/lwip/contrib/netdev/lwip_netdev.c
+6
-4
6 additions, 4 deletions
pkg/lwip/contrib/netdev/lwip_netdev.c
with
6 additions
and
4 deletions
pkg/lwip/contrib/netdev/lwip_netdev.c
+
6
−
4
View file @
fd69f2e6
...
@@ -131,7 +131,7 @@ err_t lwip_netdev_init(struct netif *netif)
...
@@ -131,7 +131,7 @@ err_t lwip_netdev_init(struct netif *netif)
case
NETDEV_TYPE_IEEE802154
:
case
NETDEV_TYPE_IEEE802154
:
{
{
u16_t
val
;
u16_t
val
;
ip
v
6_addr_t
*
addr
;
ip6_addr_t
*
addr
;
if
(
netdev
->
driver
->
get
(
netdev
,
NETOPT_NID
,
&
val
,
if
(
netdev
->
driver
->
get
(
netdev
,
NETOPT_NID
,
&
val
,
sizeof
(
val
))
<
0
)
{
sizeof
(
val
))
<
0
)
{
return
ERR_IF
;
return
ERR_IF
;
...
@@ -154,11 +154,13 @@ err_t lwip_netdev_init(struct netif *netif)
...
@@ -154,11 +154,13 @@ err_t lwip_netdev_init(struct netif *netif)
}
}
/* netif_create_ip6_linklocal_address() does weird byte-swapping
/* netif_create_ip6_linklocal_address() does weird byte-swapping
* with full IIDs, so let's do it ourselves */
* with full IIDs, so let's do it ourselves */
addr
=
(
ipv6_addr_t
*
)
&
(
netif
->
ip6_addr
[
0
]);
addr
=
&
(
netif
->
ip6_addr
[
0
]);
if
(
netdev
->
driver
->
get
(
netdev
,
NETOPT_IPV6_IID
,
&
addr
->
u8
[
8
],
sizeof
(
eui64_t
))
<
0
)
{
/* addr->addr is a uint32_t array */
if
(
netdev
->
driver
->
get
(
netdev
,
NETOPT_IPV6_IID
,
&
addr
->
addr
[
2
],
sizeof
(
eui64_t
))
<
0
)
{
return
ERR_IF
;
return
ERR_IF
;
}
}
ipv6_addr_set_link_local_prefix
(
addr
);
ipv6_addr_set_link_local_prefix
((
ipv6_addr_t
*
)
&
addr
->
addr
[
0
]);
ip6_addr_assign_zone
(
addr
,
IP6_UNICAST
,
netif
);
/* Set address state. */
/* Set address state. */
#if LWIP_IPV6_DUP_DETECT_ATTEMPTS
#if LWIP_IPV6_DUP_DETECT_ATTEMPTS
/* Will perform duplicate address detection (DAD). */
/* Will perform duplicate address detection (DAD). */
...
...
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