mirror of https://github.com/secdev/scapy.git
Issue #588: RandIP6() returns an invalid IPv6 address when zeros are present in template
This commit is contained in:
parent
02ebc34fda
commit
67db066a99
|
@ -283,6 +283,8 @@ class RandIP6(RandString):
|
|||
remain = random.randint(0,remain)
|
||||
for j in range(remain):
|
||||
ip.append("%04x" % random.randint(0,65535))
|
||||
if n == 0:
|
||||
ip.append("0")
|
||||
elif not n:
|
||||
ip.append("")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue