static int Insert(TcpStream *stream, struct TCPSACK *tree, uint32_t le, uint32_t re)
{
- SCLogDebug("* inserting: %u/%u\n", le, re);
+ SCLogDebug("inserting: %u-%u", le, re);
struct StreamTcpSackRecord *sa = StreamTcpSackRecordAlloc();
if (unlikely(sa == NULL))
*/
int StreamTcpSackUpdatePacket(TcpStream *stream, Packet *p)
{
+ SCEnter();
+
const int records = TCP_GET_SACK_CNT(p);
const uint8_t *data = TCP_GET_SACK_PTR(p);
if (records == 0 || data == NULL)
- return 0;
+ SCReturnInt(0);
TCPOptSackRecord rec[records], *sack_rec = rec;
memcpy(&rec, data, sizeof(TCPOptSackRecord) * records);