summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/reass/ip4_full_reass.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-05-12 16:58:44 -0700
committerDave Wallace <dwallacelf@gmail.com>2023-05-15 17:11:43 +0000
commit639beb91f6e80192977f12f56614ff1254431cc9 (patch)
treea872362ac3235386ce7ddef919d5c6d88e008366 /src/vnet/ip/reass/ip4_full_reass.c
parente77af765e2c4eb2e1eb858c48441b1f236ed41f9 (diff)
ip: allow overriding fib index in reass
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic28da52b9c8286f71e472ef6c3afc23d464f85b0
Diffstat (limited to 'src/vnet/ip/reass/ip4_full_reass.c')
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index 5e5969e9226..c65f349e5b0 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1222,8 +1222,10 @@ ip4_full_reass_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
goto packet_enqueue;
}
- u32 fib_index = vec_elt (ip4_main.fib_index_by_sw_if_index,
- vnet_buffer (b0)->sw_if_index[VLIB_RX]);
+ u32 fib_index = (vnet_buffer (b0)->sw_if_index[VLIB_TX] == (u32) ~0) ?
+ vec_elt (ip4_main.fib_index_by_sw_if_index,
+ vnet_buffer (b0)->sw_if_index[VLIB_RX]) :
+ vnet_buffer (b0)->sw_if_index[VLIB_TX];
ip4_full_reass_kv_t kv = { .k.fib_index = fib_index,
.k.src.as_u32 = ip0->src_address.as_u32,