summaryrefslogtreecommitdiff
path: root/nuttx/net/uip/uip_igmpleave.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/net/uip/uip_igmpleave.c')
-rwxr-xr-xnuttx/net/uip/uip_igmpleave.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nuttx/net/uip/uip_igmpleave.c b/nuttx/net/uip/uip_igmpleave.c
index a482c5c4a..ac1cc81d5 100755
--- a/nuttx/net/uip/uip_igmpleave.c
+++ b/nuttx/net/uip/uip_igmpleave.c
@@ -127,14 +127,16 @@
*
****************************************************************************/
-void igmp_leavegroup(struct uip_driver_s *dev, uip_ipaddr_t *grpaddr)
+int igmp_leavegroup(struct uip_driver_s *dev, FAR const struct in_addr *grpaddr)
{
struct igmp_group_s *group;
irqstate_t flags;
+ DEBUGASSERT(dev && grpaddr);
+
/* Find the entry corresponding to the address leaving the group */
- group = uip_grpfind(dev, grpaddr);
+ group = uip_grpfind(dev, &grpaddr->s_addr);
if (group)
{
/* Cancel the timer and discard any queued Membership Reports. Canceling
@@ -166,8 +168,10 @@ void igmp_leavegroup(struct uip_driver_s *dev, uip_ipaddr_t *grpaddr)
/* And remove the group address from the ethernet drivers MAC filter set */
- uip_removemcastmac(dev, grpaddr);
+ uip_removemcastmac(dev, &grpaddr->s_addr);
+ return OK;
}
+ return -ENOENT;
}
#endif /* CONFIG_NET_IGMP */