diff --git a/sim_sock.c b/sim_sock.c index 79834d24..81ac5da8 100644 --- a/sim_sock.c +++ b/sim_sock.c @@ -610,6 +610,14 @@ if (validate_addr) { 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_validate); return status;