upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-21 13:50:50 +0530
committerYour Name <you@example.com>2026-05-21 13:50:50 +0530
commita000d033ae9555e434ad3c6c7b44ed9b445ba99b (patch)
treed8d77963802d3003fe7d84ca0e41e413740cb048
parent5592e194029aafe96d76a0948750b8b43ae74413 (diff)
fix: restore AP gateway for DHCP client routing
AP gateway was set to 0.0.0.0 to prevent routing issues, but this broke DHCP — clients didn't get a default route through the board. Now set ap_gw = ap_ip so DHCP advertises the board as gateway, while the STA default route handles outbound internet traffic.
-rw-r--r--main/tollgate_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index ebfa52e..60503eb 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -336,7 +336,7 @@ static void wifi_create_ap_netif(void)
336 336
337 const tollgate_config_t *cfg = tollgate_config_get(); 337 const tollgate_config_t *cfg = tollgate_config_get();
338 esp_ip4_addr_t ap_ip = cfg->ap_ip; 338 esp_ip4_addr_t ap_ip = cfg->ap_ip;
339 esp_ip4_addr_t ap_gw = {0}; 339 esp_ip4_addr_t ap_gw = ap_ip;
340 esp_ip4_addr_t ap_mask; 340 esp_ip4_addr_t ap_mask;
341 IP4_ADDR(&ap_mask, 255, 255, 255, 0); 341 IP4_ADDR(&ap_mask, 255, 255, 255, 0);
342 342