Skip to content

Commit

Permalink
Check for [email protected] protocol version
Browse files Browse the repository at this point in the history
  • Loading branch information
stevapple committed Aug 28, 2024
1 parent 58559ca commit 3f2117c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/ssh/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ func (s *PipeSession) RunPipe() error {
go func() {
defer s.Upstream.transport.Close()
// If the upstream doesn't support [email protected], short-circuit with a pong response
_, upstream_supports_ping := s.Upstream.extensions["[email protected]"]
upstream_ping_version := s.Upstream.extensions["[email protected]"]
upstream_supports_ping := len(upstream_ping_version) == 1 && upstream_ping_version[0] == byte('0')
c <- pipe(s.Upstream.transport, s.Downstream.transport, !upstream_supports_ping)
}()
return <-c
Expand Down

0 comments on commit 3f2117c

Please sign in to comment.