Merge pull request #7119 from jepler/picow-reuseaddr

Enable, use SOF_REUSEADDR
This commit is contained in:
Dan Halbert 2022-10-26 15:25:50 -04:00 committed by GitHub
commit ca25016b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -852,6 +852,8 @@ bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t *socket,
mp_raise_OSError(EHOSTUNREACH);
}
ip_set_option(socket->pcb.ip, SOF_REUSEADDR);
err_t err = ERR_ARG;
switch (socket->type) {
case MOD_NETWORK_SOCK_STREAM: {

View File

@ -37,6 +37,7 @@ typedef struct _lwip_socket_obj_t {
mp_obj_base_t base;
volatile union {
struct tcp_pcb *ip;
struct tcp_pcb *tcp;
struct udp_pcb *udp;
struct raw_pcb *raw;

View File

@ -52,6 +52,7 @@
#define LWIP_NETIF_TX_SINGLE_PBUF 1
#define DHCP_DOES_ARP_CHECK 0
#define LWIP_DHCP_DOES_ACD_CHECK 0
#define SO_REUSE 1
#ifndef NDEBUG
#define LWIP_DEBUG 1