summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua9
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua9
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/network.lua7
3 files changed, 20 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
index 7a4b3c134..20adcdf10 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
@@ -58,8 +58,13 @@ s.addremove = true
s.anonymous = true
s.template = "cbi/tblsection"
-s:option(Value, "macaddr", translate("macaddress"))
-s:option(Value, "ipaddr", translate("ipaddress"))
+mac = s:option(Value, "macaddr", translate("macaddress"))
+ip = s:option(Value, "ipaddr", translate("ipaddress"))
+for i, dataset in ipairs(luci.sys.net.arptable()) do
+ ip:value(dataset["IP address"])
+ mac:value(dataset["HW address"],
+ dataset["HW address"] .. " (" .. dataset["IP address"] .. ")")
+end
return m, m2
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
index 05334049d..3d26d6a9d 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
@@ -59,7 +59,12 @@ s.addremove = true
s.anonymous = true
s.template = "cbi/tblsection"
-s:option(Value, "macaddr", translate("macaddress"))
-s:option(Value, "ipaddr", translate("ipaddress"))
+mac = s:option(Value, "macaddr", translate("macaddress"))
+ip = s:option(Value, "ipaddr", translate("ipaddress"))
+for i, dataset in ipairs(luci.sys.net.arptable()) do
+ ip:value(dataset["IP address"])
+ mac:value(dataset["HW address"],
+ dataset["HW address"] .. " (" .. dataset["IP address"] .. ")")
+end
return m, m2 \ No newline at end of file
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/network.lua b/modules/admin-mini/luasrc/model/cbi/mini/network.lua
index e2d4e3c0c..2e1d7955f 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/network.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/network.lua
@@ -16,7 +16,12 @@ m = Map("network", "Network")
s = m:section(NamedSection, "lan", "interface", translate("m_n_local"))
s:option(Value, "ipaddr", translate("ipaddress"))
-s:option(Value, "netmask", translate("netmask"))
+
+nm = s:option(Value, "netmask", translate("netmask"))
+nm:value("255.255.255.0")
+nm:value("255.255.0.0")
+nm:value("255.0.0.0")
+
gw = s:option(Value, "gateway", translate("gateway") .. translate("cbi_optional"))
gw.rmempty = true
dns = s:option(Value, "dns", translate("dnsserver") .. translate("cbi_optional"))