diff options
author | bms <bms@FreeBSD.org> | 2004-06-16 06:29:41 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2004-06-16 06:29:41 +0000 |
commit | 5bae048b018da422851dfc32d4700d7c8cbeedf4 (patch) | |
tree | 6a66079b1c8231b7eb4ae2bd22511b76e25e4114 /sbin/route | |
parent | bb7d871dd0e6814046012a18c7d9ce39874b09b2 (diff) | |
download | FreeBSD-src-5bae048b018da422851dfc32d4700d7c8cbeedf4.zip FreeBSD-src-5bae048b018da422851dfc32d4700d7c8cbeedf4.tar.gz |
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
Diffstat (limited to 'sbin/route')
-rw-r--r-- | sbin/route/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 474ac72..acb8194 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 { |