mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-09 07:10:54 +02:00
Fix IPv6 parsing to use sin6_addr buffer in MatchIPv6
This commit is contained in:
+4
-4
@@ -13263,15 +13263,15 @@ static int MatchIPv6(const char* pattern, int patternLen,
|
||||
|
||||
/* Try parsing both as IPv6 */
|
||||
#ifdef FREESCALE_MQX
|
||||
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1, sizeof(addr1)) != RTCS_OK)
|
||||
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1.sin6_addr, sizeof(addr1.sin6_addr)) != RTCS_OK)
|
||||
#else
|
||||
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1) != 1)
|
||||
if (XINET_PTON(WOLFSSL_IP6, patBuf, &addr1.sin6_addr) != 1)
|
||||
#endif
|
||||
return 0;
|
||||
#ifdef FREESCALE_MQX
|
||||
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2, sizeof(addr2)) != RTCS_OK)
|
||||
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2.sin6_addr, sizeof(addr2.sin6_addr)) != RTCS_OK)
|
||||
#else
|
||||
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2) != 1)
|
||||
if (XINET_PTON(WOLFSSL_IP6, strBuf, &addr2.sin6_addr) != 1)
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user