From f23a0d475310af4ffebd5767c541d5ba403844be Mon Sep 17 00:00:00 2001
From: Ainar Garipov <a.garipov@adguard.com>
Date: Tue, 7 Mar 2023 14:37:14 +0300
Subject: [PATCH] Pull request 1761: home: fix panic

Fixes #5573.

Squashed commit of the following:

commit daa1e65dadd779fe897c034aca4e88a6dba44c4a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Mar 7 14:28:27 2023 +0300

    home: fix panic
---
 internal/home/config.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/internal/home/config.go b/internal/home/config.go
index ee848051..6aad27b6 100644
--- a/internal/home/config.go
+++ b/internal/home/config.go
@@ -285,6 +285,12 @@ var config = &configuration{
 			TrustedProxies: []string{"127.0.0.0/8", "::1/128"},
 			CacheSize:      4 * 1024 * 1024,
 
+			EDNSClientSubnet: &dnsforward.EDNSClientSubnet{
+				CustomIP:  "",
+				Enabled:   false,
+				UseCustom: false,
+			},
+
 			// set default maximum concurrent queries to 300
 			// we introduced a default limit due to this:
 			// https://github.com/AdguardTeam/AdGuardHome/issues/2015#issuecomment-674041912