Fix issue 59. Drop a fragment that extends past the maximum IP packet size.

remotes/origin/master-1.0.x
Jason Ish 17 years ago committed by Victor Julien
parent fea277b2aa
commit a7b37afc4e

@ -14,6 +14,7 @@
* \todo pool for frag packet storage
* \todo policy bsd-right
* \todo profile hash function
* \todo log anomalies
*/
#include <sys/time.h>
@ -531,6 +532,11 @@ DefragInsertFrag(DefragContext *dc, DefragTracker *tracker, Packet *p)
exit(EXIT_FAILURE);
}
if (frag_offset + data_len > IPV4_MAXPACKET_LEN) {
/* \todo Log this - packet is too large to be re-assembled. */
return;
}
/* Lock this tracker as we'll be doing list operations on it. */
SCMutexLock(&tracker->lock);

Loading…
Cancel
Save