parse: remove ipaddr dependency
diff --git a/src/python/oftest/parse.py b/src/python/oftest/parse.py
index 385e21d..8c98c91 100644
--- a/src/python/oftest/parse.py
+++ b/src/python/oftest/parse.py
@@ -3,6 +3,7 @@
"""
import sys
+import socket
try:
import scapy.all as scapy
except:
@@ -44,8 +45,7 @@
Parse a textual IPv6 address and return a 16 byte binary string.
"""
- import ipaddr # TODO remove dependency on ipaddr?
- return str(ipaddr.IPv6Address(ip_str).packed)
+ return socket.inet_pton(socket.AF_INET6, ip_str)
def packet_type_classify(ether):
try: