diff options
author | João Valverde <j@v6e.pt> | 2016-02-08 00:43:56 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-02-08 00:44:22 +0000 |
commit | ef929dc8eb8c61d5829132d2da2a3061df44bba9 (patch) | |
tree | 6dc7fb0abec832c1b336580bfeaec70717f0a76f /epan/packet.c | |
parent | 8df2857bc1082797cc7052eb5a6ebb45ac92e4b9 (diff) |
Revert "Add free_address_wmem() and other extensions to address API"
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896.
This commit introduces a segmentation fault for Lua code (uncovered by the test suite).
Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e
Reviewed-on: https://code.wireshark.org/review/13813
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/packet.c')
-rw-r--r-- | epan/packet.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/epan/packet.c b/epan/packet.c index 16614c4d9c..90f417006a 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -471,12 +471,12 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype, edt->pi.fd = fd; edt->pi.phdr = phdr; edt->pi.pseudo_header = &phdr->pseudo_header; - clear_address(&edt->pi.dl_src); - clear_address(&edt->pi.dl_dst); - clear_address(&edt->pi.net_src); - clear_address(&edt->pi.net_dst); - clear_address(&edt->pi.src); - clear_address(&edt->pi.dst); + edt->pi.dl_src.type = AT_NONE; + edt->pi.dl_dst.type = AT_NONE; + edt->pi.net_src.type = AT_NONE; + edt->pi.net_dst.type = AT_NONE; + edt->pi.src.type = AT_NONE; + edt->pi.dst.type = AT_NONE; edt->pi.ctype = CT_NONE; edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; @@ -537,12 +537,12 @@ dissect_file(epan_dissect_t *edt, struct wtap_pkthdr *phdr, edt->pi.fd = fd; edt->pi.phdr = phdr; edt->pi.pseudo_header = &phdr->pseudo_header; - clear_address(&edt->pi.dl_src); - clear_address(&edt->pi.dl_dst); - clear_address(&edt->pi.net_src); - clear_address(&edt->pi.net_dst); - clear_address(&edt->pi.src); - clear_address(&edt->pi.dst); + edt->pi.dl_src.type = AT_NONE; + edt->pi.dl_dst.type = AT_NONE; + edt->pi.net_src.type = AT_NONE; + edt->pi.net_dst.type = AT_NONE; + edt->pi.src.type = AT_NONE; + edt->pi.dst.type = AT_NONE; edt->pi.ctype = CT_NONE; edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; @@ -754,12 +754,12 @@ call_dissector_work_error(dissector_handle_t handle, tvbuff_t *tvb, save_writable = col_get_writable(pinfo->cinfo); col_set_writable(pinfo->cinfo, FALSE); - copy_address_shallow(&save_dl_src, &pinfo->dl_src); - copy_address_shallow(&save_dl_dst, &pinfo->dl_dst); - copy_address_shallow(&save_net_src, &pinfo->net_src); - copy_address_shallow(&save_net_dst, &pinfo->net_dst); - copy_address_shallow(&save_src, &pinfo->src); - copy_address_shallow(&save_dst, &pinfo->dst); + save_dl_src = pinfo->dl_src; + save_dl_dst = pinfo->dl_dst; + save_net_src = pinfo->net_src; + save_net_dst = pinfo->net_dst; + save_src = pinfo->src; + save_dst = pinfo->dst; /* Dissect the contained packet. */ TRY { @@ -770,12 +770,12 @@ call_dissector_work_error(dissector_handle_t handle, tvbuff_t *tvb, * Restore the column writability and addresses. */ col_set_writable(pinfo->cinfo, save_writable); - copy_address_shallow(&pinfo->dl_src, &save_dl_src); - copy_address_shallow(&pinfo->dl_dst, &save_dl_dst); - copy_address_shallow(&pinfo->net_src, &save_net_src); - copy_address_shallow(&pinfo->net_dst, &save_net_dst); - copy_address_shallow(&pinfo->src, &save_src); - copy_address_shallow(&pinfo->dst, &save_dst); + pinfo->dl_src = save_dl_src; + pinfo->dl_dst = save_dl_dst; + pinfo->net_src = save_net_src; + pinfo->net_dst = save_net_dst; + pinfo->src = save_src; + pinfo->dst = save_dst; /* * Restore the current protocol, so any @@ -812,12 +812,12 @@ call_dissector_work_error(dissector_handle_t handle, tvbuff_t *tvb, ENDTRY; col_set_writable(pinfo->cinfo, save_writable); - copy_address_shallow(&pinfo->dl_src, &save_dl_src); - copy_address_shallow(&pinfo->dl_dst, &save_dl_dst); - copy_address_shallow(&pinfo->net_src, &save_net_src); - copy_address_shallow(&pinfo->net_dst, &save_net_dst); - copy_address_shallow(&pinfo->src, &save_src); - copy_address_shallow(&pinfo->dst, &save_dst); + pinfo->dl_src = save_dl_src; + pinfo->dl_dst = save_dl_dst; + pinfo->net_src = save_net_src; + pinfo->net_dst = save_net_dst; + pinfo->src = save_src; + pinfo->dst = save_dst; pinfo->want_pdu_tracking = 0; return len; } |