lgoldstein commented on code in PR #446: URL: https://github.com/apache/mina-sshd/pull/446#discussion_r1435251528
########## sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java: ########## @@ -151,24 +156,34 @@ public abstract class AbstractSession extends SessionHelper { protected final Map<KexProposalOption, String> clientProposal = new EnumMap<>(KexProposalOption.class); protected final Map<KexProposalOption, String> unmodClientProposal = Collections.unmodifiableMap(clientProposal); protected final Map<KexProposalOption, String> negotiationResult = new EnumMap<>(KexProposalOption.class); - protected final Map<KexProposalOption, String> unmodNegotiationResult = Collections.unmodifiableMap(negotiationResult); + protected final Map<KexProposalOption, String> unmodNegotiationResult = Collections + .unmodifiableMap(negotiationResult); protected KeyExchange kex; protected Boolean firstKexPacketFollows; protected boolean initialKexDone; + protected final AtomicBoolean strictKexSignalled = new AtomicBoolean(); + protected final AtomicInteger newKeysReceivedCount = new AtomicInteger(); + protected final AtomicInteger newKeysSentCount = new AtomicInteger(); + /** * Holds the current key exchange state. */ protected final AtomicReference<KexState> kexState = new AtomicReference<>(KexState.UNKNOWN); protected final AtomicReference<DefaultKeyExchangeFuture> kexFutureHolder = new AtomicReference<>(null); - // The kexInitializedFuture is fulfilled when this side (client or server) has prepared its own proposal. Access is + // The kexInitializedFuture is fulfilled when this side (client or server) + // has prepared its own proposal. Access is // synchronized on kexState. protected DefaultKeyExchangeFuture kexInitializedFuture; /* * SSH packets encoding / decoding support */ + /** Input packet sequence number. */ + protected long seqi; + /** Output packet sequence number. */ + protected long seqo; Review Comment: We have so many different guards guarding so many different sections via so many possible flows that it would be an onerous task to document let alone maintain a correct documentation every time a change is made. What can you do - SSH is complex. On a side-note - please limit your remarks to the subject of this PR and not to old code. You make some excellent points, but these remarks add "noise" to the review that must remain focused on the task at hand. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org