[Bug 1847] New: SFTP doen't work well with IPV6 address
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Wed Dec 22 15:51:30 EST 2010
https://bugzilla.mindrot.org/show_bug.cgi?id=1847
Summary: SFTP doen't work well with IPV6 address
Product: Portable OpenSSH
Version: 5.6p1
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: sftp
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: adamchen at live.cn
Greetings.
I'm using ssh 5.6p1 release and have met a problem using SFTP with IPV6
address. Here's a brief.
When I ran command "sftp -6 fe80::217:8ff:fe7c:d91c", SFTP threw out
below error messages.
ssh: Could not resolve hostname fe80: host nor service provided, or not
known
Connection closed
See that the hostname has been cut as "fe80", and of cource this could
not be resolved. By reading sftp.c, I noticed that this happened in
line 2207.
2207 if ((cp = colon(host)) != NULL) {
2208 *cp++ = '\0';
2209 file1 = cp;
2210 }
The function colon(…) is used to analyze if user's input command is
like “sftp host_address:/directory”. If it is, colon(…) modifies the
value of “host” from “host_address:/directory” to “host_address”, and
returns value “/directory” to string “cp”.
In current case, I think colon(...) incorrectly cuts a valid IPV6
address.
Would you please verify this bug and do a fix? Thanks.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list