diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 3a726eefa725..12904b833c8e 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -2980,7 +2980,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); }