aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-01-23 09:40:45 -0800
committerMohammed HAWARI <momohawari@gmail.com>2024-01-25 10:10:06 +0000
commitf1acfc00ee6643b7a55af3a1267365a97eec63ca (patch)
tree584a7f89e464241f617f8b975bded0cc41fc3bb2 /src
parent6fb2b3dc72085d80c38a5f953a296a54aaeb63e8 (diff)
udp: update rx sw_if_index to ip-local selected one
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0afd1b9ddbc17825aab3bfa3e5f9c6c0fbc561ca
Diffstat (limited to 'src')
-rw-r--r--src/vnet/udp/udp_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c
index 9cabfdf73cd..f1dcab8116f 100644
--- a/src/vnet/udp/udp_input.c
+++ b/src/vnet/udp/udp_input.c
@@ -224,6 +224,10 @@ udp_parse_and_lookup_buffer (vlib_buffer_t * b, session_dgram_hdr_t * hdr,
udp->src_port, TRANSPORT_PROTO_UDP);
}
+ /* Set the sw_if_index[VLIB_RX] to the interface we received
+ * the connection on (the local interface) */
+ vnet_buffer (b)->sw_if_index[VLIB_RX] = vnet_buffer (b)->ip.rx_sw_if_index;
+
if (PREDICT_TRUE (!(b->flags & VLIB_BUFFER_NEXT_PRESENT)))
b->current_length = hdr->data_length;
else