diff options
author | Neale Ranns <nranns@cisco.com> | 2020-01-02 04:06:10 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-11-02 08:49:08 +0000 |
commit | 041add7d12217494934b651e4e38b5eab5216ddc (patch) | |
tree | 42f6ed8c3e4477b7c7cf93b19f227e4fc0afb4cb /test/template_ipsec.py | |
parent | 62877029aac3e05a1e1db579aeaad42bca5a70a4 (diff) |
ipsec: Tunnel SA DSCP behaviour
Type: feature
- use tunnel_encap_decap_flags to control the copying of DSCP/ECN/etc
during IPSEC tunnel mode encap.
- use DSCP value to have fixed encap value.
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: If4f51fd4c1dcbb0422aac9bd078e5c14af5bf11f
Diffstat (limited to 'test/template_ipsec.py')
-rw-r--r-- | test/template_ipsec.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/template_ipsec.py b/test/template_ipsec.py index 532a7a0a189..7bd0b9ec81f 100644 --- a/test/template_ipsec.py +++ b/test/template_ipsec.py @@ -49,6 +49,9 @@ class IPsecIPv4Params(object): self.salt = 0 self.flags = 0 self.nat_header = None + self.tun_flags = (VppEnum.vl_api_tunnel_encap_decap_flags_t. + TUNNEL_API_ENCAP_DECAP_FLAG_NONE) + self.dscp = 0 class IPsecIPv6Params(object): @@ -85,6 +88,9 @@ class IPsecIPv6Params(object): self.salt = 0 self.flags = 0 self.nat_header = None + self.tun_flags = (VppEnum.vl_api_tunnel_encap_decap_flags_t. + TUNNEL_API_ENCAP_DECAP_FLAG_NONE) + self.dscp = 0 def mk_scapy_crypt_key(p): @@ -181,8 +187,10 @@ class TemplateIpsec(VppTestCase): super(TemplateIpsec, cls).tearDownClass() def setup_params(self): - self.ipv4_params = IPsecIPv4Params() - self.ipv6_params = IPsecIPv6Params() + if not hasattr(self, 'ipv4_params'): + self.ipv4_params = IPsecIPv4Params() + if not hasattr(self, 'ipv6_params'): + self.ipv6_params = IPsecIPv6Params() self.params = {self.ipv4_params.addr_type: self.ipv4_params, self.ipv6_params.addr_type: self.ipv6_params} |