This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 570c73662215835e7995c250b206dd7e245f3075
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]>
    (cherry picked from commit e922e19268453f1a7ac414adaa18f9cbb0fa638b)
---
 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 15a0573a44..af632de729 100644
--- a/src/records/RecHttp.cc
+++ b/src/records/RecHttp.cc
@@ -94,14 +94,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;
 }

Reply via email to