examples/l2fwd-crypto: fix supported key size check
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 12 Apr 2016 10:04:03 +0000 (11:04 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Jun 2016 20:21:52 +0000 (22:21 +0200)
commit37ebd9e12dd585a9472c254499135fedabf5aa06
tree115334811614692674543914c133719feb780f5f
parent5c1824f6ed6de9d2aacd071d4539400120bd6ba8
examples/l2fwd-crypto: fix supported key size check

When initializing crypto devices within the app,
the provided key sizes are checked against the supported
sizes from the crypto device capabilities.

When the supported sizes are not a range, but a single value,
the check may become an infinite loop (when size is not supported).

Fixes: a061e50a0d97 ("examples/l2fwd-crypto: fix ambiguous input key size")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
examples/l2fwd-crypto/main.c