diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2018-04-26 13:48:01 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-04-26 15:03:29 +0000 |
commit | 46fcf452ac0204152b6a4fd574547fb478f9e63b (patch) | |
tree | a510dd560a1f551061362e7b1a6dcc83b1b40e7d /epan/dissectors/packet-coap.c | |
parent | 0f50b89f676a820c2898625931dc4259495d2b13 (diff) |
coap: Store ctype values in transaction tracking
Transfer ctype values from GET request to response to be able
to decode the payload correctly.
Change-Id: Ida7598aefbd3f245dd487d50562539395f130ac4
Reviewed-on: https://code.wireshark.org/review/27163
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r-- | epan/dissectors/packet-coap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index 16e905f015..aa404ae0b4 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -1098,6 +1098,10 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d coap_trans->req_frame = pinfo->num; coap_trans->rsp_frame = 0; coap_trans->req_time = pinfo->fd->abs_ts; + if (coinfo->ctype_str) { + coap_trans->req_ctype_str = coinfo->ctype_str; + coap_trans->req_ctype_value = coinfo->ctype_value; + } if (coinfo->uri_str_strbuf) { /* Store the URI into CoAP transaction info */ coap_trans->uri_str_strbuf = wmem_strbuf_new(wmem_file_scope(), wmem_strbuf_get_str(coinfo->uri_str_strbuf)); @@ -1122,6 +1126,10 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d /* Log the first matching response frame */ coap_trans->rsp_frame = pinfo->num; } + if (coap_trans->req_ctype_str) { + coinfo->ctype_str = coap_trans->req_ctype_str; + coinfo->ctype_value = coap_trans->req_ctype_value; + } if (coap_trans->uri_str_strbuf) { /* Copy the URI stored in matching transaction info into CoAP packet info */ coinfo->uri_str_strbuf = wmem_strbuf_new(wmem_packet_scope(), wmem_strbuf_get_str(coap_trans->uri_str_strbuf)); |