From a1cffd2545efbdc38ee8c59b490567f5c3f82608 Mon Sep 17 00:00:00 2001 From: huamenggg <52490135+huamenggg@users.noreply.github.com> Date: Sat, 21 Sep 2019 02:19:10 +0800 Subject: [PATCH] [platform-netif] set link type to void (#4198) This commit sets link type to void so that only one link-local address will exist. --- src/posix/platform/netif.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/posix/platform/netif.cpp b/src/posix/platform/netif.cpp index 4da41594a..c86a3fd6c 100644 --- a/src/posix/platform/netif.cpp +++ b/src/posix/platform/netif.cpp @@ -410,13 +410,8 @@ void platformNetifInit(otInstance *aInstance) VerifyOrExit(ioctl(sTunFd, TUNSETIFF, static_cast(&ifr)) == 0, otLogCritPlat("Unable to configure tun device %s", OPENTHREAD_POSIX_TUN_DEVICE)); -#if defined(ARPHRD_6LOWPAN) - VerifyOrExit(ioctl(sTunFd, TUNSETLINK, ARPHRD_6LOWPAN) == 0, + VerifyOrExit(ioctl(sTunFd, TUNSETLINK, ARPHRD_VOID) == 0, otLogCritPlat("Unable to set link type of tun device %s", OPENTHREAD_POSIX_TUN_DEVICE)); -#else - VerifyOrExit(ioctl(sTunFd, TUNSETLINK, ARPHRD_ETHER) == 0, - otLogCritPlat("Unable to set link type of tun device %s", OPENTHREAD_POSIX_TUN_DEVICE)); -#endif sTunIndex = if_nametoindex(ifr.ifr_name); VerifyOrExit(sTunIndex > 0);