Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lwIP-v2: update & fix (see below)
* avoid crash when IP address is set to 0(any) by dhcp not getting its lease renewal in due time
* automatically remove oldest PCBs in time-wait state, limit their number
  thanks to @me-no-dev 07f4d4c#diff-f8258e71e25fb9985ca3799e3d8b88ecR399
* add a macro HAS_PHY_CAPTURE=1 indicating capture facility is available
  • Loading branch information
d-a-v committed May 17, 2018
commit cb2635225510a62adfb3701247349f7e57369736
Binary file modified tools/sdk/lib/liblwip2.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip2_1460.a
Binary file not shown.
1 change: 1 addition & 0 deletions tools/sdk/lwip2/include/gluedebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#ifdef __cplusplus
extern "C"
#endif
#define HAS_PHY_CAPTURE 1
void (*phy_capture) (int netif_idx, const char* data, size_t len, int out, int success);

/////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion tools/sdk/lwip2/include/lwip-git-hash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// generated by makefiles/make-lwip2-hash
#ifndef LWIP_HASH_H
#define LWIP_HASH_H
#define LWIP_HASH_STR "STABLE-2_0_3_RELEASE/glue:arduino-2.4.1-7-g2b827f8"
#define LWIP_HASH_STR "STABLE-2_0_3_RELEASE/glue:arduino-2.4.1-10-g0c0d8c2"
#endif // LWIP_HASH_H
31 changes: 31 additions & 0 deletions tools/sdk/lwip2/include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -2997,6 +2997,7 @@

/*
--------------------------------------------------
------------- End of original lwipopts -----------
--------------------------------------------------
*/

Expand All @@ -3013,4 +3014,34 @@ struct netif;
#endif
LWIP_ERR_T lwip_unhandled_packet (struct pbuf* pbuf, struct netif* netif) __attribute__((weak));

/*
--------------------------------------------------
----------------- TIME-WAIT tweak ----------------
--------------------------------------------------
port @me-no-dev time-wait tweak
https://github.com/esp8266/Arduino/commit/07f4d4c241df2c552899857f39a4295164f686f2#diff-f8258e71e25fb9985ca3799e3d8b88ecR399
*/

void tcp_kill_timewait (void);
#define TCP_TW_LIMIT(l) \
if (l) do { \
u32_t count_plus_1 = 1; \
struct tcp_pcb* tmp = tcp_tw_pcbs; \
if (tmp) \
while ((tmp = tmp->next)) \
++count_plus_1; \
while (--count_plus_1 > (l)) \
/* kill the oldest */ \
/* pcb in TW state */ \
tcp_kill_timewait(); \
} while (0)

/**
* MEMP_NUM_TCP_PCB_TIME_WAIT: the number of TCP pcbs in TIME_WAIT state.
* (requires the LWIP_TCP option, 0 = disabled)
*/
#ifndef MEMP_NUM_TCP_PCB_TIME_WAIT
#define MEMP_NUM_TCP_PCB_TIME_WAIT 5
#endif

#endif // MYLWIPOPTS_H