igmp: Fix optimized code by always skipping the first entry in the linked groups list

commit 8c52afb6ca ("igmp: Optimize code by always skipping the first entry in the linked groups list - it is always the "allsystems" entry")
accidently changes the code logic. it should check groupref rather than group.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2016-10-02 20:50:32 +08:00 committed by Dirk Ziegelmeier
parent 8f8f56914b
commit 5e15125b3d

View File

@ -374,8 +374,8 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest)
/* Do not send messages on the all systems group address! */
/* Skip the first group in the list, it is always the allsystems group added in igmp_start() */
if(group != NULL) {
group = group->next;
if(groupref != NULL) {
groupref = groupref->next;
}
while (groupref) {