patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8754, Add functions to join/leave IGMP...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8754: Add functions to join/leave IGMP by netif

Submitter:  Erik Ekman <yarrick>
Submitted:  Mon 28 Sep 2015 02:48:19 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Wed 30 Sep 2015 07:20:29 PM UTC, comment #9: 

I haven't used that function, all I can say is that it seems it was that way before the patch.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 30 Sep 2015 07:16:05 PM UTC, comment #8: 

The change is comment #6 is not quite right, since it continues looping after getting a match.

Valery Ushakov <uwe>
Wed 30 Sep 2015 02:35:39 PM UTC, comment #7: 

Oh, right. I've pushed that one, too.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 30 Sep 2015 01:56:04 PM UTC, comment #6: 

Attaching patch that uses netif_get_ip6_addr_match() instead of inlined for-loop for netif address check.

I think he meant something like this.

(file #35015)

Erik Ekman <yarrick>
Group Member
Wed 30 Sep 2015 12:49:50 PM UTC, comment #5: 

Both patches applied, thanks Erik.

I didn't get comment #3 though. Could you post a patch for what you want to have changed, Valery?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 30 Sep 2015 11:38:17 AM UTC, comment #4: 

That looks good. But for clarity I would want that as a separate patch.

Erik Ekman <yarrick>
Group Member
Wed 30 Sep 2015 11:30:31 AM UTC, comment #3: 

Please, can ipv6 change be combined with factoring out the open-coded version of netif_matches_ip6_addr?  I forgot I did that in my version.  So the end result would look something like


err_t
mld6_joingroup(ip6_addr_t *srcaddr, ip6_addr_t *groupaddr)
{
  err_t              err = ERR_VAL; /* no matching interface */
  struct netif      *netif;

  if (ip6_addr_isany(srcaddr)) {
    for (netif = netif_list; netif != NULL; netif = netif->next) {
      err = mld6_netif_joingroup(netif, groupaddr);
    }
  }
  else {
    for (netif = netif_list; netif != NULL; netif = netif->next) {
      if (netif_matches_ip6_addr(netif, srcaddr) >= 0) {
        return mld6_netif_joingroup(netif, groupaddr);
      }
    }
  }

  return err;
}


Valery Ushakov <uwe>
Wed 30 Sep 2015 07:56:39 AM UTC, comment #2: 

Here comes the patch for the IPv6 version of the same code

(file #35014)

Erik Ekman <yarrick>
Group Member
Tue 29 Sep 2015 12:26:39 PM UTC, comment #1: 

Yes, please.  I have this change for mld6.c but since it's against an older head from 2014 I don't think it makes much sense for me to post that rather straightforward patch here.

Valery Ushakov <uwe>
Mon 28 Sep 2015 02:48:19 PM UTC, original submission:  

Existing functions are based on IP address, but the address is used
only to look up which netif to act on. The netif-based core code is
extracted to new exported functions.

If you have a netif handle, this makes it easier to join/leave
groups without the need to get the IP address first only for the IGMP code to convert back to netif.




If this is accepted I can make the same change for IPv6, were it works similarly.

Erik Ekman <yarrick>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by uwe (Posted a comment)
  • -email is unavailable- added by yarrick (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-30 yarrick Attached File- Added 0001-mld6-Simplify-join-leavegroup.patch, #35015
    2015-09-30 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2015-09-30 yarrick Attached File- Added 0002-Add-functions-to-join-leave-v6-multicast-group-by-ne.patch, #35014
    2015-09-28 yarrick Attached File- Added 0001-Add-functions-to-join-leave-IGMP-group-by-netif.patch, #35004

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code