Skip to content

Commit

Permalink
fix typo for epoll, add winkernel checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Nov 1, 2024
1 parent 0c44652 commit aee8df6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ CxPlatDataPathCalculateFeatureSupport(
//
// TTL should always be available / enabled on Linux.
//
Datapath->Features != CXPLAT_DATAPATH_FEATURE_TTL;
Datapath->Features |= CXPLAT_DATAPATH_FEATURE_TTL;
}

void
Expand Down
72 changes: 37 additions & 35 deletions src/platform/datapath_winkernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,42 +1692,44 @@ CxPlatSocketCreateUdp(
goto Error;
}

Option = TRUE;
Status =
CxPlatDataPathSetControlSocket(
Binding,
WskSetOption,
IP_HOPLIMIT,
IPPROTO_IP,
sizeof(Option),
&Option);
if (QUIC_FAILED(Status)) {
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
Binding,
Status,
"Set IP_HOPLIMIT");
goto Error;
}
if (Datapath->Features & CXPLAT_DATAPATH_FEATURE_TTL) {
Option = TRUE;
Status =
CxPlatDataPathSetControlSocket(
Binding,
WskSetOption,
IP_HOPLIMIT,
IPPROTO_IP,
sizeof(Option),
&Option);
if (QUIC_FAILED(Status)) {
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
Binding,
Status,
"Set IP_HOPLIMIT");
goto Error;
}

Option = TRUE;
Status =
CxPlatDataPathSetControlSocket(
Binding,
WskSetOption,
IPV6_HOPLIMIT,
IPPROTO_IPV6,
sizeof(Option),
&Option);
if (QUIC_FAILED(Status)) {
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
Binding,
Status,
"Set IPV6_HOPLIMIT");
goto Error;
Option = TRUE;
Status =
CxPlatDataPathSetControlSocket(
Binding,
WskSetOption,
IPV6_HOPLIMIT,
IPPROTO_IPV6,
sizeof(Option),
&Option);
if (QUIC_FAILED(Status)) {
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
Binding,
Status,
"Set IPV6_HOPLIMIT");
goto Error;
}
}

if (Datapath->Features & CXPLAT_DATAPATH_FEATURE_RECV_COALESCING) {
Expand Down

0 comments on commit aee8df6

Please sign in to comment.