You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/12 18:05:33 UTC
(nuttx) 01/03: igmp_leave:add check of dev status in igmp_leavegroup Signed-off-by: wangchen
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 78b64cc220285250c77f7d2038b0b46d16ba7791
Author: wangchen <wa...@xiaomi.com>
AuthorDate: Tue Sep 3 21:21:00 2024 +0800
igmp_leave:add check of dev status in igmp_leavegroup
Signed-off-by: wangchen <wa...@xiaomi.com>
---
net/igmp/igmp_leave.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/igmp/igmp_leave.c b/net/igmp/igmp_leave.c
index 03318a04da..75559ecf6f 100644
--- a/net/igmp/igmp_leave.c
+++ b/net/igmp/igmp_leave.c
@@ -166,7 +166,7 @@ int igmp_leavegroup(struct net_driver_s *dev,
/* Send a leave if the flag is set according to the state diagram */
- if (IS_LASTREPORT(group->flags))
+ if (IFF_IS_UP(dev->d_flags) && IS_LASTREPORT(group->flags))
{
ninfo("Schedule Leave Group message\n");
IGMP_STATINCR(g_netstats.igmp.leave_sched);