mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 00:57:47 +00:00
[posix] allow kernel to assign netlink socket port ID (#6835)
This commit fixes a potential bug that the netlink socket may fail to bind due to port ID conflict.
This commit is contained in:
@@ -163,7 +163,6 @@ int CreateNetLinkSocket(void)
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.nl_family = AF_NETLINK;
|
||||
addr.nl_groups = RTMGRP_LINK | RTMGRP_IPV6_IFADDR;
|
||||
addr.nl_pid = getpid();
|
||||
|
||||
rval = bind(sock, reinterpret_cast<struct sockaddr *>(&addr), sizeof(addr));
|
||||
VerifyOrDie(rval == 0, OT_EXIT_ERROR_ERRNO);
|
||||
|
||||
Reference in New Issue
Block a user