mirror of
https://github.com/simh/simh.git
synced 2026-04-19 01:17:28 +00:00
sim_sock.c allow validation address to match various forms of literal localhost addresses.
This commit is contained in:
@@ -610,6 +610,14 @@ if (validate_addr) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (status != SCPE_OK) {
|
||||||
|
/* be generous and allow successful validations against variations of localhost addresses */
|
||||||
|
if (((0 == strcmp("127.0.0.1", hostp)) &&
|
||||||
|
(0 == strcmp("::1", validate_addr))) ||
|
||||||
|
((0 == strcmp("127.0.0.1", validate_addr)) &&
|
||||||
|
(0 == strcmp("::1", hostp))))
|
||||||
|
status = SCPE_OK;
|
||||||
|
}
|
||||||
p_freeaddrinfo (ai_host);
|
p_freeaddrinfo (ai_host);
|
||||||
p_freeaddrinfo (ai_validate);
|
p_freeaddrinfo (ai_validate);
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user