Skip to content

Commit f8da73b

Browse files
committed
Earlier check for settings flood
1 parent 336a98f commit f8da73b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: lib/nghttp2_session.c

+6
Original file line numberDiff line numberDiff line change
@@ -5653,6 +5653,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
56535653
break;
56545654
}
56555655

5656+
/* Check the settings flood counter early to be safe */
5657+
if (session->obq_flood_counter_ >= session->max_outbound_ack &&
5658+
!(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
5659+
return NGHTTP2_ERR_FLOODED;
5660+
}
5661+
56565662
iframe->state = NGHTTP2_IB_READ_SETTINGS;
56575663

56585664
if (iframe->payloadleft) {

0 commit comments

Comments
 (0)