summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
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 41abb8d6b..27707a128 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.188 2003/04/08 20:21:28 itojun Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.189 2003/04/14 14:17:50 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -2058,7 +2058,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
2058 continue; 2058 continue;
2059 } 2059 }
2060 /* Create a port to listen for the host. */ 2060 /* Create a port to listen for the host. */
2061 sock = socket(ai->ai_family, SOCK_STREAM, 0); 2061 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2062 if (sock < 0) { 2062 if (sock < 0) {
2063 /* this is no error since kernel may not support ipv6 */ 2063 /* this is no error since kernel may not support ipv6 */
2064 verbose("socket: %.100s", strerror(errno)); 2064 verbose("socket: %.100s", strerror(errno));
@@ -2280,7 +2280,7 @@ connect_to(const char *host, u_short port)
2280 error("connect_to: getnameinfo failed"); 2280 error("connect_to: getnameinfo failed");
2281 continue; 2281 continue;
2282 } 2282 }
2283 sock = socket(ai->ai_family, SOCK_STREAM, 0); 2283 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2284 if (sock < 0) { 2284 if (sock < 0) {
2285 if (ai->ai_next == NULL) 2285 if (ai->ai_next == NULL)
2286 error("socket: %.100s", strerror(errno)); 2286 error("socket: %.100s", strerror(errno));
@@ -2381,7 +2381,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2381 for (ai = aitop; ai; ai = ai->ai_next) { 2381 for (ai = aitop; ai; ai = ai->ai_next) {
2382 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) 2382 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
2383 continue; 2383 continue;
2384 sock = socket(ai->ai_family, SOCK_STREAM, 0); 2384 sock = socket(ai->ai_family, ai->ai_socktype,
2385 ai->ai_protocol);
2385 if (sock < 0) { 2386 if (sock < 0) {
2386 if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) { 2387 if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) {
2387 error("socket: %.100s", strerror(errno)); 2388 error("socket: %.100s", strerror(errno));
@@ -2547,7 +2548,7 @@ x11_connect_display(void)
2547 } 2548 }
2548 for (ai = aitop; ai; ai = ai->ai_next) { 2549 for (ai = aitop; ai; ai = ai->ai_next) {
2549 /* Create a socket. */ 2550 /* Create a socket. */
2550 sock = socket(ai->ai_family, SOCK_STREAM, 0); 2551 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2551 if (sock < 0) { 2552 if (sock < 0) {
2552 debug("socket: %.100s", strerror(errno)); 2553 debug("socket: %.100s", strerror(errno));
2553 continue; 2554 continue;