Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144218488
D53561.id.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
D53561.id.diff
View Options
diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c
--- a/crypto/openssh/sshconnect.c
+++ b/crypto/openssh/sshconnect.c
@@ -303,6 +303,8 @@
* 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 ||
@@ -312,6 +314,8 @@
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))
@@ -324,6 +328,8 @@
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 &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 7, 4:03 PM (1 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28457225
Default Alt Text
D53561.id.diff (1 KB)
Attached To
Mode
D53561: openssh: Don't try to bind to unsupported addresses
Attached
Detach File
Event Timeline
Log In to Comment