Skip to content

Commit

Permalink
fix: update captive domains management in ping_thread to ensure prope…
Browse files Browse the repository at this point in the history
…r DNS configuration

Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Jan 7, 2025
1 parent 37c629a commit bd21c80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ping_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ make_captive_domains_query_responsable(void)
// Add all captive domains when offline
char cmd[256] = {0};
for (int i = 0; i < sizeof(captive_domains)/sizeof(captive_domains[0]); i++) {
snprintf(cmd, sizeof(cmd), "uci -q del_list dhcp.@dnsmasq[0].address=/%s/1.1.1.1", captive_domains[i]);
system(cmd);
memset(cmd, 0, sizeof(cmd));
snprintf(cmd, sizeof(cmd), "uci -q add_list dhcp.@dnsmasq[0].address=/%s/1.1.1.1", captive_domains[i]);
system(cmd);
}
Expand Down

0 comments on commit bd21c80

Please sign in to comment.