diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-02-17 18:30:14 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-02-18 18:53:09 +0000 |
commit | 3a79d04626f2ee1e03040c545fc996a4aec96a76 (patch) | |
tree | ed850531d9302e9cdadaadd5c18e8d20ab7b00b1 /asn1 | |
parent | fb4252e5a21c92c6c1a0e5c469b8cb5bccc0ee04 (diff) |
H.248: fix dissection of ServiceChangeReason for version 1
My understanding of RFC 3015 is that the encoding of this field was not different in version 1 compared to newer releases
Bug: 10879
Change-Id: Iaa81679388860c0df4adc673ca6e56aff6f4591c
Reviewed-on: https://code.wireshark.org/review/7195
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/h248/h248.cnf | 43 | ||||
-rw-r--r-- | asn1/h248/h248v1support.asn | 2 | ||||
-rw-r--r-- | asn1/h248/packet-h248-template.c | 2 |
3 files changed, 2 insertions, 45 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index b69de9f854..f2bef14fa5 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -367,18 +367,6 @@ AuditReplyV1/auditResult audit_result } #.END -#.FN_BODY SCreasonValue -/* H248 v1 support */ - if ( h248_version > 1 ) { - /* Not V1, so call "standard" function */ -%(DEFAULT_BODY)s -} else { - /* V1 so Value == octet string */ - offset = dissect_h248_ValueV1( implicit_tag, tvb, offset, actx, tree, hf_index); -}; - -#.END - #.FN_BODY SCreasonValueOctetStr VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb; %(DEFAULT_BODY)s @@ -389,37 +377,6 @@ AuditReplyV1/auditResult audit_result dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, actx, tree, hf_h248_serviceChangeReasonStr); #.END -#.FN_HDR ValueV1 - guint8 i; - guint32 len; -#.END - -#.FN_BODY ValueV1 -/* check tvb to verify all values ascii or not. If so, output string, else hex */ - len=tvb_reported_length_remaining(tvb, offset); - if ( curr_info.par && curr_info.par->dissector) { - curr_info.par->dissector(tree, /*next_*/tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data); - } else { - /* if no registered dissector create output */ - for( i=0;i<len;i++) { - if(!g_ascii_isprint(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) { - /* not ascii or NULL character so do string as hex string */ - proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s", - (proto_registrar_get_nth(hf_index))->name, - tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len)); - return len; - }; - }; - /* if here, then string is ascii */ - proto_tree_add_text(tree, tvb, offset, len,"%s: %s", - (proto_registrar_get_nth(hf_index))->name, - tvb_format_text(tvb, 0, len)); - } - offset = len; - -#.END - - #.FN_BODY EventParameter /* H248 v1 support */ if (h248_version > 1) { diff --git a/asn1/h248/h248v1support.asn b/asn1/h248/h248v1support.asn index c0eb59118e..093b3549e0 100644 --- a/asn1/h248/h248v1support.asn +++ b/asn1/h248/h248v1support.asn @@ -38,7 +38,7 @@ BEGIN } - ValueV1 ::= OCTET STRING +-- ValueV1 ::= OCTET STRING EventParamValueV1 ::= OCTET STRING SigParamValueV1 ::= OCTET STRING diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 45c00c03cd..b67bdb32f3 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -124,7 +124,7 @@ static int dissect_h248_AuditReplyV1(gboolean implicit_tag, tvbuff_t *tvb, int o static int dissect_h248_EventParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); static int dissect_h248_SigParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); static int dissect_h248_SigParamValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); -static int dissect_h248_ValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); + #if 0 static const value_string context_id_type[] = { {NULL_CONTEXT,"0 (Null Context)"}, |