Read the census socket's binding from the kernel in the beta check #159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "beta-check-socket-kernel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Fixes beta-check item 2.2 (the census socket is bound to the tether), which read a correctly bound socket as unbound. On the device,
sslists UDP sockets from/proc/net/udp(noudp_diagmodule), and that never shows the interface a socket is bound to. So every socket looked unbound there, and on a device wheressshowed the census socket as plain0.0.0.0, the kernel reported it bound tobnep0.pidfd_getfd, as root), asks a UDP one which interface it's bound to (SO_BINDTODEVICE), and closes the copy at once. It prints counts by interface name only, as before (bnep0=1). If the process can't be read, the result isINFOwith the reason, notFAIL./status.jsonsign-in fails, the report now gives the HTTP status (HTTPError 401), so a mistyped password can be told from a busy sign-in helper.Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR.config.tomlwrite.Release impact
tools/beta-check/isn't shipped, so this doesn't affect the release kind.Notes for review
The socket reader was tested off the device against a stand-in process holding one socket bound to
loand one unbound (it reportedany=1 lo=1), and against a process that doesn't exist (unknown(ProcessLookupError), so 2.2 reportsINFO). On the device, the same reading run by hand showed the census socket bound tobnep0. Once merged, the zip on #158 is replaced.🤖 Generated with Claude Code