aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/nat/nat.c3
-rw-r--r--src/plugins/nat/nat44_cli.c18
2 files changed, 10 insertions, 11 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 232c26addf1..eaecd9658ec 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -2994,8 +2994,7 @@ nat44_plugin_enable (nat44_config_t c)
sm->enabled = 1;
-
- nat_log_err ("nat44 enable");
+ nat_log_info ("nat44 enable");
return 0;
}
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c
index a84c8204143..7c616cda801 100644
--- a/src/plugins/nat/nat44_cli.c
+++ b/src/plugins/nat/nat44_cli.c
@@ -76,13 +76,13 @@ nat44_enable_command_fn (vlib_main_t * vm,
mode_set = 1;
c.endpoint_dependent = 1;
}
- else if (unformat (input, "inside-vrf %u", &c.inside_vrf));
- else if (unformat (input, "outside-vrf %u", &c.outside_vrf));
- else if (unformat (input, "users %u", &c.users));
- else if (unformat (input, "user-memory %u", &c.user_memory));
- else if (unformat (input, "sessions %u", &c.sessions));
- else if (unformat (input, "session-memory %u", &c.session_memory));
- else if (unformat (input, "user-sessions %u", &c.user_sessions));
+ else if (unformat (line_input, "inside-vrf %u", &c.inside_vrf));
+ else if (unformat (line_input, "outside-vrf %u", &c.outside_vrf));
+ else if (unformat (line_input, "users %u", &c.users));
+ else if (unformat (line_input, "user-memory %u", &c.user_memory));
+ else if (unformat (line_input, "sessions %u", &c.sessions));
+ else if (unformat (line_input, "session-memory %u", &c.session_memory));
+ else if (unformat (line_input, "user-sessions %u", &c.user_sessions));
else
{
error = clib_error_return (0, "unknown input '%U'",
@@ -91,7 +91,7 @@ nat44_enable_command_fn (vlib_main_t * vm,
}
}
- if (!(c.sessions && c.session_memory))
+ if (c.sessions && c.session_memory)
{
error =
clib_error_return (0,
@@ -113,7 +113,7 @@ nat44_disable_command_fn (vlib_main_t * vm,
snat_main_t *sm = &snat_main;
clib_error_t *error = 0;
- if (sm->enabled)
+ if (!sm->enabled)
return clib_error_return (0, "nat44 already disabled");
if (nat44_plugin_disable () != 0)