aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-08-22 01:27:10 -0700
committerNeale Ranns <nranns@cisco.com>2018-08-22 13:39:00 +0000
commit69ce30d6ab7c6afba475b25bb32542b1e955b91d (patch)
tree70d291a626ff9cced4a68905669a8bf6f95436a9 /src/plugins/nat/nat.c
parenta7e6cd90b8db92c5eebc103f0994bfe612eccc21 (diff)
NAT: update nat_show_config_reply API (VPP-1403)
Change-Id: I85383e428cb54c4c09ab387811dd6390f7c61d97 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rwxr-xr-xsrc/plugins/nat/nat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index ff3b2ed8a5f..bb82e924947 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -2812,6 +2812,18 @@ snat_config (vlib_main_t * vm, unformat_input_t * input)
format_unformat_error, input);
}
+ if (sm->deterministic && sm->endpoint_dependent)
+ return clib_error_return (
+ 0, "deterministic and endpoint-dependent modes are mutually exclusive");
+
+ if (static_mapping_only && (sm->deterministic || sm->endpoint_dependent))
+ return clib_error_return (
+ 0, "static mapping only mode available only for simple nat");
+
+ if (sm->out2in_dpo && (sm->deterministic || sm->endpoint_dependent))
+ return clib_error_return (
+ 0, "out2in dpo mode available only for simple nat");
+
/* for show commands, etc. */
sm->translation_buckets = translation_buckets;
sm->translation_memory_size = translation_memory_size;