summaryrefslogtreecommitdiff
path: root/Assistant/Pairing/Network.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Pairing/Network.hs')
-rw-r--r--Assistant/Pairing/Network.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs
index 7a4ac3ffe..694dcbbcc 100644
--- a/Assistant/Pairing/Network.hs
+++ b/Assistant/Pairing/Network.hs
@@ -33,9 +33,9 @@ pairingPort = 55556
{- 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.251"
-multicastAddress (IPv6Addr _) = "ff02::fb"
+multicastAddress :: AddrClass -> HostName
+multicastAddress IPv4AddrClass = "224.0.0.251"
+multicastAddress IPv6AddrClass = "ff02::fb"
{- Multicasts a message repeatedly on all interfaces, with a 2 second
- delay between each transmission. The message is repeated forever
@@ -62,7 +62,7 @@ multicastPairMsg repeats secret pairdata stage = go M.empty repeats
sendinterface cache i = void $ tryIO $
withSocketsDo $ bracket setup cleanup use
where
- setup = multicastSender (multicastAddress i) pairingPort
+ setup = multicastSender (multicastAddress IPv4AddrClass) pairingPort
cleanup (sock, _) = sClose sock -- FIXME does not work
use (sock, addr) = do
setInterface sock (showAddr i)