Message ID | 1516860016-16876-2-git-send-email-odpbot@yandex.ru |
---|---|
State | New |
Headers | show |
Series | [v3,1/1] linux-gen: cls: fix: invalid queue handle check for hashing | expand |
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 668b41eb1..85353a12f 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -988,8 +988,10 @@ int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base, if (cos == NULL) return -EINVAL; - if (cos->s.queue == ODP_QUEUE_INVALID || - cos->s.pool == ODP_POOL_INVALID) + if (cos->s.queue == ODP_QUEUE_INVALID && cos->s.num_queue == 1) + return -EFAULT; + + if (cos->s.pool == ODP_POOL_INVALID) return -EFAULT; *pool = cos->s.pool;