Skip to content
Permalink
Browse files

rc: change default behaviour of resolv.conf to use ISP instead of loc…

…al cache

With the increased complexity involving DNS Privacy, ntpd and WAN monitoring,
it's safer (and more reliable) to have the router always use the ISP resolvers
by default.
  • Loading branch information...
RMerl committed May 19, 2019
1 parent 8104802 commit de8806990462b8c3dbd4182b4991e31cd082f7fe
@@ -1765,7 +1765,7 @@ void start_dnsmasq(void)

/* Update local resolving mode */
n = readlink("/etc/resolv.conf", buf, sizeof(buf));
if (nvram_get_int("dns_local")) {
if (nvram_get_int("dns_local_cache")) {
/* Use dnsmasq for local resolving if it did start,
* fallback to wan dns otherwise */
path = (char *)dmresolv;
@@ -3107,7 +3107,7 @@ struct nvram_tuple router_defaults[] = {
{ "nat_type", "0", CKN_STR1, CKN_TYPE_DEFAULT, CKN_ACC_LEVEL_DEFAULT, CKN_ENC_DEFAULT, 0 }, //0: Symmetric 1: Full cone
#endif
{ "dns_norebind", "0", CKN_STR1, CKN_TYPE_DEFAULT, CKN_ACC_LEVEL_DEFAULT, CKN_ENC_DEFAULT, 0 }, // dnsmasq DNS rebind protection
{ "dns_local", "1", CKN_STR1, CKN_TYPE_DEFAULT, CKN_ACC_LEVEL_DEFAULT, CKN_ENC_DEFAULT, 0 }, // use local dns as system resolver
{ "dns_local_cache", "0", CKN_STR1, CKN_TYPE_DEFAULT, CKN_ACC_LEVEL_DEFAULT, CKN_ENC_DEFAULT, 0 }, // use local dns as system resolver

// miniupnpd - PCP-related values
{ "upnp_min_lifetime", "120", CKN_STR6, CKN_TYPE_DEFAULT, CKN_ACC_LEVEL_DEFAULT, CKN_ENC_DEFAULT, 0 },
@@ -560,7 +560,7 @@ function applyRule(){
}
}
if (getRadioValue(document.form.dns_local) != "<% nvram_get("dns_local"); %>")
if (getRadioValue(document.form.dns_local_cache) != "<% nvram_get("dns_local_cache"); %>")
document.form.action_script.value += ";restart_dnsmasq";
document.form.submit();
@@ -872,10 +872,10 @@ function done_validating(action){
</td>
</tr>
<tr>
<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(50,27);">Wan: Use local caching DNS server as system resolver (default: Yes)</a></th>
<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(50,27);">Wan: Use local caching DNS server as system resolver (default: No)</a></th>
<td>
<input type="radio" name="dns_local" class="input" value="1" <% nvram_match_x("", "dns_local", "1", "checked"); %>><#checkbox_Yes#>
<input type="radio" name="dns_local" class="input" value="0" <% nvram_match_x("", "dns_local", "0", "checked"); %>><#checkbox_No#>
<input type="radio" name="dns_local_cache" class="input" value="1" <% nvram_match_x("", "dns_local_cache", "1", "checked"); %>><#checkbox_Yes#>
<input type="radio" name="dns_local_cache" class="input" value="0" <% nvram_match_x("", "dns_local_cache", "0", "checked"); %>><#checkbox_No#>
</td>
</tr>
<tr>

0 comments on commit de88069

Please sign in to comment.
You can’t perform that action at this time.