lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Bug in igmp_input (igmp.c)


From: Michael Fischer
Subject: [lwip-devel] Bug in igmp_input (igmp.c)
Date: Thu, 02 Feb 2017 17:51:47 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Dear lwIP List,

I think I have found a bug in igmp_input (core\ipv4\igmp.c).

Unfortunately the stack will not answer a  IGMP_MEMB_QURY correct.
If I have register a multicast address, the query will not answered.

The original code looks like

==================================================================

      groupref = netif_igmp_data(inp);

      /* 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(groupref != NULL) {
        groupref = groupref->next;
      }

      while (groupref) {
        igmp_delaying_member(groupref, igmp->igmp_maxresp);
        groupref = groupref->next;
      }

==================================================================

But in this case the allsystems group is not the first group in the list. It looks that a new
address is added in the front. Therefore the new code should look like:

==================================================================

      groupref = netif_igmp_data(inp);

      while (groupref) {
        /* Do not send messages on the all systems group address! */
        if ( !(ip4_addr_cmp(&(groupref->group_address), &allsystems)))
        {
          igmp_delaying_member(groupref, igmp->igmp_maxresp);
        }
        groupref = groupref->next;
      }

==================================================================

With this changes, everything is working as expected.

Best regards,
Michael
(www.emb4fun.de)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]