aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec')
-rw-r--r--src/vnet/ipsec/ipsec.c20
-rw-r--r--src/vnet/ipsec/ipsec_api.c12
-rw-r--r--src/vnet/ipsec/ipsec_cli.c20
-rw-r--r--src/vnet/ipsec/ipsec_itf.c6
-rw-r--r--src/vnet/ipsec/ipsec_sa.c6
-rw-r--r--src/vnet/ipsec/ipsec_tun.c6
6 files changed, 35 insertions, 35 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index a2de1e7fa44..1d92676706a 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -342,20 +342,20 @@ ipsec_set_async_mode (u32 is_enabled)
ipsec_sa_t *sa;
/* lock all SAs before change im->async_mode */
- pool_foreach (sa, im->sad, (
- {
- fib_node_lock (&sa->node);
- }));
+ pool_foreach (sa, im->sad)
+ {
+ fib_node_lock (&sa->node);
+ }
im->async_mode = is_enabled;
/* change SA crypto op data before unlock them */
- pool_foreach (sa, im->sad, (
- {
- sa->crypto_op_data = is_enabled ?
- sa->async_op_data.data : sa->sync_op_data.data;
- fib_node_unlock (&sa->node);
- }));
+ pool_foreach (sa, im->sad)
+ {
+ sa->crypto_op_data = is_enabled ?
+ sa->async_op_data.data : sa->sync_op_data.data;
+ fib_node_unlock (&sa->node);
+ }
}
static void
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 7003791c8c8..06e7ba0d784 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -514,9 +514,9 @@ vl_api_ipsec_spds_dump_t_handler (vl_api_ipsec_spds_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (spd, im->spds, ({
+ pool_foreach (spd, im->spds) {
send_ipsec_spds_details (spd, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
#else
clib_warning ("unimplemented");
@@ -1130,7 +1130,7 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t * mp)
ipsec_ah_backend_t *ab;
ipsec_esp_backend_t *eb;
/* *INDENT-OFF* */
- pool_foreach (ab, im->ah_backends, {
+ pool_foreach (ab, im->ah_backends) {
vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp));
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1141,8 +1141,8 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t * mp)
mp->index = ab - im->ah_backends;
mp->active = mp->index == im->ah_current_backend ? 1 : 0;
vl_api_send_msg (rp, (u8 *)mp);
- });
- pool_foreach (eb, im->esp_backends, {
+ }
+ pool_foreach (eb, im->esp_backends) {
vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp));
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1153,7 +1153,7 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t * mp)
mp->index = eb - im->esp_backends;
mp->active = mp->index == im->esp_current_backend ? 1 : 0;
vl_api_send_msg (rp, (u8 *)mp);
- });
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index e0a271db87d..407ae868adf 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -424,10 +424,10 @@ ipsec_sa_show_all (vlib_main_t * vm, ipsec_main_t * im, u8 detail)
u32 sai;
/* *INDENT-OFF* */
- pool_foreach_index (sai, im->sad, ({
+ pool_foreach_index (sai, im->sad) {
vlib_cli_output(vm, "%U", format_ipsec_sa, sai,
(detail ? IPSEC_FORMAT_DETAIL : IPSEC_FORMAT_BRIEF));
- }));
+ }
/* *INDENT-ON* */
}
@@ -437,9 +437,9 @@ ipsec_spd_show_all (vlib_main_t * vm, ipsec_main_t * im)
u32 spdi;
/* *INDENT-OFF* */
- pool_foreach_index (spdi, im->spds, ({
+ pool_foreach_index (spdi, im->spds) {
vlib_cli_output(vm, "%U", format_ipsec_spd, spdi);
- }));
+ }
/* *INDENT-ON* */
}
@@ -545,9 +545,9 @@ clear_ipsec_sa_command_fn (vlib_main_t * vm,
if (~0 == sai)
{
/* *INDENT-OFF* */
- pool_foreach_index (sai, im->sad, ({
+ pool_foreach_index (sai, im->sad) {
ipsec_sa_clear(sai);
- }));
+ }
/* *INDENT-ON* */
}
else
@@ -643,7 +643,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
u8 *s = format (NULL, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
ipsec_ah_backend_t *ab;
/* *INDENT-OFF* */
- pool_foreach (ab, im->ah_backends, {
+ pool_foreach (ab, im->ah_backends) {
s = format (s, "%=25s %=25u %=10s\n", ab->name, ab - im->ah_backends,
ab - im->ah_backends == im->ah_current_backend ? "yes" : "no");
if (verbose) {
@@ -657,7 +657,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
n = vlib_get_node (vm, ab->ah6_decrypt_node_index);
s = format (s, " dec6 %s (next %d)\n", n->name, ab->ah6_decrypt_next_index);
}
- });
+ }
/* *INDENT-ON* */
vlib_cli_output (vm, "%v", s);
_vec_len (s) = 0;
@@ -665,7 +665,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
s = format (s, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
ipsec_esp_backend_t *eb;
/* *INDENT-OFF* */
- pool_foreach (eb, im->esp_backends, {
+ pool_foreach (eb, im->esp_backends) {
s = format (s, "%=25s %=25u %=10s\n", eb->name, eb - im->esp_backends,
eb - im->esp_backends == im->esp_current_backend ? "yes"
: "no");
@@ -680,7 +680,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
n = vlib_get_node (vm, eb->esp6_decrypt_node_index);
s = format (s, " dec6 %s (next %d)\n", n->name, eb->esp6_decrypt_next_index);
}
- });
+ }
/* *INDENT-ON* */
vlib_cli_output (vm, "%v", s);
diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c
index 97a43875989..4a0f9e7bb6c 100644
--- a/src/vnet/ipsec/ipsec_itf.c
+++ b/src/vnet/ipsec/ipsec_itf.c
@@ -469,10 +469,10 @@ ipsec_interface_show (vlib_main_t * vm,
index_t ii;
/* *INDENT-OFF* */
- pool_foreach_index (ii, ipsec_itf_pool,
- ({
+ pool_foreach_index (ii, ipsec_itf_pool)
+ {
vlib_cli_output (vm, "%U", format_ipsec_itf, ii);
- }));
+ }
/* *INDENT-ON* */
return NULL;
diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c
index 71e86ac5c45..d5a971bb46d 100644
--- a/src/vnet/ipsec/ipsec_sa.c
+++ b/src/vnet/ipsec/ipsec_sa.c
@@ -460,11 +460,11 @@ ipsec_sa_walk (ipsec_sa_walk_cb_t cb, void *ctx)
ipsec_sa_t *sa;
/* *INDENT-OFF* */
- pool_foreach (sa, im->sad,
- ({
+ pool_foreach (sa, im->sad)
+ {
if (WALK_CONTINUE != cb(sa, ctx))
break;
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c
index 9116df5d7e3..a35b6190c44 100644
--- a/src/vnet/ipsec/ipsec_tun.c
+++ b/src/vnet/ipsec/ipsec_tun.c
@@ -838,10 +838,10 @@ ipsec_tun_protect_walk (ipsec_tun_protect_walk_cb_t fn, void *ctx)
index_t itpi;
/* *INDENT-OFF* */
- pool_foreach_index(itpi, ipsec_tun_protect_pool,
- ({
+ pool_foreach_index (itpi, ipsec_tun_protect_pool)
+ {
fn (itpi, ctx);
- }));
+ }
/* *INDENT-ON* */
}