aboutsummaryrefslogtreecommitdiff
path: root/bpf_filter.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-08-31 18:17:35 -0700
committerGuy Harris <guy@alum.mit.edu>2018-08-31 18:17:35 -0700
commitf21caab7dfb4d6f0e76db7ad078fe85f68481a9a (patch)
tree1e138ab9af880f37a325dc7606b891a0cbd3d326 /bpf_filter.c
parent96571eef583c493956809f5f1f36f807683c07da (diff)
Squelch a compiler warning.
Diffstat (limited to 'bpf_filter.c')
-rw-r--r--bpf_filter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bpf_filter.c b/bpf_filter.c
index af19158d..ebf118f4 100644
--- a/bpf_filter.c
+++ b/bpf_filter.c
@@ -44,6 +44,7 @@
#include <pcap/pcap-inttypes.h>
#include "pcap-types.h"
+#include "varattrs.h"
#include "extract.h"
#define EXTRACT_SHORT EXTRACT_BE_U_2
@@ -83,9 +84,15 @@ enum {
*
* Thanks to Ani Sinha <ani@arista.com> for providing initial implementation
*/
+#if defined(SKF_AD_VLAN_TAG_PRESENT)
u_int
bpf_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p,
u_int wirelen, u_int buflen, const struct bpf_aux_data *aux_data)
+#else
+u_int
+bpf_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p,
+ u_int wirelen, u_int buflen, const struct bpf_aux_data *aux_data _U_)
+#endif
{
register uint32_t A, X;
register bpf_u_int32 k;
@@ -370,7 +377,6 @@ bpf_filter(const struct bpf_insn *pc, const u_char *p, u_int wirelen,
return bpf_filter_with_aux_data(pc, p, wirelen, buflen, NULL);
}
-
/*
* Return true if the 'fcode' is a valid filter program.
* The constraints are that each jump be forward and to a valid