mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 20:27:45 +00:00
Fix IPv4 operations where v6only behavior is default
Some configurations disable dual stack sockets. For example if net.ipv6.bindv6only is 1 in linux, pyghmi was failing. Address by explicitly requesting the converse behavior on the socket since we explicitly do want to not care whether a particular socket is engaged in ipv4 or ipv6 activity. Change-Id: I17a16f0ebe4752ca743f115af39a367670691507
This commit is contained in:
parent
8c66abb200
commit
37bfae70c4
@ -287,6 +287,7 @@ class Session(object):
|
||||
tmpsocket = _io_apply(socket.socket,
|
||||
(socket.AF_INET6, socket.SOCK_DGRAM)) # INET6
|
||||
# can do IPv4 if you are nice to it
|
||||
tmpsocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
|
||||
self.socketpool[tmpsocket] = 1
|
||||
iosockets.append(tmpsocket)
|
||||
return tmpsocket
|
||||
|
Loading…
x
Reference in New Issue
Block a user