feature: Add Disable Default Route checkbox to Lan box

Allows users to disable publishing 0.0.0.0/0 (all/internet) route via DHCP.
This commit is contained in:
Conrad Lara - KG6JEI 2015-04-29 23:18:09 -07:00
parent 0be1ee22dc
commit a1ce01044d
2 changed files with 17 additions and 3 deletions

View File

@ -503,13 +503,18 @@ if(wifi_useschains()){
$cmd .= "uci set wireless.\@wifi-device[0].rxantenna=$cfg{wifi_rxant} >/dev/null 2>&1;";
$cmd .= "uci set wireless.\@wifi-device[0].txantenna=$cfg{wifi_txant} >/dev/null 2>&1;";
}
# Setup node lan dhcp
if ( $cfg{lan_dhcp_noroute} ) {
$cmd .= "uci add_list dhcp.\@dhcp[0].dhcp_option=3 >/dev/null 2>&1;"
}
# finish up
$cmd .= "uci -q commit;";
system $cmd;
# finish up
unless($auto)
{
print "configuration complete.\n";

View File

@ -682,6 +682,15 @@ if($dmz_mode)
print "<tr><td><nobr>DHCP End</nobr></td>";
#print "<td><input type=text size=4 name=dmz_dhcp_end value='$dmz_dhcp_end' disabled></td></tr>\n";
print "<td>$dmz_dhcp_end</td></tr>\n";
print "<tr><td colspan=2><hr></hr></td></tr>";
print "<tr><th colspan=2>Advanced</th></tr>";
print "<tr><td>Disable<br>Default Route</td>";
print "<td><input type=checkbox name=lan_dhcp_noroute value=1";
print " checked" if $lan_dhcp_noroute;
print "></td></tr>\n";
push @hidden, "<input type=hidden name=dmz_dhcp_end value='$dmz_dhcp_end'>";
push @hidden, "<input type=hidden name=dmz_dhcp_limit value='$dmz_dhcp_limit'>";