diff options
author | Neale Ranns <nranns@cisco.com> | 2019-02-13 02:08:06 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-02-13 02:08:06 -0800 |
commit | b4cfd55f25cb87acff732fc40633d055cfedd816 (patch) | |
tree | 4bd0ce349148f944f106236077f0f6596a994398 /src/vnet/ipsec/ipsec.c | |
parent | 6fef74ad3083f630648eae65545a0dd46af1102e (diff) |
IPSEC: restack SAs on backend change
Change-Id: I5852ca02d684fa9d59e1690efcaca06371c5faff
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec.c')
-rw-r--r-- | src/vnet/ipsec/ipsec.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c index e88a72e8bac..0ad11ba842e 100644 --- a/src/vnet/ipsec/ipsec.c +++ b/src/vnet/ipsec/ipsec.c @@ -181,6 +181,14 @@ ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im, return b - im->esp_backends; } +static walk_rc_t +ipsec_sa_restack (ipsec_sa_t * sa, void *ctx) +{ + ipsec_sa_stack (sa); + + return (WALK_CONTINUE); +} + int ipsec_select_ah_backend (ipsec_main_t * im, u32 backend_idx) { @@ -199,6 +207,8 @@ ipsec_select_ah_backend (ipsec_main_t * im, u32 backend_idx) im->ah6_decrypt_node_index = b->ah6_decrypt_node_index; im->ah6_encrypt_next_index = b->ah6_encrypt_next_index; im->ah6_decrypt_next_index = b->ah6_decrypt_next_index; + + ipsec_sa_walk (ipsec_sa_restack, NULL); return 0; } @@ -220,6 +230,8 @@ ipsec_select_esp_backend (ipsec_main_t * im, u32 backend_idx) im->esp6_decrypt_node_index = b->esp6_decrypt_node_index; im->esp6_encrypt_next_index = b->esp6_encrypt_next_index; im->esp6_decrypt_next_index = b->esp6_decrypt_next_index; + + ipsec_sa_walk (ipsec_sa_restack, NULL); return 0; } |