From b22d1dc084c20372a10160d618ad8db01811cbc7 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 29 Oct 2020 07:46:39 -0700 Subject: [PATCH] [posix] set default IPv6 hop limit to OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT (#5736) --- src/posix/platform/udp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/platform/udp.cpp b/src/posix/platform/udp.cpp index 151c73640..e8bdb26a9 100644 --- a/src/posix/platform/udp.cpp +++ b/src/posix/platform/udp.cpp @@ -116,7 +116,7 @@ static otError transmitPacket(int aFd, uint8_t *aPayload, uint16_t aLength, cons cmsg = CMSG_FIRSTHDR(&msg); { - int hopLimit = (aMessageInfo.mHopLimit ? aMessageInfo.mHopLimit : -1); + int hopLimit = (aMessageInfo.mHopLimit ? aMessageInfo.mHopLimit : OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT); cmsg->cmsg_level = IPPROTO_IPV6; cmsg->cmsg_type = IPV6_HOPLIMIT;