Ethereal-dev: Re: [Ethereal-dev] ethereal crash when set display filter

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

From: Ming Zhang <mingz@xxxxxxxxxxx>
Date: Thu, 02 Mar 2006 13:30:19 -0500
Cool! it works.

yes, iscsi pdu basic header is 48bytes and that variable should be reset
to 48 every time when while loop begins.

ming


On Thu, 2006-03-02 at 18:08 +0000, didier wrote:
> Hi
> Ming Zhang wrote:
> > 
> > only have .10.12 here, can not see anything special. i am not good at
> > tcp/ip. :P
> I know nothing about iscsi , but try the attached patch. It fix the 
> wrong desegmentation and the ethereal bug isn't triggered anymore.
> 
> Didier
> plain text document attachment (packet-iscsi.patch)
> --- epan/dissectors/packet-iscsi.c
> +++ epan/dissectors/packet-iscsi.c
> @@ -1747,7 +1747,6 @@ dissect_iscsi(tvbuff_t *tvb, packet_info
>      guint iSCSIPdusDissected = 0;
>      guint offset = 0;
>      guint32 available_bytes = tvb_length_remaining(tvb, offset);
> -    guint32 pduLen = 48;
>      int digestsActive = 1;
>      conversation_t *conversation = NULL;
>      iscsi_session_t *iscsi_session=NULL;
> @@ -1763,6 +1762,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info
>      while(available_bytes >= 48 || (iscsi_desegment && available_bytes >= 8)) {
>  	const char *opcode_str = NULL;
>  	guint32 data_segment_len;
> +	guint32 pduLen = 48;
>  	guint8 opcode = tvb_get_guint8(tvb, offset + 0);
>  	guint8 secondPduByte = tvb_get_guint8(tvb, offset + 1);
>  	int badPdu = FALSE;