[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1333269926-24681-1-git-send-email-roy.qing.li@gmail.com>
Date: Sun, 1 Apr 2012 16:45:26 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org
Subject: [PATCH] ipv6: fix array index in ip6_mc_add_src()
From: RongQing.Li <roy.qing.li@...il.com>
Convert array index from the loop bound to the loop index.
Signed-off-by: RongQing.Li <roy.qing.li@...il.com>
---
net/ipv6/mcast.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 16c33e3..c6378de 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2044,7 +2044,7 @@ static int ip6_mc_add_src(struct inet6_dev *idev, const struct in6_addr *pmca,
if (!delta)
pmc->mca_sfcount[sfmode]--;
for (j=0; j<i; j++)
- (void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
+ ip6_mc_del1_src(pmc, sfmode, &psfsrc[j]);
} else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
struct ip6_sf_list *psf;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists