summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-01-28 16:31:22 +1100
committerDamien Miller <djm@mindrot.org>2009-01-28 16:31:22 +1100
commit3dc71ad8653bab5591fc75bb1d3e6aa8fb9360df (patch)
treec41a8152c222b8bebb63d9d9185e8a160b71a5a0 /readconf.c
parent9576ac4afc7124415183dd9fe73d410165dbfe82 (diff)
- djm@cvs.openbsd.org 2009/01/22 10:02:34
[clientloop.c misc.c readconf.c readconf.h servconf.c servconf.h] [serverloop.c ssh-keyscan.c ssh.c sshd.c] make a2port() return -1 when it encounters an invalid port number rather than 0, which it will now treat as valid (needed for future work) adjust current consumers of a2port() to check its return value is <= 0, which in turn required some things to be converted from u_short => int make use of int vs. u_short consistent in some other places too feedback & ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c
index f63a00c47..0a8be1400 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.174 2009/01/15 17:38:43 stevesk Exp $ */ 1/* $OpenBSD: readconf.c,v 1.175 2009/01/22 10:02:34 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1279,11 +1279,11 @@ parse_forward(Forward *fwd, const char *fwdspec, int dynamicfwd)
1279 } else { 1279 } else {
1280 if (!(i == 3 || i == 4)) 1280 if (!(i == 3 || i == 4))
1281 goto fail_free; 1281 goto fail_free;
1282 if (fwd->connect_port == 0) 1282 if (fwd->connect_port <= 0)
1283 goto fail_free; 1283 goto fail_free;
1284 } 1284 }
1285 1285
1286 if (fwd->listen_port == 0) 1286 if (fwd->listen_port <= 0)
1287 goto fail_free; 1287 goto fail_free;
1288 1288
1289 if (fwd->connect_host != NULL && 1289 if (fwd->connect_host != NULL &&