summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-06 11:47:28 +1100
committerDamien Miller <djm@mindrot.org>1999-12-06 11:47:28 +1100
commitaae6c614da614eb10ced16505f35410671c95d9d (patch)
tree441e578781d38e7de4c5f609a4f86695d937e640 /channels.c
parentdc33fc3910552c82518503b581efc1a51192fa76 (diff)
- Merged OpenBSD CVS changes:
- [auth-krb4.c auth-passwd.c auth-skey.c ssh. move skey-auth from auth-passwd.c to auth-s - [auth-rsa.c] warn only about mismatch if key is _used_ warn about keysize-mismatch with log() not channels.c readconf.c readconf.h ssh.c ssh. ports are u_short - [hostfile.c] indent, shorter warning - [nchan.c] use error() for internal errors - [packet.c] set loglevel for SSH_MSG_DISCONNECT to log( serverloop.c indent - [ssh-add.1 ssh-add.c ssh.h] document , reasonable default - [ssh.1] CheckHostIP is not available for connects v - [sshconnect.c] typo easier to read client code for passwd and s turn of checkhostip for proxy connects, sin
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/channels.c b/channels.c
index 61ba76de..01382365 100644
--- a/channels.c
+++ b/channels.c
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.8 1999/11/25 00:54:58 damien Exp $");
+RCSID("$Id: channels.c,v 1.9 1999/12/06 00:47:29 damien Exp $");
#include "ssh.h"
#include "packet.h"
@@ -82,7 +82,7 @@ unsigned int x11_fake_data_len;
*/
typedef struct {
char *host; /* Host name. */
- int port; /* Port number. */
+ u_short port; /* Port number. */
} ForwardPermission;
/* List of all permitted host/port pairs to connect. */
@@ -876,8 +876,8 @@ channel_open_message()
*/
void
-channel_request_local_forwarding(int port, const char *host,
- int host_port)
+channel_request_local_forwarding(u_short port, const char *host,
+ u_short host_port)
{
int ch, sock, on = 1;
struct sockaddr_in sin;
@@ -932,8 +932,8 @@ channel_request_local_forwarding(int port, const char *host,
*/
void
-channel_request_remote_forwarding(int port, const char *host,
- int remote_port)
+channel_request_remote_forwarding(u_short port, const char *host,
+ u_short remote_port)
{
int payload_len;
/* Record locally that connection to this host/port is permitted. */
@@ -968,7 +968,7 @@ channel_request_remote_forwarding(int port, const char *host,
void
channel_input_port_forward_request(int is_root)
{
- int port, host_port;
+ u_short port, host_port;
char *hostname;
/* Get arguments from the packet. */
@@ -976,10 +976,6 @@ channel_input_port_forward_request(int is_root)
hostname = packet_get_string(NULL);
host_port = packet_get_int();
- /* Port numbers are 16 bit quantities. */
- if ((port & 0xffff) != port)
- packet_disconnect("Requested forwarding of nonexistent port %d.", port);
-
/*
* Check that an unprivileged user is not trying to forward a
* privileged port.
@@ -1004,7 +1000,8 @@ channel_input_port_forward_request(int is_root)
void
channel_input_port_open(int payload_len)
{
- int remote_channel, sock, newch, host_port, i;
+ int remote_channel, sock, newch, i;
+ u_short host_port;
struct sockaddr_in sin;
char *host, *originator_string;
struct hostent *hp;
@@ -1122,7 +1119,8 @@ char *
x11_create_display_inet(int screen_number)
{
extern ServerOptions options;
- int display_number, port, sock;
+ int display_number, sock;
+ u_short port;
struct sockaddr_in sin;
char buf[512];
char hostname[MAXHOSTNAMELEN];