summaryrefslogtreecommitdiffstats
path: root/test/test_ipsec_tun_if_esp.py
diff options
context:
space:
mode:
authorsnaramre <snaramre@cisco.com>2019-12-13 23:39:35 +0000
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-12-14 22:14:12 +0000
commit5d4b8912d2fe186b4fb920a72b3a2f7b556f4e7d (patch)
tree4530f71a783679e3566ed501471cbad481c128d7 /test/test_ipsec_tun_if_esp.py
parentaa72578637e2a346ee845545b2e26aad83e12192 (diff)
tests: changes for scapy 2.4.3 migration
Type: fix Change-Id: I7e041b666dabd90df23a920a1f1d99db4c10ddfe Signed-off-by: snaramre <snaramre@cisco.com>
Diffstat (limited to 'test/test_ipsec_tun_if_esp.py')
-rw-r--r--test/test_ipsec_tun_if_esp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py
index 589fb10d740..3e578fabaf9 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -3,7 +3,8 @@ import socket
import copy
from scapy.layers.ipsec import SecurityAssociation, ESP
-from scapy.layers.l2 import Ether, Raw, GRE
+from scapy.layers.l2 import Ether, GRE
+from scapy.packet import Raw
from scapy.layers.inet import IP, UDP
from scapy.layers.inet6 import IPv6
from framework import VppTestRunner
@@ -21,8 +22,8 @@ from vpp_papi import VppEnum
def config_tun_params(p, encryption_type, tun_if):
ip_class_by_addr_type = {socket.AF_INET: IP, socket.AF_INET6: IPv6}
- use_esn = bool(p.flags & (VppEnum.vl_api_ipsec_sad_flags_t.
- IPSEC_API_SAD_FLAG_USE_ESN))
+ esn_en = bool(p.flags & (VppEnum.vl_api_ipsec_sad_flags_t.
+ IPSEC_API_SAD_FLAG_USE_ESN))
crypt_key = mk_scapy_crypt_key(p)
p.scapy_tun_sa = SecurityAssociation(
encryption_type, spi=p.vpp_tun_spi,
@@ -33,7 +34,7 @@ def config_tun_params(p, encryption_type, tun_if):
src=tun_if.remote_ip,
dst=tun_if.local_ip),
nat_t_header=p.nat_header,
- use_esn=use_esn)
+ esn_en=esn_en)
p.vpp_tun_sa = SecurityAssociation(
encryption_type, spi=p.scapy_tun_spi,
crypt_algo=p.crypt_algo,
@@ -43,7 +44,7 @@ def config_tun_params(p, encryption_type, tun_if):
dst=tun_if.remote_ip,
src=tun_if.local_ip),
nat_t_header=p.nat_header,
- use_esn=use_esn)
+ esn_en=esn_en)
class TemplateIpsec4TunIfEsp(TemplateIpsec):