From owner-svn-src-stable-10@freebsd.org Tue Jan 5 16:58:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34F43A63C5D; Tue, 5 Jan 2016 16:58:09 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 057CD1778; Tue, 5 Jan 2016 16:58:08 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u05Gw8kX096726; Tue, 5 Jan 2016 16:58:08 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u05Gw8pl096725; Tue, 5 Jan 2016 16:58:08 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201601051658.u05Gw8pl096725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Tue, 5 Jan 2016 16:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293208 - stable/10/sbin/route X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 16:58:09 -0000 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: