mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix oversight in build_server_array().
The index computation went awry when servers are disabled by the loop-detection system. Thanks to Xingcong Li for spotting this.
This commit is contained in:
@@ -65,7 +65,7 @@ void build_server_array(void)
|
||||
|
||||
count = 0;
|
||||
|
||||
for (serv = daemon->servers; serv; serv = serv->next, count++)
|
||||
for (serv = daemon->servers; serv; serv = serv->next)
|
||||
#ifdef HAVE_LOOP
|
||||
if (!(serv->flags & SERV_LOOP))
|
||||
#endif
|
||||
@@ -73,6 +73,7 @@ void build_server_array(void)
|
||||
daemon->serverarray[count] = serv;
|
||||
serv->serial = count;
|
||||
serv->last_server = -1;
|
||||
count++;
|
||||
}
|
||||
|
||||
for (serv = daemon->local_domains; serv; serv = serv->next, count++)
|
||||
|
||||
Reference in New Issue
Block a user