Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[network] Modify iOS port knock to use a valid mDNS packet #17687

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

ngreatorex
Copy link
Contributor

The network binding has functionality that assumes, by default, that a device is an iOS device, and should be woken up by sending a packet to port 5353 (mDNS). The code sends a packet with an empty UDP payload, which is not a valid mDNS packet.

If the device is not an iOS device, but is instead a Windows device running the Apple Bonjour Service, the Bonjour Service will add an entry to the application event log for each "malformed" packet received. While this feature can now be disabled (since #16259 was merged), I believe it would be a simple (and non-breaking) change to send a 12-byte packet of zeroes instead. This is a valid mDNS packet (representing a query with 0 questions and 0 answers) so doesn't trigger the error logging in Bonjour for Windows.

There is also a possibility that the malformed packets may trip some firewalls, but I do not have any evidence that this is happening.

Signed-off-by: Neil Greatorex <neil@greatorex.me.uk>
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Nov 4, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@lsiepel lsiepel merged commit cd099cc into openhab:main Nov 4, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Nov 4, 2024
@ngreatorex ngreatorex deleted the patch-1 branch November 4, 2024 19:04
KaaNee pushed a commit to KaaNee/openhab-addons that referenced this pull request Nov 8, 2024
…7687)

Signed-off-by: Neil Greatorex <neil@greatorex.me.uk>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Dec 16, 2024
…7687)

Signed-off-by: Neil Greatorex <neil@greatorex.me.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants