diff options
author | Kingwel Xie <kingwel.xie@ericsson.com> | 2019-03-05 22:56:17 -0500 |
---|---|---|
committer | Kingwel Xie <kingwel.xie@ericsson.com> | 2019-03-05 22:56:17 -0500 |
commit | 561d1caad7ab9b5f75a88d3a71fa2150212eb317 (patch) | |
tree | 45e768fa17bec6c4bcac369af3db99a0f1a0f816 /src/vnet/ipsec/ipsec.c | |
parent | 665581a5de364341c8c924d39dbb54a2bda3715c (diff) |
ipsec: cleanup, remove unnecessary code,
ipsec_proto_main moved to ipsec.c
fix missing '\0' of backend name
Change-Id: I90760b3045973a46792c2f098d9b0b1b3d209ad0
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec.c')
-rw-r--r-- | src/vnet/ipsec/ipsec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c index a512d0094a6..a1d8f09691b 100644 --- a/src/vnet/ipsec/ipsec.c +++ b/src/vnet/ipsec/ipsec.c @@ -26,6 +26,7 @@ #include <vnet/ipsec/ah.h> ipsec_main_t ipsec_main; +ipsec_proto_main_t ipsec_proto_main; static void ipsec_rand_seed (void) @@ -136,7 +137,7 @@ ipsec_register_ah_backend (vlib_main_t * vm, ipsec_main_t * im, { ipsec_ah_backend_t *b; pool_get (im->ah_backends, b); - b->name = format (NULL, "%s", name); + b->name = format (0, "%s%c", name, 0); ipsec_add_node (vm, ah4_encrypt_node_name, "ipsec4-output-feature", &b->ah4_encrypt_node_index, &b->ah4_encrypt_next_index); @@ -164,7 +165,7 @@ ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im, { ipsec_esp_backend_t *b; pool_get (im->esp_backends, b); - b->name = format (NULL, "%s", name); + b->name = format (0, "%s%c", name, 0); ipsec_add_node (vm, esp4_encrypt_node_name, "ipsec4-output-feature", &b->esp4_encrypt_node_index, &b->esp4_encrypt_next_index); |