From ea80f5eb28f41ccfe8795c849f224030edee7221 Mon Sep 17 00:00:00 2001 From: Shawn Carey Date: Tue, 18 Jul 2023 06:31:43 -0400 Subject: [PATCH] enable TCP_DEBUG --- lib/ziti-tunnel/lwip/lwipopts.h | 7 +++++-- lib/ziti-tunnel/tunnel_tcp.c | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ziti-tunnel/lwip/lwipopts.h b/lib/ziti-tunnel/lwip/lwipopts.h index 4b4952c4..640be29b 100644 --- a/lib/ziti-tunnel/lwip/lwipopts.h +++ b/lib/ziti-tunnel/lwip/lwipopts.h @@ -7,10 +7,13 @@ #define MEM_SIZE 524288 /* the size of the heap memory (1600) */ #endif +#define SCAREY_DEBUGGING_LWIP 1 #if SCAREY_DEBUGGING_LWIP -#define MEMP_OVERFLOW_CHECK 2 /* reserves bytes before and after each memp element in every pool and fills it with a prominent default value */ -#define MEMP_SANITY_CHECK 1 /* run a sanity check after each mem_free() to make sure that the linked list of heap elements is not corrupted */ +//#define MEMP_OVERFLOW_CHECK 2 /* reserves bytes before and after each memp element in every pool and fills it with a prominent default value */ +//#define MEMP_SANITY_CHECK 1 /* run a sanity check after each mem_free() to make sure that the linked list of heap elements is not corrupted */ //#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 +#define LWIP_DEBUG +#define TCP_DEBUG LWIP_DBG_ON #endif //#define MEMP_NUM_PBUF 64 /* number of memp struct pbufs (used for PBUF_ROM and PBUF_REF) */ diff --git a/lib/ziti-tunnel/tunnel_tcp.c b/lib/ziti-tunnel/tunnel_tcp.c index 21d3a2ac..547ab696 100644 --- a/lib/ziti-tunnel/tunnel_tcp.c +++ b/lib/ziti-tunnel/tunnel_tcp.c @@ -93,8 +93,6 @@ static struct tcp_pcb *new_tcp_pcb(ip_addr_t src, ip_addr_t dest, struct tcp_hdr /* allocate a listener and set accept fn to appease lwip */ npcb->listener = phony_listener; npcb->netif_idx = netif_get_index(netif_default); - // tell lwip to send tcp keepalive acks when the connection is established - ip_set_option(npcb, SOF_KEEPALIVE); /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb);