From e1282556e82ed470941a845af447065502a2c5ad Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Thu, 7 Jul 2022 16:35:45 +0100 Subject: [PATCH] shared/netutils/dhcpserver: Match default DNS to server IP. Change the default DNS to match the gateway IP of a board running in access point mode (or otherwise acting as a "server"). This fixes the rather meaningless use of "8.8.8.8" as the default DNS server address offered up to access point clients via the DHCP server. Since most devices wont be able to proxy access to the real "8.8.8.8". It allows for a DNS responder to run and provide a catchall response for captive portal functionality, or just a quality-of-life response to a friendly URL for access-point based configuration and other applications. Signed-off-by: Phil Howard --- shared/netutils/dhcpserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/netutils/dhcpserver.c b/shared/netutils/dhcpserver.c index 9db42b3fd9..ea5718d114 100644 --- a/shared/netutils/dhcpserver.c +++ b/shared/netutils/dhcpserver.c @@ -65,7 +65,7 @@ #define PORT_DHCP_SERVER (67) #define PORT_DHCP_CLIENT (68) -#define DEFAULT_DNS MAKE_IP4(8, 8, 8, 8) +#define DEFAULT_DNS MAKE_IP4(192, 168, 4, 1) #define DEFAULT_LEASE_TIME_S (24 * 60 * 60) // in seconds #define MAC_LEN (6)