Skip to content

fix(linux): stop the command line refusing the app before it accepts the connection - #4311

Merged
datlechin merged 4 commits into
mainfrom
fix/linux-host-peer-check-ppa
Nov 17, 2026
Merged

datlechin merged 4 commits into
mainfrom
fix/linux-host-peer-check-ppa

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • loopback_peer_is_ours on Linux: a server-side connection still waiting to be accepted has no inode in /proc/net/tcp, and kernels before 6.17 list it as root's. It now takes the owner of the LISTEN socket on the same address, only for ESTABLISHED and SYN_RECV rows; a closing socket with no inode is never attributed to a listener.
  • Effect: tablepro (the command line) refused the running app as a foreign server when it checked before the app accepted the connection, on kernels before 6.17. This failed command_line::linux_host::tests::a_listener_this_process_owns_is_verified in every Launchpad PPA build of linux-v0.1.0-beta.4.
  • Doc comments in proc_net_tcp.rs become plain comments.

Test plan

  • proc_net_tcp tests: a crafted table as kernel 6.8 lists an unaccepted connection (ours, another user's listener, no listener), and another user's closed connection at an address a listener of ours took later (refused).
  • a_connection_waiting_to_be_accepted_is_its_own and the existing Linux host test run on Linux CI.
  • Codex adversarial review: its one finding (closing sockets) is fixed in this PR.

@datlechin datlechin changed the title fix(linux): see the app's own command-line server while it has not accepted yet fix(linux): stop the command line refusing the app before it accepts the connection Nov 17, 2026
@datlechin
datlechin enabled auto-merge (squash) November 17, 2026 15:46
@datlechin
datlechin merged commit 46e497b into main Nov 17, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant