/* Add/del external address range to FIB */
/* *INDENT-OFF* */
- pool_foreach (i, dm->interfaces, ({
+ pool_foreach (i, dm->interfaces) {
if (det44_interface_is_inside(i))
continue;
det44_add_del_addr_to_fib(out_addr, out_plen, i->sw_if_index, is_add);
goto out;
- }));
+ }
/* *INDENT-ON* */
out:
return 0;
// then register nodes
/* *INDENT-OFF* */
- pool_foreach (tmp, dm->interfaces, ({
+ pool_foreach (tmp, dm->interfaces) {
if (tmp->sw_if_index == sw_if_index)
{
i = tmp;
goto out;
}
- }));
+ }
/* *INDENT-ON* */
out:
// add/del outside address to FIB
snat_det_map_t *mp;
/* *INDENT-OFF* */
- pool_foreach (mp, dm->det_maps, ({
+ pool_foreach (mp, dm->det_maps) {
det44_add_del_addr_to_fib(&mp->out_addr,
mp->out_plen, sw_if_index, !is_del);
- }));
+ }
/* *INDENT-ON* */
}
return 0;
vlib_process_get_events (vm, NULL);
u32 now = (u32) vlib_time_now (vm);
/* *INDENT-OFF* */
- pool_foreach (mp, dm->det_maps, ({
+ pool_foreach (mp, dm->det_maps) {
vec_foreach(ses, mp->sessions)
{
/* Delete if session expired */
if (ses->in_port && (ses->expire < now))
snat_det_ses_close (mp, ses);
}
- }));
+ }
/* *INDENT-ON* */
return 0;
}
vec_free (interfaces);
/* *INDENT-OFF* */
- pool_foreach (mp, dm->det_maps,
- ({
+ pool_foreach (mp, dm->det_maps)
+ {
vec_free (mp->sessions);
- }));
+ }
/* *INDENT-ON* */
det44_reset_timeouts ();
return;
/* *INDENT-OFF* */
- pool_foreach (i, dm->interfaces,
- ({
+ pool_foreach (i, dm->interfaces)
+ {
if (i->sw_if_index == sw_if_index)
{
if (!(det44_interface_is_outside (i)))
return;
match = 1;
}
- }));
+ }
/* *INDENT-ON* */
if (!match)