fix error handle in ip_mc_add_src()
Subsystems (3)
PATCH 1/1 fix error handle in ip_mc_add_src()
When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding.
net/ipv4/igmp.c +2 -1
@@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,if (err) {int j; - pmc->sfcount[sfmode]--; +if (!delta) + pmc->sfcount[sfmode]--;for (j=0 ; j<i; j++) (void )ip_mc_del1_src (pmc, sfmode, &psfsrc[j]); }else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE ] !=0 )) {
Quoted 3 lines · Jun Zhao
When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding.
Missing "---" separator
net/ipv4/igmp.c static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, · line 1719
Quoted 10 lines
net/ipv4/igmp.c +1
-1@@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,if (err) {int j; - pmc->sfcount[sfmode]--; +if (!delta)
Missing space, should be : if (!delta)
Quoted 7 lines
net/ipv4/igmp.c +1
-0+ pmc->sfcount[sfmode]--;for (j=0 ; j<i; j++) (void )ip_mc_del1_src (pmc, sfmode, &psfsrc[j]); }else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE ] !=0 )) {Signed-off-by Jun Zhao <[email protected]>
Your "Signed-off-by:" should come before actual patch
Please read Documentation/SubmittingPatches
Thanks
Quoted 25 lines · Eric Dumazet
Quoted 3 lines · Jun Zhao
When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding.
Missing "---" separator
net/ipv4/igmp.c static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, · line 1719
Quoted 10 lines
net/ipv4/igmp.c +1
-1@@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,if (err) {int j; - pmc->sfcount[sfmode]--; +if (!delta)Missing space, should be : if (!delta)
Quoted 5 lines
net/ipv4/igmp.c +1
-0+ pmc->sfcount[sfmode]--;for (j=0 ; j<i; j++) (void )ip_mc_del1_src (pmc, sfmode, &psfsrc[j]); }else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE ] !=0 )) {
Quoted 11 lines
Quoted 2 lines
Signed-off-by Jun Zhao <[email protected]>Your "Signed-off-by:" should come before actual patch
Please read
Documentation/SubmittingPatchesThanks
Tks, Eric Dumazet , I will re-submit this patch and follow the format.
David Stevens
Acked-byWith Eric's changes,
Good catch!
+-DLS
[email protected] wrote on 11/21/2011 07:30:10 AM:
Quoted 54 lines
From: Jun Zhao <[email protected]>
To: Eric Dumazet <[email protected]>,
Cc: [email protected], [email protected]
Date: 11/21/2011 07:32 AM
Subject: Re: [patch] fix error handle inip_mc_add_src()Sent by: [email protected]Quoted 2 lines · Eric Dumazet
Quoted 1 line · Jun Zhao
When add sources to interface failure, need to roll back the
sfcount[MODE]
Quoted 10 lines
Quoted 2 lines
to before state. We need to match it corresponding.
Missing "---" separator
net/ipv4/igmp.c static int ip_mc_add_src(struct in_device
Quoted 5 lines
net/ipv4/igmp.c +0
-0@@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device
*in_dev,__be32*pmca, int sfmode,Quoted 13 lines
net/ipv4/igmp.c static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, · line 1719
Quoted 5 lines
net/ipv4/igmp.c +1
-1if (err) {int j; - pmc->sfcount[sfmode]--; +if (!delta)Missing space, should be : if (!delta)
Quoted 5 lines
net/ipv4/igmp.c +1
-0+ pmc->sfcount[sfmode]--;for (j=0 ; j<i; j++) (void )ip_mc_del1_src (pmc, sfmode, &psfsrc[j]); }else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE ] !=0 )) {Quoted 11 lines
Quoted 2 lines
Signed-off-by Jun Zhao <[email protected]>Your "Signed-off-by:" should come before actual patch
Please read
Documentation/SubmittingPatchesThanks
Tks, Eric Dumazet , I will re-submit this patch and follow the format.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerFrom: Jun Zhao <[email protected]>
Date: Mon, 21 Nov 2011 23:05:46 +0800
Quoted 2 lines
When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding.
You need to private a proper "Signed-off-by: " tag with your patch, please read Documentation/SubmittingPatches.
DO not just reply to this email with the signoff tag, instead make a new, fresh, clean posting of your patch with the necessary tag.