Add safety nets for lousy networks

This commit is contained in:
Sergio R. Caprile committed 2025-12-03 11:31:47 -03:00
1 parent 0f1a3cf84b
commit 66dcca9392
5 files changed
+182 -46

No files matched your search

+2
View File
@@ -252,6 +252,7 @@ static void init_tests(struct mg_mgr *mgr, struct eth *e, struct ipp *ipp,
if (ipp->ip6 != NULL) {
mif->ip6[0] = 1;
mif->gw6[0] = 1;
mif->gw6_ready = true;
mif->state = MG_TCPIP_STATE_READY; // so DHCP stops
mif->state6 = MG_TCPIP_STATE_READY; // so mg_send() works and RS stops
} else
@@ -259,6 +260,7 @@ static void init_tests(struct mg_mgr *mgr, struct eth *e, struct ipp *ipp,
{
mif->ip = 1;
mif->gw = 1;
mif->gw_ready = true;
mif->mask = 255; // use router, to avoid firing an ARP request
mif->state = MG_TCPIP_STATE_READY; // so mg_send() works and DHCP stops
}