Commit Graph

436 Commits

Author SHA1 Message Date
Nils Schneider
2e0e24a992 announce neighbours using alfred/gluon-announce
This adds a new announce.d datum "neighbours" (alfred 160) containing
information about mesh neighbours. It's intended to be an replacement
for batadv-vis.

In addition to the data already provided by batadv-vis it'll also
provide information about direct wifi neighbours.

Unlike batadv-vis, no data about clients is transmitted.

Sample data:

    {
      "wifi": {
        "90:f6:52:82:06:02": {
          "neighbours": {
            "f8:d1:11:2c:a7:d2": {
              "noise": -95,
              "inactive": 0,
              "signal": 0
            },
            "96:f6:52:ff:cd:6f": {
              "noise": -95,
              "inactive": 0,
              "signal": -37
            }
          }
        }
      },
      "batadv": {
        "90:f6:52:82:06:02": {
          "neighbours": {
            "96:f6:52:ff:cd:6f": {
              "lastseen": 2.8500000000000001,
              "tq": 177
            }
          }
        },
        "90:f6:52:82:06:03": {
          "neighbours": {
            "f8:d1:11:2c:a7:d3": {
              "lastseen": 2.3500000000000001,
              "tq": 206
            }
          }
        }
      },
      "node_id": "90f652820602"
    }
2015-01-24 12:12:53 +01:00
NeoRaider
71c498edd2 Merge pull request #83 from kokel/node-role
add section "system" to gluon-node-info with new option "role" and luci package to change role via config mode
2015-01-24 11:13:42 +01:00
NeoRaider
12304fcb4c Merge pull request #95 from freifunk-gluon/config-mode-skip
gluon-setup-mode: allow skipping on first boot
2015-01-24 11:12:19 +01:00
NeoRaider
4947578d48 Merge pull request #87 from freifunk-darmstadt/patch-1
gluon-announce: rename announce.lua to collect.lua
2015-01-24 11:11:55 +01:00
Kokel
a80400bb41 add package gluon-luci-node-role; depends on package "gluon-node-info"; depends on new site.conf section 2015-01-23 12:22:48 +01:00
Kokel
ba81359c60 "gluon-node-info": add section system and option role; add announce script to announce the role as nodeinfo;
add invariant script "001-node-system" to add section "system" if not exist; add invariant script "010-node-role"
to add section "system" if not exist; add invariant script "010-node-role" to set role to default value
(site.roles.default) if not exist; depends on new site.conf section
2015-01-23 12:22:42 +01:00
Nils Schneider
629409364b gluon-setup-mode: allow skipping on first boot
By setting setup_mode.skip to true in site.conf the device will skip
setup mode on first boot.
2015-01-23 12:05:26 +01:00
Matthias Schiffer
8e33dd5075 gluon-setup-mode: always finalize the overlay before rebooting
When an early reboot is triggered because an upgrade script has disabled the
config mode, we need to explicitly call /etc/init.d/done, otherwise the overlay
will not be finalized after a firstboot and we get an endless reboot loop.
2015-01-22 23:53:56 +01:00
Daniel Golle
3de151c286 mesh-batman-adv-core: allow sites to set VLAN for mesh
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2015-01-18 08:03:59 +01:00
flokli
63ff54e4bc gluon-announce: rename announce.lua to collect.lua
Signed-off-by: flokli <florian@darmstadt.freifunk.net>
2015-01-14 10:36:32 +01:00
flokli
fc62de55e3 gluon-announced: rename DEVLIST file to gluon-announced.devs
was gluon-announce.devs before

Signed-off-by: flokli <florian@darmstadt.freifunk.net>
2015-01-14 10:31:29 +01:00
flokli
0df0eaeaac gluon-announced: add dependency to gluon-announce
the gluon-announced package installs a hotplug script
that uses announce.lua from the gluon-announce package.

So we need to include gluon-announce as dependency.

Signed-off-by: flokli <florian@darmstadt.freifunk.net>
2015-01-14 06:20:28 +01:00
Matthias Schiffer
78b43b1dd6 gluon-core, gluon-setup-mode: fix LAN and WAN on nanostation-m-xw 2014-11-26 23:30:56 +01:00
Matthias Schiffer
bf4b3a265f gluon-setup-mode: initialize all LEDs 2014-11-26 20:32:47 +01:00
Matthias Schiffer
9dd4f52bfa CPE510-specific config (switch WAN and LAN, config mode on WAN) 2014-11-26 19:50:45 +01:00
Matthias Schiffer
104c92dfe6 gluon-status-page: remove workaround for now fixed LuCi bug 2014-11-17 16:22:05 +01:00
Nils Schneider
14553d42be gluon-alfred: no parallel cronjobs
This should reduce memory consumption a little.

https://github.com/freifunk-gluon/gluon/issues/109#issuecomment-61681696
2014-11-17 15:36:06 +01:00
Matthias Schiffer
691f0cb6c5 gluon-status-page: show VPN status (very minimalistic for now) 2014-11-17 03:24:08 +01:00
Matthias Schiffer
5ee5cf3ec1 gluon-mesh-vpn-fastd: configure a status socket 2014-11-17 03:23:36 +01:00
Matthias Schiffer
7bd30f9c84 gluon-ebtables-filter-multicast: allow hop-by-hop options as ICMPv6 is sometimes prefixed by an HBH header 2014-11-13 02:37:30 +01:00
Matthias Schiffer
2627161509 Merge remote-tracking branch 'origin/status-page-164' 2014-11-13 01:37:18 +01:00
Nils Schneider
5266a07334 status-page: escape html, move script to body 2014-11-13 01:36:38 +01:00
Nils Schneider
710cb8b36c status-page: lua rewrite, use gluon-neighbour-info 2014-10-27 23:21:40 +01:00
ohrensessel
15adcae331 Fix ebtables dhcpv6 rules
the ports were interchanged, see the following packet flow:

client:546 --> [ff02::1:2]:547
server:547 --> client:546

therefore we need to allow outgoing multicast packets with dst-port 547
and unicast packets from bat0 to clients with dst-port 546 and 547 in the other direction
2014-10-19 16:02:30 +02:00
Kokel
0e5a2ea38d deactivate multicast_mode by default 2014-10-05 15:24:58 +02:00
Matthias Schiffer
7496b3d3c1 gluon-luci-admin: fix SSH keys being removed when a password is set 2014-10-03 00:47:48 +02:00
Matthias Schiffer
f9cc73187f gluon-mesh-vpn-fastd: use delete_all instead of foreach to delete the old peers 2014-09-15 21:50:43 +02:00
Matthias Schiffer
1803525745 Configure unique MAC addresses for all WLAN interfaces 2014-09-15 19:55:09 +02:00
Matthias Schiffer
b51e1063b7 Add utility function to generate unique MAC addresses derived from the primary MAC 2014-09-15 19:55:09 +02:00
Matthias Schiffer
b977f00162 Fix mesh-batman-adv-core legacy script path 2014-09-15 19:55:09 +02:00
Matthias Schiffer
2dfe68d50a Remove obsolete legacy upgrade script 2014-09-15 19:55:09 +02:00
Nils Schneider
c06141cff3 gluon-node-info: remove fixup-owner script 2014-09-15 19:54:30 +02:00
Nils Schneider
0de7bf5f64 gluon-core: port initial/020-wireless to lua 2014-09-15 19:50:10 +02:00
Nils Schneider
53e56b0853 Merge pull request #74 from freifunk-gluon/authorized-keys
gluon-authorized-keys: add keys from site.conf
2014-09-15 19:20:01 +02:00
Nils Schneider
a753fa79e3 gluon-authorized-keys: add keys from site.conf
This package will run as invariant script after each upgrade and copy
all keys from site.conf's authorized_keys entry to
/etc/dropbear/authorized_keys.

Existing keys will be preserved.

The site.conf entry 'authorized_keys' is required (if this package is
selected) and must contain a list of strings, each representing a line
of the resulting file.
2014-09-15 19:19:21 +02:00
Nils Schneider
f21678dc0d Merge pull request #69 from freifunk-gluon/gluon-neighbour-info
gluon-neighbour-info: query direct neighbours
2014-09-15 18:52:25 +02:00
Nils Schneider
5fa97f8fdb gluon-core: add node_id() to gluon.util 2014-09-11 12:27:29 +02:00
Nils Schneider
d87cf05c95 mesh-batman-adv-core: disable igmp_snooping on br-client
IGMP snooping causes serious trouble with IPv6 neighbour discovery.
2014-09-09 11:29:51 +02:00
Nils Schneider
abcc86bf8f gluon-neighbour-info: global timeout 2014-09-06 15:40:03 +02:00
Nils Schneider
0222f342af gluon-neighbour-info: newlines between responses 2014-09-06 14:10:43 +02:00
Nils Schneider
b969f3e644 gluon-neighbour-info: cleanup, use recv instead of recvfrom 2014-09-06 14:02:19 +02:00
Nils Schneider
29464a4ba1 Merge pull request #72 from freifunk-gluon/fastd-site-enable
mesh-vpn-fastd: enable from site.conf
2014-09-06 13:38:43 +02:00
Nils Schneider
4e19df098a mesh-vpn-fastd: enable from site.conf
This patch allows fastd's enabled flag's default value to be set from
site.conf.
2014-09-03 20:37:17 +02:00
Jan-Philipp Litza
ae43f3dc3e gluon-core: Remove VERSION_DIR hack
As the (removed) comment said, this was a one-time-hack that was obsoleted long ago.
2014-08-30 15:13:52 +02:00
Nils Schneider
fe57f93bc7 gluon-neighbour-info: query direct neighbours
This is a simple client for gluon-announced.
2014-08-28 18:48:57 +02:00
Nils Schneider
e2ff6a6ed3 gluon-luci-admin: restructure firmware upgrades 2014-08-28 16:36:04 +02:00
NeoRaider
9d11f4bda1 Merge pull request #68 from FreifunkBremen/gluon-cron-fix
gluon-cron: Fix endless loop parsing invalid lines
2014-08-27 10:33:34 +02:00
Jan-Philipp Litza
afce06c3d3 gluon-cron: Fix endless loop parsing invalid lines
Using the line
```
* * * * echo "foobar"
```
(notice the missing fifth time field) in a crontab causes gluon-cron
to enter an endless loop while parsing it, thus it won't even execute
the other, valid crontabs.

This is caused by the loop in [line 138] where `begin - min`
substracts the unsigned `min` from the signed `begin`. If now `begin`
is invalid, `strict_atoi` returns -1 and the loop starts at
`(-1)-1=MAX_INT` and runs while `i <= MAX_INT` which is always true.

The real culprit lies in [line 134] where exactly this case
`begin < min` is checked - but because of the signedness, this check doesn't
work as expected either.

The easiest solution is to make `min` a signed integer instead of an unsigned
one, as we do not require it to be very large and only pass the constants 0 or
1 to it.

To avoid other similar problems, this patch makes the input variable `n` a
signed integer as well.
2014-08-27 10:20:04 +02:00
Nils Schneider
a90920e373 gluon-announced: avoid spawning zombies 2014-08-25 21:53:21 +02:00
Nils Schneider
40321595a9 Merge pull request #62 from freifunk-gluon/clientcount
mesh-batman-adv-core: add clientcount statistics
2014-08-22 14:40:09 +02:00