Skip to content

Commit 6f32768

Browse files
committed
extmod/modlwip: Fix IGMP address type when IPv6 is enabled.
This was missed in 628abf8. The the bug was that, when IPv6 is enabled, the `sizeof(ip_addr_t)` is much larger than IPv4 size, which is what's needed for IGMP addressing. Fixes issue #16100. Signed-off-by: Damien George <damien@micropython.org>
1 parent a7d3bc2 commit 6f32768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extmod/modlwip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ static mp_obj_t lwip_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
14321432
case IP_DROP_MEMBERSHIP: {
14331433
mp_buffer_info_t bufinfo;
14341434
mp_get_buffer_raise(args[3], &bufinfo, MP_BUFFER_READ);
1435-
if (bufinfo.len != sizeof(ip_addr_t) * 2) {
1435+
if (bufinfo.len != sizeof(MP_IGMP_IP_ADDR_TYPE) * 2) {
14361436
mp_raise_ValueError(NULL);
14371437
}
14381438

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy