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 mDNS announcement spam on all interfaces. Fixes #5435 #5455

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions supervisor/dbus/network/setting/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,22 @@
if not uuid:
uuid = str(uuid4())

# Announce mDNS/LLMNR hostname only on primary interface to avoid conflicts
# TODO: Expose these settings in API to allow users to have control over these settings.

Check warning on line 162 in supervisor/dbus/network/setting/generate.py

View workflow job for this annotation

GitHub Actions / Check pylint

W0511: TODO: Expose these settings in API to allow users to have control over these settings. (fixme)
if interface.primary:
mdns = 2
llmnr = 2
else:
mdns = 1 # resolve only
llmnr = 1

conn: dict[str, dict[str, Variant]] = {
CONF_ATTR_CONNECTION: {
CONF_ATTR_CONNECTION_ID: Variant("s", name),
CONF_ATTR_CONNECTION_UUID: Variant("s", uuid),
CONF_ATTR_CONNECTION_TYPE: Variant("s", iftype),
CONF_ATTR_CONNECTION_LLMNR: Variant("i", 2),
CONF_ATTR_CONNECTION_MDNS: Variant("i", 2),
CONF_ATTR_CONNECTION_LLMNR: Variant("i", llmnr),
CONF_ATTR_CONNECTION_MDNS: Variant("i", mdns),
CONF_ATTR_CONNECTION_AUTOCONNECT: Variant("b", True),
},
}
Expand Down
Loading