summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-siitwizard
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-12-27 01:44:56 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-12-27 01:44:56 +0000
commit71b8fd5ddf9d7f23ada97a1910bafd1f8711a76b (patch)
treebe8f0c46995d919630bc53a60c7e23157e5fea74 /applications/luci-siitwizard
parent870397a3cd621561e8f464d1aed7b0cef88d98d7 (diff)
applications/siitwizard:
- fix calculation of available hosts addresses in pool - also calculate dhcp start and limit addresses - tune siit defaults to use Freifunk PI addresses - change bssid to avoid collision with Freifunk mesh
Diffstat (limited to 'applications/luci-siitwizard')
-rw-r--r--applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua6
-rw-r--r--applications/luci-siitwizard/root/etc/config/siit6
2 files changed, 7 insertions, 5 deletions
diff --git a/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua b/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua
index c95b805f7..c1dbb0efd 100644
--- a/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua
+++ b/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua
@@ -65,7 +65,7 @@ f = SimpleForm("siitwizward", "SIIT-Wizzard",
f:field(DummyValue, "info_ula", "Mesh ULA address").value = ula:string()
f:field(DummyValue, "ipv4_pool", "IPv4 allocation pool").value =
- "%s (%i hosts)" %{ gv4_net:string(), 2 ^ gv4_net:prefix() - 2 }
+ "%s (%i hosts)" %{ gv4_net:string(), 2 ^ ( 32 - gv4_net:prefix() ) - 2 }
f:field(DummyValue, "ipv4_size", "IPv4 LAN network prefix").value =
"%i bit (%i hosts)" %{ ipv4_netsz, 2 ^ ( 32 - ipv4_netsz ) - 2 }
@@ -364,7 +364,9 @@ function mode.write(self, section, value)
-- lan dns
uci:tset("dhcp", "lan", {
- dhcp_option = "6," .. dns_server
+ dhcp_option = "6," .. dns_server,
+ start = bit.band(lan_net:minhost():add(1)[2][2], 0xFF),
+ limit = ( 2 ^ ( 32 - lan_net:prefix() ) ) - 3
})
-- hostname
diff --git a/applications/luci-siitwizard/root/etc/config/siit b/applications/luci-siitwizard/root/etc/config/siit
index b318ddda6..14149228d 100644
--- a/applications/luci-siitwizard/root/etc/config/siit
+++ b/applications/luci-siitwizard/root/etc/config/siit
@@ -1,6 +1,6 @@
config siit ipv4
- option pool "172.23.0.0/16"
- option netsize "24"
+ option pool "77.87.48.0/23"
+ option netsize "29"
config siit ipv6
option ula_prefix "fd00::"
@@ -10,5 +10,5 @@ config siit ipv6
config siit wifi
option essid "6mesh.freifunk.net"
- option bssid "02:ca:ff:ee:ba:be"
+ option bssid "02:25:c3:ca:ff:ee"
option channel "1"