summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2012-03-06 09:02:52 (GMT)
committerJan Huwald <jh@sotun.de>2012-03-06 09:02:52 (GMT)
commite3f9967e9c20b592d369b224749d11617d1bf157 (patch)
treec880aa16a9bfca3042628c562f22742935cf9951
parent4d0f68a50efb43eeac2f283cc998ac5cfd42a984 (diff)
add start_ip & end_ip to mesh dhcp config
Otherwise the DHCP server allways serves X.X.0.2 - X.X.1.0 (via 2603713eb66680ccdb03e7409a5f2ec152534849)
-rwxr-xr-xfiles/common/etc/fsm/inetable/trans/queen.enter9
1 files changed, 7 insertions, 2 deletions
diff --git a/files/common/etc/fsm/inetable/trans/queen.enter b/files/common/etc/fsm/inetable/trans/queen.enter
index a2a3ebf..9753a81 100755
--- a/files/common/etc/fsm/inetable/trans/queen.enter
+++ b/files/common/etc/fsm/inetable/trans/queen.enter
@@ -26,8 +26,11 @@ if [ -z "$oct3" ]; then
# TODO: log warning about IPv4 addr space exhaustion
fi
[ -n "$oct3" ]
-gwip=$(ipcalc.sh "$(uci get cloud.cur.net_mesh)" $(($oct3 * 256 + 1)) 1 \
- | grep ^START | cut -f2 -d=)
+net_mesh=$(uci get cloud.cur.net_mesh)
+gwip=$( ipcalc.sh $net_mesh $(($oct3 * 256 + 1)) 1 | grep ^START | cut -f2 -d=)
+dhcp_start=$(ipcalc.sh $net_mesh $(($oct3 * 256 + 2)) 1 | grep ^START | cut -f2 -d=)
+dhcp_end=$( ipcalc.sh $net_mesh $(($oct3 * 256 + 254)) 1 | grep ^START | cut -f2 -d=)
+
p2ptbl update $gwiptbl $oct3 "queen\t$NodeId" br-mesh
# activate gw mode
@@ -43,6 +46,8 @@ set dhcp.mesh.start=2
set dhcp.mesh.limit=254
set dhcp.mesh.leasetime=$DHCPLeaseTime
set dhcp.mesh.interface=mesh
+set dhcp.mesh.start_ip=$dhcp_start
+set dhcp.mesh.end_ip=$dhcp_end
" | uci batch
/etc/init.d/dnsmasq restart
contact: Jan Huwald // Impressum