From c40ba040a6bd5a69b31b7093702444a07bf9be57 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Mon, 8 Dec 2014 09:53:41 +0100 Subject: [PATCH] Enable IPv6-support in libzmq by default Change-Id: I53790e5492ebf026e0b331ecb3c294da89603540 Closes-Bug: 1389137 --- oslo/messaging/_drivers/impl_zmq.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/oslo/messaging/_drivers/impl_zmq.py b/oslo/messaging/_drivers/impl_zmq.py index e45a39ead..61117bb84 100644 --- a/oslo/messaging/_drivers/impl_zmq.py +++ b/oslo/messaging/_drivers/impl_zmq.py @@ -120,6 +120,12 @@ class ZmqSocket(object): def __init__(self, addr, zmq_type, bind=True, subscribe=None): self.ctxt = zmq.Context(CONF.rpc_zmq_contexts) self.sock = self.ctxt.socket(zmq_type) + + # Enable IPv6-support in libzmq. + # When IPv6 is enabled, a socket will connect to, or accept + # connections from, both IPv4 and IPv6 hosts. + self.sock.ipv6 = True + self.addr = addr self.type = zmq_type self.subscriptions = []