From 3a7d7a8b39d1ceb069892afbdf7459bd517dd800 Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Wed, 16 Jun 2004 06:29:41 +0000 Subject: [PATCH] When parsing an argument as an address in getaddr(), heed the -host option in all cases. The failure mode in the PR is easily reproducible without this patch. PR: bin/43139 --- sbin/route/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/route/route.c b/sbin/route/route.c index 474ac725efb2..acb81942dc28 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1040,7 +1040,7 @@ getaddr(which, s, hpp) if ((which != RTA_DST || forcenet == 0) && inet_aton(s, &su->sin.sin_addr)) { val = su->sin.sin_addr.s_addr; - if (which != RTA_DST || + if (which != RTA_DST || forcehost || inet_lnaof(su->sin.sin_addr) != INADDR_ANY) return (1); else {