extmod/modlwip: Fix setting of IP option SOF_BROADCAST.

Follow up to 25b89cbe94.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-09-12 12:49:14 +10:00
parent 3637252b7b
commit 8dbdac8c82

View File

@ -1382,9 +1382,9 @@ STATIC mp_obj_t lwip_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
mp_int_t val = mp_obj_get_int(args[3]);
// Options are common for UDP and TCP pcb's.
if (val) {
ip_set_option(socket->pcb.tcp, SOF_REUSEADDR);
ip_set_option(socket->pcb.tcp, opt);
} else {
ip_reset_option(socket->pcb.tcp, SOF_REUSEADDR);
ip_reset_option(socket->pcb.tcp, opt);
}
break;
}