diff options
author | Neale Ranns <nranns@cisco.com> | 2020-12-21 13:19:10 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2021-01-18 08:35:52 +0000 |
commit | 4a58e49cfe03150034a65e147a2ffe8d24391b86 (patch) | |
tree | a929278e8a40067c1d103cf75174aa83f334c26e /src/vnet/ipsec/ipsec_handoff.c | |
parent | 20399f8f3a27d54f65c4aff92998a2a345a7adab (diff) |
ipsec: Support MPLS over IPSec[46] interface
Type: feature
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I89dc3815eabfee135cd5b3c910dea5e2e2ef1333
Diffstat (limited to 'src/vnet/ipsec/ipsec_handoff.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_handoff.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec_handoff.c b/src/vnet/ipsec/ipsec_handoff.c index 4446f1e523a..87eb801f76f 100644 --- a/src/vnet/ipsec/ipsec_handoff.c +++ b/src/vnet/ipsec/ipsec_handoff.c @@ -220,6 +220,15 @@ VLIB_NODE_FN (esp6_encrypt_tun_handoff) (vlib_main_t * vm, true); } +VLIB_NODE_FN (esp_mpls_encrypt_tun_handoff) +(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) +{ + ipsec_main_t *im = &ipsec_main; + + return ipsec_handoff (vm, node, from_frame, im->esp_mpls_enc_tun_fq_index, + true); +} + VLIB_NODE_FN (esp4_decrypt_handoff) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) @@ -343,6 +352,18 @@ VLIB_REGISTER_NODE (esp6_encrypt_tun_handoff) = { [0] = "error-drop", }, }; +VLIB_REGISTER_NODE (esp_mpls_encrypt_tun_handoff) = { + .name = "esp-mpls-encrypt-tun-handoff", + .vector_size = sizeof (u32), + .format_trace = format_ipsec_handoff_trace, + .type = VLIB_NODE_TYPE_INTERNAL, + .n_errors = ARRAY_LEN(ipsec_handoff_error_strings), + .error_strings = ipsec_handoff_error_strings, + .n_next_nodes = 1, + .next_nodes = { + [0] = "error-drop", + }, +}; VLIB_REGISTER_NODE (esp4_decrypt_handoff) = { .name = "esp4-decrypt-handoff", .vector_size = sizeof (u32), |