summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_input.c
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2023-02-27 15:33:30 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-03-01 16:46:28 +0000
commit2cc8c0a8db227996bd2ee624f480f6674e25b6f0 (patch)
tree7893825e5ac9708b0d5f208b429fc43a0ecf2e0b /src/vnet/udp/udp_input.c
parentad215f211d73e656a149326651fa2017382e51e0 (diff)
udp: fix optimistic assert for UDP RX
Change-Id: I431c4a6f409b129e4290dba2e1acadea460ac797 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
Diffstat (limited to 'src/vnet/udp/udp_input.c')
-rw-r--r--src/vnet/udp/udp_input.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c
index d5dd159c4b2..6e5ed158d56 100644
--- a/src/vnet/udp/udp_input.c
+++ b/src/vnet/udp/udp_input.c
@@ -161,7 +161,11 @@ udp_connection_enqueue (udp_connection_t * uc0, session_t * s0,
TRANSPORT_PROTO_UDP,
queue_event);
}
- ASSERT (wrote0 > 0);
+
+ /* In some rare cases, session_enqueue_dgram_connection can fail because a
+ * chunk cannot be allocated in the RX FIFO */
+ if (PREDICT_FALSE (wrote0 == 0))
+ *error0 = UDP_ERROR_FIFO_NOMEM;
unlock_rx_lock: