Skip to content

Commit

Permalink
extmod/modlwip: Fix setting of IP option SOF_BROADCAST.
Browse files Browse the repository at this point in the history
Follow up to 25b89cb.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Sep 12, 2023
1 parent 3637252 commit 8dbdac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extmod/modlwip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8dbdac8

Please sign in to comment.