Commit Graph

31 Commits (51f2bc1d810409b94003015a3d916eded5f3dc8e)

Author SHA1 Message Date
Jason Ish e87d4f8a28 Split the defrag counters into ipv4 and ipv6. 16 years ago
Jason Ish 6b562f7aa6 Issue 82 - fragment counters. - number of fragments - number reassembled - number of timeouts 16 years ago
Pablo Rincon d0404d8447 Renaming errors with naming conventions 16 years ago
Pablo Rincon ad2c136e8f Renaming errors (naming conventions) 16 years ago
Jason Ish 8f618b2121 - actually re-inject ipv6 re-assembled packets. - set the next header. 16 years ago
Jason Ish fbf03a927d Fix issue 71. The insert and re-assemble need to be done under the same tracker lock. 16 years ago
Jason Ish 7d920a1254 Fix issue 65.
- Update unit test to trigger the failure found in the issue 65 pcap.
- Increase pkt buffer to account for the IPv6 header, as a maximum
  size IPv6 datagram is 40 + 0xffff.
- Account for IPv4 header when checking where end of fragment lies.
- Second sanity check during re-assembly to check for writing past
  the end of the pkt buffer.
16 years ago
Steve Grubb c95cd2e80a memory leak cleanups in misc places
Hello,

This is all the rest of the memory leaks I found.

*In src/source-pcap-file.c at line 152, ptv is not being freed.
*In src/util-unittest-helper.c at line 152, p was not being freed.
*In src/log-httplog.c at line 195, aft was not being freed
*In src/counters.c at line 51, log_filename was not being freed. At line 1188
pctx is being tested to see if its NULL. However, at 1173 it exits the
function if it were NULL. This test is not needed and should be deleted.
*In src/defrag.c at line 351, tracker was not being freed. At line 390, dc is
being checked for NULL but this was already done at line 384. Probably what
was meant was checking the value of dc->frag_table which was just assigned.

The patch below makes the above described changes.

-Steve
16 years ago
Jason Ish 5076452707 Potential fix for issue 60.
- Increase the packet buffer so it can hold the link header when we
  have maximum size IP datagrams.
- Fix ip header length and pkt length calculation for re-assembled
  packets.
16 years ago
Jason Ish 7aac64f262 unit test for issue 59. 16 years ago
Jason Ish a7b37afc4e Fix issue 59. Drop a fragment that extends past the maximum IP packet size. 16 years ago
Jason Ish c4f178f3d7 Do not seen_last unless the packet with more_frags=0 was actually inserted into the frag tracker. Fixes issue 53.
Add unit test for this failure case.
16 years ago
Jason Ish fc5df7d064 don't create a new tracker when frags are received in reverse order. 16 years ago
Jason Ish 1aabe6f7c1 in the unit tests make sure memory allocated from the pool was returned. 16 years ago
Jason Ish 6547725b39 consolidate more common code between ipv4 and ipv6. 16 years ago
Jason Ish 176c6e5668 use a common insert method for ipv4 and ipv6 16 years ago
Jason Ish ccbf8bcae5 Use the V6 insert and re-assembly logic for IPv4 as well. Its a little simpler to track and update. 16 years ago
Victor Julien 6beee776ca Move rand seed code into util-random 16 years ago
Pablo Rincon 6224c30548 Adding preseending to rands 16 years ago
Jason Ish b2ee780788 "last" policy for ipv6 16 years ago
Jason Ish ecc50b8b2f add first policy for ipv6 frag re-assembly 16 years ago
Jason Ish d9380a8cb5 solaris policy for ipv6 16 years ago
Jason Ish 9d55a41e49 Windows and Linux policies for IPV6 frag reassembly. 16 years ago
Victor Julien ecf86f9c23 Rename to Suricata. 16 years ago
Jason Ish 0d92f0018b First cut at IPv6 re-assembly. Only BSD policy for now, packets don't actually get passed to it yet though. 16 years ago
Pablo Rincon e26833be3f Changing mutex/spinlocks/conditions naming types 16 years ago
Pablo Rincon 769022f4be Adding support for Mac OS X, FreeBSD, centrailizing mutex/spins/conditions in a macro API, and some unittests 16 years ago
Anoop Saldanha 96614c60f2 change the netmask to uint8_t for the ip handling part of the radix tree and also use 255 instead of -1 to indicate the absence of a netblock 16 years ago
Victor Julien fbe87a3ad5 Bunch of mostly unittest related memleak fixes. 16 years ago
Victor Julien 56e45e0c16 Fix warning free compilation of defrag. Fix a missing variable initialization that cause a segv in the unittests. 16 years ago
Jason Ish e0b9e85230 Break out checksum fixup code to make the license separation more clear. 16 years ago