mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 21:18:59 +00:00
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
This commit is contained in:
parent
cc090be082
commit
3a7d7a8b39
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130569
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user