From a1ce01044d3ec62452019fa16ab834b17c4c62d0 Mon Sep 17 00:00:00 2001 From: Conrad Lara - KG6JEI Date: Wed, 29 Apr 2015 23:18:09 -0700 Subject: [PATCH] feature: Add Disable Default Route checkbox to Lan box Allows users to disable publishing 0.0.0.0/0 (all/internet) route via DHCP. --- files/usr/local/bin/node-setup | 11 ++++++++--- files/www/cgi-bin/setup | 9 +++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/files/usr/local/bin/node-setup b/files/usr/local/bin/node-setup index 98d9cf2c..a8214fc2 100755 --- a/files/usr/local/bin/node-setup +++ b/files/usr/local/bin/node-setup @@ -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"; diff --git a/files/www/cgi-bin/setup b/files/www/cgi-bin/setup index 2fecadb1..06c14ea4 100755 --- a/files/www/cgi-bin/setup +++ b/files/www/cgi-bin/setup @@ -682,6 +682,15 @@ if($dmz_mode) print "DHCP End"; #print "\n"; print "$dmz_dhcp_end\n"; + + print "
"; + print "Advanced"; + + print "Disable
Default Route"; + print "\n"; + push @hidden, ""; push @hidden, "";