Developing lightweight computation at the DSG edge

Commit e9d056d1 authored by p4u's avatar p4u
Browse files

DHCP on in LAN interface by default

parent 8413ac94
......@@ -270,7 +270,7 @@ qmp_configure_dhcp() {
# If DHCP non overlapping enabled, configuring it (this is the layer3 roaming)
if [ $(qmp_uci_get non_overlapping.ignore) -eq 0 ]; then
if [ "$(qmp_uci_get non_overlapping.ignore)" == "0" ]; then
echo "Configuring DHCP non-overlapping (roaming mode)"
local num_grp=256
local uci_offset="$(qmp_uci_get non_overlapping.dhcp_offset)"
......@@ -280,16 +280,20 @@ qmp_configure_dhcp() {
start=$(( 0x$community_node_id * $num_grp + $offset ))
limit=$(( $num_grp - $offset ))
# Setting values
echo "Setting up DHCP server in LAN interface"
qmp_uci_set_raw dhcp.lan="dhcp"
qmp_uci_set_raw dhcp.lan.interface="lan"
qmp_uci_set_raw dhcp.lan.leasetime="$leasetime"
qmp_uci_set_raw dhcp.lan.start="$start"
qmp_uci_set_raw dhcp.lan.limit="$limit"
qmp_uci_set_raw dhcp.lan.limit="$limit"
if qmp_uci_test qmp.networks.disable_lan_dhcp; then
qmp_uci_set_raw dhcp.lan.ignore="0"
qmp_uci_set_raw dhcp.lan.ignore="1"
# If disable_lan_dhcp=1 disable DHCP server
if [ "$(qmp_uci_get networks.disable_lan_dhcp)" == "1" ]; then
echo "DHCP server disabled in LAN interface"
qmp_uci_set_raw dhcp.lan.ignore="1"
qmp_uci_set_raw dhcp.lan.ignore="0"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment