This is an automated email from the ASF dual-hosted git repository.
lserris pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e922e19268 Disable mptcp if proper header files are not available
(#11651)
e922e19268 is described below
commit e922e19268453f1a7ac414adaa18f9cbb0fa638b
Author: Serris Lew <[email protected]>
AuthorDate: Mon Aug 19 14:55:35 2024 -0700
Disable mptcp if proper header files are not available (#11651)
* Disable mptcp if logging is disabled
* open file after cond
---------
Co-authored-by: Serris Lew <[email protected]>
---
src/records/RecHttp.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/records/RecHttp.cc b/src/records/RecHttp.cc
index 48d6f87ae1..ae244d3805 100644
--- a/src/records/RecHttp.cc
+++ b/src/records/RecHttp.cc
@@ -95,14 +95,15 @@ SessionProtocolSet DEFAULT_QUIC_SESSION_PROTOCOL_SET;
static bool
mptcp_supported()
{
+ int value = 0;
+#if defined(HAVE_STRUCT_MPTCP_INFO_SUBFLOWS) && defined(MPTCP_INFO) &&
MPTCP_INFO == 1
ats_scoped_fd fd(::open("/proc/sys/net/mptcp/enabled", O_RDONLY));
- int value = 0;
-
if (fd > 0) {
TextBuffer buffer(16);
buffer.slurp(fd.get());
value = atoi(buffer.bufPtr());
}
+#endif
return value != 0;
}