Skip to content

Commit 2711656

Browse files
authored
Add_membership should use the supplied if address. (#165)
1 parent 74c96a0 commit 2711656

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
- Clustering strategy for the Rancher container platform (see: https://github.com/rancher/rancher)
1919
- LocalEpmd strategy that uses epmd to discover nodes on the local host
20+
- Gossip strategy multicast interface is used for adding multicast membership
2021

2122
## 2.0.0
2223

lib/strategy/gossip.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,15 @@ defmodule Cluster.Strategy.Gossip do
103103
[
104104
multicast_if: sanitize_ip(multicast_if),
105105
multicast_ttl: ttl,
106-
multicast_loop: true
106+
multicast_loop: true,
107+
add_membership: {multicast_addr, sanitize_ip(multicast_if)}
107108
]
108109

109110
:else ->
110111
[
111112
multicast_ttl: ttl,
112-
multicast_loop: true
113+
multicast_loop: true,
114+
add_membership: {multicast_addr, {0, 0, 0, 0}}
113115
]
114116
end
115117

@@ -120,7 +122,6 @@ defmodule Cluster.Strategy.Gossip do
120122
ip: ip,
121123
reuseaddr: true,
122124
broadcast: true,
123-
add_membership: {multicast_addr, {0, 0, 0, 0}}
124125
] ++ multicast_opts ++ reuse_port()
125126

126127
{:ok, socket} = :gen_udp.open(port, options)

0 commit comments

Comments
 (0)