diff options
author | Peter Lemenkov <lemenkov@gmail.com> | 2015-04-30 16:53:27 +0300 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-04-30 18:26:51 +0000 |
commit | 12ec6c4482950dafab1701e709a0a0fee37e399c (patch) | |
tree | e858252a1d09f9b5bd3867513fffb3295a112e26 /epan/dissectors/packet-rtpproxy.c | |
parent | 6d17456208af52b7ec98b82962193263fc020100 (diff) |
Add correct decoding of a Il command
That's another one protocol shortcoming - the same parameter used twice:
* https://github.com/sippy/rtpproxy/wiki/RTPP-%28RTPproxy-protocol%29-technical-specification#createupdatelookup-session
* https://github.com/sippy/rtpproxy/wiki/RTPP-%28RTPproxy-protocol%29-technical-specification#get-information
Change-Id: I9ccc05579b0a1c28b8180eb56a2eb51fc803c063
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://code.wireshark.org/review/8250
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rtpproxy.c')
-rw-r--r-- | epan/dissectors/packet-rtpproxy.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c index 92d0f89499..2134fbd6af 100644 --- a/epan/dissectors/packet-rtpproxy.c +++ b/epan/dissectors/packet-rtpproxy.c @@ -167,8 +167,8 @@ static const value_string paramtypenames[] = { {'E', "External network (non RFC 1918)"}, {'i', "Internal network (RFC 1918)"}, {'I', "Internal network (RFC 1918)"}, - {'l', "Local address"}, - {'L', "Local address"}, + {'l', "Local address / Load average"}, + {'L', "Local address / Load average"}, {'n', "request New port"}, {'N', "request New port"}, {'r', "Remote address"}, @@ -366,13 +366,18 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t g_strfreev(codecs); break; case 'l': + /* That's another one protocol shortcoming - the same parameter used twice. */ + /* https://github.com/sippy/rtpproxy/wiki/RTPP-%28RTPproxy-protocol%29-technical-specification#createupdatelookup-session */ + /* https://github.com/sippy/rtpproxy/wiki/RTPP-%28RTPproxy-protocol%29-technical-specification#get-information */ new_offset = (gint)strspn(rawstr+offset, "0123456789."); - another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_local); - if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), ipaddr)) - proto_tree_add_ipv4(another_tree, hf_rtpproxy_command_parameter_local_ipv4, tvb, begin+offset, new_offset, ipaddr[0]); - else - proto_tree_add_expert(another_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, begin+offset, new_offset); - offset += new_offset; + if(new_offset){ + another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_local); + if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), ipaddr)) + proto_tree_add_ipv4(another_tree, hf_rtpproxy_command_parameter_local_ipv4, tvb, begin+offset, new_offset, ipaddr[0]); + else + proto_tree_add_expert(another_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, begin+offset, new_offset); + offset += new_offset; + } break; case 'r': new_offset = (gint)strspn(rawstr+offset, "0123456789."); |