diff --git a/telnet/commands.c b/telnet/commands.c index bc683c7..86544e7 100644 --- a/telnet/commands.c +++ b/telnet/commands.c @@ -2430,7 +2430,7 @@ tn(argc, argv) hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(src_addr, 0, &hints, &src_res); - if (error == EAI_NONAME) { + if (error == EAI_NODATA) { hints.ai_flags = 0; error = getaddrinfo(src_addr, 0, &hints, &src_res); } @@ -3159,7 +3159,7 @@ sourceroute(ai, arg, cpp, lenp, protop, optp) hints.ai_flags = AI_NUMERICHOST; error = getaddrinfo(cp, NULL, &hints, &res); - if (error == EAI_NONAME) { + if (error == EAI_NODATA) { hints.ai_flags = 0; error = getaddrinfo(cp, NULL, &hints, &res); }