简体   繁体   English

关于Scapy中IPv6地址的问题

[英]An issue about IPv6 address in Scapy

I'm using scapy in python2.6 and met an issue about the IPv6 address: 我在python2.6中使用scapy并遇到了有关IPv6地址的问题:

from scapy.all import *
p = IPv6(src = '1:0:0:1::1', dst = '2:0:0:2::2')
print p.src, p.dst
p.show()

it seems that scapy replaced every continuation of '0' with '::', the result of the print turned out to be: 似乎scapy用'::'替换了每个'0'的延续,结果印刷结果是:

1::1::1 2::2::2

and the p.show() part raised an exception complaining illegal syntax for IP address. 并且p.show()部分引发了一个异常,抱怨IP地址的非法语法。

Is this a problem unsolved in scapy or are there some configuration not right in scapy? 这是一个在scapy中没有解决的问题,还是有些配置不适合scapy? thx in advance. thx提前。

I'm having the same issue on my Fedora 26 installation. 我在Fedora 26安装上遇到了同样的问题。 After some searching in the github issue-list of the scapy project. 在scapy项目的github问题列表中进行了一些搜索之后。 I've discovered following bug-reports and fixes: 我发现了以下错误报告和修复:

Bugreport: Zero block in IPv6 route prefix misinterpreted #359 Bugreport:IPv6路由前缀中的零块错误解释了#359

changeset 1 (note: for linux/unix only ) changeset 1 (注意:仅适用于linux / unix)

changeset 2 (note: for windows and linux/unix ) changeset 2 (注意:对于windows和linux / unix)

These changes were made in Dec 16/Jan 17. Version 2.3.3 dates from oct 2016. So when 2.3.4 is released, they will contain these 2 fixes. 这些更改是在12月16日/ 1月17日进行的。版本2.3.3的日期是2016年10月。因此,当2.3.4发布时,它们将包含这2个修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM