+
+ rv = ip4_sv_reass_output_enable_disable_with_refcnt (sw_if_index, 1);
+ if (rv)
+ {
+ return rv;
+ }
+
+ vnet_feature_enable_disable ("ip4-unicast", "nat-pre-out2in",
+ sw_if_index, 1, 0, 0);
+ vnet_feature_enable_disable ("ip4-output", "nat-pre-in2out-output",
+ sw_if_index, 1, 0, 0);
+ }
+
+ nat_validate_interface_counters (sm, sw_if_index);
+
+ pool_get (sm->output_feature_interfaces, i);
+ i->sw_if_index = sw_if_index;
+ i->flags = 0;
+ i->flags |= NAT_INTERFACE_FLAG_IS_INSIDE;
+ i->flags |= NAT_INTERFACE_FLAG_IS_OUTSIDE;
+
+ fib_index =
+ fib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, sw_if_index);
+ update_per_vrf_sessions_vec (fib_index, 0 /*is_del*/);
+
+ outside_fib = nat44_ed_get_outside_fib (sm->outside_fibs, fib_index);
+ if (outside_fib)
+ {
+ outside_fib->refcount++;
+ }
+ else
+ {
+ vec_add2 (sm->outside_fibs, outside_fib, 1);
+ outside_fib->fib_index = fib_index;
+ outside_fib->refcount = 1;
+ }
+
+ vec_foreach (ap, sm->addresses)
+ {
+ snat_add_del_addr_to_fib (&ap->addr, 32, sw_if_index, 1);
+ }
+
+ pool_foreach (m, sm->static_mappings)
+ {
+ if (!((is_addr_only_static_mapping (m))) ||
+ (m->local_addr.as_u32 == m->external_addr.as_u32))
+ {
+ continue;
+ }
+ snat_add_del_addr_to_fib (&m->external_addr, 32, sw_if_index, 1);
+ }
+
+ return 0;
+}
+
+int
+nat44_ed_del_output_interface (u32 sw_if_index)
+{
+ snat_main_t *sm = &snat_main;
+
+ nat_outside_fib_t *outside_fib;
+ snat_static_mapping_t *m;
+ snat_interface_t *i;
+ snat_address_t *ap;
+ u32 fib_index;
+ int rv;
+
+ if (!sm->enabled)
+ {
+ nat_log_err ("nat44 is disabled");
+ return VNET_API_ERROR_UNSUPPORTED;