Skip to content

Commit

Permalink
DLPX-88615 SSHJ - Bad packet received by server when hearbeat is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkatanadhanG committed Jan 25, 2024
1 parent dc6b207 commit fe67d5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ public long write(SSHPacket payload)
try {

if (kexer.isKexOngoing()) {
// Only transport layer packets (1 to 49) allowed except SERVICE_REQUEST
// Only transport layer packets (1 to 49) allowed except SERVICE_REQUEST and IGNORE
final Message m = Message.fromByte(payload.array()[payload.rpos()]);
if (!m.in(1, 49) || m == Message.SERVICE_REQUEST) {
if (!m.in(1, 49) || m == Message.SERVICE_REQUEST || m == Message.IGNORE) {
assert m != Message.KEXINIT;
kexer.waitForDone();
}
Expand Down

0 comments on commit fe67d5c

Please sign in to comment.