Secure: send over TCP instead of UDP - #15
Merged
Merged
Conversation
A StreamSender over an lwIP TCP stream replaces the UDP sender, and the collector moves to 5601. Records are framed by octet count (RFC 6587), which is what a receiver expects on a stream transport. Flash 7,664 B (+548) Static RAM 2,784 B (+180) Heap -32 B (-8) Log stack 448 B (0) Service stack 784 B (+8) TCP before TLS is deliberate. It is the smaller step — a stream, a connect and a framing rule, with no certificates in the picture — and it gives store-and-forward somewhere to spool before crypto arrives. It also complements the sequenceId added earlier: the transport now detects loss at the point it happens, where the sequence only reveals it afterwards. The log stack does not move at all. A task that calls Log is unaffected by the transport underneath it, and what TCP costs lands on the service task, which is the one that connects. The stream takes a Sleep callback because a connect is not instantaneous and the library will not pick a blocking primitive on your behalf; one vTaskDelay is the whole of it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSyslog transmission changes from UDP datagrams to an LWIP raw TCP stream on port 5601. A delay helper bounds connection retries, sender setup uses TCP stream configuration, and the run report records updated measurements and collector timestamps. ChangesSyslog TCP migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SyslogLogger
participant SolidSyslogStreamSender
participant LwipRawTcpStream
participant SyslogCollector
SyslogLogger->>SolidSyslogStreamSender: enqueue and drain log messages
SolidSyslogStreamSender->>LwipRawTcpStream: open TCP stream on port 5601
LwipRawTcpStream->>SyslogCollector: deliver syslog stream
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this tag adds
A plain TCP transport, replacing UDP:
SolidSyslogStreamSenderoverSolidSyslogLwipRawTcpStream, with the collector on 5601 and records framed byoctet count (RFC 6587). Moves toward secure.
TCP lands before TLS deliberately — it is the smaller step (a stream, a connect and
a framing rule, no certificates), and it gives store-and-forward somewhere to spool
before crypto arrives. It also complements the
sequenceIdadded earlier: thetransport detects loss where it happens, the sequence only reveals it afterwards.
The log stack does not move — a task that calls Log is unaffected by the transport
underneath it, and the cost lands on the service task, which does the connecting.
Checklist
app/syslog/Syslog.conly. No build-systemchange was needed:
SolidSyslogLwipRawTcpStreamships in theLwipRawpackthat is already named and linked.
measurements/<State>.csvcommitted, and a row added tomeasurements/tags.tsv.Secure's row is already present; its CSV is frozen at the end of Secure's work,
not here — see
conventions.md.frozen.
./run.shgreen (build + QEMU + baseline self-check), record delivered overTCP and confirmed in the collector output.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes