From c885a642bfd3df890704a35a777d306bd6bb9fe1 Mon Sep 17 00:00:00 2001 From: Stas Denisov Date: Fri, 6 Dec 2019 14:13:50 +0500 Subject: [PATCH] Zero out an IPv4-mapped IPv6 address for in case of reusability --- Source/Native/enet.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Native/enet.h b/Source/Native/enet.h index d0b0fef..c03aa24 100644 --- a/Source/Native/enet.h +++ b/Source/Native/enet.h @@ -4329,6 +4329,9 @@ extern "C" { if (strchr(ip, ':') == NULL) { type = AF_INET; + + memset(address, 0, sizeof(address->ipv4.zeros)); + address->ipv4.ffff = 0xFFFF; destination = &address->ipv4.ip; }