summaryrefslogtreecommitdiff
path: root/pysnmp
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-01-14 23:02:01 +0100
committerIlya Etingof <etingof@gmail.com>2019-02-07 09:39:58 +0100
commitf31d8923d5343c167448738d0803407e3272c198 (patch)
tree2c1d91752b3304bc614201a507e1e2910a20527f /pysnmp
parent41637896e2644030cd616f6fd55ff575f86a304a (diff)
downloadpysnmp-git-f31d8923d5343c167448738d0803407e3272c198.tar.gz
Fix IPV6_TRANSPARENT socket option
Diffstat (limited to 'pysnmp')
-rw-r--r--pysnmp/carrier/asyncore/dgram/base.py2
-rw-r--r--pysnmp/carrier/sockfix.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/pysnmp/carrier/asyncore/dgram/base.py b/pysnmp/carrier/asyncore/dgram/base.py
index f6ebbbe9..95b24222 100644
--- a/pysnmp/carrier/asyncore/dgram/base.py
+++ b/pysnmp/carrier/asyncore/dgram/base.py
@@ -96,7 +96,7 @@ class DgramSocketTransport(AbstractSocketTransport):
)
if self.socket.family == socket.AF_INET6:
self.socket.setsockopt(
- socket.SOL_IPV6, socket.IP_TRANSPARENT, flag
+ socket.SOL_IPV6, socket.IPV6_TRANSPARENT, flag
)
except socket.error:
diff --git a/pysnmp/carrier/sockfix.py b/pysnmp/carrier/sockfix.py
index 02480bb2..fab6d1aa 100644
--- a/pysnmp/carrier/sockfix.py
+++ b/pysnmp/carrier/sockfix.py
@@ -14,7 +14,8 @@ SYMBOLS = {
'IP_TRANSPARENT': 19,
'SOL_IPV6': 41,
'IPV6_RECVPKTINFO': 49,
- 'IPV6_PKTINFO': 50
+ 'IPV6_PKTINFO': 50,
+ 'IPV6_TRANSPARENT': 75
}
for symbol, value in SYMBOLS.items():