bugzilla-daemon at mindrot.org
2014-Oct-06 22:20 UTC
[Bug 2286] New: Port ignored when re-reading config after canonicalization
https://bugzilla.mindrot.org/show_bug.cgi?id=2286
Bug ID: 2286
Summary: Port ignored when re-reading config after
canonicalization
Product: Portable OpenSSH
Version: 6.6p1
Hardware: Other
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: pcl at pclewis.com
Created attachment 2482
--> https://bugzilla.mindrot.org/attachment.cgi?id=2482&action=edit
Patch to make ssh_connect_direct use port parameter.
To reproduce:
--
# ~/.ssh/config
CanonicalizeHostname yes
CanonicalDomains mynet.local
Host *.mynet.local
Port 99
--
$ ssh -vvv somedomain
...
debug1: Canonicalized hostname "somedomain" =>
"somedomain.mynet.local"
debug1: Hostname has changed; re-reading configuration
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 4: Applying options for
*.mynet.local
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to somedomain.mynet.local [127.0.0.1] port 22.
...
Expected result:
Connection attempted on port 99
Actual result:
Connection attempted on port 22.
More info:
The correct port is passed to ssh_connect_direct, but it is not used.
ssh_proxy_connect works as expected.
Attached patch just sets the port inside the addrinfo struct before
trying to connect.
Workaround:
Port 99
ProxyCommand nc %h %p
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Oct-06 23:03 UTC
[Bug 2286] Port ignored when re-reading config after canonicalization
https://bugzilla.mindrot.org/show_bug.cgi?id=2286
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2482|0 |1
is obsolete| |
Status|NEW |ASSIGNED
Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org
CC| |djm at mindrot.org
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
Created attachment 2483
--> https://bugzilla.mindrot.org/attachment.cgi?id=2483&action=edit
Reset port number in canonicalised address list
Nice catch. The problem is that the canonicalisation code resolves the
addresses before the second config pass and never updates them with the
possibly-changed port number. This patch makes the update immediately
after the post-canonicalisation config pass.
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2014-Oct-08 22:21 UTC
[Bug 2286] Port ignored when re-reading config after canonicalization
https://bugzilla.mindrot.org/show_bug.cgi?id=2286
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Blocks| |2266
--- Comment #2 from Damien Miller <djm at mindrot.org> ---
Patch applied - this will be in openssh-6.8
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2015-Mar-18 07:17 UTC
[Bug 2286] Port ignored when re-reading config after canonicalization
https://bugzilla.mindrot.org/show_bug.cgi?id=2286
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #3 from Damien Miller <djm at mindrot.org> ---
openssh-6.8 is released
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.