diff options
Diffstat (limited to 'epan/dissectors/packet-stun.c')
-rw-r--r-- | epan/dissectors/packet-stun.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c index 8ce2f665cd..06a0cd5114 100644 --- a/epan/dissectors/packet-stun.c +++ b/epan/dissectors/packet-stun.c @@ -547,7 +547,8 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole const char *msg_class_str; const char *msg_method_str; guint16 att_type; - guint16 att_length; + guint16 att_length, clear_port; + guint32 clear_ip; guint i; guint offset; guint magic_cookie_first_word; @@ -1048,8 +1049,8 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole /* Show the port 'in the clear' XOR (host order) transid with (host order) xor-port. Add host-order port into tree. */ - ti = proto_tree_add_uint(att_tree, hf_stun_att_port, tvb, offset+2, 2, - tvb_get_ntohs(tvb, offset+2) ^ (magic_cookie_first_word >> 16)); + clear_port = tvb_get_ntohs(tvb, offset+2) ^ (magic_cookie_first_word >> 16); + ti = proto_tree_add_uint(att_tree, hf_stun_att_port, tvb, offset+2, 2, clear_port); PROTO_ITEM_SET_GENERATED(ti); if (att_length < 8) @@ -1061,8 +1062,8 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole /* Show the address 'in the clear'. XOR (host order) transid with (host order) xor-address. Add in network order tree. */ - ti = proto_tree_add_ipv4(att_tree, hf_stun_att_ipv4, tvb, offset+4, 4, - tvb_get_ipv4(tvb, offset+4) ^ g_htonl(magic_cookie_first_word)); + clear_ip = tvb_get_ipv4(tvb, offset+4) ^ g_htonl(magic_cookie_first_word); + ti = proto_tree_add_ipv4(att_tree, hf_stun_att_ipv4, tvb, offset+4, 4, clear_ip); PROTO_ITEM_SET_GENERATED(ti); { |