Skip to content

Commit a8528f4

Browse files
committed
Fix IPv6 parsing to use sin6_addr buffer in MatchIPv6
1 parent 4f33799 commit a8528f4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/internal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13263,15 +13263,15 @@ static int MatchIPv6(const char* pattern, int patternLen,
1326313263

1326413264
/* Try parsing both as IPv6 */
1326513265
#ifdef FREESCALE_MQX
13266-
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1, sizeof(addr1)) != RTCS_OK)
13266+
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1.sin6_addr, sizeof(addr1.sin6_addr)) != RTCS_OK)
1326713267
#else
13268-
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1) != 1)
13268+
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1.sin6_addr) != 1)
1326913269
#endif
1327013270
return 0;
1327113271
#ifdef FREESCALE_MQX
13272-
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2, sizeof(addr2)) != RTCS_OK)
13272+
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2.sin6_addr, sizeof(addr2.sin6_addr)) != RTCS_OK)
1327313273
#else
13274-
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2) != 1)
13274+
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2.sin6_addr) != 1)
1327513275
#endif
1327613276
return 0;
1327713277

0 commit comments

Comments
 (0)