Skip to content

Commit 7522f9c

Browse files
authored
Merge pull request #11667 from sathishm6/pr/ipv6-multi-cast-join-fix
Fixes IPv6 multicast join issue
2 parents e8804cd + 5b791a4 commit 7522f9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

features/lwipstack/LWIPStack.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,14 @@ nsapi_error_t LWIP::setsockopt(nsapi_socket_t handle, int level, int optname, co
560560
return NSAPI_ERROR_PARAMETER;
561561
}
562562

563-
/* Convert the interface address, or make sure it's the correct sort of "any" */
564563
if (imr->imr_interface.version != NSAPI_UNSPEC) {
564+
/* Convert the interface address */
565565
if (!convert_mbed_addr_to_lwip(&if_addr, &imr->imr_interface)) {
566566
return NSAPI_ERROR_PARAMETER;
567567
}
568568
} else {
569-
ip_addr_set_any(IP_IS_V6(&if_addr), &if_addr);
569+
/* Set interface address to "any", matching the group address type */
570+
ip_addr_set_any(IP_IS_V6(&multi_addr), &if_addr);
570571
}
571572

572573
igmp_err = ERR_USE; // Maps to NSAPI_ERROR_UNSUPPORTED

0 commit comments

Comments
 (0)