summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-01-14 23:02:01 +0100
committerIlya Etingof <etingof@gmail.com>2019-01-14 23:02:01 +0100
commitfbaa6da636c20fb71e5af28eee9dba5133f0d42c (patch)
tree98d86bdd429cf5a773c3b0ede5d93d2f88943e48
parent1f52f82d7434e709d4663d8f295a4eac948ac5bd (diff)
downloadpysnmp-git-fbaa6da636c20fb71e5af28eee9dba5133f0d42c.tar.gz
Fix IPV6_TRANSPARENT socket option
-rw-r--r--CHANGES.txt2
-rw-r--r--pysnmp/carrier/asyncore/dgram/base.py2
-rw-r--r--pysnmp/carrier/sockfix.py3
3 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 4ffcf25b..7f7e7618 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ Revision 4.4.9, released 2019-01-XX
- Made MIB loader ignoring file and directory access errors
- Fixed crash on MIB load failure in case of directory access error
+- Fixed socket transparency option (IPV6_TRANSPARENT)to make IPv6
+ transparent operation functional
Revision 4.4.8, released 2018-12-30
-----------------------------------
diff --git a/pysnmp/carrier/asyncore/dgram/base.py b/pysnmp/carrier/asyncore/dgram/base.py
index 3e9ea129..5b0faab2 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():