summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-05-18 20:50:30 +1000
committerDamien Miller <djm@mindrot.org>2003-05-18 20:50:30 +1000
commit20a8f97b034df418d0e5e04b11000b44ab07e628 (patch)
treef5bf1076934a1f5724d2f267a4b9921693746b81 /readconf.c
parent25d9342f04249e3af01058bb9ba2a539f928bab0 (diff)
- djm@cvs.openbsd.org 2003/05/16 03:27:12
[readconf.c ssh_config ssh_config.5 ssh-keysign.c] add AddressFamily option to ssh_config (like -4, -6 on commandline). Portable bug #534; ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c
index a0cf3d68..2a77ea14 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.111 2003/05/15 14:55:25 djm Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -107,6 +107,7 @@ typedef enum {
oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
oClearAllForwardings, oNoHostAuthenticationForLocalhost,
oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
+ oAddressFamily,
oDeprecated, oUnsupported
} OpCodes;
@@ -194,6 +195,7 @@ static struct {
{ "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
{ "rekeylimit", oRekeyLimit },
{ "connecttimeout", oConnectTimeout },
+ { "addressfamily", oAddressFamily },
{ NULL, oBadOption }
};
@@ -286,6 +288,7 @@ process_config_line(Options *options, const char *host,
size_t len;
u_short fwd_port, fwd_host_port;
char sfwd_host_port[6];
+ extern int IPv4or6;
/* Strip trailing whitespace */
for(len = strlen(line) - 1; len > 0; len--) {
@@ -720,6 +723,18 @@ parse_int:
*intptr = value;
break;
+ case oAddressFamily:
+ arg = strdelim(&s);
+ if (strcasecmp(arg, "inet") == 0)
+ IPv4or6 = AF_INET;
+ else if (strcasecmp(arg, "inet6") == 0)
+ IPv4or6 = AF_INET6;
+ else if (strcasecmp(arg, "any") == 0)
+ IPv4or6 = AF_UNSPEC;
+ else
+ fatal("Unsupported AddressFamily \"%s\"", arg);
+ break;
+
case oEnableSSHKeysign:
intptr = &options->enable_ssh_keysign;
goto parse_flag;