aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2016-12-22 02:46:27 -0800
committerMatus Fabian <matfabia@cisco.com>2016-12-22 02:46:27 -0800
commite73d0a3aab61a4b192fe73165e6cece4a95c107b (patch)
tree692c81562d5891d8adf71e6f9b65a78cd338a0a1 /plugins/snat-plugin
parent436b319354362c5f64ad342d19ada87f246b5e74 (diff)
SNAT: Remove the oldest translation fix (VPP-568)
Fixed bug and add test. Change-Id: I60fbec48abd9d9cb86be1bd1cdbb7d16f9f93c3e Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'plugins/snat-plugin')
-rw-r--r--plugins/snat-plugin/snat/in2out.c2
-rw-r--r--plugins/snat-plugin/snat/snat.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/snat-plugin/snat/in2out.c b/plugins/snat-plugin/snat/in2out.c
index d7b647ef14e..c78fdd76631 100644
--- a/plugins/snat-plugin/snat/in2out.c
+++ b/plugins/snat-plugin/snat/in2out.c
@@ -203,7 +203,7 @@ static u32 slow_path (snat_main_t *sm, vlib_buffer_t *b0,
/* Get the session */
s = pool_elt_at_index (sm->per_thread_data[cpu_index].sessions,
session_index);
- } while (!snat_is_session_static (s));
+ } while (snat_is_session_static (s));
/* Remove in2out, out2in keys */
kv0.key = s->in2out.as_u64;
diff --git a/plugins/snat-plugin/snat/snat.c b/plugins/snat-plugin/snat/snat.c
index ad350d6a128..b3b2097a3ee 100644
--- a/plugins/snat-plugin/snat/snat.c
+++ b/plugins/snat-plugin/snat/snat.c
@@ -974,13 +974,13 @@ vl_api_snat_show_config_t_handler
REPLY_MACRO2(VL_API_SNAT_SHOW_CONFIG_REPLY,
({
- rmp->translation_buckets = htons (sm->translation_buckets);
- rmp->translation_memory_size = htons (sm->translation_memory_size);
- rmp->user_buckets = htons (sm->user_buckets);
- rmp->user_memory_size = htons (sm->user_memory_size);
- rmp->max_translations_per_user = htons (sm->max_translations_per_user);
- rmp->outside_vrf_id = htons (sm->outside_vrf_id);
- rmp->inside_vrf_id = htons (sm->inside_vrf_id);
+ rmp->translation_buckets = htonl (sm->translation_buckets);
+ rmp->translation_memory_size = htonl (sm->translation_memory_size);
+ rmp->user_buckets = htonl (sm->user_buckets);
+ rmp->user_memory_size = htonl (sm->user_memory_size);
+ rmp->max_translations_per_user = htonl (sm->max_translations_per_user);
+ rmp->outside_vrf_id = htonl (sm->outside_vrf_id);
+ rmp->inside_vrf_id = htonl (sm->inside_vrf_id);
rmp->static_mapping_only = sm->static_mapping_only;
rmp->static_mapping_connection_tracking =
sm->static_mapping_connection_tracking;