Message ID | 1516723226-13957-2-git-send-email-odpbot@yandex.ru |
---|---|
State | Superseded |
Headers | show |
Series | [v2,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 276430923..d97807df0 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -979,8 +979,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;