ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] [PATCH] packet-ip.c reassembly id

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

From: Jon Oberheide <jon@xxxxxxxxxxxxx>
Date: Mon, 02 Jan 2006 17:14:17 -0500
Greetings,

Ethereal does not take into account the protocol field of the IP header
when reassembling fragmented packets as specified in RFC791.  This can
lead to incorrect reassembly of packets with an identical src address,
dst address, and identification number, but with differing protocols.

The attached patch includes the protocol in the generation of the id
used to index into the reassembly table.

Regards,
Jon Oberheide

-- 
Jon Oberheide <jon@xxxxxxxxxxxxx>
GnuPG Key: 1024D/F47C17FE
Fingerprint: B716 DA66 8173 6EDD 28F6  F184 5842 1C89 F47C 17FE
Index: epan/dissectors/packet-ip.c
===================================================================
--- epan/dissectors/packet-ip.c	(revision 16931)
+++ epan/dissectors/packet-ip.c	(working copy)
@@ -1115,7 +1115,7 @@
       tvb_bytes_exist(tvb, offset, pinfo->iplen - pinfo->iphdrlen) &&
       ipsum == 0) {
 		ipfd_head = fragment_add_check(tvb, offset, pinfo, 
-			     iph->ip_id ^ src32 ^ dst32,
+			     iph->ip_p ^ iph->ip_id ^ src32 ^ dst32,
 			     ip_fragment_table,
 			     ip_reassembled_table,
 			     (iph->ip_off & IP_OFFSET)*8,

Attachment: signature.asc
Description: This is a digitally signed message part