Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tests: changes for scapy 2.4.3 migration
[vpp.git]
/
test
/
test_ipsec_tun_if_esp.py
diff --git
a/test/test_ipsec_tun_if_esp.py
b/test/test_ipsec_tun_if_esp.py
index
589fb10
..
3e578fa
100644
(file)
--- 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
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
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}
def config_tun_params(p, encryption_type, tun_if):
ip_class_by_addr_type = {socket.AF_INET: IP, socket.AF_INET6: IPv6}
-
use_es
n = bool(p.flags & (VppEnum.vl_api_ipsec_sad_flags_t.
-
IPSEC_API_SAD_FLAG_USE_ESN))
+
esn_e
n = 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,
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,
src=tun_if.remote_ip,
dst=tun_if.local_ip),
nat_t_header=p.nat_header,
-
use_esn=use_es
n)
+
esn_en=esn_e
n)
p.vpp_tun_sa = SecurityAssociation(
encryption_type, spi=p.scapy_tun_spi,
crypt_algo=p.crypt_algo,
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,
dst=tun_if.remote_ip,
src=tun_if.local_ip),
nat_t_header=p.nat_header,
-
use_esn=use_es
n)
+
esn_en=esn_e
n)
class TemplateIpsec4TunIfEsp(TemplateIpsec):
class TemplateIpsec4TunIfEsp(TemplateIpsec):