applications/siitwizard:
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Dec 2008 01:44:56 +0000 (01:44 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Dec 2008 01:44:56 +0000 (01:44 +0000)
- 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

applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua
applications/luci-siitwizard/root/etc/config/siit

index c95b805f7b13442e728376f2909276375c358527..c1dbb0efd38f9b10fbfb55e4c54cea9bc943f673 100644 (file)
@@ -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
index b318ddda64185568125ee6462460f5926bebf734..14149228df85b2895f89c8acc4a09fddc30d3234 100644 (file)
@@ -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"