From: Victor Julien Date: Thu, 5 Dec 2024 09:00:14 +0000 (+0100) Subject: stream: remove unused function argument X-Git-Tag: suricata-7.0.8~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcc398fc9ce991995c32778677493187392e00fb;p=thirdparty%2Fsuricata.git stream: remove unused function argument Sequence number is taken from seg, not the func arg. (cherry picked from commit 4c1554f4f690a7e89c4190b0fa3f31a19d0bbedc) --- diff --git a/src/stream-tcp-list.c b/src/stream-tcp-list.c index 164825440f..91d0d25616 100644 --- a/src/stream-tcp-list.c +++ b/src/stream-tcp-list.c @@ -636,7 +636,7 @@ static void StreamTcpSegmentAddPacketData( */ int StreamTcpReassembleInsertSegment(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpStream *stream, TcpSegment *seg, Packet *p, - uint32_t pkt_seq, uint8_t *pkt_data, uint16_t pkt_datalen) + uint8_t *pkt_data, uint16_t pkt_datalen) { SCEnter(); diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index d6d05410fe..3d4952bb5a 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -809,7 +809,7 @@ int StreamTcpReassembleHandleSegmentHandleData(ThreadVars *tv, TcpReassemblyThre } int r = StreamTcpReassembleInsertSegment( - tv, ra_ctx, stream, seg, p, TCP_GET_SEQ(p), p->payload, p->payload_len); + tv, ra_ctx, stream, seg, p, p->payload, p->payload_len); if (r < 0) { if (r == -SC_ENOMEM) { ssn->flags |= STREAMTCP_FLAG_LOSSY_BE_LIBERAL; diff --git a/src/stream-tcp-reassemble.h b/src/stream-tcp-reassemble.h index 6f761fc0b4..c883e6c0f5 100644 --- a/src/stream-tcp-reassemble.h +++ b/src/stream-tcp-reassemble.h @@ -107,7 +107,8 @@ void StreamTcpSetOSPolicy(TcpStream *, Packet *); int StreamTcpReassembleHandleSegmentHandleData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpSession *ssn, TcpStream *stream, Packet *p); -int StreamTcpReassembleInsertSegment(ThreadVars *, TcpReassemblyThreadCtx *, TcpStream *, TcpSegment *, Packet *, uint32_t pkt_seq, uint8_t *pkt_data, uint16_t pkt_datalen); +int StreamTcpReassembleInsertSegment(ThreadVars *, TcpReassemblyThreadCtx *, TcpStream *, + TcpSegment *, Packet *, uint8_t *pkt_data, uint16_t pkt_datalen); TcpSegment *StreamTcpGetSegment(ThreadVars *, TcpReassemblyThreadCtx *); void StreamTcpReturnStreamSegments(TcpStream *); diff --git a/src/stream-tcp-util.c b/src/stream-tcp-util.c index 4d8bf8a893..735c25e838 100644 --- a/src/stream-tcp-util.c +++ b/src/stream-tcp-util.c @@ -126,7 +126,7 @@ int StreamTcpUTAddSegmentWithPayload(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ } p->tcph->th_seq = htonl(seq); - if (StreamTcpReassembleInsertSegment(tv, ra_ctx, stream, s, p, TCP_GET_SEQ(p), p->payload, p->payload_len) < 0) + if (StreamTcpReassembleInsertSegment(tv, ra_ctx, stream, s, p, p->payload, p->payload_len) < 0) return -1; UTHFreePacket(p); @@ -151,7 +151,7 @@ int StreamTcpUTAddSegmentWithByte(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx } p->tcph->th_seq = htonl(seq); - if (StreamTcpReassembleInsertSegment(tv, ra_ctx, stream, s, p, TCP_GET_SEQ(p), p->payload, p->payload_len) < 0) + if (StreamTcpReassembleInsertSegment(tv, ra_ctx, stream, s, p, p->payload, p->payload_len) < 0) return -1; UTHFreePacket(p); return 0;