nat: fix incorrect using about sw_if_index in nat44-ed static mapping v2 api.
[vpp.git] / src / plugins / nat / nat44-ed / nat44_ed_api.c
index ea29514..56e2960 100644 (file)
@@ -590,7 +590,7 @@ static void
     }
 
   sw_if_index = clib_net_to_host_u32 (mp->external_sw_if_index);
-  if (sw_if_index)
+  if (sw_if_index != ~0)
     {
       flags |= NAT_SM_FLAG_SWITCH_ADDRESS;
     }