summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorjackiechen1985 <xiaobo.chen@tieto.com>2019-05-09 16:57:16 +0800
committerNeale Ranns <nranns@cisco.com>2019-05-23 07:25:20 +0000
commit0ad4a439d68f906295656876cc3bb3092da2cf56 (patch)
treec20a0a0e03242496b6f26aa9a75f59ebcdab01ef /src/plugins/nat/nat.c
parent23551d6c40142c215eb39bfd79265d136d13fa33 (diff)
Fix vpp crash bug while deleting dhcp client
We must do lock fib while vrf id ~0, otherwise it crashes while unlocking fib. Change-Id: Iec9754ccd67634a132bc5384a4f796d4a65943ae Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rwxr-xr-xsrc/plugins/nat/nat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 0d909cedbf4..9eb0384a95b 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -830,6 +830,7 @@ snat_add_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr,
{
fib_index = sm->inside_fib_index;
vrf_id = sm->inside_vrf_id;
+ fib_table_lock (fib_index, FIB_PROTOCOL_IP4, FIB_SOURCE_PLUGIN_LOW);
}
if (!(out2in_only || identity_nat))