Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 33048: /trunk/ /trunk/epan/dissector

From: Graeme Lunt <graeme@xxxxxxxxxxx>
Date: Tue, 29 Jun 2010 15:11:29 +0100
Stig,

I have looked a both the captures and I think that they show problems with their associated dissectors.

The patch added better/more rigorous handling of constructed ASN.1 types that are IMPLICITLY tagged, and consequently you can get away with less.

In your capture file, the IMPLICIT CONTEXT [0] tag was marked as constructed. The Wireshark ASN.1 file expected to decode this as OCTET STRING:

ISO8823-PRESENTATION.asn:
CHOICE {single-ASN1-type   [0] IMPLICIT OCTET STRING,

So wireshark expects to find a constructed OCTET STRING - but it doesn't find an internal OCTET STRING tag and so you see the error in wireshark you do.

However, I believe this is because ISO8823-PRESENTATION.asn should say:

CHOICE {single-ASN1-type   [0] ANY,

This much better aligns with the original ASN.1.

The ANY you provided in your example capture was indeed constructed.

Attached is a simple patch. If you concur, then I will apply it.

As for Jeff's problem, I suspect it is something similar, but I will have to do a bit more digging yet as I am not as familiar with that protocol.

Graeme






2010/6/29 Stig Bjørlykke <stig@xxxxxxxxxxxxx>
2010/6/29 Stig Bjørlykke <stig@xxxxxxxxxxxxx>:
> I'm also having problem with this patch.  Have a look at this packet
> which is marked as "[Unreassembled Packet]", while it used to display
> fine with a "single-ASN1-type" in PRES.

Ok, and now with the example packet.


--
Stig Bjørlykke

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

Index: asn1/pres/ISO8823-PRESENTATION.asn
===================================================================
--- asn1/pres/ISO8823-PRESENTATION.asn	(revision 33367)
+++ asn1/pres/ISO8823-PRESENTATION.asn	(working copy)
@@ -368,7 +368,7 @@
   transfer-syntax-name             Transfer-syntax-name OPTIONAL,
   presentation-context-identifier  Presentation-context-identifier,
   presentation-data-values
-    CHOICE {single-ASN1-type	[0] IMPLICIT OCTET STRING,
+    CHOICE {single-ASN1-type	[0] ANY,
 --              [0]  ABSTRACT-SYNTAX.&Type
 --                     (CONSTRAINED BY {
                         
Index: asn1/pres/pres.cnf
===================================================================
--- asn1/pres/pres.cnf	(revision 33367)
+++ asn1/pres/pres.cnf	(working copy)
@@ -47,7 +47,6 @@
 			proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
 			expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
 		}
-		%(DEFAULT_BODY)s
 	}
 #.FN_BODY PDV-list/presentation-data-values/octet-aligned