The socketOption was not updated as expected in version 6.x

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 6.0.0, 6.1.1, 6.2.1, 6.3.2
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In socket_util.h, if the value of TCP_KEEPINTVL exceeds maxKeepIntvlSecs, it should be capped at maxKeepIntvlSecs. The same logic applies to TCP_KEEPIDLE.

      However, in reality, optVal is always set to 1, and rawOptVal is never assigned to optVal, which results in the socket option not being updated as expected.

      A correct implementation might be:

      And I've already verified the fix using the strace tool.

      Before the fix:

      After the fix:

      If my analysis is correct, I'd be happy to fix the issue!!

       

        1. image-2025-07-23-14-26-05-091.png
          image-2025-07-23-14-26-05-091.png
          266 kB
        2. image-2025-07-23-14-27-07-666.png
          image-2025-07-23-14-27-07-666.png
          207 kB
        3. image-2025-07-23-14-29-13-534.png
          image-2025-07-23-14-29-13-534.png
          460 kB
        4. image-2025-07-23-14-29-45-083.png
          image-2025-07-23-14-29-45-083.png
          472 kB

              Assignee:
              Unassigned
              Reporter:
              Jinzhong Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: