summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 1e0a177d..ee7ae4f1 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -1209,6 +1209,11 @@ int fset_add(struct flow_set * set,
pthread_rwlock_wrlock(&ai.lock);
+ if (ai.flows[fd].flow_id < 0) {
+ pthread_rwlock_unlock(&ai.lock);
+ return -EINVAL;
+ }
+
ret = shm_flow_set_add(ai.fqset, set->idx, ai.flows[fd].flow_id);
packets = shm_rbuff_queued(ai.flows[fd].rx_rb);