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

Fix compatibility with some IoT devices using avahi 0.8-rc1 #108

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

DerAndereAndi
Copy link
Contributor

@DerAndereAndi DerAndereAndi commented Jun 8, 2022

This fixes browse, lookup and also register not working properly with some devices running with avahi 0.8-rc1

The problem came up with Elli Charger wallboxes, which are using avahi 0.8-rc1 which couldn't be seen using this library and the device also didn't see the service announced with this library. Using avahi 0.8-rc1 on a linux device (ubuntu) does not show the same effects. So something within this device is causing this.

Upping the IPv4 TTL to 255 and the IPv6 HopLimit to 255 solves this. The avahi library also uses these values since almost 18 years and they haven't been changed.

The Multicast DNS RFC has a section about IP TTLs: https://datatracker.ietf.org/doc/html/rfc6762#section-11

All Multicast DNS responses (including responses sent via unicast) SHOULD be sent with IP TTL set to 255. This is recommended to provide backwards-compatibility with older Multicast DNS queriers (implementing a draft version of this document, posted in February 2004) that check the IP TTL on reception to determine whether the packet originated on the local link. These older queriers discard all packets with TTLs other than 255.

@grandcat
Copy link
Owner

Thanks for your contribution. Could you squash it into a single commit?
A reference to the RFC in the commit body would be the cherry on the top :)

@DerAndereAndi DerAndereAndi changed the title Fix compatibility with avahi 0.8-rc1 Fix compatibility with some IoT devices using avahi 0.8-rc1 Jun 23, 2022
This fixes browse, lookup and also register not working properly with some devices running with avahi 0.8-rc1

The problem came up with Elli Charger wallboxes, which are using avahi 0.8-rc1 which couldn't be seen using this library and the device also didn't see the service announced with this library. Using avahi 0.8-rc1 on a linux device (ubuntu) does not show the same effects. So something within this device is causing this.

Upping the IPv4 TTL to 255 and the IPv6 HopLimit to 255 solves this. The avahi library also uses these values since almost 18 years and they haven't been changed.

The Multicast DNS RFC has a section about IP TTLs: https://datatracker.ietf.org/doc/html/rfc6762#section-11
@DerAndereAndi
Copy link
Contributor Author

HI @grandcat thanks for the comment. I squashed it into a single commit and updated the information regarding the issue.

Copy link
Owner

@grandcat grandcat left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks 👏

@grandcat grandcat merged commit e1d6e57 into grandcat:master Jun 23, 2022
@DerAndereAndi DerAndereAndi deleted the bugfix/avahi-0.8 branch June 23, 2022 17:07
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.

2 participants