net/mld: fix build break of mld router

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-01-11 19:44:41 +08:00 committed by Xiang Xiao
parent 1ce93a7d9a
commit 47d628d22e
6 changed files with 7 additions and 5 deletions

View file

@ -16,7 +16,7 @@ menuconfig NET_MLD
if NET_MLD
config NET_MLD_ROUTER
bool # "MLD Router support"
bool "MLD Router support"
default n
---help---
Enables a few hooks that will be needed for router support in the

View file

@ -58,6 +58,7 @@
*
****************************************************************************/
#ifndef CONFIG_NET_MLD_ROUTER
static int mld_ngroups(FAR struct net_driver_s *dev)
{
FAR struct mld_group_s *group;
@ -79,6 +80,7 @@ static int mld_ngroups(FAR struct net_driver_s *dev)
return ngroups > 0 ? ngroups - 1 : 0;
}
#endif
/****************************************************************************
* Public Functions

View file

@ -206,7 +206,7 @@ int mld_joingroup(FAR const struct ipv6_mreq *mrec)
* perform the group startup operations.
*/
if (group->join == 0)
if (group->njoins == 0)
{
/* This is the for join from this host. Perform out start up
* operations.

View file

@ -321,7 +321,7 @@ int mld_query(FAR struct net_driver_s *dev,
* cycle
*/
mld_new_pollcycle(dev)
mld_new_pollcycle(dev);
#endif
/* Check MLDv1 compatibility mode */

View file

@ -65,7 +65,7 @@ int mld_report(FAR struct net_driver_s *dev,
#ifdef CONFIG_NET_MLD_ROUTER
/* Assure that the group address is an IPv6 multicast address */
if (!net_is_addr_mcast(mrec->ipv6mr_multiaddr.s6_addr16))
if (!net_is_addr_mcast(grpaddr))
{
return -EINVAL;
}

View file

@ -280,7 +280,7 @@ void mld_send(FAR struct net_driver_s *dev, FAR struct mld_group_s *group,
{
/* Update accumulated membership for all groups. */
mld_new_pollcycle(dev)
mld_new_pollcycle(dev);
}
else
{