summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-11-19 16:19:36 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-11-19 17:03:36 +0000
commit6e1dc9027fa6b48c0102fc7e48fd1909377f4e1b (patch)
treeecc52364722bf9f9f0fa4d5fba13e975b49bae1a
parent554babcdcb8b24db4eedea2da482457b47f40d50 (diff)
downloadwireshark-6e1dc9027fa6b48c0102fc7e48fd1909377f4e1b.tar.gz
Profinet: use pinfo pool to build conversation filter
Packet pool cannot be used from GUI. Bug: 11730 Change-Id: I4f5764a38a10809373c365ecf1ea50404a15b89a Reviewed-on: https://code.wireshark.org/review/11966 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> (cherry picked from commit cf562210de8997813abf624de36a5a70d73ac421) Reviewed-on: https://code.wireshark.org/review/11969
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 7ee9610f01..022e5d8bf9 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -9676,7 +9676,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
- char *buf, *guid_str;
+ char *buf;
address controllermac_addr, devicemac_addr;
if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
@@ -9686,15 +9686,13 @@ pn_io_ar_conv_filter(packet_info *pinfo)
SET_ADDRESS(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
SET_ADDRESS(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
- guid_str = guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid);
buf = g_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
- guid_str,
- ar->controlleralarmref, address_to_str(wmem_packet_scope(), &controllermac_addr),
- ar->devicealarmref, address_to_str(wmem_packet_scope(), &devicemac_addr));
- wmem_free(NULL, guid_str);
+ guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid),
+ ar->controlleralarmref, address_to_str(pinfo->pool, &controllermac_addr),
+ ar->devicealarmref, address_to_str(pinfo->pool, &devicemac_addr));
return buf;
}
@@ -9713,9 +9711,9 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
SET_ADDRESS(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
SET_ADDRESS(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
- controllermac_str = address_to_str(wmem_packet_scope(), &controllermac_addr);
- devicemac_str = address_to_str(wmem_packet_scope(), &devicemac_addr);
- guid_str = guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid);
+ controllermac_str = address_to_str(pinfo->pool, &controllermac_addr);
+ devicemac_str = address_to_str(pinfo->pool, &devicemac_addr);
+ guid_str = guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid);
if (ar->arType == 0x0010) /* IOCARSingle using RT_CLASS_3 */
{
buf = g_strdup_printf(