diff --git a/scapy/volatile.py b/scapy/volatile.py index dcb704c1c..f7dcfbc08 100644 --- a/scapy/volatile.py +++ b/scapy/volatile.py @@ -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: