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 <[email protected]> AuthorDate: Tue Sep 3 21:21:00 2024 +0800 igmp_leave:add check of dev status in igmp_leavegroup Signed-off-by: wangchen <[email protected]> --- 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);
