diff options
author | Neale Ranns <neale@graphiant.com> | 2021-02-04 11:09:33 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2021-02-08 19:37:28 +0000 |
commit | c7eaa711f3e25580687df0618e9ca80d3dc85e5f (patch) | |
tree | 0871a2a166c46c3dc2a50bdc635de1a2a6cbc2b3 /src/vnet/ipsec/ipsec_tun.c | |
parent | 4c71d6c8f84d48754a8ead116f223088b85f587c (diff) |
ipsec: Use the new tunnel API types to add flow label and TTL copy
support
Type: feature
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I6d4a9b187daa725d4b2cbb66e11616802d44d2d3
Diffstat (limited to 'src/vnet/ipsec/ipsec_tun.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_tun.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index 63e063fcee3..74340256f38 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -470,13 +470,13 @@ ipsec_tun_protect_set_crypto_addr (ipsec_tun_protect_t * itp) ({ if (ipsec_sa_is_set_IS_TUNNEL (sa)) { - itp->itp_crypto.src = sa->tunnel_dst_addr; - itp->itp_crypto.dst = sa->tunnel_src_addr; - if (!(itp->itp_flags & IPSEC_PROTECT_ITF)) - { - ipsec_sa_set_IS_PROTECT (sa); - itp->itp_flags |= IPSEC_PROTECT_ENCAPED; - } + itp->itp_crypto.src = ip_addr_46 (&sa->tunnel.t_dst); + itp->itp_crypto.dst = ip_addr_46 (&sa->tunnel.t_src); + if (!(itp->itp_flags & IPSEC_PROTECT_ITF)) + { + ipsec_sa_set_IS_PROTECT (sa); + itp->itp_flags |= IPSEC_PROTECT_ENCAPED; + } } else { |