Commit Graph

674 Commits

Author SHA1 Message Date
Matthias Schiffer
a258092760 Merge remote-tracking branch 'origin/mesh-on-lan' 2015-05-06 23:55:04 +02:00
Matthias Schiffer
1e427c4e77 Merge branch 'configurable-methods' 2015-05-06 23:54:17 +02:00
Nils Schneider
d4c3467bc3 luci-portconfig: allow toggling of mesh_on_lan 2015-05-06 13:57:46 +02:00
Nils Schneider
39d0c8f459 mesh-batman-adv: mesh_on_lan
This adds mesh_on_lan functionality.

A new optional site.conf option, mesh_on_lan, has been added. If set to
'true', all LAN ports will be used for meshing instead of being part of
the client bridge.
2015-05-06 13:57:46 +02:00
Matthias Schiffer
cd00eeb367 Merge remote-tracking branch 'origin/meshinterfaces' 2015-05-04 19:28:28 +02:00
Nils Schneider
a349dd07bd nodeinfo: mesh interface classes (wireless, tunnel, other)
This will introduce a new nodeinfo object, network.mesh.bat0.interfaces,
containing any of the the following subordinated objects:

- wireless
- tunnel
- other

Each of these objects contains a (possibly empty) list of MAC addresses
(lowercase, colon-notation) corresponding to a interface of the given
class. Combined with a batman graph it is thus possible to mark
sub-graphs as "wireless" or "vpn".

The previously used object mesh_intefaces is superseded by this new
object structure and mesh_interfaces will be removed in a future Gluon
release.
2015-05-04 19:15:39 +02:00
Matthias Schiffer
fadfc64e16 gluon-luci-wifi-config: don't use luci.sys.wifi.getiwinfo()
Directly using libiwinfo is more reliable.
2015-05-04 19:07:33 +02:00
Matthias Schiffer
f4a3f73fcb gluon-luci-private-wifi: various fixes and cleanup
It would be nice to generalize this to work with multiple radios, maybe by
integrating it into the wifi-config module...
2015-05-04 04:44:12 +02:00
Matthias Schiffer
6fc1db3a70 gluon-luci-wifi-config: add txpower setting
Fixes #219
2015-05-04 04:34:23 +02:00
Matthias Schiffer
76607b0070 Add new package gluon-luci-mesh-vpn-fastd
This new package allows enabling or disabling the null method for the
fastd mesh VPN.
2015-05-04 03:09:36 +02:00
Matthias Schiffer
ce2f494e0c gluon-luci-theme: add cbi-value-field-long class
This new class allows visually pleasing lists of radio buttons/checkboxes/etc.
with long explanation texts.
2015-05-04 03:09:35 +02:00
Matthias Schiffer
a50cce4e09 gluon-mesh-vpn-fastd: make adding or removing the null method survive updates (if desired) 2015-05-04 03:09:07 +02:00
Matthias Schiffer
b76e1a9e48 gluon-luci-wifi-config: i18n and miscellaneous fixes 2015-05-04 03:04:25 +02:00
Matthias Schiffer
4b06bc6a3d gluon-luci-theme: don't color section titles
All other titles are grey, the magenta-colored section titles inbetween look
weird.
2015-05-04 02:49:40 +02:00
Matthias Schiffer
a02d7ad800 gluon-luci-private-wifi: i18n 2015-05-04 02:43:48 +02:00
Matthias Schiffer
56c8fe5145 gluon-luci-autoupdater: order next to the manual upgrades in the navigation 2015-05-04 02:17:38 +02:00
Matthias Schiffer
cdc16af1bd gluon-luci-portconfig: i18n 2015-05-04 02:15:22 +02:00
Matthias Schiffer
fe265126a9 gluon-luci-autoupdater: i18n 2015-05-04 01:57:50 +02:00
Matthias Schiffer
e1f2ac11b6 gluon-luci-admin: i18n 2015-05-04 01:29:29 +02:00
Matthias Schiffer
623966afae gluon-luci-theme: more consistent button spacing 2015-05-04 01:29:03 +02:00
Matthias Schiffer
4d7e84b405 gluon-config-mode-core: nicer LuCI view filenames 2015-05-03 01:58:07 +02:00
Matthias Schiffer
1838cee0d6 gluon-setup-mode: set br-setup MAC address to the primary MAC address
This allows to reach the node in setup mode over the same link-local IPv6
address as br-client uses during normal operation.
2015-05-01 19:57:45 +02:00
Matthias Schiffer
2deb82bcb6 gluon-setup-mode: set regdom
OpenWrt doesn't set the regdom unless a WLAN device is started. Explicitly set
the regdom in the setup mode to get the correct list of allowed txpower entries
in the planned LuCI module.
2015-05-01 19:50:40 +02:00
Hendrik Lüth
34d48501cf fix the data types in the check_site.lua 2015-05-01 05:36:50 +02:00
Matthias Schiffer
f1b5692c2c Merge pull request #344 from do9xe/master
Add the package gluon-luci-wifi-config
2015-05-01 00:17:12 +02:00
Matthias Schiffer
1b7c3e060b gluon-luci-node-role: make node role display strings translatable 2015-04-30 23:48:07 +02:00
Matthias Schiffer
82983c871e Merge branch 'i18n' of https://github.com/freifunk-mwu/gluon 2015-04-30 22:22:30 +02:00
Matthias Schiffer
00c47f2912 gluon-mesh-vpn-fastd: extend site configuration to allow multiple and nested peer groups 2015-04-30 13:05:15 +02:00
kokel
25d8b18f7a gluon-luci-node-role: activate reset button 2015-04-28 17:22:38 +02:00
Kokel
0c80e7863f gluon-luci-node-role: add translations 2015-04-28 17:22:38 +02:00
do9xe
e0a1bf5f9a add the package gluon-luci-wifi-config 2015-04-28 07:10:47 +02:00
Matthias Schiffer
6bcd9b92d4 gluon-announced: allow announced queries on WAN (if mesh-on-wan is enabled) 2015-04-28 05:25:56 +02:00
Matthias Schiffer
bca916dd55 gluon-core: disable multicast snooping on the WAN bridge
This seems to mitigate weird bridge forwarding issues.
2015-04-27 22:00:38 +02:00
Matthias Schiffer
5aa6838828 Introduce virtual packages for gluon-setup-mode and gluon-config-mode-core
This will require site.mk to explicitly pull in the gluon-setup-mode and
gluon-config-mode-core packages.
2015-04-26 13:16:23 +02:00
Matthias Schiffer
6ee65907a4 gluon-announce: add number of CPUs 2015-04-25 23:25:26 +02:00
Matthias Schiffer
53dac66a04 Merge branch 'survive-upgrades' of https://github.com/do9xe/gluon 2015-04-25 21:44:00 +02:00
DO9XE
44beb0c178 gluon-mesh-batman-adv-core: make wireless-disable state survive updates and allow site option 2015-04-25 21:38:57 +02:00
Matthias Schiffer
5d8aee0559 gluon-config-mode-geo-location: add "Altitude" string to the POT file 2015-04-25 18:40:19 +02:00
Matthias Schiffer
d7fb0c7fa0 gluon-announced: use respondd
This also adds an extended query protocol and deflate compression.
2015-04-23 18:36:00 +02:00
Matthias Schiffer
62de29cb67 gluon-announce: don't make the lua module executable 2015-04-23 18:27:15 +02:00
bjoern
c4f7a52621 gluon-config-mode-mesh-vpn: Remove trailing newline from pubkey variable in 0100-mesh-vpn.lua 2015-04-10 23:00:13 +02:00
Jan-Philipp Litza
ba9ce051b0 gluon-announce: Fix permissions of collect.lua 2015-04-08 21:16:55 +02:00
Matthias Schiffer
cd34cb2ebb gluon-core, gluon-setup-mode: improve support for UAP Outdoor+ 2015-04-08 00:44:12 +02:00
Matthias Schiffer
a476dd4e33 gluon-site: remove PO template, it is maintained in the site-example
Having two POT files will only cause confusion.
2015-03-25 17:43:37 +01:00
Matthias Schiffer
a97116b909 Remove english .po files, they are redundant. 2015-03-25 17:42:58 +01:00
Nils Schneider
653ea4a301 Merge pull request #76 from freifunk-gluon/neighours
announce neighbours using alfred/gluon-announce
2015-03-24 20:56:39 +01:00
Nils Schneider
7e7ee16105 gluon-announce: move collect_dir to library 2015-03-23 22:09:27 +01:00
Martin Weinelt
8361b51c32 gluon-config-mode-geo-location: add altitude field 2015-03-23 02:19:36 +01:00
Matthias Schiffer
127b576fa5 gluon-config-mode-*: remove usages of the word "Freifunk" 2015-03-22 23:42:23 +01:00
Matthias Schiffer
6c387af9ca gluon-site: always provide a PKG_VERSION, also during package scan 2015-03-21 18:26:54 +01:00
Jan-Philipp Litza
335026af09 Allow empty hostname prefix
In Bremen it has been noted that a prefix may lead people to believe it
has to stay there and thus naming their nodes "ffhb-*", which is not
what the community wants (see FreifunkBremen/gluon-site-ffhb#1).

However, an empty prefix lead to the connecting hyphen still being
inserted. This commit thus makes the hyphen part of the configured
prefix and allows the prefix to be missing from the `site.conf`.
2015-03-21 13:43:45 +01:00
Matthias Schiffer
7896f91f86 gluon-config-mode-mesh-vpn: add translations 2015-03-19 22:22:39 +01:00
Matthias Schiffer
ce82baf0ad gluon-config-mode-core: use translated messages from the site configuration 2015-03-19 22:11:43 +01:00
Matthias Schiffer
5805e78455 gluon-site: add translations from the site configuration 2015-03-19 21:31:44 +01:00
Matthias Schiffer
0e9095b58c gluon-config-mode-contact-info: add missing translation 2015-03-19 21:14:41 +01:00
Matthias Schiffer
87370a456d gluon-site: add POT file for site-configurable messages 2015-03-19 20:31:12 +01:00
Matthias Schiffer
65b44ca4ce Rename gluon-config to gluon-site 2015-03-19 20:14:40 +01:00
Matthias Schiffer
d9366935e3 gluon-config-mode-*: add source directory to GluonBuildI18N calls 2015-03-19 19:05:42 +01:00
Matthias Schiffer
113f362c30 gluon-config: use PKG_FILE_DEPENDS 2015-03-19 03:54:12 +01:00
Matthias Schiffer
67b607d882 gluon-config-mode-core: add translations 2015-03-19 02:35:20 +01:00
Matthias Schiffer
76ccfeea25 gluon-config-mode-contact-info: fix c&p mistake 2015-03-19 02:35:13 +01:00
Matthias Schiffer
224f3990e0 gluon-config-mode-contact-info: add translations 2015-03-19 01:43:25 +01:00
Matthias Schiffer
613dceaa25 gluon-config-mode-geo-location: add translations 2015-03-19 01:22:31 +01:00
Matthias Schiffer
325eeb4f69 gluon-config-mode-hostname: add translations 2015-03-19 00:57:16 +01:00
Matthias Schiffer
c6f96c3666 gluon-config-mode-autoupdater: add translations for English and German 2015-03-18 20:25:27 +01:00
Matthias Schiffer
0a1e1ad37e gluon-config-mode-core: pull in LuCi i18n packages for enabled languages 2015-03-18 20:25:12 +01:00
Matthias Schiffer
dce26de28c gluon-core: add i18n support 2015-03-18 20:24:57 +01:00
Lars Bußmann
9e267f30bf gluon-next-node: fix IPv4 next node feature 2015-03-18 15:58:21 +01:00
Nils Schneider
b58ab9abb9 ebtables-filter-mcast: drop ARPs to/from 0.0.0.0
Fixes https://github.com/freifunk-gluon/gluon/issues/311
2015-03-16 20:08:22 +01:00
Matthias Schiffer
93cc8e543e gluon-core: fix primary MAC address on TP-LINK Archer C5/C7 2015-03-10 13:40:45 +01:00
Matthias Schiffer
8c59e0c4ea Merge branch 'announce_site_code' of https://github.com/freifunk-mwu/packages 2015-03-02 23:12:53 +01:00
Matthias Schiffer
112c9d5c9d gluon-wan-dnsmasq: don't rewrite resolv.conf when its content hasn't changed
This avoids poking dnsmasq every time a DHCP lease is obtained or a router
advertisement received.
2015-02-18 01:23:11 +01:00
Kokel
3b3b0bf521 gluon-announce: add script to announce site_code 2015-02-10 18:20:44 +01:00
Nils Schneider
9f4770fd62 Merge pull request #99 from freifunk-gluon/allow-ripng
ebtables-filter-multicast: allow ripng
2015-02-10 16:38:55 +01:00
Nils Schneider
3bd93dea06 ebtables-filter-multicast: allow ripng 2015-02-09 02:41:28 +01:00
Nils Schneider
db1fddb0c6 gluon-mesh-vpn-fastd: announce peer status using statistics.d
This adds basic peer statistics to statistics.d:

    "mesh_vpn": {
      "muehlentor": {
        "established": 23.8 // seconds
      },
      "huextertor": null,
      "holstentor": null
    }
2015-02-05 21:33:36 +01:00
Matthias Schiffer
cbedc9421e gluon-core: sysconfig: differentiate between nil and empty string 2015-01-26 20:18:33 +01:00
Matthias Schiffer
c45a0bcdc1 gluon-core: fall back to eth0 for the primary MAC address when there is no WLAN device 2015-01-25 02:29:43 +01:00
Matthias Schiffer
2dea903120 gluon-mesh-batman-adv-core: explicitly set WLAN client and mesh interfaces' ifname 2015-01-24 23:34:35 +01:00
Matthias Schiffer
949420158f gluon-mesh-batman-adv-core: remove unused variable in upgrade script 2015-01-24 23:11:27 +01:00
Matthias Schiffer
6e22c667de gluon-mesh-batman-adv-*: move MTU configuration to version-specific upgrade scripts 2015-01-24 17:18:47 +01:00
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
Matthias Schiffer
9b172bbaf4 Move all upgrade scripts to a common directory
Moving the scripts to a common directory not only vastly simplifies the
zzz-gluon-upgrade script, but also allows to define an ordering of such
scripts across packages.
2015-01-24 11:27:47 +01:00
Matthias Schiffer
20187005d4 gluon-legacy: convert the remaining legacy infrastructure to a simple invariant script 2015-01-24 11:14:09 +01:00
Matthias Schiffer
0371b443d3 gluon-legacy: convert the remaining legacy scripts to invariant scripts 2015-01-24 11:14:09 +01:00
Matthias Schiffer
5e0bad2f25 gluon-legacy: convert gluon-core legacy scripts to invariant scripts
This also fixes a long-broken legacy upgrade script which would leave the
sysconfig variable lan_ifname unset and the LAN ports unusable.
2015-01-24 11:14:09 +01:00
Matthias Schiffer
ecfcb4dd6b gluon-mesh-vpn-fastd: get rid of initial script 2015-01-24 11:14:09 +01:00
Matthias Schiffer
7940bad4a9 gluon-lock-password: convert to invariant script and remove legacy script 2015-01-24 11:14:09 +01:00
Matthias Schiffer
6f11279438 gluon-core: convert all initial scripts to invariant scripts 2015-01-24 11:14:09 +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
ohrensessel
fea00b3603 calculate rootfs usage instead of overlayfs
in case a target does not use overlayfs
2014-08-18 14:07:23 +02:00
ohrensessel
4d747c09c4 adapt overlay_usage to match the comments from luebeck 2014-08-18 13:08:54 +02:00
ohrensessel
42c43ba2af overlay: rename to clarify value 2014-08-18 12:12:00 +02:00
ohrensessel
0e95c90e21 overlay: change to normalized, fix error handling 2014-08-18 12:10:54 +02:00
ohrensessel
4e76436932 add overlay usage to statistics.d 2014-08-18 11:40:13 +02:00
Matthias Schiffer
fe2fc8785e Remove gluon-ath9k-workaround 2014-08-17 19:34:03 +02:00
Matthias Schiffer
f9e5e3325f gluon-setup-mode: cleanup and upgrade fix
Since switching to Barrier Breaker/procd, we'd not notice if we were
upgrading from a version before renaming the config file to gluon-setup-mode
as the upgrade scripts run after the preinit.

Fix this by checking later during setup mode init again and rebooting into the
regular run mode if we detect this case.
2014-08-16 15:15:24 +02:00
Matthias Schiffer
f3ff07b1a5 gluon-mesh-vpn-fastd: delete all old backbone peers on update 2014-08-16 14:51:18 +02:00
penguineer
31fe529e92 Beschreibungstext umformuliert, damit die Option "Mesh-VPN" klarer wird.
Die Bezeichnung "Mesh-VPN" ist etwas irreführend. Man kann denken, dass hiermit das Meshing aktiviert wird, wobei es ja — im Gegenteil — um eine Nutzung des WAN geht.
2014-08-15 15:28:05 +02:00
Nils Schneider
3652628e96 luci-portconfig: fix dns 2014-08-10 17:13:39 +02:00
Nils Schneider
a1d27aefbb mesh-batman-adv-core: add clientcount statistics
This adds

  "client" { "total": <int>, "wifi": <int>" }

to statistics.d. "total" will be the number of clients connected.
"wifi" will be the number of clients connected over wifi. I.e. "total"
will always be equal to or greater than "wifi".

The node will not count itself.
2014-08-10 13:24:08 +02:00
Nils Schneider
d90b1d66fd Merge pull request #61 from freifunk-gluon/configurable-wan
Configurable WAN
2014-08-09 23:31:19 +02:00
Nils Schneider
5145eab954 Merge pull request #59 from freifunk-gluon/form-fields
luci-theme: fix centering of form fields
2014-08-09 20:56:48 +02:00
Matthias Schiffer
62d910edde gluon-luci-portconfig: expose advanced WAN configuration 2014-08-09 17:36:15 +02:00
Matthias Schiffer
3762f52c69 gluon-core: restructure WAN configuration 2014-08-09 14:39:21 +02:00
Matthias Schiffer
d8f0c531c9 gluon-wan-dnsmasq: allow configuring static DNS servers 2014-08-09 14:39:05 +02:00
Nils Schneider
25e0c6e07b luci-theme: fix checkboxes on firefox 2014-08-09 09:35:39 +02:00
Nils Schneider
488ed1bdd7 Merge pull request #58 from jplitza/patch-1
gluon-announced: fix help message
2014-08-08 21:44:11 +02:00
Matthias Schiffer
143d5a9565 Add gluon-mesh-batman-adv-15 2014-08-08 15:56:36 +02:00
Matthias Schiffer
279cfd5117 Split gluon-mesh-batman-adv into gluon-mesh-batman-adv-core and gluon-mesh-batman-adv-14 2014-08-08 15:50:52 +02:00
Nils Schneider
b169a169d6 luci-theme: fix centering of form fields 2014-08-08 14:53:27 +02:00
Jan-Philipp Litza
8a32dd7887 gluon-announced: fix help message
It incorrectly stated "-m" to be the multicast group option, when it really was "-g"
2014-08-08 14:50:00 +02:00
Nils Schneider
4f65d49950 Revert "gluon-luci-theme: remove top padding cbi-field-title"
This reverts commit f37f1f1ac2c9a44d0aafb25e3f5a01e16df6019e.
2014-08-08 14:34:19 +02:00
Matthias Schiffer
cd0a932ac0 gluon-setup-mode: provide alternative rc.d directory for procd 2014-08-07 15:52:38 +02:00
Julian Kornberger
60e0a5601c gluon-luci-private-wifi: fix package naming
previously it was gluon-luci-privatewifi
2014-08-06 23:21:33 +02:00
Matthias Schiffer
1bf1a8ad05 Remove gluon-luci-core
The package luci-base now contains everything we need.
2014-08-06 12:07:34 +02:00
Matthias Schiffer
201acaa3a9 Dependency fixes for the new LuCi version 2014-08-06 12:06:49 +02:00
Matthias Schiffer
c0139e871f gluon-setup-mode: change START to 15
To start after haveged after the recent update.
2014-08-06 11:45:26 +02:00
Nils Schneider
257787a0b0 Merge pull request #40 from digineo/private-wifi
gluon-luci-private-wifi: UI for enabling a private WLAN
2014-08-05 15:50:53 +02:00
Nils Schneider
3aecc92073 gluon-config-mode: modularize wizard
This commit splits gluon-config-mode into several, mostly independent
packages.

* gluon-config-mode-core: basic functionality (required)
* gluon-config-mode-hostname: hostname field
* gluon-config-mode-autoupdater: show when autoupdater is enabled
* gluon-config-mode-mesh-vpn: fastd vpn configuration, bw limit
* gluon-config-mode-geo-location: geo coordinates
* gluon-config-mode-contact-info: contact info field

The package gluon-config-mode has been removed. You need to replace
it with these packages (or any subset of them) in site.mk:

* gluon-config-mode-hostname
* gluon-config-mode-autoupdater
* gluon-config-mode-mesh-vpn
* gluon-config-mode-geo-location
* gluon-config-mode-contact-info

Note: It is not possible to deactivate the autoupdater in config mode
anymore (expert mode will still allow it). Instead, a message is shown
in case the autoupdater is enabled.
2014-08-05 14:56:45 +02:00
Julian Kornberger
1fc572e863 gluon-luci-wifi: UI for enabling a private WLAN
freifunk-gluon/gluon#122
2014-08-05 01:20:15 +02:00
Matthias Schiffer
07ce01517c gluon-radvd: fix NULL deref
The specification says that the ifa_addr field of struct ifaddrs may be NULL,
and in Barrier Breaker, this does actually occur...
2014-08-04 22:57:26 +02:00
Nils Schneider
ce1a160bcc gluon-config-mode: mention reboot on button
Make it clear that saving settings will reboot the device.
2014-08-04 20:46:33 +02:00
Nils Schneider
74dfce8a30 gluon-announced: do not strdup optarg 2014-08-04 20:41:00 +02:00
Nils Schneider
a7a8f37308 Merge pull request #53 from freifunk-gluon/fastd-key-generate
config-mode, mesh-vpn: refactor key generation
2014-08-04 20:32:03 +02:00
Matthias Schiffer
8f6ec2fb4b gluon-simple-tc: replace tc with own implementation to reduce size 2014-08-04 20:08:40 +02:00
Matthias Schiffer
4732de1f82 gluon-radvd: implement own radvd to reduce size 2014-08-04 20:08:40 +02:00
Matthias Schiffer
bce2f19a8c Remove outdated IP dependencies 2014-08-04 20:08:40 +02:00
Matthias Schiffer
117f9b4662 gluon-mesh-batman-adv: don't parse ip output for nodeinfo 2014-08-04 20:08:40 +02:00
Matthias Schiffer
4795fc4a50 gluon-mesh-batman-adv: use lua-ethtool-stats instead of ethtool 2014-08-04 20:08:40 +02:00
Matthias Schiffer
7b0ed188b0 gluon-wan-dnsmasq: use libpacketmark 2014-08-03 11:07:28 +02:00
Matthias Schiffer
354508752c gluon-mesh-batman-adv: fix network.mesh_inferfaces announce field with new netifd 2014-07-28 16:29:20 +02:00
Nils Schneider
2f5705b5de config-mode, mesh-vpn: refactor key generation
Previously, the config-mode was responsible for generating the fastd
secret. This patch sets the default secret to "generate" causing a
secret to be generated on its first use (e.g. show_key or start).

This also changes the info page (in Expert Mode) to show "n/a" when the
public key is not yet available.
2014-07-27 16:22:40 +02:00
Matthias Schiffer
9510d03b8b gluon-autoupdater: perform fallback updates hourly 2014-07-25 16:55:00 +02:00
Matthias Schiffer
35d8ff579f gluon-autoupdater: unconditionally perform an update 5 minutes after boot when the whole PRIORITY delay has passed 2014-07-21 17:27:47 +02:00
Matthias Schiffer
a39f527dad gluon-autoupdater: add locking to ensure no two instances of the autoupdater run in parallel 2014-07-21 17:27:47 +02:00
Matthias Schiffer
bb2adefd34 gluon-autoupdater: adjust for new updater logic
The probability field is removed, updates are performed once per night between
04:00 and 05:00.
2014-07-21 17:27:47 +02:00
Matthias Schiffer
059ea7e5fd gluon-autoupdater: add version_file option to uci settings 2014-07-21 17:27:47 +02:00
Cyrus
cfc4a99307 Fixed bug which led to empty ath9k crontab file
The crontab file was opened in write mode but in the case where no monitor is defined it would leave an empty file.
2014-07-20 16:30:36 +02:00
Nils Schneider
0a3bf70d56 split announce.d into nodeinfo + statistics 2014-07-20 14:00:10 +02:00
Nils Schneider
a9c22c5ace gluon-core: add unique node_id
This adds a `node_id` to announce.d. `node_id` is an hex-number uniquely
identifying a particular node. On nodes having a
primary MAC this MAC address will be used as `node_id` (sans the
colons). The value is opaque. It must not be converted back into
a MAC address.

`node_id` should be sent in all alfred and announced packets to
ensure clients can link the data to a particular node.
2014-07-20 11:24:47 +02:00
Matthias Schiffer
12144126fe gluon-luci-admin: add an info page 2014-07-20 08:12:48 +02:00
Matthias Schiffer
71c9bb815f gluon-luci-theme: remove top padding cbi-field-title
This allows to use cbi-field to format plain text instead of form fields.
2014-07-20 08:12:48 +02:00
Matthias Schiffer
971dec8d27 gluon-core: remove now unused dnsmasq.d support 2014-07-20 04:04:27 +02:00
Matthias Schiffer
e9376fc3bd gluon-mesh-vpn-fastd: use gluon-wan-dnsmasq 2014-07-20 04:03:43 +02:00
Matthias Schiffer
f389ef925e Add new package gluon-wan-dnsmasq
This package provides a secondary dnsmasq instance on port 54 which resolves
everything over the WAN interface.
2014-07-20 03:25:22 +02:00
Matthias Schiffer
d638359215 Explicitly set the WAN MAC address on all models where WAN is a VLAN device
Also move it to gluon-mesh-batman-adv, as mesh_on_wan is the only feature that
needs a unique MAC address on the WAN interface.
2014-07-19 18:40:12 +02:00
Matthias Schiffer
f792997bb1 gluon-simple-tc: add site validator 2014-07-16 17:31:40 +02:00
Matthias Schiffer
de633e9bc3 gluon-simple-tc: change type of the enabled option in the site config to boolean 2014-07-16 16:56:15 +02:00
Matthias Schiffer
ce37755488 gluon-mesh-batman-adv: validate mesh_on_wan option 2014-07-16 16:44:33 +02:00
Nils Schneider
e2d9bd5160 Merge pull request #27 from freifunk-gluon/batman-on-wan
gluon-batman-on-wan + gluon-luci-portconfig
2014-07-16 16:30:36 +02:00
Nils Schneider
d2d3a7b628 gluon-batman-on-wan + gluon-luci-portconfig 2014-07-16 16:11:31 +02:00