summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index 365f67eb0..007056d4d 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.70 2001/04/02 14:20:23 stevesk Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.71 2001/04/07 08:55:17 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -110,7 +110,7 @@ typedef enum {
110 oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, 110 oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
111 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, 111 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
112 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, 112 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
113 oPreferredAuthentications 113 oDynamicForward, oPreferredAuthentications
114} OpCodes; 114} OpCodes;
115 115
116/* Textual representations of the tokens. */ 116/* Textual representations of the tokens. */
@@ -172,6 +172,7 @@ static struct {
172 { "keepalive", oKeepAlives }, 172 { "keepalive", oKeepAlives },
173 { "numberofpasswordprompts", oNumberOfPasswordPrompts }, 173 { "numberofpasswordprompts", oNumberOfPasswordPrompts },
174 { "loglevel", oLogLevel }, 174 { "loglevel", oLogLevel },
175 { "dynamicforward", oDynamicForward },
175 { "preferredauthentications", oPreferredAuthentications }, 176 { "preferredauthentications", oPreferredAuthentications },
176 { NULL, 0 } 177 { NULL, 0 }
177}; 178};
@@ -583,6 +584,18 @@ parse_int:
583 add_local_forward(options, fwd_port, buf, fwd_host_port); 584 add_local_forward(options, fwd_port, buf, fwd_host_port);
584 break; 585 break;
585 586
587 case oDynamicForward:
588 arg = strdelim(&s);
589 if (!arg || *arg == '\0')
590 fatal("%.200s line %d: Missing port argument.",
591 filename, linenum);
592 if (arg[0] < '0' || arg[0] > '9')
593 fatal("%.200s line %d: Badly formatted port number.",
594 filename, linenum);
595 fwd_port = atoi(arg);
596 add_local_forward(options, fwd_port, "socks4", 0);
597 break;
598
586 case oHost: 599 case oHost:
587 *activep = 0; 600 *activep = 0;
588 while ((arg = strdelim(&s)) != NULL && *arg != '\0') 601 while ((arg = strdelim(&s)) != NULL && *arg != '\0')