diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c index a0cf3d687..2a77ea14f 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.111 2003/05/15 14:55:25 djm Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -107,6 +107,7 @@ typedef enum { | |||
107 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, | 107 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, |
108 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, | 108 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, |
109 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, | 109 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, |
110 | oAddressFamily, | ||
110 | oDeprecated, oUnsupported | 111 | oDeprecated, oUnsupported |
111 | } OpCodes; | 112 | } OpCodes; |
112 | 113 | ||
@@ -194,6 +195,7 @@ static struct { | |||
194 | { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, | 195 | { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, |
195 | { "rekeylimit", oRekeyLimit }, | 196 | { "rekeylimit", oRekeyLimit }, |
196 | { "connecttimeout", oConnectTimeout }, | 197 | { "connecttimeout", oConnectTimeout }, |
198 | { "addressfamily", oAddressFamily }, | ||
197 | { NULL, oBadOption } | 199 | { NULL, oBadOption } |
198 | }; | 200 | }; |
199 | 201 | ||
@@ -286,6 +288,7 @@ process_config_line(Options *options, const char *host, | |||
286 | size_t len; | 288 | size_t len; |
287 | u_short fwd_port, fwd_host_port; | 289 | u_short fwd_port, fwd_host_port; |
288 | char sfwd_host_port[6]; | 290 | char sfwd_host_port[6]; |
291 | extern int IPv4or6; | ||
289 | 292 | ||
290 | /* Strip trailing whitespace */ | 293 | /* Strip trailing whitespace */ |
291 | for(len = strlen(line) - 1; len > 0; len--) { | 294 | for(len = strlen(line) - 1; len > 0; len--) { |
@@ -720,6 +723,18 @@ parse_int: | |||
720 | *intptr = value; | 723 | *intptr = value; |
721 | break; | 724 | break; |
722 | 725 | ||
726 | case oAddressFamily: | ||
727 | arg = strdelim(&s); | ||
728 | if (strcasecmp(arg, "inet") == 0) | ||
729 | IPv4or6 = AF_INET; | ||
730 | else if (strcasecmp(arg, "inet6") == 0) | ||
731 | IPv4or6 = AF_INET6; | ||
732 | else if (strcasecmp(arg, "any") == 0) | ||
733 | IPv4or6 = AF_UNSPEC; | ||
734 | else | ||
735 | fatal("Unsupported AddressFamily \"%s\"", arg); | ||
736 | break; | ||
737 | |||
723 | case oEnableSSHKeysign: | 738 | case oEnableSSHKeysign: |
724 | intptr = &options->enable_ssh_keysign; | 739 | intptr = &options->enable_ssh_keysign; |
725 | goto parse_flag; | 740 | goto parse_flag; |