summaryrefslogtreecommitdiff
path: root/pysnmp/carrier/asyncore/dgram/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/carrier/asyncore/dgram/base.py')
-rw-r--r--pysnmp/carrier/asyncore/dgram/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pysnmp/carrier/asyncore/dgram/base.py b/pysnmp/carrier/asyncore/dgram/base.py
index d38f3080..f72fe57c 100644
--- a/pysnmp/carrier/asyncore/dgram/base.py
+++ b/pysnmp/carrier/asyncore/dgram/base.py
@@ -78,7 +78,7 @@ class DgramSocketTransport(AbstractSocketTransport):
if self.socket.family == socket.AF_INET6:
self.socket.setsockopt(socket.SOL_IPV6, socket.IPV6_RECVPKTINFO, flag)
- self.socket.setsockopt(socket.SOL_IPV6, socket.IPV6_V6ONLY, not flag)
+ self.socket.setsockopt(socket.SOL_IPV6, socket.IPV6_V6ONLY, int(not flag))
except socket.error:
raise error.CarrierError('setsockopt() for %s failed: %s' % (self.socket.family == socket.AF_INET6 and "IPV6_RECVPKTINFO" or "IP_PKTINFO", sys.exc_info()[1]))