Skip to content

Commit

Permalink
enable TCP_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Jul 18, 2023
1 parent 4cb75a1 commit ea80f5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/ziti-tunnel/lwip/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */

Expand Down
2 changes: 0 additions & 2 deletions lib/ziti-tunnel/tunnel_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ea80f5e

Please sign in to comment.