]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #58 in SNORT/snort3 from debug_enable to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 2 Oct 2015 18:28:44 +0000 (14:28 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 2 Oct 2015 18:28:44 +0000 (14:28 -0400)
Squashed commit of the following:

commit 48c1eb68e4c7140451b9fe2738158618187c5f3c
Author: davis mcpherson <davis.mcpherson@gmail.com>
Date:   Fri Oct 2 14:22:53 2015 -0400

    fix var refs in DEBUG_* statements missed in normalization refactor

src/stream/tcp/tcp_normalizer.cc
src/stream/tcp/tcp_session.cc

index 53c49f7d66661a77bfd6156d0afa7e7645619caf..c2118319610f0dd401dbbbf936858990d8a3ee8e 100644 (file)
@@ -206,8 +206,7 @@ uint32_t TcpNormalizer::get_tcp_timestamp(TcpDataBlock* tdb, bool strip)
             if(!stripped)
             {
                 tdb->ts = EXTRACT_32BITS(opt.data);
-                DebugFormat(DEBUG_STREAM_STATE, "Found timestamp %lu\n", *ts);
-
+                DebugFormat(DEBUG_STREAM_STATE, "Found timestamp %lu\n", tdb->ts);
                 return TF_TSTAMP;
             }
         }
@@ -293,7 +292,7 @@ int TcpNormalizer::validate_paws_timestamp( TcpDataBlock* tdb, int* eventcode )
     {
         /* this packet is from way too far into the future */
         DebugFormat(DEBUG_STREAM_STATE, "packet PAWS timestamp way too far ahead of last packet %d %d...\n",
-                p->pkth->ts.tv_sec, peer_tracker->ts_last_pkt);
+                tdb->pkt->pkth->ts.tv_sec, peer_tracker->ts_last_pkt);
         //inc_tcp_discards();
         *eventcode |= EVENT_BAD_TIMESTAMP;
         packet_dropper(tdb, NORM_TCP_OPT);
index 341092888dd12182f45c67f591b08c514d334746..6f0cb9a06c023bb4b1651586c744ad599f166cb7 100644 (file)
@@ -546,7 +546,7 @@ static inline int ValidSeq( Flow* flow, TcpTracker *st, TcpDataBlock *tdb)
     uint32_t left_seq;
 
     DebugFormat(DEBUG_STREAM_STATE, "Checking end_seq (%X) > r_win_base (%X) && seq (%X) < r_nxt_ack(%X)\n",
-            tdb->end_seq, st->r_win_base, tdb->seq, st->r_nxt_ack + st->normalizer->get_stream_window(flow, st, tdb));
+            tdb->end_seq, st->r_win_base, tdb->seq, st->r_nxt_ack + st->normalizer->get_stream_window(tdb));
 
     if (SEQ_LT(st->r_nxt_ack, st->r_win_base))
         left_seq = st->r_nxt_ack;
@@ -887,7 +887,7 @@ static void NewQueue(TcpTracker *st, TcpDataBlock *tdb)
     AddStreamNode(st, tdb, tdb->pkt->dsize, overlap, 0, tdb->seq + overlap, NULL);
 
     DebugFormat(DEBUG_STREAM_STATE, "Attached new queue to seglist, %d bytes queued, base_seq 0x%X\n",
-            p->dsize-overlap, st->seglist_base_seq);
+            tdb->pkt->dsize-overlap, st->seglist_base_seq);
 
     MODULE_PROFILE_END(s5TcpInsertPerfStats);
 }
@@ -896,7 +896,7 @@ static void NewQueue(TcpTracker *st, TcpDataBlock *tdb)
 static void ProcessTcpStream(TcpTracker *rcv, TcpSession *tcpssn, TcpDataBlock *tdb,
         StreamTcpConfig* config)
 {
-    DebugFormat(DEBUG_STREAM_STATE, "In ProcessTcpStream(), %d bytes to queue\n", p->dsize);
+    DebugFormat(DEBUG_STREAM_STATE, "In ProcessTcpStream(), %d bytes to queue\n", tdb->pkt->dsize);
 
     if (tdb->pkt->packet_flags & PKT_IGNORE)
         return;