From 45089d8f8e316bba70a7a89284bc6c8761ccfdff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Oct 2012 15:50:30 -0400 Subject: webapp: Switched to using the same multicast IP address that avahi uses. --- Assistant/Pairing/Network.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Assistant') diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs index a6289c035..73de9c760 100644 --- a/Assistant/Pairing/Network.hs +++ b/Assistant/Pairing/Network.hs @@ -31,11 +31,12 @@ import Control.Concurrent pairingPort :: PortNumber pairingPort = 55556 -{- This is the All Hosts multicast group, which should reach all hosts - - on the same network segment. -} +{- Goal: Reach all hosts on the same network segment. + - Method: Use same address that avahi uses. Other broadcast addresses seem + - to not be let through some routers. -} multicastAddress :: SomeAddr -> HostName -multicastAddress (IPv4Addr _) = "224.0.0.1" -multicastAddress (IPv6Addr _) = "ff02::1" +multicastAddress (IPv4Addr _) = "224.0.0.251" +multicastAddress (IPv6Addr _) = "ff02::fb" {- Multicasts a message repeatedly on all interfaces, with a 2 second - delay between each transmission. The message is repeated forever -- cgit v1.2.3