summaryrefslogtreecommitdiffstats
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-05-14 13:42:23 +1000
committerDamien Miller <djm@mindrot.org>2003-05-14 13:42:23 +1000
commit2372ace57287c6963a5790fb254e47de57537e0a (patch)
tree20a109f7f5c789a79599a52bcf6a6346fb794293 /channels.c
parent44e72a764f7febd041263c61c6931896a67d338e (diff)
- markus@cvs.openbsd.org 2003/04/14 14:17:50
[channels.c sshconnect.c sshd.c ssh-keyscan.c] avoid hardcoded SOCK_xx; with itojun@; should allow ssh over SCTP
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/channels.c b/channels.c
index 41abb8d6..27707a12 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.188 2003/04/08 20:21:28 itojun Exp $");
+RCSID("$OpenBSD: channels.c,v 1.189 2003/04/14 14:17:50 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -2058,7 +2058,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
continue;
}
/* Create a port to listen for the host. */
- sock = socket(ai->ai_family, SOCK_STREAM, 0);
+ sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sock < 0) {
/* this is no error since kernel may not support ipv6 */
verbose("socket: %.100s", strerror(errno));
@@ -2280,7 +2280,7 @@ connect_to(const char *host, u_short port)
error("connect_to: getnameinfo failed");
continue;
}
- sock = socket(ai->ai_family, SOCK_STREAM, 0);
+ sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sock < 0) {
if (ai->ai_next == NULL)
error("socket: %.100s", strerror(errno));
@@ -2381,7 +2381,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
for (ai = aitop; ai; ai = ai->ai_next) {
if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
continue;
- sock = socket(ai->ai_family, SOCK_STREAM, 0);
+ sock = socket(ai->ai_family, ai->ai_socktype,
+ ai->ai_protocol);
if (sock < 0) {
if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) {
error("socket: %.100s", strerror(errno));
@@ -2547,7 +2548,7 @@ x11_connect_display(void)
}
for (ai = aitop; ai; ai = ai->ai_next) {
/* Create a socket. */
- sock = socket(ai->ai_family, SOCK_STREAM, 0);
+ sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sock < 0) {
debug("socket: %.100s", strerror(errno));
continue;