Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Bugs

[Bug 1648] New: Fix IPV6_V6ONLY for -L with -g

 

 

OpenSSH bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla-daemon at bugzilla

Sep 13, 2009, 6:58 AM

Post #1 of 1 (375 views)
Permalink
[Bug 1648] New: Fix IPV6_V6ONLY for -L with -g

https://bugzilla.mindrot.org/show_bug.cgi?id=1648

Summary: Fix IPV6_V6ONLY for -L with -g
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: ssh
AssignedTo: unassigned-bugs [at] mindrot
ReportedBy: jan.kratochvil [at] redhat


Created an attachment (id=1695)
--> (https://bugzilla.mindrot.org/attachment.cgi?id=1695)
Fix following the current openssh style.

$ /usr/bin/ssh -g -L 5000:localhost:22 localhost cat
bind: Address already in use
[... running]
# netstat -apn|grep 5000
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 23526/ssh
$ telnet localhost6 5000
Trying ::1...
telnet: connect to address ::1: Connection refused

patched:

$ ./ssh -g -L 5000:localhost:22 localhost cat
[... running]
# netstat -apn|grep 5000
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 23139/ssh
tcp 0 0 :::5000 :::* LISTEN 23139/ssh
$ telnet localhost6 5000
Trying ::1...
Connected to localhost6.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.2


Using Fedora 11 kernel with its (+AFAIK upstream) defaults:
# cat /proc/version
Linux version 2.6.30.5-43.fc11.x86_64
(mockbuild [at] xenbuilder4) (gcc version 4.4.1
20090725 (Red Hat 4.4.1-2) (GCC) ) #1 SMP Thu Aug 27 21:39:52 EDT 2009
# cat /proc/sys/net/ipv6/bindv6only
0

In the current case one cannot access IPv6 because the IPv4 socket was
created first. If IPv6 would be created first it would work.

The copy-pasted code could be probably moved to some unified function.
This is out of scope of this patch.

Similiar problem+resolution was in Bug 164, Bug 1309 and Bug 1392.

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

OpenSSH bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.