mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-18 18:31:15 +00:00
PinholeVerification(): use memcpy() to compare structures
fix 99fc9941aa301323307a865f3798f64d189cc544
This commit is contained in:
parent
99fc9941aa
commit
ec48e04cd5
@ -1634,7 +1634,7 @@ PinholeVerification(struct upnphttp * h, char * int_ip, unsigned short int_port)
|
||||
strncpy(clientaddr_str, "*ERROR*", sizeof(clientaddr_str));
|
||||
}
|
||||
|
||||
if(h->clientaddr_v6.s6_addr != result_ip.s6_addr)
|
||||
if(memcmp(&h->clientaddr_v6, &result_ip, sizeof(struct in6_addr)) != 0)
|
||||
{
|
||||
syslog(LOG_INFO, "%s: Client %s tried to access pinhole for internal %s and is not authorized",
|
||||
"PinholeVerification", clientaddr_str, int_ip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user