summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/udp/udp_input.c')
-rw-r--r--src/vnet/udp/udp_input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c
index 4b22cbef54d..1e1c60b419f 100644
--- a/src/vnet/udp/udp_input.c
+++ b/src/vnet/udp/udp_input.c
@@ -208,6 +208,7 @@ udp46_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
child0->c_rmt_port = udp0->src_port;
child0->c_is_ip4 = is_ip4;
child0->c_fib_index = tc0->fib_index;
+ child0->mss = uc0->mss;
child0->flags |= UDP_CONN_F_CONNECTED;
if (session_stream_accept (&child0->connection,
@@ -238,7 +239,14 @@ udp46_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
error0 = UDP_ERROR_FIFO_FULL;
goto trace0;
}
- hdr0.data_length = b0->current_length = data_len;
+
+ hdr0.data_length = data_len;
+ if (PREDICT_TRUE (!(b0->flags & VLIB_BUFFER_NEXT_PRESENT)))
+ b0->current_length = data_len;
+ else
+ b0->total_length_not_including_first_buffer = data_len
+ - b0->current_length;
+
hdr0.data_offset = 0;
ip_set (&hdr0.lcl_ip, lcl_addr, is_ip4);
ip_set (&hdr0.rmt_ip, rmt_addr, is_ip4);