upstream: set errno=EAFNOSUPPORT when filtering addresses that don't
match AddressFamily; yields slightly better error message if no address matches. bz#3526 OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6
This commit is contained in:
parent
26f3f3bbc6
commit
c52db01148
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sshconnect.c,v 1.364 2023/11/15 23:03:38 djm Exp $ */
|
/* $OpenBSD: sshconnect.c,v 1.365 2023/11/20 02:50:00 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -485,7 +485,7 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop,
|
||||||
ai->ai_family != options.address_family) {
|
ai->ai_family != options.address_family) {
|
||||||
debug2_f("skipping address [%s]:%s: "
|
debug2_f("skipping address [%s]:%s: "
|
||||||
"wrong address family", ntop, strport);
|
"wrong address family", ntop, strport);
|
||||||
errno = 0;
|
errno = EAFNOSUPPORT;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue