|
Lines 91-96
expand_proxy_command(const char *proxy_command, const char *user,
Link Here
|
| 91 |
char *tmp, *ret, strport[NI_MAXSERV]; |
91 |
char *tmp, *ret, strport[NI_MAXSERV]; |
| 92 |
const char *keyalias = options.host_key_alias ? |
92 |
const char *keyalias = options.host_key_alias ? |
| 93 |
options.host_key_alias : host_arg; |
93 |
options.host_key_alias : host_arg; |
|
|
94 |
const char *family = ""; |
| 95 |
|
| 96 |
if (options.address_family == AF_INET6) { |
| 97 |
family = "-6"; |
| 98 |
} else if (options.address_family == AF_INET) { |
| 99 |
family = "-4"; |
| 100 |
} |
| 94 |
|
101 |
|
| 95 |
snprintf(strport, sizeof strport, "%d", port); |
102 |
snprintf(strport, sizeof strport, "%d", port); |
| 96 |
xasprintf(&tmp, "exec %s", proxy_command); |
103 |
xasprintf(&tmp, "exec %s", proxy_command); |
|
Lines 100-105
expand_proxy_command(const char *proxy_command, const char *user,
Link Here
|
| 100 |
"n", host_arg, |
107 |
"n", host_arg, |
| 101 |
"p", strport, |
108 |
"p", strport, |
| 102 |
"r", options.user, |
109 |
"r", options.user, |
|
|
110 |
"f", family, |
| 103 |
(char *)NULL); |
111 |
(char *)NULL); |
| 104 |
free(tmp); |
112 |
free(tmp); |
| 105 |
return ret; |
113 |
return ret; |