aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/tap.c20
-rw-r--r--epan/tap.h3
2 files changed, 14 insertions, 9 deletions
diff --git a/epan/tap.c b/epan/tap.c
index ba4a1839e5..0abcbdee71 100644
--- a/epan/tap.c
+++ b/epan/tap.c
@@ -322,15 +322,19 @@ tap_push_tapped_queue(epan_dissect_t *edt)
for(i=0;i<tap_packet_index;i++){
for(tl=(tap_listener_t *)tap_listener_queue;tl;tl=tl->next){
tp=&tap_packet_array[i];
- if(tp->tap_id==tl->tap_id){
- gboolean passed=TRUE;
- if(tl->code){
- passed=dfilter_apply_edt(tl->code, edt);
+ /* Don't tap the packet if its an "error" unless the listener tells us to */
+ if ((!tp->pinfo->flags.in_error_pkt) || (tl->flags & TL_REQUIRES_ERROR_PACKETS))
+ {
+ if(tp->tap_id==tl->tap_id){
+ gboolean passed=TRUE;
+ if(tl->code){
+ passed=dfilter_apply_edt(tl->code, edt);
+ }
+ if(passed && tl->packet){
+ tl->needs_redraw|=tl->packet(tl->tapdata, tp->pinfo, edt, tp->tap_specific_data);
+ }
}
- if(passed && tl->packet){
- tl->needs_redraw|=tl->packet(tl->tapdata, tp->pinfo, edt, tp->tap_specific_data);
- }
- }
+ }
}
}
}
diff --git a/epan/tap.h b/epan/tap.h
index 4b6f72e5ef..fa801c2a49 100644
--- a/epan/tap.h
+++ b/epan/tap.h
@@ -40,8 +40,9 @@ typedef void (*tap_draw_cb)(void *tapdata);
#define TL_REQUIRES_NOTHING 0x00000000 /**< nothing */
#define TL_REQUIRES_PROTO_TREE 0x00000001 /**< full protocol tree */
#define TL_REQUIRES_COLUMNS 0x00000002 /**< columns */
+#define TL_REQUIRES_ERROR_PACKETS 0x00000004 /**< include packet even if pinfo->flags.in_error_pkt is set */
/** Flags to indicate what the tap listener does */
-#define TL_IS_DISSECTOR_HELPER 0x00000004 /**< tap helps a dissector do work
+#define TL_IS_DISSECTOR_HELPER 0x00000008 /**< tap helps a dissector do work
** but does not, itself, require dissection */
#ifdef HAVE_PLUGINS