diff options
author | Damien Miller <djm@mindrot.org> | 2003-05-14 13:42:23 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-05-14 13:42:23 +1000 |
commit | 2372ace57287c6963a5790fb254e47de57537e0a (patch) | |
tree | 20a109f7f5c789a79599a52bcf6a6346fb794293 /channels.c | |
parent | 44e72a764f7febd041263c61c6931896a67d338e (diff) | |
download | openssh-git-2372ace57287c6963a5790fb254e47de57537e0a.tar.gz |
- 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.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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; |