Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162783996
D53588.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53588.diff
View Options
diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade
--- a/crypto/openssh/FREEBSD-upgrade
+++ b/crypto/openssh/FREEBSD-upgrade
@@ -181,6 +181,13 @@
skip setting DISABLE_LASTLOG which we've applied for FreeBSD, but the
autoconf machinery really ought to be reworked. Reported upstream at
https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html
+
+11) Protocol selection
+
+ We use the non-portable feature_present(3) API to determine which
+ internet protocols are supported by the kernel before trying to
+ connect to the target host. This avoids confusing the user with
+ spurious error messages.
This port was brought to you by (in no particular order) DARPA, NAI
diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c
--- a/crypto/openssh/sshconnect.c
+++ b/crypto/openssh/sshconnect.c
@@ -458,6 +458,8 @@
memset(ntop, 0, sizeof(ntop));
memset(strport, 0, sizeof(strport));
+ int inet_supported = feature_present("inet");
+ int inet6_supported = feature_present("inet6");
for (attempt = 0; attempt < connection_attempts; attempt++) {
if (attempt > 0) {
/* Sleep a moment before retrying. */
@@ -482,6 +484,13 @@
errno = oerrno;
continue;
}
+ if ((ai->ai_family == AF_INET && !inet_supported) ||
+ (ai->ai_family == AF_INET6 && !inet6_supported)) {
+ debug2_f("skipping address [%s]:%s: "
+ "unsupported address family", ntop, strport);
+ errno = EAFNOSUPPORT;
+ continue;
+ }
if (options.address_family != AF_UNSPEC &&
ai->ai_family != options.address_family) {
debug2_f("skipping address [%s]:%s: "
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 17, 8:47 PM (7 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35176969
Default Alt Text
D53588.diff (1 KB)
Attached To
Mode
D53588: openssh: Don't attempt to connect to unsupported addresses
Attached
Detach File
Event Timeline
Log In to Comment