Ethereal-dev: [Ethereal-dev] [PATCH] WCCP Capabilities Element:

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

From: "Raghu Angadi" <rangadi@xxxxxxxxxxx>
Date: Wed, 21 Nov 2001 16:33:19 -0800 (PST)
This seems to be the correct interpretation of "Length" field in Section
5.7.5 in WCCP2 spec
(http://www.wrec.org/Drafts/draft-wilson-wrec-wccp-v2-00.txt)
Try with the attached capture file.

patch:

--- ../ethereal-0.8.20/packet-wccp.c	Fri Aug  3 18:52:07 2001
+++ packet-wccp.c	Wed Nov 21 16:20:31 2001
@@ -1142,7 +1142,7 @@
 	proto_tree *element_tree;
 
 	for (curr_offset = offset; curr_offset < (length + offset);
-	    curr_offset += capability_len) {
+	    curr_offset += capability_len + 4) {
 		capability_type = tvb_get_ntohs(tvb, curr_offset);
 		capability_len = tvb_get_ntohs(tvb, curr_offset + 2);
 		te = proto_tree_add_text(info_tree, tvb, curr_offset,
@@ -1212,10 +1212,10 @@
 	int space_left;
 	char buf[1025];
 
-	if (capability_len != 8) {
+	if (capability_len != 4) {
 		proto_tree_add_text(element_tree, tvb,
 		    curr_offset+4, capability_len-4,
-		    "Illegal length (must be 8)");
+		    "Illegal length (must be 4)");
 		return;
 	}
 

Attachment: l2_only.pcap
Description: Binary data