forked from osmocom/wireshark
From report of chen li via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8572 Endian error and IP:Port error when decoding BT-DHT response message
When the remote client sended a node set, it contains nodes info The node info it shows like (1 3cad1f360cc51870d3e68d61ed604078bc608ee2 60.173.31.54:43365), but this node's true ip and port is 99.192.73.131:26025. When we expand these items, the ips and ports in detailed information are right. From me : It is a problem of encoding (LITTLE ENDIAN => BIG ENDIAN) and wrong offset Some issue with Peers info svn path=/trunk/; revision=48850
This commit is contained in:
parent
ddb1685c93
commit
05e954f48c
|
@ -261,7 +261,7 @@ dissect_bt_dht_values(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
|
|||
{
|
||||
peer_index += 1;
|
||||
TVB_SET_ADDRESS( &addr, AT_IPv4, tvb, offset, 4);
|
||||
port = tvb_get_letohl( tvb, offset+4 );
|
||||
port = tvb_get_ntohs( tvb, offset+4 );
|
||||
|
||||
value_ti = proto_tree_add_none_format( sub_tree, hf_bt_dht_peer, tvb, offset, 6,
|
||||
"%d\t%s:%u", peer_index, ep_address_to_str( &addr ), port );
|
||||
|
@ -310,8 +310,8 @@ dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
|
|||
node_index += 1;
|
||||
|
||||
id = tvb_bytes_to_str(tvb, offset, 20 );
|
||||
TVB_SET_ADDRESS( &addr, AT_IPv4, tvb, offset, 4);
|
||||
port = tvb_get_letohl( tvb, offset+24 );
|
||||
TVB_SET_ADDRESS( &addr, AT_IPv4, tvb, offset+20, 4);
|
||||
port = tvb_get_ntohs( tvb, offset+24 );
|
||||
|
||||
node_ti = proto_tree_add_none_format( sub_tree, hf_bt_dht_node, tvb, offset, 26,
|
||||
"%d\t%s %s:%u", node_index, id, ep_address_to_str( &addr ), port );
|
||||
|
|
Loading…
Reference in New Issue