Bugzilla – Attachment 2419 Details for
Bug 2222
GatewayPorts=no should not rewrite localhost addresses in port-forward requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow explicit IPv4/IPv6 localhost address regardless of GatewayPorts
fwd-bind-allow-explicit-localhost.diff (text/plain), 1.41 KB, created by
Damien Miller
on 2014-04-07 21:51:45 AEST
(
hide
)
Description:
Allow explicit IPv4/IPv6 localhost address regardless of GatewayPorts
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2014-04-07 21:51:45 AEST
Size:
1.41 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /var/cvs/openssh/channels.c,v >retrieving revision 1.323 >diff -u -p -r1.323 channels.c >--- channels.c 26 Feb 2014 23:18:33 -0000 1.323 >+++ channels.c 7 Apr 2014 11:50:17 -0000 >@@ -2700,6 +2700,7 @@ channel_set_af(int af) > * "0.0.0.0" -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR > * "" (empty string), "*" -> wildcard v4/v6 > * "localhost" -> loopback v4/v6 >+ * "127.0.0.1" / "::1" -> accepted even if gateway_ports isn't set > */ > static const char * > channel_fwd_bind_addr(const char *listen_addr, int *wildcardp, >@@ -2729,9 +2730,20 @@ channel_fwd_bind_addr(const char *listen > "\"%s\" overridden by server " > "GatewayPorts", listen_addr); > } >- } >- else if (strcmp(listen_addr, "localhost") != 0) >+ } else if (strcmp(listen_addr, "localhost") != 0 || >+ strcmp(listen_addr, "127.0.0.1") == 0 || >+ strcmp(listen_addr, "::1") == 0) { >+ /* Accept localhost address when GatewayPorts=yes */ > addr = listen_addr; >+ } >+ } else if (strcmp(listen_addr, "127.0.0.1") == 0 || >+ strcmp(listen_addr, "::1") == 0) { >+ /* >+ * If a specific IPv4/IPv6 localhost address has been >+ * requested then accept it even if gateway_ports is in >+ * effect. This allows the client to prefer IPv4 or IPv6. >+ */ >+ addr = listen_addr; > } > if (wildcardp != NULL) > *wildcardp = wildcard;
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 2222
: 2419