diff options
Diffstat (limited to 'pysnmp/carrier/asyncore/dgram/base.py')
-rw-r--r-- | pysnmp/carrier/asyncore/dgram/base.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pysnmp/carrier/asyncore/dgram/base.py b/pysnmp/carrier/asyncore/dgram/base.py index 573e6f56..378974e6 100644 --- a/pysnmp/carrier/asyncore/dgram/base.py +++ b/pysnmp/carrier/asyncore/dgram/base.py @@ -78,6 +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) 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])) |