aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-04-13 16:28:01 +0200
committerAlice Frosi <afrosi@redhat.com>2023-04-13 16:28:01 +0200
commit8e93fbb4313c0ebd955478797febf2f99e3dcd96 (patch)
treeb28528aa7c1f0a458a748d1d0492670dd55ba946
parentfdaf7901b9d8c6c598f260c245213b5a759210f0 (diff)
downloadseitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar.gz
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar.bz2
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar.lz
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar.xz
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.tar.zst
seitan-8e93fbb4313c0ebd955478797febf2f99e3dcd96.zip
Add comparison operations to the BPF filter
-rw-r--r--cooker/filter.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/cooker/filter.c b/cooker/filter.c
index 0b35463..a4e1857 100644
--- a/cooker/filter.c
+++ b/cooker/filter.c
@@ -447,9 +447,27 @@ unsigned int create_bfp_program(struct syscall_entry table[],
size += eq(&filter[size], k, entry, 0,
offset);
break;
+ case NE:
+ size += neq(&filter[size], k, entry, 0,
+ offset);
+ break;
+ case GT:
+ size += gt(&filter[size], k, entry, 0,
+ offset);
+ break;
+ case LT:
+ size += lt(&filter[size], k, entry, 0,
+ offset);
+ break;
+ case GE:
+ size += ge(&filter[size], k, entry, 0,
+ offset);
+ break;
+ case LE:
+ size += le(&filter[size], k, entry, 0,
+ offset);
+ break;
default:
- fprintf(stderr,
- "operation not recognized\n");
continue;
}
n_checks++;