diff --git a/sbin/route/route.c b/sbin/route/route.c index 1bce41ef4298..a357a4d03851 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1222,6 +1222,9 @@ getaddr(int idx, char *str, struct hostent **hpp, int nrflags) freeifaddrs(ifap); if (sdl != NULL) return(1); + else + errx(EX_DATAERR, + "interface '%s' does not exist", str); } break; case RTAX_IFP: