Skip to content

Commit

Permalink
[posix] loose check for NETLINK_EXT_ACK and NETLINK_CAP_ACK
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtdkp committed Jul 19, 2023
1 parent d973b60 commit c192e43
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/posix/platform/netif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2004,10 +2004,18 @@ static void platformConfigureNetLink(void)
{
int enable = 1;

VerifyOrDie(setsockopt(sNetlinkFd, SOL_NETLINK, NETLINK_EXT_ACK, &enable, sizeof(enable)) == 0,
OT_EXIT_ERROR_ERRNO);
VerifyOrDie(setsockopt(sNetlinkFd, SOL_NETLINK, NETLINK_CAP_ACK, &enable, sizeof(enable)) == 0,
OT_EXIT_ERROR_ERRNO);
#if defined (NETLINK_EXT_ACK)
if (setsockopt(sNetlinkFd, SOL_NETLINK, NETLINK_EXT_ACK, &enable, sizeof(enable)) != 0)
{
otLogWarnPlat("[netif] Failed to enable NETLINK_EXT_ACK: %s", strerror(errno));
}
#endif
#if defined (NETLINK_CAP_ACK)
if (setsockopt(sNetlinkFd, SOL_NETLINK, NETLINK_CAP_ACK, &enable, sizeof(enable)) != 0)
{
otLogWarnPlat("[netif] Failed to enable NETLINK_CAP_ACK: %s", strerror(errno));
}
#endif
}
#endif

Expand Down

0 comments on commit c192e43

Please sign in to comment.