From f1db04c543bbf1ba5acbe76bae1e848b6b610e62 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Sun, 13 Apr 2025 22:50:51 -0400 Subject: [PATCH] tcp: remove erroneous exception seg check assert Type: fix Change-Id: Ic3ae960e8f4a28f96b9964f6a3bd60379dd3795f Signed-off-by: Florin Coras --- src/vnet/tcp/tcp_input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 2d43cf0f01f..7977a6c0a6e 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -1361,10 +1361,9 @@ tcp_established_trace_frame (vlib_main_t * vm, vlib_node_runtime_t * node, always_inline int tcp_segment_is_exception (tcp_connection_t *tc, tcp_header_t *th) { - /* TODO(fcoras): tcp-input should not allow segments without one of ack, rst, - * syn flags, so we shouldn't be checking for their presence. Leave the check - * in for now, remove in due time */ - ASSERT (th->flags & (TCP_FLAG_ACK | TCP_FLAG_RST | TCP_FLAG_SYN)); + /* tcp-input allows through segments without ack, e.g., fin without ack, + * which have to be handled as exception in nodes like established. So + * flags must be checked */ return !tc || tc->state == TCP_STATE_CLOSED || !(th->flags & (TCP_FLAG_ACK | TCP_FLAG_RST | TCP_FLAG_SYN)); } -- 2.16.6