Bugzilla – Attachment 3438 Details for
Bug 3199
Pass address family switch to proxy command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Pass address family switch to proxy command
file_3199.txt (text/plain), 1.64 KB, created by
Jakub Jelen
on 2020-08-03 23:43:54 AEST
(
hide
)
Description:
Pass address family switch to proxy command
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2020-08-03 23:43:54 AEST
Size:
1.64 KB
patch
obsolete
>commit ac876b466601feedf382c089256bb2f69dd8fb87 >Author: Jakub Jelen <jjelen@redhat.com> >Date: Mon Aug 3 15:32:01 2020 +0200 > > Pass address family switch to proxy command > >diff --git a/ssh_config.5 b/ssh_config.5 >index 2b635410..179c6557 100644 >--- a/ssh_config.5 >+++ b/ssh_config.5 >@@ -1846,6 +1846,8 @@ A literal > Hash of %l%h%p%r. > .It %d > Local user's home directory. >+.It %f >+The preferred address family switch (either -4, -6 or empty). > .It %h > The remote hostname. > .It %i >@@ -1895,7 +1897,7 @@ accepts the tokens %% and %h. > accepts all tokens. > .Pp > .Cm ProxyCommand >-accepts the tokens %%, %h, %n, %p, and %r. >+accepts the tokens %%, %f, %h, %n, %p, and %r. > .Sh ENVIRONMENT VARIABLES > Arguments to some keywords can be expanded at runtime from environment > variables on the client by enclosing them in >diff --git a/sshconnect.c b/sshconnect.c >index f6d8a1bc..47ffedd1 100644 >--- a/sshconnect.c >+++ b/sshconnect.c >@@ -91,6 +91,13 @@ expand_proxy_command(const char *proxy_command, const char *user, > char *tmp, *ret, strport[NI_MAXSERV]; > const char *keyalias = options.host_key_alias ? > options.host_key_alias : host_arg; >+ const char *family = ""; >+ >+ if (options.address_family == AF_INET6) { >+ family = "-6"; >+ } else if (options.address_family == AF_INET) { >+ family = "-4"; >+ } > > snprintf(strport, sizeof strport, "%d", port); > xasprintf(&tmp, "exec %s", proxy_command); >@@ -100,6 +107,7 @@ expand_proxy_command(const char *proxy_command, const char *user, > "n", host_arg, > "p", strport, > "r", options.user, >+ "f", family, > (char *)NULL); > free(tmp); > return ret;
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 3199
: 3438