changed
CHANGELOG.md
|
@@ -2,6 +2,13 @@
|
2
2
|
|
3
3
|
This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
4
|
|
5
|
+ ## v0.8.9 - 2024-02-02
|
6
|
+
|
7
|
+ * Bug fixes
|
8
|
+ * Switch bridge recursive lookup to default to false. The issue that this
|
9
|
+ works around has been fixed since OTP 24.1.
|
10
|
+ * Handle crash when cleaning up responders when a network goes down.
|
11
|
+
|
5
12
|
## v0.8.8 - 2023-05-26
|
6
13
|
|
7
14
|
* New feature
|
changed
README.md
|
@@ -139,8 +139,7 @@ environment:
|
139
139
|
config :mdns_lite,
|
140
140
|
dns_bridge_enabled: true,
|
141
141
|
dns_bridge_ip: {127, 0, 0, 53},
|
142
|
- dns_bridge_port: 53,
|
143
|
- dns_bridge_recursive: true
|
142
|
+ dns_bridge_port: 53
|
144
143
|
|
145
144
|
config :vintage_net,
|
146
145
|
additional_name_servers: [{127, 0, 0, 53}]
|
|
@@ -149,15 +148,11 @@ config :vintage_net,
|
149
148
|
The choice of running the DNS bridge on 127.0.0.53:53 is mostly arbitrary. This
|
150
149
|
is the default.
|
151
150
|
|
152
|
- There is an issue on Nerves and Linux that you may hit if the `:mdns_lite`
|
153
|
- application is not running. The Erlang DNS resolver calls `connect` to the IP
|
154
|
- address of the DNS server and then calls `connect` again to the next one. The
|
155
|
- second `connect` call fails when the first one is a `127.0.0.x` address. See
|
156
|
- [Issue 5092](https://github.com/erlang/otp/issues/5092). Setting
|
157
|
- `dns_bridge_recursive: true` works around this issue.
|
158
|
-
|
159
|
- Update: Issue 5092 has been fixed in Erlang/OTP 24.1 and you can safely use
|
160
|
- `dns_bridge_recursive: false` in that version or later.
|
151
|
+ > #### Info {: .info}
|
152
|
+ >
|
153
|
+ > If you're using a version of Erlang/OTP before 24.1, you'll be affected by
|
154
|
+ > [OTP #5092](https://github.com/erlang/otp/issues/5092). The workaround is to
|
155
|
+ > add the `dns_bridge_recursive: true` option to the `:mdns_lite` config.
|
161
156
|
|
162
157
|
## Debugging
|
changed
hex_metadata.config
|
@@ -1,7 +1,7 @@
|
1
1
|
{<<"links">>,
|
2
2
|
[{<<"GitHub">>,<<"https://github.com/nerves-networking/mdns_lite">>}]}.
|
3
3
|
{<<"name">>,<<"mdns_lite">>}.
|
4
|
- {<<"version">>,<<"0.8.8">>}.
|
4
|
+ {<<"version">>,<<"0.8.9">>}.
|
5
5
|
{<<"description">>,<<"A simple, no frills mDNS implementation in Elixir">>}.
|
6
6
|
{<<"elixir">>,<<"~> 1.11">>}.
|
7
7
|
{<<"app">>,<<"mdns_lite">>}.
|
|
@@ -13,19 +13,19 @@
|
13
13
|
{<<"requirement">>,<<"~> 0.7">>},
|
14
14
|
{<<"repository">>,<<"hexpm">>}]]}.
|
15
15
|
{<<"files">>,
|
16
|
- [<<"lib">>,<<"lib/mdns_lite">>,<<"lib/mdns_lite/options.ex">>,
|
17
|
- <<"lib/mdns_lite/dns.ex">>,<<"lib/mdns_lite/table">>,
|
18
|
- <<"lib/mdns_lite/table/builder.ex">>,<<"lib/mdns_lite/application.ex">>,
|
19
|
- <<"lib/mdns_lite/table_server.ex">>,<<"lib/mdns_lite/info.ex">>,
|
20
|
- <<"lib/mdns_lite/utilities.ex">>,<<"lib/mdns_lite/vintage_net_monitor.ex">>,
|
21
|
- <<"lib/mdns_lite/table.ex">>,<<"lib/mdns_lite/dns_bridge.ex">>,
|
22
|
- <<"lib/mdns_lite/core_monitor.ex">>,<<"lib/mdns_lite/inet_monitor.ex">>,
|
23
|
- <<"lib/mdns_lite/client.ex">>,<<"lib/mdns_lite/if_info.ex">>,
|
24
|
- <<"lib/mdns_lite/responder.ex">>,<<"lib/mdns_lite/cache.ex">>,
|
25
|
- <<"lib/mdns_lite/responder_supervisor.ex">>,<<"lib/mdns_lite.ex">>,
|
16
|
+ [<<"lib">>,<<"lib/mdns_lite">>,<<"lib/mdns_lite/cache.ex">>,
|
17
|
+ <<"lib/mdns_lite/if_info.ex">>,<<"lib/mdns_lite/application.ex">>,
|
18
|
+ <<"lib/mdns_lite/client.ex">>,<<"lib/mdns_lite/core_monitor.ex">>,
|
19
|
+ <<"lib/mdns_lite/responder_supervisor.ex">>,<<"lib/mdns_lite/options.ex">>,
|
20
|
+ <<"lib/mdns_lite/table_server.ex">>,<<"lib/mdns_lite/table.ex">>,
|
21
|
+ <<"lib/mdns_lite/vintage_net_monitor.ex">>,<<"lib/mdns_lite/info.ex">>,
|
22
|
+ <<"lib/mdns_lite/inet_monitor.ex">>,<<"lib/mdns_lite/dns_bridge.ex">>,
|
23
|
+ <<"lib/mdns_lite/table">>,<<"lib/mdns_lite/table/builder.ex">>,
|
24
|
+ <<"lib/mdns_lite/dns.ex">>,<<"lib/mdns_lite/utilities.ex">>,
|
25
|
+ <<"lib/mdns_lite/responder.ex">>,<<"lib/mdns_lite.ex">>,
|
26
26
|
<<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE">>,
|
27
|
- <<"CHANGELOG.md">>,<<"src">>,<<"src/mdns_lite_inet_dns.hrl">>,
|
28
|
- <<"src/mdns_lite_inet_int.hrl">>,
|
27
|
+ <<"CHANGELOG.md">>,<<"src">>,<<"src/mdns_lite_inet_int.hrl">>,
|
28
|
+ <<"src/mdns_lite_inet_dns.hrl">>,
|
29
29
|
<<"src/mdns_lite_inet_dns_record_adts.hrl">>,
|
30
30
|
<<"src/mdns_lite_inet_dns.erl">>]}.
|
31
31
|
{<<"build_tools">>,[<<"mix">>]}.
|
changed
lib/mdns_lite/options.ex
|
@@ -85,7 +85,7 @@ defmodule MdnsLite.Options do
|
85
85
|
dns_bridge_enabled: false,
|
86
86
|
dns_bridge_ip: @default_dns_ip,
|
87
87
|
dns_bridge_port: @default_dns_port,
|
88
|
- dns_bridge_recursive: true,
|
88
|
+ dns_bridge_recursive: false,
|
89
89
|
if_monitor: nil,
|
90
90
|
excluded_ifnames: @default_excluded_ifnames,
|
91
91
|
ipv4_only: @default_ipv4_only
|
|
@@ -118,7 +118,7 @@ defmodule MdnsLite.Options do
|
118
118
|
dns_bridge_enabled = Map.get(opts, :dns_bridge_enabled, false)
|
119
119
|
dns_bridge_ip = Map.get(opts, :dns_bridge_ip, @default_dns_ip)
|
120
120
|
dns_bridge_port = Map.get(opts, :dns_bridge_port, @default_dns_port)
|
121
|
- dns_bridge_recursive = Map.get(opts, :dns_bridge_recursive, true)
|
121
|
+ dns_bridge_recursive = Map.get(opts, :dns_bridge_recursive, false)
|
122
122
|
if_monitor = Map.get(opts, :if_monitor, default_if_monitor())
|
123
123
|
ipv4_only = Map.get(opts, :ipv4_only, @default_ipv4_only)
|
124
124
|
excluded_ifnames = Map.get(opts, :excluded_ifnames, @default_excluded_ifnames)
|
changed
lib/mdns_lite/responder.ex
|
@@ -89,6 +89,11 @@ defmodule MdnsLite.Responder do
|
89
89
|
@spec stop_server(String.t(), :inet.ip_address()) :: :ok
|
90
90
|
def stop_server(ifname, address) do
|
91
91
|
GenServer.stop(via_name({ifname, address}))
|
92
|
+ catch
|
93
|
+ {:exit, {:noproc, _}} ->
|
94
|
+ # Ignore if the server already stopped. It already exited due to the
|
95
|
+ # network going down.
|
96
|
+ :ok
|
92
97
|
end
|
93
98
|
|
94
99
|
##############################################################################
|
changed
mix.exs
|
@@ -1,7 +1,7 @@
|
1
1
|
defmodule MdnsLite.MixProject do
|
2
2
|
use Mix.Project
|
3
3
|
|
4
|
- @version "0.8.8"
|
4
|
+ @version "0.8.9"
|
5
5
|
@source_url "https://github.com/nerves-networking/mdns_lite"
|
6
6
|
|
7
7
|
def project do
|