From bfa86084af0e4d0cc8ad8ccbeafe999b748a990e Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Thu, 9 Sep 2021 18:31:36 +0200 Subject: ip: Add ip46-local node for local swif[rx] Type: improvement This adds a new ip[46]-receive node, sibling of ip[46]-local. Its goal is to set vnet_buffer (b)->ip.rx_sw_if_index to the sw_if_index of the local interface. In dependant nodes further down the line (e.g. hoststack) we then set sw_if_idx[rx] to this value. So that we know which local interface did receive the packet. The TCP issue this fixes is that : On accepts, we were setting tc->sw_if_index to the source sw_if_index. We should use the dest sw_if_index, so that packets coming back on this connection have the right source sw_if_index. And also setting it in the tx-ed packet. Change-Id: I569ed673e15c21e71f365c3ad45439b05bd14a9f Signed-off-by: Nathan Skrzypczak --- src/vnet/dpo/receive_dpo.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/vnet/dpo') diff --git a/src/vnet/dpo/receive_dpo.c b/src/vnet/dpo/receive_dpo.c index b12b382ce64..0a97e1d373b 100644 --- a/src/vnet/dpo/receive_dpo.c +++ b/src/vnet/dpo/receive_dpo.c @@ -156,15 +156,13 @@ const static dpo_vft_t receive_vft = { * this means that these graph nodes are ones from which a receive is the * parent object in the DPO-graph. */ -const static char* const receive_ip4_nodes[] = -{ - "ip4-local", - NULL, +const static char *const receive_ip4_nodes[] = { + "ip4-receive", + NULL, }; -const static char* const receive_ip6_nodes[] = -{ - "ip6-local", - NULL, +const static char *const receive_ip6_nodes[] = { + "ip6-receive", + NULL, }; const static char* const * const receive_nodes[DPO_PROTO_NUM] = -- cgit 1.2.3-korg