diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/channels.c b/channels.c index 6aafc3dc3..82a2db05e 100644 --- a/channels.c +++ b/channels.c | |||
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: channels.c,v 1.84 2001/01/29 16:55:36 markus Exp $"); | 43 | RCSID("$OpenBSD: channels.c,v 1.85 2001/01/29 19:42:35 markus Exp $"); |
44 | 44 | ||
45 | #include <openssl/rsa.h> | 45 | #include <openssl/rsa.h> |
46 | #include <openssl/dsa.h> | 46 | #include <openssl/dsa.h> |
@@ -546,7 +546,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) | |||
546 | struct sockaddr addr; | 546 | struct sockaddr addr; |
547 | int newsock, newch; | 547 | int newsock, newch; |
548 | socklen_t addrlen; | 548 | socklen_t addrlen; |
549 | char buf[16384], *remote_hostname; | 549 | char buf[16384], *remote_ipaddr; |
550 | int remote_port; | 550 | int remote_port; |
551 | 551 | ||
552 | if (FD_ISSET(c->sock, readset)) { | 552 | if (FD_ISSET(c->sock, readset)) { |
@@ -557,10 +557,10 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) | |||
557 | error("accept: %.100s", strerror(errno)); | 557 | error("accept: %.100s", strerror(errno)); |
558 | return; | 558 | return; |
559 | } | 559 | } |
560 | remote_hostname = get_remote_hostname(newsock); | 560 | remote_ipaddr = get_peer_ipaddr(newsock); |
561 | remote_port = get_peer_port(newsock); | 561 | remote_port = get_peer_port(newsock); |
562 | snprintf(buf, sizeof buf, "X11 connection from %.200s port %d", | 562 | snprintf(buf, sizeof buf, "X11 connection from %.200s port %d", |
563 | remote_hostname, remote_port); | 563 | remote_ipaddr, remote_port); |
564 | 564 | ||
565 | newch = channel_new("x11", | 565 | newch = channel_new("x11", |
566 | SSH_CHANNEL_OPENING, newsock, newsock, -1, | 566 | SSH_CHANNEL_OPENING, newsock, newsock, -1, |
@@ -572,8 +572,8 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) | |||
572 | packet_put_int(newch); | 572 | packet_put_int(newch); |
573 | packet_put_int(c->local_window_max); | 573 | packet_put_int(c->local_window_max); |
574 | packet_put_int(c->local_maxpacket); | 574 | packet_put_int(c->local_maxpacket); |
575 | /* originator host and port */ | 575 | /* originator ipaddr and port */ |
576 | packet_put_cstring(remote_hostname); | 576 | packet_put_cstring(remote_ipaddr); |
577 | if (datafellows & SSH_BUG_X11FWD) { | 577 | if (datafellows & SSH_BUG_X11FWD) { |
578 | debug("ssh2 x11 bug compat mode"); | 578 | debug("ssh2 x11 bug compat mode"); |
579 | } else { | 579 | } else { |
@@ -587,7 +587,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) | |||
587 | packet_put_string(buf, strlen(buf)); | 587 | packet_put_string(buf, strlen(buf)); |
588 | packet_send(); | 588 | packet_send(); |
589 | } | 589 | } |
590 | xfree(remote_hostname); | 590 | xfree(remote_ipaddr); |
591 | } | 591 | } |
592 | } | 592 | } |
593 | 593 | ||