Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-108889

lftp should disable the Nagle algorithm

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: Generate New Ti...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • rhel-10.2
    • lftp
    • None
    • No
    • None
    • 1
    • rhel-net-perf
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • _N&P-Refined_
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      When discussing RHEL-108115 it looks possible that issue is exacerbated by the fact that lftp doesn't disable the Nagle algorithm (setting the TCP_NODELAY socket option).

      For at least the FTP data connection and probably the control connection this is certainly appropriate and should be the default to avoid surprises.

      Contrast with curl - a much more widely used FTP client than lftp - which is disabling Nagle for both the control and data connections.

      $ strace -econnect,setsockopt curl ftp://ftp.mirrorservice.org/
      setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
      setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
      setsockopt(4, SOL_TCP, TCP_KEEPIDLE, [60], 4) = 0
      setsockopt(4, SOL_TCP, TCP_KEEPINTVL, [60], 4) = 0
      setsockopt(4, SOL_TCP, TCP_KEEPCNT, [9], 4) = 0
      connect(4, {sa_family=AF_INET6, sin6_port=htons(21), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2001:630:341:12::184", &sin6_addr), sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
      setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
      setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
      setsockopt(5, SOL_TCP, TCP_KEEPIDLE, [60], 4) = 0
      setsockopt(5, SOL_TCP, TCP_KEEPINTVL, [60], 4) = 0
      setsockopt(5, SOL_TCP, TCP_KEEPCNT, [9], 4) = 0
      connect(5, {sa_family=AF_INET6, sin6_port=htons(59061), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2001:630:341:12::184", &sin6_addr), sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
      drwxr-xr-x    2 ftp      ftp          4096 Aug 02  2023 pub
      drwxr-xr-x  142 ftp      ftp          4096 Mar 06 11:00 sites

              mruprich@redhat.com Michal Ruprich
              rhn-engineering-jorton Joe Orton
              Michal Ruprich Michal Ruprich
              Jötnar Project Jötnar Project
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: