summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-01-04 13:41:32 +0000
committermarkus <markus@openbsd.org>2000-01-04 13:41:32 +0000
commitb1f9b8fc4fdfe48ae64006fe8f0ab23bea13017f (patch)
treef2b13729cf63a51aef7f9b027ccfec9cb63dd286
parentRemove unused file. If we end up using m_pulldown() in the future, it (diff)
downloadwireguard-openbsd-b1f9b8fc4fdfe48ae64006fe8f0ab23bea13017f.tar.xz
wireguard-openbsd-b1f9b8fc4fdfe48ae64006fe8f0ab23bea13017f.zip
more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo, from itojun@
-rw-r--r--usr.bin/ssh/canohost.c3
-rw-r--r--usr.bin/ssh/ssh.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index 095d0136968..fcf743cd417 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/canohost.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$Id: canohost.c,v 1.10 2000/01/04 00:07:58 markus Exp $");
+RCSID("$Id: canohost.c,v 1.11 2000/01/04 13:41:32 markus Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -70,6 +70,7 @@ get_remote_hostname(int socket)
*/
memset(&hints, 0, sizeof(hints));
hints.ai_family = from.ss_family;
+ hints.ai_socktype = SOCK_STREAM;
if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
log("reverse mapping checking getaddrinfo for %.700s failed - POSSIBLE BREAKIN ATTEMPT!", name);
strlcpy(name, ntop, sizeof name);
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index ca99f2818e5..63f7cb00e7f 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -11,7 +11,7 @@
*/
#include "includes.h"
-RCSID("$Id: ssh.c,v 1.38 2000/01/04 09:07:59 markus Exp $");
+RCSID("$Id: ssh.c,v 1.39 2000/01/04 13:41:32 markus Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -491,6 +491,7 @@ main(int ac, char **av)
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_flags = AI_CANONNAME;
+ hints.ai_socktype = SOCK_STREAM;
errgai = getaddrinfo(host, NULL, &hints, &ai);
if (errgai == 0) {
if (ai->ai_canonname != NULL)