-
Notifications
You must be signed in to change notification settings - Fork 552
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
Add New Listener Callback for DoS Mode #4868
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4868 +/- ##
==========================================
- Coverage 86.27% 86.11% -0.17%
==========================================
Files 56 56
Lines 17630 17677 +47
==========================================
+ Hits 15211 15223 +12
- Misses 2419 2454 +35 ☔ View full report in Codecov by Sentry. |
TEST_QUIC_SUCCEEDED(ClientConfiguration.GetInitStatus()); | ||
|
||
QuicAddr ServerLocalAddr(QuicAddrFamily); | ||
MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, MsQuicConnection::NoOpCallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The listener needs to validate it actually received the expected event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any code handling the callback event.
MsQuicLib.HandshakeMemoryLimit = | ||
(MsQuicLib.Settings.RetryMemoryLimit * CxPlatTotalMemory) / UINT16_MAX; | ||
QuicLibraryEvaluateSendRetryState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put this after the log below please? It might help with debugging in the future.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case IOCTL_QUIC_RUN_RETRY_MEMORY_LIMIT_CONNECT: | ||
CXPLAT_FRE_ASSERT(Params != nullptr); | ||
QuicTestCtlRun(QuicTestRetryMemoryLimitConnect(Params->Family)); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case IOCTL_QUIC_RUN_RETRY_MEMORY_LIMIT_CONNECT: | |
CXPLAT_FRE_ASSERT(Params != nullptr); | |
QuicTestCtlRun(QuicTestRetryMemoryLimitConnect(Params->Family)); | |
break; | |
case IOCTL_QUIC_RUN_RETRY_MEMORY_LIMIT_CONNECT: | |
CXPLAT_FRE_ASSERT(Params != nullptr); | |
QuicTestCtlRun(QuicTestRetryMemoryLimitConnect(Params->Family)); | |
break; |
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_QUIC_SUCCEEDED( | ||
MsQuic->SetParam( | ||
Listener.Handle, | ||
QUIC_PARAM_DOS_MODE_EVENTS, | ||
sizeof(buffer), | ||
&buffer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_QUIC_SUCCEEDED( | |
MsQuic->SetParam( | |
Listener.Handle, | |
QUIC_PARAM_DOS_MODE_EVENTS, | |
sizeof(buffer), | |
&buffer)); | |
TEST_QUIC_SUCCEEDED( | |
MsQuic->SetParam( | |
Listener.Handle, | |
QUIC_PARAM_DOS_MODE_EVENTS, | |
sizeof(buffer), | |
&buffer)); |
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_QUIC_SUCCEEDED( | ||
MsQuic->SetParam( | ||
NULL, | ||
QUIC_PARAM_GLOBAL_RETRY_MEMORY_PERCENT, | ||
sizeof(RetryMemoryLimit), | ||
&RetryMemoryLimit)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should set this after you create the listener to trigger the event.
Description
Resolved #3717.
To support health probe, added new event for listeners. This event will be triggered for all opted in listeners.
Testing
Did basic tests manually.
Documentation
Is there any documentation impact for this change?