Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.5.0 - 2026-09-07
Added
Publish DNS-SD services with
Madness.publish/2and withdraw them withMadness.unpublish/1. Publications follow an owner process, support conflict renaming and lifecycle notifications, and are withdrawn when their owner exits. Publishing has a caller-defined timeout; daemon connection loss and terminal Avahi failures end the affected publication so it can be monitored and published again explicitly.Publish through Avahi on Linux or Apple's mDNSResponder daemon. Automatic backend selection detects a reachable daemon and reconnects after it restarts. The required
rebusdependency provides Avahi's D-Bus transport.Restrict publications by interface, with address-family scoping on Avahi. Interface-scoped publishing requires the optional
inertialdependency and terminates the publication if its interface disappears or observation loses continuity.
Fixed
- Decode records carrying the mDNS cache-flush bit with the
:inclass. - Encode fully-qualified query names correctly and reject invalid DNS name lengths.
- Receive multicast replies when
unicast_response: falseand ignore packets sent from a source port other than 5353. - Keep concurrent stream queries from consuming one another's UDP messages, and release message-mode sockets when their caller exits.
- Select numeric interfaces by OS index and reject reserved publication index zero.
- Drop malformed NSEC records and records whose data does not match their declared type.
0.4.2 - 2026-02-20
Changed
GitLab build components - CI component includes now target
1.4.0across deps, compile, test, format, credo, dialyzer, and publish jobs.
0.4.1 - 2026-02-20
Changed
Internal publishing process - Release publishing now uses
mix publishodirectly. The previousexpublishdependency and custommix publishalias-based wrapper have been removed.
0.4.0 - 2026-02-16
Add source IP to response metadata
Added
- Source IP in response metadata - Each record's metadata now includes a
:source_ipfield containing the IP address of the host that sent the mDNS response. This is an:inet.ip_address()tuple (e.g.,{192, 168, 1, 100}for IPv4 or{0x2001, 0xdb8, 0, 0, 0, 0, 0, 1}for IPv6). Available viarecord.metadata.source_ip.
0.3.3 - 2026-02-11
Fix IPv6 multicast interface option on Linux
Fixed
- IPv6 multicast now works on Linux - The
IPV6_MULTICAST_IFsocket option number differs between platforms (9 on macOS, 17 on Linux). The option is now determined at runtime based on the OS. Unsupported platforms will raise aFunctionClauseError.
0.3.2 - 2026-02-11
Fix late UDP packets leaking into caller's mailbox
Fixed
- Stream mode now properly cleans up sockets - When using
Madness.request/2in stream mode (the default), sockets are owned by the caller process. Late UDP packets could remain in the caller's mailbox as orphaned{:udp, ...}messages after the request completed. The cleanup function now sets sockets to passive mode before draining pending messages, eliminating the race window between draining and closing.
0.3.1 - 2026-02-11
Fix late UDP packets leaking into caller's mailbox
Fixed
- Stream mode now drains pending UDP messages on cleanup - When using
Madness.request/2in stream mode (the default), sockets are owned by the caller process. If UDP packets arrived between the lastset_activecall and stream termination, they would remain in the caller's mailbox as orphaned{:udp, socket, ip, port, data}messages. These could cause unexpected behavior in GenServers or other OTP processes. The cleanup function now drains any pending UDP messages before closing sockets.
0.3.0 - 2026-02-03
Fix IPv6 mDNS queries
Fixed
Link-local IPv6 addresses now allowed for mDNS - Previously, link-local addresses (fe80::) were filtered out, but they are required for IPv6 mDNS since the multicast address ff02::fb is link-local scope.
PTR queries no longer return immediately with no results - PTR queries are excluded from the pending questions set since we don't know how many responses to expect. However, an empty pending set was incorrectly causing immediate exit. Now PTR-only queries correctly wait for the full timeout.
0.2.1 - 2026-01-30
Added
- GitLab CI pipeline with deps, compile, test, format, credo, and dialyzer stages
- Credo for static code analysis
- Dialyxir for type checking
- ExCoveralls for test coverage reporting
Changed
- Refactored deeply nested functions across lib and test files to satisfy Credo checks
- Replaced
length/1 > 0with empty list comparison for performance - Added underscores to large numeric literals for readability
0.2.0 - 2026-01-29
Changed
- Default
:familyoption from:inetto:any, sending mDNS queries over both IPv4 and IPv6 - Minimum Elixir version from ~> 1.19 to ~> 1.18
Added
:anyvalue for the:familyoption, which resolves interfaces and opens sockets for both address families- IPv6 mDNS demo script (
scripts/demo_ipv6.exs)
0.1.1 - 2026-01-28
- Initial release
Madness.request/2for sending mDNS queries- Stream and message response modes
- IPv4 and IPv6 multicast support
- Automatic parsing of A, AAAA, PTR, SRV, TXT, CNAME, NS, MX, SOA, NSEC records
- Additional section records included in responses
- NSEC record support for early query termination
- Unicast response flag (QU bit) support
- Multi-interface support with efficient active mode sockets