fix: keep KNX-IP datalink in sync with link/IP + plug friendlyName leak - #31
Open
GeminiServer wants to merge 1 commit into
Open
fix: keep KNX-IP datalink in sync with link/IP + plug friendlyName leak#31GeminiServer wants to merge 1 commit into
GeminiServer wants to merge 1 commit into
Conversation
GeminiServer
commented
Jul 7, 2026
Member
- GOT_IP: rebind multicast only on real IP change (no heap churn on lease renew); handle LOST_IP -> drop datalink.
- checkLinkStatus: reconcile controlKnxIp(established()) each tick -> recovers a link flap where GOT_IP never re-fires (datalink stuck off).
- loadSettings: delete[] the friendlyNameRead buffer propertyValueRead() new[]'d.
- GOT_IP: rebind multicast only on real IP change (no heap churn on lease renew); handle LOST_IP -> drop datalink. - checkLinkStatus: reconcile controlKnxIp(established()) each tick -> recovers a link flap where GOT_IP never re-fires (datalink stuck off). - loadSettings: delete[] the friendlyNameRead buffer propertyValueRead() new[]'d.
traxanos
added a commit
that referenced
this pull request
Aug 5, 2026
- GOT_IP: rebind only on a real IP change. enabled(true) was a no-op on an already-active datalink, so the socket kept the old binding after an IP change - device silently off the bus until a restart. On the same IP (lease renewal) the socket stays untouched; a rebind costs telegrams (IGMP leave/join). - GOT_IP: add a LOST_IP branch, drops the datalink. - checkLinkStatus (ESP32 only): reconciles controlKnxIp(established()) every tick, catches a link flap where GOT_IP never re-fires. Not on RP2040, since there is no such event gap to close there. Ported from 0c20c45 (PR #31, against v1). Deliberately not carried over: the unconditional rebind on every GOT_IP from the original - it was meant to avoid heap churn, which never happened due to the no-op, but would have cost telegrams on every lease renewal for nothing.
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.