summaryrefslogtreecommitdiffstats
path: root/src/vnet/classify/pcap_classify.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/classify/pcap_classify.h')
-rw-r--r--src/vnet/classify/pcap_classify.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/classify/pcap_classify.h b/src/vnet/classify/pcap_classify.h
index 1f1c38fd6e6..e079816f62c 100644
--- a/src/vnet/classify/pcap_classify.h
+++ b/src/vnet/classify/pcap_classify.h
@@ -33,6 +33,7 @@ vnet_is_packet_pcaped (vnet_pcap_t *pp, vlib_buffer_t *b, u32 sw_if_index)
{
const u32 pcap_sw_if_index = pp->pcap_sw_if_index;
const u32 filter_classify_table_index = pp->filter_classify_table_index;
+ const vlib_error_t pcap_error_index = pp->pcap_error_index;
if (pcap_sw_if_index != 0)
{
@@ -42,6 +43,9 @@ vnet_is_packet_pcaped (vnet_pcap_t *pp, vlib_buffer_t *b, u32 sw_if_index)
return 0; /* wrong interface, skip */
}
+ if (pcap_error_index != (vlib_error_t) ~0 && pcap_error_index != b->error)
+ return 0; /* wrong error */
+
if (filter_classify_table_index != ~0 &&
vnet_is_packet_traced_inline (b, filter_classify_table_index,
0 /* full classify */) != 1)