bthci_acl: Set src/dst addresses before reassembly.
Set all addresses before we do reassembly because sub-dissectors may set their own addresses, and we don't want to override them again. This fixes "Follow TCP Stream" and shows the correct IP addresses in the Source and Destination columns when transporting IP packets. Allocate the addresses in pinfo pool to avoid possible stack buffer overflow. Bug: 13230 Change-Id: I3b81ccb02b38331add4773d9bb3d5e0f6dcf025e Reviewed-on: https://code.wireshark.org/review/19201 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
9d85c4f0b7
commit
f530b58bb5
|
@ -412,6 +412,13 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
fragmented = FALSE;
|
||||
}
|
||||
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->net_src, AT_STRINGZ, (int)strlen(src_name) + 1, src_name);
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->dl_src, AT_ETHER, 6, src_bd_addr);
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->src, AT_STRINGZ, (int)strlen(src_addr_name) + 1, src_addr_name);
|
||||
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->net_dst, AT_STRINGZ, (int)strlen(dst_name) + 1, dst_name);
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->dl_dst, AT_ETHER, 6, dst_bd_addr);
|
||||
alloc_address_wmem(pinfo->pool, &pinfo->dst, AT_STRINGZ, (int)strlen(dst_addr_name) + 1, dst_addr_name);
|
||||
|
||||
if (!fragmented || (!acl_reassembly && !(pb_flag & 0x01))) {
|
||||
/* call L2CAP dissector for PDUs that are not fragmented
|
||||
|
@ -507,14 +514,6 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
expert_add_info(pinfo, bthci_acl_itam, &ei_invalid_session);
|
||||
}
|
||||
|
||||
set_address(&pinfo->net_src, AT_STRINGZ, (int)strlen(src_name) + 1, src_name);
|
||||
set_address(&pinfo->dl_src, AT_ETHER, 6, src_bd_addr);
|
||||
set_address(&pinfo->src, AT_STRINGZ, (int)strlen(src_addr_name) + 1, src_addr_name);
|
||||
|
||||
set_address(&pinfo->net_dst, AT_STRINGZ, (int)strlen(dst_name) + 1, dst_name);
|
||||
set_address(&pinfo->dl_dst, AT_ETHER, 6, dst_bd_addr);
|
||||
set_address(&pinfo->dst, AT_STRINGZ, (int)strlen(dst_addr_name) + 1, dst_addr_name);
|
||||
|
||||
if (!pinfo->fd->flags.visited) {
|
||||
address *addr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue