svn commit: r293208 - stable/10/sbin/route
Ryan Stone
rstone at FreeBSD.org
Tue Jan 5 16:58:09 UTC 2016
Author: rstone
Date: Tue Jan 5 16:58:07 2016
New Revision: 293208
URL: https://svnweb.freebsd.org/changeset/base/293208
Log:
MFC r287920:
Fix /sbin/route to never look up (invalid) interface names through DNS
/sbin/route has a bug where if it is passed an interface name that does
not exist, it falls through and winds up interpreting it as a hostname.
It fails out eventually, but on a system where DNS lookup is broken you
can end up waiting for up to 60 seconds waiting for the DNS lookup to
timeout. I'm not quite sure what happens if the DNS lookup somehow
succeeds but I doubt that can end well.
Reviewed by: markj, cem
MFC after: 2 weeks
Sponsored by: EMC/Isilon Storage Division
Modified:
stable/10/sbin/route/route.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sbin/route/route.c
==============================================================================
--- stable/10/sbin/route/route.c Tue Jan 5 16:49:27 2016 (r293207)
+++ stable/10/sbin/route/route.c Tue Jan 5 16:58:07 2016 (r293208)
@@ -1239,6 +1239,9 @@ getaddr(int idx, char *str, struct hoste
freeifaddrs(ifap);
if (sdl != NULL)
return(1);
+ else
+ errx(EX_DATAERR,
+ "interface '%s' does not exist", str);
}
break;
case RTAX_IFP:
More information about the svn-src-stable-10
mailing list