Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect total connection table size in the quic server when removing multiple connections with the same IP:Port #26073

Merged

Conversation

ryleung-solana
Copy link
Contributor

Problem

We are currently always assuming we remove 1 connection from the quic server connection table when we remove the connections associated with an IP:Port pair. However, there may actually be multiple connections associated with an IP:Port pair. In that case, the total connection table size becomes incorrect due to this incorrect assumption.

Summary of Changes

Calculate the number of connections actually removed from the connection table and subtract this value from the total connection table size.

Fixes #

…oving multiple connections with the same IP:Port
@ryleung-solana ryleung-solana linked an issue Jun 20, 2022 that may be closed by this pull request
Copy link
Member

@jstarry jstarry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, can you please add a test as well?

…le connections associated with an IP:Port pair
@ryleung-solana
Copy link
Contributor Author

Change looks good, can you please add a test as well?

Added.

@ryleung-solana ryleung-solana requested a review from jstarry June 21, 2022 03:12
Copy link
Member

@sakridge sakridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ryleung-solana ryleung-solana merged commit 84a1aae into solana-labs:master Jun 21, 2022
@pgarg66 pgarg66 added the v1.10 label Jun 27, 2022
mergify bot pushed a commit that referenced this pull request Jun 27, 2022
…oving multiple connections with the same IP:Port (#26073)

* Fix incorrect total connection table size in the quic server when removing multiple connections with the same IP:Port

(cherry picked from commit 84a1aae)
mergify bot added a commit that referenced this pull request Jun 27, 2022
…oving multiple connections with the same IP:Port (#26073) (#26270)

* Fix incorrect total connection table size in the quic server when removing multiple connections with the same IP:Port

(cherry picked from commit 84a1aae)

Co-authored-by: ryleung-solana <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QUIC server connection table size can be corrupted
4 participants