Skip to content

Commit

Permalink
dnsmasq: fix filter-aaaa
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Oct 12, 2023
1 parent 5b4979d commit 2e34344
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 21 deletions.
2 changes: 0 additions & 2 deletions trunk/user/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ $(eval $(call BuildPackage,dnsmasq))
romfs:
$(INSTALL_DIR) $(ROMFSDIR)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dnsmasq $(ROMFSDIR)/usr/sbin/dnsmasq
$(INSTALL_DIR) $(ROMFSDIR)/usr/bin
$(INSTALL_BIN) ./dnsmasq.sh $(ROMFSDIR)/usr/bin/dnsmasq.sh
14 changes: 0 additions & 14 deletions trunk/user/dnsmasq/dnsmasq.sh

This file was deleted.

12 changes: 8 additions & 4 deletions trunk/user/rc/src/services_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,14 @@ int
start_dns_dhcpd(int is_ap_mode)
{
FILE *fp;
int i_verbose, i_dhcp_enable, is_dhcp_used, is_dns_used,filter_aaaa;
int i_verbose, i_dhcp_enable, is_dhcp_used, is_dns_used, i_filter_aaa;
char dhcp_start[32], dhcp_end[32], dns_all[64], dnsv6[40];
char *ipaddr, *netmask, *gw, *dns1, *dns2, *dns3, *wins, *domain, *dns6;
const char *storage_dir = "/etc/storage/dnsmasq";

i_dhcp_enable = is_dhcpd_enabled(is_ap_mode);
i_verbose = nvram_get_int("dhcp_verbose");
i_filter_aaa = nvram_get_int("dhcp_filter_aaa");

ipaddr = nvram_safe_get("lan_ipaddr");
netmask = nvram_safe_get("lan_netmask");
Expand Down Expand Up @@ -500,12 +501,15 @@ start_dns_dhcpd(int is_ap_mode)

fprintf(fp, "conf-file=%s/dnsmasq.conf\n", storage_dir);
fclose(fp);
doSystem("/usr/bin/dnsmasq.sh");
if (is_dns_used)
fill_dnsmasq_servers();

if (is_dns_used || is_dhcp_used)
return eval("/usr/sbin/dnsmasq");
if (is_dns_used || is_dhcp_used) {
if (i_filter_aaa == 1)
return eval("/usr/sbin/dnsmasq", "--filter-AAAA");
else
return eval("/usr/sbin/dnsmasq");
}

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/user/www/dict/CN.dict
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ DDNS_CheckIP_item0=默认
DDNS_Period=DDNS 更新周期:
DDNS_Forced=DDNS 强制更新周期:
DDNS_Verbose=DDNS 日志级别:
DHCP_Filter_AAAA=过滤 IPv6 AAAA 记录:
DHCP_Verbose=DHCP 日志级别:
STB_Isolation=IPTV STB 端口隔离:
STB_IsolationItem1=隔离路由器和 CPU 端口
Expand Down
1 change: 1 addition & 0 deletions trunk/user/www/dict/EN.footer
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ DDNS_CheckIP_item0=Use default (from profile)
DDNS_Period=DDNS Update Period:
DDNS_Forced=DDNS Forced Update Period:
DDNS_Verbose=Syslog Verbose Level:
DHCP_Filter_AAAA=Filter IPv6 AAAA Records:
DHCP_Verbose=DHCP Server Verbose:
STB_Isolation=IPTV STB Port(s) Isolation:
STB_IsolationItem1=Isolation between Router CPU Port
Expand Down
2 changes: 1 addition & 1 deletion trunk/user/www/n56u_ribbon_fixed/Advanced_DHCP_Content.asp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function changeBgColor(obj, num){
<th colspan="2" style="background-color: #E3E3E3;"><#t2Advanced#></th>
</tr>
<tr>
<th width="50%"><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,5,13);">禁止解析IPv6 DNS记录</a></th>
<th width="50%"><#DHCP_Filter_AAAA#></th>
<td>
<div class="main_itoggle">
<div id="dhcp_filter_aaa_on_of">
Expand Down

0 comments on commit 2e34344

Please sign in to comment.