Skip to content

fix: keep KNX-IP datalink in sync with link/IP + plug friendlyName leak - #31

Open
GeminiServer wants to merge 1 commit into
v1from
ec/v1-friendlyNameLeak-got_ip-rebind
Open

fix: keep KNX-IP datalink in sync with link/IP + plug friendlyName leak#31
GeminiServer wants to merge 1 commit into
v1from
ec/v1-friendlyNameLeak-got_ip-rebind

Conversation

@GeminiServer

Copy link
Copy Markdown
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.
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