From 301b6555aa61931d16ab06e5fdce07205ff8aab5 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 12 Dec 2018 10:35:41 +0100 Subject: [PATCH] lwip: use l2util_ipv6_iid_from_addr() instead of NETOPT_IPV6_IID --- Makefile.dep | 1 + pkg/lwip/contrib/netdev/lwip_netdev.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.dep b/Makefile.dep index 5fe8f4edd7..36e09558e2 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -434,6 +434,7 @@ endif ifneq (,$(filter lwip_sixlowpan,$(USEMODULE))) USEMODULE += lwip_ipv6_autoconfig + USEMODULE += l2util endif ifneq (,$(filter lwip_ipv6_autoconfig lwip_ipv6_mld,$(USEMODULE))) diff --git a/pkg/lwip/contrib/netdev/lwip_netdev.c b/pkg/lwip/contrib/netdev/lwip_netdev.c index 73ec8190c6..dbc3b59e5b 100644 --- a/pkg/lwip/contrib/netdev/lwip_netdev.c +++ b/pkg/lwip/contrib/netdev/lwip_netdev.c @@ -156,7 +156,9 @@ err_t lwip_netdev_init(struct netif *netif) * with full IIDs, so let's do it ourselves */ addr = &(netif->ip6_addr[0]); /* addr->addr is a uint32_t array */ - if (netdev->driver->get(netdev, NETOPT_IPV6_IID, &addr->addr[2], sizeof(eui64_t)) < 0) { + if (l2util_ipv6_iid_from_addr(dev_type, + netif->hwaddr, netif->hwaddr_len, + (eui64_t *)&addr->addr[2]) < 0) { return ERR_IF; } ipv6_addr_set_link_local_prefix((ipv6_addr_t *)&addr->addr[0]);