[RFC,v3,2/8] Added ssid values to hoodfile

Submitted by Jan Kraus on June 12, 2016, 12:17 p.m.

Details

Message ID 1465733847-2307-3-git-send-email-mayosemmel@gmail.com
State Superseded, archived
Headers show

Commit Message

Jan Kraus June 12, 2016, 12:17 p.m.
The lenght of ssid's is limited to 32 characters.
If the ssid is created with hoodname and protocol you will have more than 32 characters sometimes.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
---
 src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood   |  4 +++-
 .../fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig        | 13 +++++++++++++
 src/packages/fff/fff-hoods/files/usr/sbin/configurehood     |  8 +++++---
 3 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
index 6c26ab3..e017a2f 100644
--- a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
+++ b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
@@ -2,7 +2,9 @@ 
  "version": 1,
  "hood": {
   "name": "nuernberg",
-  "bssid": "ca:ff:ee:ba:be:03",
+  "essid": "nbg.franken.freifunk.net",
+  "mesh_bssid": "ca:ff:ee:ba:be:03",
+  "mesh_essid": "mesh.nbg.franken.freifunk.net",
   "protocol": "batman-adv-v14",
   "channel2": 1,
   "mode2": "HT20",
diff --git a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig
new file mode 100644
index 0000000..6cd1f3d
--- /dev/null
+++ b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig
@@ -0,0 +1,13 @@ 
+{
+    "Sigs":
+    [
+        {
+            "PubKey": "e96e53f782aa4bb432773834a08c759fd7c0d70fdd124c432d9ec5c2c3826fd4",
+            "Sig": "bd3b658cacc4896edccc4c111fe63b1d579c1ea569352c7ac62a2ba5221a2d01364b5e683469ce987946148bafbfd37913566e2dbf481a6f959f9b771483df09"
+        },
+        {
+            "PubKey": "8366b366904c41e5c1839e3ae2cbb7fb5253ce7664fe9c67aabaa5549d44c79e",
+            "Sig": "d13af6ada2ad1d0f3900ab2c53d1f5c5223f2bb38e826e9d7cf06198cc60da055b235e9a013e1c40ba56bb6e22efab168802e41d8d434b2c6e8931f4a4128400"
+        }
+    ]
+}
diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index a1b5a6a..dacb2fd 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -73,7 +73,9 @@  json_load "$(cat $nearestHood)"
 json_select hood
 
 json_get_var hood name
-json_get_var bssid bssid
+json_get_var bssid mesh_bssid
+json_get_var meshessid mesh_essid
+json_get_var essid essid
 json_get_var channel2 channel2
 json_get_var mode2 mode2
 json_get_var protocol protocol
@@ -100,7 +102,7 @@  uci set wireless.@wifi-iface[0].network=w2mesh
 uci set wireless.@wifi-iface[0].ifname=w2mesh
 uci set wireless.@wifi-iface[0].mode=$type2
 uci set wireless.@wifi-iface[0].bssid=$bssid
-uci set wireless.@wifi-iface[0].ssid=${protocol}.${hood}.freifunk.net
+uci set wireless.@wifi-iface[0].ssid=$meshessid
 uci set wireless.@wifi-iface[0].mcast_rate=6000
 uci set wireless.@wifi-iface[0].encryption=none
 uci set wireless.@wifi-iface[1]=wifi-iface
@@ -108,7 +110,7 @@  uci set wireless.@wifi-iface[1].device=radio0
 uci set wireless.@wifi-iface[1].network=mesh
 uci set wireless.@wifi-iface[1].ifname=w2ap
 uci set wireless.@wifi-iface[1].mode=ap
-uci set wireless.@wifi-iface[1].ssid=${hood}.freifunk.net
+uci set wireless.@wifi-iface[1].ssid=$essid
 uci set wireless.@wifi-iface[1].encryption=none
 uci commit
 

Comments

Tim Niemeyer June 12, 2016, 8:37 p.m.
Ich finde es nicht gut im ersten Patch die hood files anzulegen und dann
hier nochmal was zu ändern, ohne das da jetzt ein neues Feature was
einen separaten Patch begründet kommt. Die Änderung kann gleich im
ersten Patch erfolgen.

Ah nein, die hood files sollten gar nicht im Patchset sein (abgesehen
von der Trainstation), weil die ja frisch runtergeladen werden sollen.

Tim

Am Sonntag, den 12.06.2016, 14:17 +0200 schrieb Jan Kraus:
> The lenght of ssid's is limited to 32 characters.
> If the ssid is created with hoodname and protocol you will have more than 32 characters sometimes.
> 
> Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
> ---
>  src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood   |  4 +++-
>  .../fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig        | 13 +++++++++++++
>  src/packages/fff/fff-hoods/files/usr/sbin/configurehood     |  8 +++++---
>  3 files changed, 21 insertions(+), 4 deletions(-)
>  create mode 100644 src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig
> 
> diff --git a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
> index 6c26ab3..e017a2f 100644
> --- a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
> +++ b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood
> @@ -2,7 +2,9 @@
>   "version": 1,
>   "hood": {
>    "name": "nuernberg",
> -  "bssid": "ca:ff:ee:ba:be:03",
> +  "essid": "nbg.franken.freifunk.net",
> +  "mesh_bssid": "ca:ff:ee:ba:be:03",
> +  "mesh_essid": "mesh.nbg.franken.freifunk.net",
>    "protocol": "batman-adv-v14",
>    "channel2": 1,
>    "mode2": "HT20",
> diff --git a/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig
> new file mode 100644
> index 0000000..6cd1f3d
> --- /dev/null
> +++ b/src/packages/fff/fff-hoods/files/etc/hoods/nuernberg.hood.sig
> @@ -0,0 +1,13 @@
> +{
> +    "Sigs":
> +    [
> +        {
> +            "PubKey": "e96e53f782aa4bb432773834a08c759fd7c0d70fdd124c432d9ec5c2c3826fd4",
> +            "Sig": "bd3b658cacc4896edccc4c111fe63b1d579c1ea569352c7ac62a2ba5221a2d01364b5e683469ce987946148bafbfd37913566e2dbf481a6f959f9b771483df09"
> +        },
> +        {
> +            "PubKey": "8366b366904c41e5c1839e3ae2cbb7fb5253ce7664fe9c67aabaa5549d44c79e",
> +            "Sig": "d13af6ada2ad1d0f3900ab2c53d1f5c5223f2bb38e826e9d7cf06198cc60da055b235e9a013e1c40ba56bb6e22efab168802e41d8d434b2c6e8931f4a4128400"
> +        }
> +    ]
> +}
> diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> index a1b5a6a..dacb2fd 100755
> --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> @@ -73,7 +73,9 @@ json_load "$(cat $nearestHood)"
>  json_select hood
>  
>  json_get_var hood name
> -json_get_var bssid bssid
> +json_get_var bssid mesh_bssid
> +json_get_var meshessid mesh_essid
> +json_get_var essid essid
>  json_get_var channel2 channel2
>  json_get_var mode2 mode2
>  json_get_var protocol protocol
> @@ -100,7 +102,7 @@ uci set wireless.@wifi-iface[0].network=w2mesh
>  uci set wireless.@wifi-iface[0].ifname=w2mesh
>  uci set wireless.@wifi-iface[0].mode=$type2
>  uci set wireless.@wifi-iface[0].bssid=$bssid
> -uci set wireless.@wifi-iface[0].ssid=${protocol}.${hood}.freifunk.net
> +uci set wireless.@wifi-iface[0].ssid=$meshessid
>  uci set wireless.@wifi-iface[0].mcast_rate=6000
>  uci set wireless.@wifi-iface[0].encryption=none
>  uci set wireless.@wifi-iface[1]=wifi-iface
> @@ -108,7 +110,7 @@ uci set wireless.@wifi-iface[1].device=radio0
>  uci set wireless.@wifi-iface[1].network=mesh
>  uci set wireless.@wifi-iface[1].ifname=w2ap
>  uci set wireless.@wifi-iface[1].mode=ap
> -uci set wireless.@wifi-iface[1].ssid=${hood}.freifunk.net
> +uci set wireless.@wifi-iface[1].ssid=$essid
>  uci set wireless.@wifi-iface[1].encryption=none
>  uci commit
>  
> -- 
> 2.1.4
>