Skip to content

Commit

Permalink
Zero out an IPv4-mapped IPv6 address for in case of reusability
Browse files Browse the repository at this point in the history
  • Loading branch information
nxrighthere authored Dec 6, 2019
1 parent e45bd61 commit c885a64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Native/enet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c885a64

Please sign in to comment.