Skip to content

Commit

Permalink
upstream: set errno=EAFNOSUPPORT when filtering addresses that don't
Browse files Browse the repository at this point in the history
match AddressFamily; yields slightly better error message if no address
matches. bz#3526

OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6
  • Loading branch information
djmdjm committed Nov 20, 2023
1 parent 26f3f3b commit c52db01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sshconnect.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
Expand Down Expand Up @@ -485,7 +485,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;
}

Expand Down

0 comments on commit c52db01

Please sign in to comment.