summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/nat/nat44_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44_api.c b/src/plugins/nat/nat44_api.c
index 05a79719261..a5e29198c64 100644
--- a/src/plugins/nat/nat44_api.c
+++ b/src/plugins/nat/nat44_api.c
@@ -1157,6 +1157,12 @@ static void
int rv = 0;
u8 is_del;
+ if (sm->static_mapping_only)
+ {
+ rv = VNET_API_ERROR_FEATURE_DISABLED;
+ goto send_reply;
+ }
+
is_del = !mp->is_add;
VALIDATE_SW_IF_INDEX (mp);
@@ -1165,6 +1171,8 @@ static void
mp->flags & NAT_API_IS_TWICE_NAT);
BAD_SW_IF_INDEX_LABEL;
+
+send_reply:
REPLY_MACRO (VL_API_NAT44_ADD_DEL_INTERFACE_ADDR_REPLY);
}