go.crypto/ssh: add workaround for broken port forwarding in
OpenSSH 5. Tested with OpenSSH_5.9 R=agl, dave CC=golang-dev https://golang.org/cl/11921043
This commit is contained in:
committed by
Adam Langley
parent
eb19e229bd
commit
2d394e3025
@@ -0,0 +1,16 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAutoPortListenBroken(t *testing.T) {
|
||||
broken := "SSH-2.0-OpenSSH_5.9hh11"
|
||||
works := "SSH-2.0-OpenSSH_6.1"
|
||||
if !isBrokenOpenSSHVersion(broken) {
|
||||
t.Errorf("version %q not marked as broken", broken)
|
||||
}
|
||||
if isBrokenOpenSSHVersion(works) {
|
||||
t.Errorf("version %q marked as broken", works)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user