2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Tolerate disabled IPv4 multicast route

Sometimes the IPv4 multicast route isn't playing ball.  Tolerate such
a scenario and move on.
This commit is contained in:
Jarrod Johnson 2018-01-22 11:53:19 -05:00
parent 48b9d735f2
commit 97401e306b

View File

@ -222,7 +222,13 @@ def _find_srvtype(net, net4, srvtype, addresses, xid):
bcast = i4['broadcast']
net4.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF,
socket.inet_aton(addr))
net4.sendto(data, ('239.255.255.253', 427))
try:
net4.sendto(data, ('239.255.255.253', 427))
except socket.error as se:
# On occasion, multicasting may be disabled
# tolerate this scenario and move on
if se.errno != 101:
raise
net4.sendto(data, (bcast, 427))