Bugzilla – Attachment 303 Details for
Bug 534
No option to use IPv6 connections by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds AddressFamily option to client
ssh-af.diff (text/plain), 3.35 KB, created by
Damien Miller
on 2003-05-16 10:50:31 AEST
(
hide
)
Description:
Adds AddressFamily option to client
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2003-05-16 10:50:31 AEST
Size:
3.35 KB
patch
obsolete
>This adds an "AddressFamily" option to the client, previously this could >only be set using the '-4' and '-6' commandline options. > >Useful if you only want to speak IPv6 to certain hosts, yet still refer to >them by DNS name. > >http://bugzilla.mindrot.org/show_bug.cgi?id=534 > >Index: readconf.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/readconf.c,v >retrieving revision 1.111 >diff -u -r1.111 readconf.c >--- readconf.c 15 May 2003 14:55:25 -0000 1.111 >+++ readconf.c 16 May 2003 00:46:37 -0000 >@@ -107,6 +107,7 @@ > oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, > oClearAllForwardings, oNoHostAuthenticationForLocalhost, > oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, >+ oAddressFamily, > oDeprecated, oUnsupported > } OpCodes; > >@@ -194,6 +195,7 @@ > { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, > { "rekeylimit", oRekeyLimit }, > { "connecttimeout", oConnectTimeout }, >+ { "addressfamily", oAddressFamily }, > { NULL, oBadOption } > }; > >@@ -284,6 +286,7 @@ > 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--) { >@@ -716,6 +719,18 @@ > } > if (*activep && *intptr == -1) > *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: >Index: ssh-keysign.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh-keysign.c,v >retrieving revision 1.11 >diff -u -r1.11 ssh-keysign.c >--- ssh-keysign.c 2 Apr 2003 14:36:26 -0000 1.11 >+++ ssh-keysign.c 16 May 2003 00:46:37 -0000 >@@ -42,7 +42,9 @@ > #include "pathnames.h" > #include "readconf.h" > >-uid_t original_real_uid; /* XXX readconf.c needs this */ >+/* XXX readconf.c needs these */ >+uid_t original_real_uid; >+int IPv4or6; > > static int > valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, >Index: ssh_config >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh_config,v >retrieving revision 1.17 >diff -u -r1.17 ssh_config >--- ssh_config 15 May 2003 14:55:25 -0000 1.17 >+++ ssh_config 16 May 2003 00:46:37 -0000 >@@ -25,6 +25,7 @@ > # HostbasedAuthentication no > # BatchMode no > # CheckHostIP yes >+# AddressFamily any > # ConnectTimeout 0 > # StrictHostKeyChecking ask > # IdentityFile ~/.ssh/identity >Index: ssh_config.5 >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh_config.5,v >retrieving revision 1.9 >diff -u -r1.9 ssh_config.5 >--- ssh_config.5 15 May 2003 14:55:25 -0000 1.9 >+++ ssh_config.5 16 May 2003 00:46:37 -0000 >@@ -115,6 +115,13 @@ > .Ar hostname > argument given on the command line (i.e., the name is not converted to > a canonicalized host name before matching). >+.It Cm AddressFamily >+Specifies which address family to use when connecting. Valid arguments are >+.Dq any , >+.Dq inet >+(Use IPv4 only) or >+.Dq inet6 >+(Use IPv6 only.) > .It Cm AFSTokenPassing > Specifies whether to pass AFS tokens to remote host. > The argument to this keyword must be
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 534
: 303 |
342