summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2025-11-04 21:13:11 +0100
committerDag-Erling Smørgrav <des@FreeBSD.org>2025-11-04 21:13:11 +0100
commit96e215ad8173185337cf3057b80f2a0723ca201a (patch)
tree8e2f73592ca8169d523ae0f3360f4bf2b2e5ee05 /crypto
parenta935c2a63f9270500cddab1d9868c6183c25d5a8 (diff)
Revert "openssh: Don't try to bind to unsupported addresses"
This doesn't actually do anything useful, since getifaddrs() will only return supported addresses. The root cause of the issue described in the PR lies earlier in the connection timeline, around the start of the ssh_create_socket() function. This reverts commit e5ff8e7977434b150a66bb3e472c6d0e0f644cfa. PR: 195231
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/sshconnect.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c
index cb45d719f961..c86182d13673 100644
--- a/crypto/openssh/sshconnect.c
+++ b/crypto/openssh/sshconnect.c
@@ -303,8 +303,6 @@ check_ifaddrs(const char *ifname, int af, const struct ifaddrs *ifaddrs,
* Prefer addresses that are not loopback or linklocal, but use them
* if nothing else matches.
*/
- int inet_supported = feature_present("inet");
- int inet6_supported = feature_present("inet6");
for (allow_local = 0; allow_local < 2; allow_local++) {
for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
if (ifa->ifa_addr == NULL || ifa->ifa_name == NULL ||
@@ -314,8 +312,6 @@ check_ifaddrs(const char *ifname, int af, const struct ifaddrs *ifaddrs,
continue;
switch (ifa->ifa_addr->sa_family) {
case AF_INET:
- if (!inet_supported)
- continue;
sa = (struct sockaddr_in *)ifa->ifa_addr;
if (!allow_local && sa->sin_addr.s_addr ==
htonl(INADDR_LOOPBACK))
@@ -328,8 +324,6 @@ check_ifaddrs(const char *ifname, int af, const struct ifaddrs *ifaddrs,
memcpy(resultp, sa, *rlenp);
return 0;
case AF_INET6:
- if (!inet6_supported)
- continue;
sa6 = (struct sockaddr_in6 *)ifa->ifa_addr;
v6addr = &sa6->sin6_addr;
if (!allow_local &&