mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add dhcpd VLAN parameter to restrict dhcpd to given VLAN
This commit is contained in:
+2
-1
@@ -63,7 +63,8 @@
|
||||
When updating the above settings, remember to point your browser to the new IP afterwards:<br/>
|
||||
<input style="width:40%;" class="action" id="ip_sub" onclick="ipSub();" type="button" value="Update Settings"><br/>
|
||||
<br/><br/>
|
||||
<label class="dhcpdon">Enable DHCP Server: <input id="dhcpd" type="checkbox"></label><br/>
|
||||
<label class="dhcpdon">Enable DHCP Server: <input id="dhcpd" type="checkbox"></label><br/><br/>
|
||||
<label class="dhcpdvlan">Limit DHCP Server to VLAN (0: serve all VLANs): <input type="number" min="0" max="2047" value="0" id="dhcpd_vid" name="dhcpd_vid"></label><br/>
|
||||
<input style="width:40%;" class="action" id="dhcpd_sub" onclick="dhcpdSub();" type="button" value="Change DHCPD State"><br/><br/><br/>
|
||||
Save all current settings to Flash:<br/>
|
||||
<input style="width:40%;" class="action" id="flash_sub" onclick="flashSave();" type="button" value="Save Settings to Flash">
|
||||
|
||||
+6
-1
@@ -42,9 +42,14 @@ async function ipSub() {
|
||||
}
|
||||
async function dhcpdSub() {
|
||||
var dhcpd_cmd = "dhcpd off";
|
||||
if (document.getElementById('dhcpd').checked)
|
||||
if (document.getElementById('dhcpd').checked) {
|
||||
dhcpd_cmd = "dhcpd on";
|
||||
var v=document.getElementById('dhcpd_vid').value
|
||||
if (v && v!= 0)
|
||||
dhcpd_cmd = dhcpd_cmd + " " + v;
|
||||
}
|
||||
try {
|
||||
console.log("Sending: ", dhcpd_cmd);
|
||||
const response = await fetch('/cmd', {
|
||||
method: 'POST',
|
||||
body: dhcpd_cmd
|
||||
|
||||
Reference in New Issue
Block a user