Skip to content

Instantly share code, notes, and snippets.

// sockets:
// - zum empfangen von RAs (icmpv6)
// - zum senden von RAs (icmpv6)
// - netlink zum setzen von routen
//
// ra teil:
// - all nodes multicastgruppe joinen
// -

Gluon has a single interface to configure node information like location or contact info. This is done in config mode, a distinct operating mode of each node that can only be accessed by pressing button and physically connecting a network cable, while disrupting normal mesh operation at the same time. While this is feasible on planned installation it is less suited for ad-hoc setups of new nodes and while moving nodes.

A core principle of most Gluon-based firmwares is to prevent any accidental access to a node's config during normal operation, except for signed automatic updates. While users are free set a password or add a SSH key, there is no default password. We'd not like to encourage users to set passwords, either. Passwords are likely to be unsafe yet granting full root access to a node so we'd like to keep that attack vector as small as possible.

Most communities would like to have coordinates and contact information set for all nodes. At good map seems to stimulate a communities growth quite a bit a

@tcatm
tcatm / faq.md
Last active August 29, 2015 14:27

Gibt es eine Grundgebühr?

Nein. Nach dem Erwerb des Knotens nimmst du direkt am Mesh teil. Es gibt keine weiteren Kosten.

Ist Freifunk ein Ersatz für meinen Internetanschluss?

Nein, im Moment nicht. Das Mesh lässt sich jedoch gut als Ersatz verwenden, falls dein Internetanschluss ausfällt. Wenn du in Funkreichweite anderer Knoten bist, wird dein Knoten automatisch eine andere Verbindung nutzen.

Welche Vorteile bringt mir Freifunk gegenüber dem Internet?

{
hostname_prefix = 'babel-',
site_name = 'Freifunk Lübeck Babel',
site_code = 'ffhl-babel',
opkg_repo = 'http://openwrt.draic.info/chaos_calmer/15.05-rc3/%S/packages',
prefix4 = '10.130.128.0/20',
prefix6 = '2001:67c:2d50:1001::/64',
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin
# /usr/bin/respondd -g ff02::2:1001 -p 1001 -c 'return require("gluon.announced").handle_request' -i br-client -i br-wan -i ibss0 -i mesh0
Allocating 384 bytes
Allocating 192 bytes
Allocating 720 bytes
Allocating 32 bytes
Freeing 0 bytes
Allocating 64 bytes
Allocating 32 bytes
Freeing 0 bytes
Allocating 64 bytes
code: a = 7; a * a - 7
VmPeak: 7608 kB
VmSize: 7600 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 772 kB
VmRSS: 772 kB
VmData: 340 kB
VmStk: 136 kB
21:14:14 up 2 min, load average: 4.58, 1.43, 0.52
PID USER VSZ STAT COMMAND
1 root 1408 S /sbin/procd
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW< [kworker/0:0H]
6 root 0 RW [kworker/u2:0]
7 root 0 SW< [khelper]
[ 650.470000] fw3 invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0
[ 650.470000] CPU: 0 PID: 3569 Comm: fw3 Not tainted 3.18.20 #9
[ 650.480000] Stack : 00000000 00000000 00000000 00000000 803d4292 00000031 00000000 00001bdf
00000001 00000000 80326d64 80380ba3 00000df1 803d34d0 819e72b8 00000000
00000000 00000000 00000000 800a3840 00000006 8008045c 00000000 00000000
8032a35c 8073fbbc 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
...
[ 650.520000] Call Trace:
[ 650.520000] [<800710f0>] show_stack+0x48/0x70
diff --git a/package/gluon-announced/files/usr/lib/lua/gluon/announced.lua b/package/gluon-announced/files/usr/lib/lua/gluon/announced.lua
index aa6da3d..d658968 100644
--- a/package/gluon-announced/files/usr/lib/lua/gluon/announced.lua
+++ b/package/gluon-announced/files/usr/lib/lua/gluon/announced.lua
@@ -1,17 +1,21 @@
local announce = require 'gluon.announce'
local deflate = require 'deflate'
local json = require 'luci.jsonc'
+local nixio = require 'nixio'
+local fs = require 'nixio.fs'
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <json.h>
static json_object *neighbours(void) {
struct json_object *obj = json_object_new_object();
FILE *f;