mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
pktgen: do not access flows[] beyond its length
typo -- pkt_dev->nflows is for stats only, the number of concurrent flows is stored in cflows. Reported-By: Vladimir Ivashchenko <hazard@francoudi.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c40499e04b
commit
5b5f792a6a
1 changed files with 1 additions and 1 deletions
|
@ -2447,7 +2447,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev)
|
|||
if (pkt_dev->cflows) {
|
||||
/* let go of the SAs if we have them */
|
||||
int i = 0;
|
||||
for (; i < pkt_dev->nflows; i++){
|
||||
for (; i < pkt_dev->cflows; i++) {
|
||||
struct xfrm_state *x = pkt_dev->flows[i].x;
|
||||
if (x) {
|
||||
xfrm_state_put(x);
|
||||
|
|
Loading…
Reference in a new issue