From 31c31aa3b68f434e047309224ce0923600a59e16 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Sun, 5 Feb 2017 22:45:57 -0800 Subject: SNAT: initialize outside and inside FIB index in snat_config Change-Id: If26d758997d71792cedad1afae8d6a38cfd364ac Signed-off-by: Matus Fabian --- src/plugins/snat/in2out.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/plugins/snat/in2out.c') diff --git a/src/plugins/snat/in2out.c b/src/plugins/snat/in2out.c index e783027f..b0047737 100644 --- a/src/plugins/snat/in2out.c +++ b/src/plugins/snat/in2out.c @@ -163,13 +163,6 @@ snat_not_translate (snat_main_t * sm, snat_runtime_t * rt, u32 sw_if_index0, if (PREDICT_FALSE(ip0->dst_address.as_u32 == rt->cached_ip4_address)) return 1; - /* If outside FIB index is not resolved yet */ - if (sm->outside_fib_index == ~0) - { - sm->outside_fib_index = - ip4_fib_table_find_or_create_and_lock (sm->outside_vrf_id); - } - key0.addr = ip0->dst_address; key0.port = udp0->dst_port; key0.protocol = proto0; @@ -535,13 +528,6 @@ snat_hairpinning (snat_main_t *sm, u32 new_dst_addr0 = 0, old_dst_addr0, ti = 0, si; u16 new_dst_port0, old_dst_port0; - /* If outside FIB index is not resolved yet */ - if (sm->outside_fib_index == ~0) - { - sm->outside_fib_index = - ip4_fib_table_find_or_create_and_lock (sm->outside_vrf_id); - } - key0.addr = ip0->dst_address; key0.port = udp0->dst_port; key0.protocol = proto0; -- cgit 1.2.3-korg