From 72956078150c44731a4373edbd20e73da8be7744 Mon Sep 17 00:00:00 2001 From: drbrain Date: Sat, 4 Jan 2014 01:18:20 +0000 Subject: [PATCH] * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use ipv4_multicast_ttl option for portability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/rinda/ring.rb | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23c390bded..088d58c866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 4 10:17:54 2014 Eric Hodel + + * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use + ipv4_multicast_ttl option for portability. + Sat Jan 4 10:15:47 2014 Eric Hodel * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use diff --git a/lib/rinda/ring.rb b/lib/rinda/ring.rb index 4e9efadc35..2c29977d11 100644 --- a/lib/rinda/ring.rb +++ b/lib/rinda/ring.rb @@ -414,8 +414,7 @@ module Rinda if addrinfo.ipv4_multicast? then soc.setsockopt(Socket::Option.ipv4_multicast_loop(1)) - soc.setsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL, - [@multicast_hops].pack('c')) + soc.setsockopt(Socket::Option.ipv4_multicast_ttl(@multicast_hops)) elsif addrinfo.ipv6_multicast? then soc.setsockopt(:IPPROTO_IPV6, :IPV6_MULTICAST_LOOP, true) soc.setsockopt(:IPPROTO_IPV6, :IPV6_MULTICAST_HOPS,