Skip to content

Commit e19c3b1

Browse files
committed
Fix DHCP with cheap routers.
A load of consumer-grade routers set 0 UDP checksums in their DHCP Offer packets and rely on the Ethernet CRC for integrity. By default, the FreeRTOS TCP/IP stack drops these on the floor. Don't do that.
1 parent 2fe5c29 commit e19c3b1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/tcpip/FreeRTOSIPConfig.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@
101101
#define pvPortMalloc(x) malloc(x)
102102
#define vPortFree(x) free(x)
103103

104+
// Zero indicates that the checksum is omitted. This is common for link-local
105+
// things such as DHCP offers (where they can rely on the Ethernet checksum to
106+
// provide marginally better integrity guarantees). With this not set, the
107+
// TCP/IP stack will decide to drop DHCP Offer packets from a load of
108+
// consumer-grade routers.
109+
#define ipconfigUDP_PASS_ZERO_CHECKSUM_PACKETS 1
110+
104111
// #define DEBUG_FREERTOS_TCP
105112
#ifdef DEBUG_FREERTOS_TCP
106113
# define ipconfigHAS_DEBUG_PRINTF 1

0 commit comments

Comments
 (0)