From ed457e5f9ebfe9f663472983f762d9cc4c886693 Mon Sep 17 00:00:00 2001 From: Guillaume Valadon Date: Fri, 2 Aug 2013 10:38:38 +0200 Subject: [PATCH] RandIP6() bug: http://thread.gmane.org/gmane.comp.security.scapy.general/4872 --- scapy/volatile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scapy/volatile.py b/scapy/volatile.py index f7dcfbc08..5d3e2adcb 100644 --- a/scapy/volatile.py +++ b/scapy/volatile.py @@ -291,6 +291,8 @@ class RandIP6(RandString): ip.append("%04x" % n) if len(ip) == 9: ip.remove("") + if ip[-1] == "": + ip[-1] = 0 return ":".join(ip) class RandOID(RandString):