[posix] set link type to none explicitly (#8526)

Linux kernels with CONFIG_MCTP enable (available in 5.16 or newer)
seem to have an issue when setting the link type to ARPHRD_VOID.
There seem to be no good reason why ARPHRD_VOID is used. Stick to
the default ARPHRD_NONE.
This commit is contained in:
Stefan Agner
2023-02-15 10:22:57 -08:00
committed by GitHub
parent 242c7cc7c3
commit 7a6546c2b7
+1 -1
View File
@@ -1721,7 +1721,7 @@ static void platformConfigureTunDevice(otPlatformConfig *aPlatformConfig)
SetLinkState(gInstance, false);
}
VerifyOrDie(ioctl(sTunFd, TUNSETLINK, ARPHRD_VOID) == 0, OT_EXIT_ERROR_ERRNO);
VerifyOrDie(ioctl(sTunFd, TUNSETLINK, ARPHRD_NONE) == 0, OT_EXIT_ERROR_ERRNO);
ifr.ifr_mtu = static_cast<int>(kMaxIp6Size);
VerifyOrDie(ioctl(sIpFd, SIOCSIFMTU, static_cast<void *>(&ifr)) == 0, OT_EXIT_ERROR_ERRNO);