summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-01-29 19:42:36 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-01-29 19:42:36 +0000
commitdb845f186bda7cece113ce8c619af2c50d6236a1 (patch)
treec57c273ab1811e37dd57eefd984dc6fc8e4d19b4 /usr.bin/ssh/channels.c
parentfc275459f7ccd34d16a96a1f4d2b4d73477e0b1a (diff)
add get_peer_ipaddr(socket), x11-fwd in ssh2 requires ipaddr, not DNS
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 4a4d2721978..af8e66b780b 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.84 2001/01/29 16:55:36 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.85 2001/01/29 19:42:35 markus Exp $");
#include <openssl/rsa.h>
#include <openssl/dsa.h>
@@ -546,7 +546,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
struct sockaddr addr;
int newsock, newch;
socklen_t addrlen;
- char buf[16384], *remote_hostname;
+ char buf[16384], *remote_ipaddr;
int remote_port;
if (FD_ISSET(c->sock, readset)) {
@@ -557,10 +557,10 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
error("accept: %.100s", strerror(errno));
return;
}
- remote_hostname = get_remote_hostname(newsock);
+ remote_ipaddr = get_peer_ipaddr(newsock);
remote_port = get_peer_port(newsock);
snprintf(buf, sizeof buf, "X11 connection from %.200s port %d",
- remote_hostname, remote_port);
+ remote_ipaddr, remote_port);
newch = channel_new("x11",
SSH_CHANNEL_OPENING, newsock, newsock, -1,
@@ -572,8 +572,8 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
packet_put_int(newch);
packet_put_int(c->local_window_max);
packet_put_int(c->local_maxpacket);
- /* originator host and port */
- packet_put_cstring(remote_hostname);
+ /* originator ipaddr and port */
+ packet_put_cstring(remote_ipaddr);
if (datafellows & SSH_BUG_X11FWD) {
debug("ssh2 x11 bug compat mode");
} else {
@@ -587,7 +587,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
packet_put_string(buf, strlen(buf));
packet_send();
}
- xfree(remote_hostname);
+ xfree(remote_ipaddr);
}
}