From bf4c2e8a58852cdb2e1d153fc951c481a23c9488 Mon Sep 17 00:00:00 2001 From: Pierre LALET <pierre.lalet@cea.fr> Date: Mon, 1 Feb 2016 20:17:30 +0100 Subject: [PATCH] Fix ipsec for Python 2.5 (fractions module does not exist) --- scapy/layers/ipsec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/layers/ipsec.py b/scapy/layers/ipsec.py index 588ac42d..f45fa49c 100644 --- a/scapy/layers/ipsec.py +++ b/scapy/layers/ipsec.py @@ -40,7 +40,7 @@ True """ import socket -import fractions +from Crypto.Util.number import GCD as gcd from scapy.data import IP_PROTOS @@ -162,7 +162,7 @@ def _lcm(a, b): if a == 0 or b == 0: return 0 else: - return abs(a * b) // fractions.gcd(a, b) + return abs(a * b) / gcd(a, b) class CryptAlgo(object): """ -- GitLab