forked from osmocom/wireshark
PPCAP: don't pass by local variable for display address
Change-Id: I9ac7ba2dfd8c8f3b084e8e95a893830828b28a46 Reviewed-on: https://code.wireshark.org/review/11308 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
e70a23f49d
commit
ad2e930ede
|
@ -304,15 +304,13 @@ dissect_ppcap_source_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ppc
|
|||
if (msg_len%16 != 0)
|
||||
{
|
||||
|
||||
proto_tree_add_ipv4(ppcap_tree1, hf_ppcap_source_ip_address1, tvb, offset, msg_len, tvb_get_ipv4(tvb, offset));
|
||||
proto_tree_add_item(ppcap_tree1, hf_ppcap_source_ip_address1, tvb, offset, msg_len, ENC_NA);
|
||||
TVB_SET_ADDRESS(&pinfo->net_src, AT_IPv4, tvb, offset, 4);
|
||||
copy_address_shallow(&pinfo->src, &pinfo->net_src);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct e_in6_addr value;
|
||||
tvb_get_ipv6(tvb, offset, &value);
|
||||
proto_tree_add_ipv6(ppcap_tree1, hf_ppcap_source_ip_address2, tvb, offset, msg_len, &value);
|
||||
proto_tree_add_item(ppcap_tree1, hf_ppcap_source_ip_address2, tvb, offset, msg_len, ENC_NA);
|
||||
TVB_SET_ADDRESS(&pinfo->net_src, AT_IPv6, tvb, offset, 6);
|
||||
copy_address_shallow(&pinfo->src, &pinfo->net_src);
|
||||
}
|
||||
|
@ -396,16 +394,13 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree
|
|||
{
|
||||
if (msg_len%16 != 0)
|
||||
{
|
||||
proto_tree_add_ipv4(ppcap_tree1, hf_ppcap_destination_ip_address1, tvb, offset, msg_len, tvb_get_ipv4(tvb, offset));
|
||||
proto_tree_add_item(ppcap_tree1, hf_ppcap_destination_ip_address1, tvb, offset, msg_len, ENC_NA);
|
||||
TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPv4, tvb, offset, 4);
|
||||
copy_address_shallow(&pinfo->dst, &pinfo->net_dst);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct e_in6_addr value;
|
||||
|
||||
tvb_get_ipv6(tvb, offset,&value);
|
||||
proto_tree_add_ipv6(ppcap_tree1, hf_ppcap_destination_ip_address2, tvb, offset, msg_len, &value);
|
||||
proto_tree_add_item(ppcap_tree1, hf_ppcap_destination_ip_address2, tvb, offset, msg_len, ENC_NA);
|
||||
TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPv6, tvb, offset, 6);
|
||||
copy_address_shallow(&pinfo->dst, &pinfo->net_dst);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue