extmod/modlwip: Fix IGMP address type when IPv6 is enabled.
This was missed in 628abf8f25. 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>
This commit is contained in:
parent
85053adb24
commit
919756cea4
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue