aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2018-01-22 14:05:14 +0100
committerOle Trøan <otroan@employees.org>2018-01-23 12:17:44 +0000
commit2aa22909c70ff5c5eed6a7f7a0f8a587c9260da8 (patch)
tree69058b2eab297b375160f5bbebcaeae0fbc6b4b6 /src/plugins/nat/nat.c
parent1019bafc1444df1e139cae337031fe265669176f (diff)
NAT44: Fix interface feature removal.
Change-Id: Ie7cd809f30decc36cb8e1f4d8acc4b41f17cd390 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rw-r--r--src/plugins/nat/nat.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 6ed4877eafa..bedf4e5d386 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -1399,11 +1399,22 @@ int snat_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
i->flags &= ~NAT_INTERFACE_FLAG_IS_OUTSIDE;
if (sm->num_workers > 1 && !sm->deterministic)
- del_feature_name = "nat44-handoff-classify";
+ {
+ del_feature_name = "nat44-handoff-classify";
+ feature_name = !is_inside ? "nat44-in2out-worker-handoff" :
+ "nat44-out2in-worker-handoff";
+ }
else if (sm->deterministic)
- del_feature_name = "nat44-det-classify";
+ {
+ del_feature_name = "nat44-det-classify";
+ feature_name = !is_inside ? "nat44-det-in2out" :
+ "nat44-det-out2in";
+ }
else
- del_feature_name = "nat44-classify";
+ {
+ del_feature_name = "nat44-classify";
+ feature_name = !is_inside ? "nat44-in2out" : "nat44-out2in";
+ }
vnet_feature_enable_disable ("ip4-unicast", del_feature_name,
sw_if_index, 0, 0, 0);