From: djm Date: Mon, 20 Nov 2023 02:50:00 +0000 (+0000) Subject: set errno=EAFNOSUPPORT when filtering addresses that don't match X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8f13aefc2fe6a867a0d42f30832d8ea36ada693d;p=openbsd set errno=EAFNOSUPPORT when filtering addresses that don't match AddressFamily; yields slightly better error message if no address matches. bz#3526 --- diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index a47c8f76bd2..c8ee995b3cf 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -463,7 +463,7 @@ ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, ai->ai_family != options.address_family) { debug2_f("skipping address [%s]:%s: " "wrong address family", ntop, strport); - errno = 0; + errno = EAFNOSUPPORT; continue; }