Skip to content

Commit

Permalink
Merge pull request #196 from rod-hynes/master
Browse files Browse the repository at this point in the history
Fix: "keepalive@openssh.com" requests incorrectly logged as invalid requests
  • Loading branch information
rod-hynes committed Jun 28, 2016
2 parents f262aa3 + 3f7a651 commit 5e3cc08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion psiphon/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ func sshAPIRequestHandler(
var params requestJSONObject
err := json.Unmarshal(requestPayload, &params)
if err != nil {
return nil, psiphon.ContextError(err)
return nil, psiphon.ContextError(
fmt.Errorf("invalid payload for request name: %s: %s", name, err))
}

switch name {
Expand Down
7 changes: 6 additions & 1 deletion psiphon/server/tunnelServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,12 @@ func (sshClient *sshClient) runClient(

for request := range requests {

// requests are processed serially; responses must be sent in request order.
// Discard keepalive requests.
if request.Type == "keepalive@openssh.com" && request.WantReply == false {
continue
}

// Requests are processed serially; responses must be sent in request order.
responsePayload, err := sshAPIRequestHandler(
sshClient.sshServer.support,
sshClient.geoIPData,
Expand Down

0 comments on commit 5e3cc08

Please sign in to comment.