aboutsummaryrefslogtreecommitdiff
path: root/bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bpf.c')
-rw-r--r--bpf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bpf.c b/bpf.c
index e130850..d8bf46c 100644
--- a/bpf.c
+++ b/bpf.c
@@ -236,6 +236,11 @@ size_t bpf_arg_comp(struct sock_filter **pfilter, int op, int argidx,
unsigned char jt, unsigned char jf);
int flip = 0;
+ if (!filter) {
+ *pfilter = NULL;
+ return 0;
+ }
+
/* Load arg */
curr_block += bpf_load_arg(curr_block, argidx);