Open comotion opened 1 year ago
You should read #429 to learn why posting here isn't the right thing to do in the future.
About this specific error, your modification of fetch-variables-over-ipv6.py
matters and must be revealed. Note that socket.inet_pton(socket.AF_INET6, '[fe80::abd:43ff:fe75:bfc5%ens3f0]')
produces the same error, but socket.inet_pton(socket.AF_INET6, 'fe80::abd:43ff:fe75:bfc5%ens3f0')
works flawlessly.
IPv6 link-local addresses are often the only way to reliably find an unconfigured switch.
If I do
snmpwalk [fe80::abd:43ff:fe75:bfc5%ens3f0] -u admin
(MD5, no auth, SNMPv3) I get the expected tree however, if I modify thefetch-variables-over-ipv6.py
example to use this same addres, I getThe immediate problem seems to be that the link-local address is parsed by
inet_pton
, however there is an underlying assumption that IPv6 addresses are just[(p,port,family)
tuples, while the complete struct also includes a "zone info" that indicates the correct interface which must also be passed to thesocket
call and shouldn't be stripped: