Ethereal-dev: Re: [Ethereal-dev] Ethereal 0.8.20 and WSP/GTP

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

From: Georg von Zezschwitz <gvz@xxxxxxxxxx>
Date: Mon, 22 Oct 2001 00:16:52 +0200
On Fri, Oct 19, 2001 at 04:24:06PM -0700, Guy Harris wrote:
> With the Miracle of Text2pcap (and some hand editing), I was able to
> reconstruct the packet, with synthesized Ethernet and IP headers; I've
> attached it.

Hi,

actually the problem was very simple, an uninitialized local
variable in add_cache_control_header.

The attached patch also extends the handling in this function
to all three cache-control headers, those of 1.1, 1.3 and 1.4.
S_MAXAGE is implemented.  I could not find any significant
difference between them.


Cheers,


Georg
Index: packet-wsp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-wsp.c,v
retrieving revision 1.41
diff -u -r1.41 packet-wsp.c
--- packet-wsp.c	2001/10/18 08:23:24	1.41
+++ packet-wsp.c	2001/10/21 22:13:54
@@ -1517,9 +1517,11 @@
 		break;
 
 	case FN_CACHE_CONTROL_DEP:	/* Cache-Control */
+	case FN_CACHE_CONTROL:
+	case FN_CACHE_CONTROL14:
 		/*
-		 * XXX - should both encoding versions 1.1 and
-		 * 1.3 be handled this way?
+		 * XXX - is the only difference in the three different
+		 * versions (1.1, 1.3, 1.4) really only S_MAXAGE?
 		 */
 		add_cache_control_header (tree, header_buff, headerLen,
 		    value_buff, valueType, valueLen);
@@ -1901,7 +1903,7 @@
     int headerLen, tvbuff_t *value_buff, value_type_t valueType,
     int valueLen)
 {
-	int offset;
+	int offset = 0;
 	int subvalueLen;
 	int subvalueOffset;
 	guint value;
@@ -1990,6 +1992,7 @@
 		case MAX_AGE:
 		case MAX_STALE:
 		case MIN_FRESH:
+		case S_MAXAGE:
 			/*
 			 * Get Delta-second-value.
 			 */