diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-06-29 15:13:43 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-06-29 17:56:35 +0000 |
commit | e39e44df246c89c31d708923a181f99810240731 (patch) | |
tree | 85f50463460e8700cec0322583df651b98dcb13c /asn1 | |
parent | 60ffafdb7c762a25c8fe36b763041899a4a599f7 (diff) |
GSM MAP: ensure that p2p_dir is always initialized before calling GSM SMS dissector
Bug: 10234
Change-Id: Ie340b849015febe46f91836440d44d4cfde005a4
Reviewed-on: https://code.wireshark.org/review/2695
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/gsm_map/gsm_map.cnf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf index 07dd16d329..a187e7a70f 100644 --- a/asn1/gsm_map/gsm_map.cnf +++ b/asn1/gsm_map/gsm_map.cnf @@ -383,6 +383,13 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + if (opcode == 44) { + actx->pinfo->p2p_dir = P2P_DIR_RECV; + } else if (opcode == 46) { + actx->pinfo->p2p_dir = P2P_DIR_SENT; + } + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MO-ForwardSM-Arg @@ -392,6 +399,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_RECV; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MO-ForwardSM-Res @@ -401,6 +411,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_SENT; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-Arg @@ -410,6 +423,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_SENT; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-Res @@ -419,6 +435,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_RECV; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-VGCS-Arg @@ -428,6 +447,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_SENT; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY MT-ForwardSM-VGCS-Res @@ -437,6 +459,9 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; if (!actx->value_ptr) return offset; + if (actx->pinfo->p2p_dir == P2P_DIR_UNKNOWN) { + actx->pinfo->p2p_dir = P2P_DIR_RECV; + } call_dissector_only(gsm_sms_handle, (tvbuff_t*)actx->value_ptr, actx->pinfo, top_tree, NULL); #.FN_BODY SS-Status VAL_PTR = ¶meter_tvb |