diff options
| author | Damien George <damien@micropython.org> | 2024-10-31 12:41:17 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-11-04 13:12:18 +1100 |
| commit | 919756cea4da30ab98cfa00016ed5b3847003219 (patch) | |
| tree | de15f1a951c86665ce3ab22147b58b8b64a6b2f9 | |
| parent | 85053adb243800e7168e5736853bea5364770191 (diff) | |
extmod/modlwip: Fix IGMP address type when IPv6 is enabled.
This was missed in 628abf8f25a7705a2810fffe2ca6ae652c532896. 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>
| -rw-r--r-- | extmod/modlwip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 21c6f7264..0d38bf41b 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -1432,7 +1432,7 @@ static mp_obj_t lwip_socket_setsockopt(size_t n_args, const mp_obj_t *args) { case IP_DROP_MEMBERSHIP: { mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[3], &bufinfo, MP_BUFFER_READ); - if (bufinfo.len != sizeof(ip_addr_t) * 2) { + if (bufinfo.len != sizeof(MP_IGMP_IP_ADDR_TYPE) * 2) { mp_raise_ValueError(NULL); } |
