diff options
author | Florian Westphal <fw@strlen.de> | 2009-05-21 15:07:12 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-15 09:39:53 -0700 |
commit | 94c571ca297247524159f6b045cd82beb6312876 (patch) | |
tree | c05caab8da1687ea300fe26860faf884f5dd3710 /net | |
parent | c930a1bcf48a0ba7350c224071455afcb9da0882 (diff) |
pktgen: do not access flows[] beyond its length
[ Upstream commit 5b5f792a6a9a2f9ae812d151ed621f72e99b1725 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 65498483325a..c4070ecbbedd 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -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); |