net/avahi-reflector: add Avahi mDNS/DNS-SD reflector plugin#5217
Open
cayossarian wants to merge 4 commits intoopnsense:masterfrom
Open
net/avahi-reflector: add Avahi mDNS/DNS-SD reflector plugin#5217cayossarian wants to merge 4 commits intoopnsense:masterfrom
cayossarian wants to merge 4 commits intoopnsense:masterfrom
Conversation
New plugin that runs avahi-daemon in reflector mode, proxying multicast DNS and DNS Service Discovery traffic across VLANs. Provides a GUI for configuration, a dashboard status widget, and a diagnostics API endpoint. Depends on the avahi-app FreeBSD package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix dashboard widget: use framework getMarkup/createTable pattern, ajaxCall instead of non-existent ajaxGet, correct updateTable signature with table ID, and use text-success/text-danger icons instead of non-existent label-opnsense--success CSS classes - Fix widget metadata XML structure to match framework expectations (AvahiReflector wrapper element, filename, endpoints) - Remove non-existent sessionClose() call from diagnosticsAction - Replace hardcoded mdns-repeater conflict check with dynamic port 5353 detection via sockstat - Remove silent mdns-repeater stop from start/restart actions - Add conflict and Monit guidance to Enable help text Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ments Add health check script for Monit to detect avahi-daemon slot pool exhaustion and trigger automatic restarts. The reflector's hardcoded 100-slot pool for legacy unicast reflection can be exhausted by mDNS traffic bursts, causing reflected services to go offline for hours. Changes: - Add avahi_slot_check.sh: stateful syslog scanner with offset+inode tracking, exits non-zero on slot errors for Monit integration - Add healthcheck configd action for manual testing - Extend status.py with slot error summary (today's count, last error timestamp, process start time) in a new health section - Rework dashboard widget: proper BaseTableWidget API usage (getMarkup, createTable, ajaxCall), correct OPNsense CSS badge classes, health and last restart rows promoted to top of widget, PID/memory removed - Fix widget metadata XML structure to match OPNsense conventions (widget wrapper element, filename, endpoints) - Auto-show advanced mode on settings page when reflect_filters has values, so configured filters are visible without manual toggle
Use colored circle indicator with combined status/health line instead of badge labels. Remove uptime row (redundant with last restart). Show reflector as plain text instead of highlighted badge.
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.
Summary
Adds a new plugin that runs avahi-daemon in reflector mode, proxying mDNS/DNS-SD traffic across VLANs for cross-subnet service discovery.
avahi-daemon.confandrc.conf.dfrom model settingsavahi-apppackage (installed automatically)Why a new plugin?
Existing mDNS plugins forward raw multicast packets between interfaces. This works for basic announcement reflection but does not handle full DNS-SD browse/resolve flows or A/AAAA hostname queries. Avahi's built-in reflector mode operates at the protocol level, correctly proxying service discovery and name resolution — which is required for many modern Bonjour-based workflows (e.g., AirPlay, AirPrint, Thread/Matter via Home Assistant).
Test plan
pluginctlavahi-daemonlogs with no reflector errors