Skip to content

Commit 276baa3

Browse files
committed
fix ipv6 bug when input the wrong broadcast
1 parent 893aa7f commit 276baa3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/core/ipv6/mld6.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@ mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
322322
err_t err = ERR_VAL; /* no matching interface */
323323
struct netif *netif;
324324
LWIP_ASSERT_CORE_LOCKED();
325-
#if ESP_IPV6
326-
LWIP_ERROR("mld6_joingroup: attempt to join non-multicast address", ip6_addr_ismulticast(groupaddr), return ERR_VAL;);
327-
#endif
328325
/* loop through netif's */
329326
NETIF_FOREACH(netif) {
330327
/* Should we join this interface ? */
@@ -355,7 +352,9 @@ mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr)
355352
struct mld_group *group;
356353
#if LWIP_IPV6_SCOPES
357354
ip6_addr_t ip6addr;
358-
355+
#if ESP_IPV6
356+
LWIP_ERROR("mld6_joingroup: attempt to join non-multicast address", ip6_addr_ismulticast(groupaddr), return ERR_VAL;);
357+
#endif
359358
/* If the address has a particular scope but no zone set, use the netif to
360359
* set one now. Within the mld6 module, all addresses are properly zoned. */
361360
if (ip6_addr_lacks_zone(groupaddr, IP6_MULTICAST)) {

0 commit comments

Comments
 (0)