Ethereal-dev: [Ethereal-dev] IP patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Pilz Rene <rene.pilz@xxxxxx>
Date: Wed, 06 Apr 2005 13:03:02 +0200
Hi

Please take a look at this patch. It should lower the probability of wrong reassembly. It uses now a 32bit key instead of only the 16bits of the identification field.

/rene

** <http://dict.tu-chemnitz.de/dings.cgi?o=3003;count=50;service=en-de;query=probability>

--
Dipl-Ing (FH) MSc. C.E Ren� Pilz
ftw. Telekommunications Research Center Vienna http://www.ftw.at
Tech Gate Vienna, Donaucitystra�e 1, A-1220 Wien
Mobile: +43 664 8269871 Office: +43 1 5052830-13  Fax: +43 1 5052830-99

--- epan/dissectors/packet-ip.c (revision 13825)
+++ epan/dissectors/packet-ip.c (working copy)
@@ -1035,7 +1035,11 @@
   if (ip_defragment && (iph->ip_off & (IP_MF|IP_OFFSET)) &&
       tvb_bytes_exist(tvb, offset, pinfo->iplen - pinfo->iphdrlen) &&
       ipsum == 0) {
-    ipfd_head = fragment_add_check(tvb, offset, pinfo, iph->ip_id,
+    ipfd_head = fragment_add_check(tvb, offset, pinfo,
+                            ( iph->ip_id
+                            | *(guint32*)src_addr |
+                            *(guint32*)dst_addr
+                            ) ,
                             ip_fragment_table,
                             ip_reassembled_table,
                             (iph->ip_off & IP_OFFSET)*8,