Commit Graph

713 Commits

Author SHA1 Message Date
Matthias Schiffer
937fe715c7 gluon-mesh-batman-adv-core: make mesh_lan config a bridge
There are a few devices which have more than one LAN interface (for example
some revision of the TL-WR941ND, which uses a DSA-based switch, so each
switch port has its own netdev.) On these devices we need a bridge for
mesh-on-lan (as the alternative of adding them to batman-adv individually
would need too many MAC addresses.)
2016-04-27 12:20:27 +02:00
lemoer
c73a12e0ea Change MAC schema generation (#715)
While ath9k/ath10k devices can supprt VIFs with any combination of MAC addresses, there are also adapters which have a hardware MAC filter which only allows a few bits to differ. This commit changes the addresses of all VIFs to ony differ in the last 3 bits, which is required to support many Ralink/Mediatek based WLAN adapters.

Technically, the new addresses are generated by calculating an MD5 hash of the primary MAC address and using a part of this hash as a prefix for the MAC addresses.

The addresses (BSSIDs) of the AP VIFs are also reused for the LAN and WAN interfaces in mesh-on-LAN/WAN mode to reduce the number of needed addresses, and thus reduce the chance of collisions. This is not a problem as the MAC addresses of the AP VIFs are never used except as BSSID, and thus not seen by routing protocols like batman-adv.

Fixes #648

[Matthias Schiffer: rewrote commit message]
2016-04-27 12:16:39 +02:00
corvusmo
82b5b5a8d2 gluon-status-page: refactor creation of table rows and cells (#738) 2016-04-27 08:40:13 +02:00
Matthias Schiffer
7f2b93e7f0 gluon-status-page: remove old status page
We have Git for history, there's no reason to keep old files that aren't
used anymore.
2016-04-26 21:29:48 +02:00
Matthias Schiffer
c936fd8054 Merge branch 'master' of https://github.com/corvusmo/gluon 2016-04-25 18:33:10 +02:00
Matthias Schiffer
c18d43d2cb gluon-core: use correct file variable in get_site_config() 2016-04-24 15:55:37 +02:00
Matthias Schiffer
f38bbf0d2c gluon-mesh-batman-adv-core: remove 'gluon.batman_adv' Lua module
It is not used anymore.
2016-04-24 09:47:06 +02:00
Matthias Schiffer
db32736d3b Merge pull request #730 from jannic/master
Add support for carambola 2 board
2016-04-22 18:13:10 +02:00
Jan Niehusmann
bdcd166c7c ar71xx-generic: add support for Carambola 2
Device information can be found at:
http://www.8devices.com/products/carambola-2
https://wiki.openwrt.org/toh/8devices/carambola2

I only did some minimal testing of gluon on the carambola 2 development
board:

 - Config mode works
 - Connects to Wifi Mesh
 - Allows clients to connect

Notably, autoupgrade has not yet been tested.

Change to 010-primary-mac is necessary as the mac address printed
on the sticker is the one of eth0, not the wifi mac.
2016-04-22 08:32:19 +02:00
Matthias Schiffer
ddb9e6b2e5 Merge pull request #679 from T-X/preparations-for-mcast-snooping-final
Preparations for Multicast Snooping Final
2016-04-20 19:44:53 +02:00
corvusmo
80515c087d gluon-status-page: sort gateways alphabetically
Fixes #698
2016-04-08 21:23:56 +02:00
Jan-Philipp Litza
3a3c922a4d gluon-core: use exec on uci commit 2016-04-03 16:14:48 +02:00
Matthias Schiffer
4658afb2c6 gluon-core: commit all UCI configs at the end
Avoid commiting configs inbetween to decrease number of flash writes.

Fixes #714.
2016-04-02 18:56:45 +02:00
Matthias Schiffer
827d81aab3 gluon-config-mode-mesh-vpn: fix save() call for traffic limits
It doesn't seem like this mistake had any effect.
2016-04-02 18:53:56 +02:00
Matthias Schiffer
b8cb60a8d6 Merge pull request #675 from T-X/preparations-for-mcast-snooping
Preparations for Multicast Snooping
2016-03-11 13:27:33 +01:00
Linus Lüssing
c9aa2672bd bridge: Increase IGMP/MLD robustness parameter to three for br-client
We are mostly dealing with the 2.4GHz crap-band here, so increasing the
IGMP/MLD robustness parameter to three to be able to compensate for up
to two consecutive instead of just one lost packet.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-03-10 16:44:34 +01:00
Linus Lüssing
4d00c804c0 bridge: Lower IGMP/MLD query intervals for br-client
There are some devices not acting properly to roaming events, in that
they do not timely reissue IGMP/MLD reports after reconnecting.

To compensate for that this commit reduces the query interval from 125
seconds to 20 and the query response interval from 20 seconds to 5.
This reduces a timeout to 20+5 seconds in the worst-case (12.5s average)
after a roaming event for such broken devices. This should be below the
30s "impatient user threshold" and below any connection timeout.

Until the bridge multicast snooping + querier gets re-enabled this is a
no-op.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-03-10 16:44:05 +01:00
Matthias Schiffer
fc6d4d6c97 gluon-mesh-batman-adv-core: respondd: add uci.h include
This include wasn't actually missing, but well hidden behind the iwinfo.h
include. Make this more obvious.
2016-03-08 07:57:06 +01:00
Linus Lüssing
0fc9e1d966 update config: "firewall: Allow IGMP and MLD input on WAN" (r45613)
Adopt the according modifications to the default firewall settings of
the WAN interface from OpenWRT, revision 45613.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-03-08 07:55:55 +01:00
Linus Lüssing
ca9a6f34f3 gluon-mesh-batman-adv-core: Always forward towards mesh/batman-adv
An IGMP/MLD domain split will prevent us from being able to track
multicast listeners on other nodes.

Therefore we need to always hand any multicast packets we received from
local clients to batman-adv. With bridge multicast snooping disabled,
the current setting in Gluon, this is already the case.

However, in preparation to enabling multicast snooping, we need to
enforce forwarding towards batman-adv by setting the bridge port
option "multicast_router" to 2.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-03-08 07:55:55 +01:00
Matthias Schiffer
289b599233 gluon-status-page: unify prefix list of prettyBytes and prettyBits 2016-03-01 00:06:20 +01:00
Matthias Schiffer
6e452f207a gluon-status-page: don't use internationalization API
It is not supported by all browsers yet.

Also change load display always to display 2 decimal digits (as it is read
from the kernel with 2 decimal digits).

Fixes #606
2016-03-01 00:06:20 +01:00
Matthias Schiffer
79bc3a8d4b gluon-status-page: fix neighbour purging
notUpdated is a Set, to a for-in loop doesn't work.

Fixes #657
2016-02-29 01:12:20 +01:00
Matthias Schiffer
bb8d1783b3 gluon-config-mode-*, gluon-luci-portconfig: improve validation
Make bandwidth limits unsigned; trim numbers, the validator accepts
trailing whitespace.
2016-02-28 22:38:19 +01:00
Matthias Schiffer
88bdc98108 gluon-status-page: don't reset signal graphs on resize events if width hasn't changed
Mobile browsers will often show or hide the address bar while scrolling.
This causes resize events which would often reset the signal graphs.

Fixes #662
2016-02-26 05:35:47 +01:00
Matthias Schiffer
6961406523 Merge pull request #640 from kokel/preserve-wifi-channel
gluon-core: add preserve wifi channel feature
2016-02-24 17:25:02 +01:00
Matthias Schiffer
f0ad8ed5cb gluon-mesh-batman-adv-core: enable mesh_no_rebroadcast for Mesh-on-WAN/LAN
Ethernet links provide transitive connectivity in all but very unusual
setup, enable mesh_no_rebroadcast to reduce load for devices on links with
many nodes.

Fixes #652
2016-02-16 23:26:42 +01:00
Kokel
388d264ff0 gluon-core: add preserve wifi channels feature
This new feature introduces the new uci section 'gluon-core.wireless' with a preserve_channels option:
 * preserve_channels (boolean)

By setting this option to 1 (true) wifi channels will be preserved during upgrades.
2016-02-10 07:06:36 +01:00
Matthias Schiffer
19242f4deb Remove all uses of batman-adv-visdata
Should be redundant after 0bd0df6f93
2016-02-08 20:58:28 +01:00
Matthias Schiffer
e0e96b7b28 Merge branch 'restrict-respondd' 2016-02-05 19:18:40 +01:00
Matthias Schiffer
145cb4ded2 gluon-luci-admin: ensure that the authorized_keys file always ends with a newline
Fixes #558
2016-02-05 18:31:25 +01:00
Matthias Schiffer
2f499dbfc1 gluon-respondd: restrict queries from the mesh to link-local addresses
Restrict to link-local addresses to prevent amplification attacks from
outside the mesh, or such attacks affecting the outside world.

Fixes #637
2016-02-05 17:06:07 +01:00
Matthias Schiffer
6554cc21ab Merge remote-tracking branch 'origin/firewall-multicast' 2016-02-03 08:40:20 +01:00
Matthias Schiffer
d58484c84e gluon-mesh-batman-adv-core: respondd: fix pattern to count clients to work with compat 15 2016-02-02 17:18:52 +01:00
Jan-Philipp Litza
5bb4316f71 gluon-neighbour-info: Open firewall on WAN for respondd replies
If the query was via multicast, the response isn't matched by
--state ESTABLISHED,RELATED

This fixes #619
2016-02-02 13:06:54 +01:00
Matthias Schiffer
0005b3b5a2 autoupdater: stop non-essential services before downloading the image 2016-02-02 09:22:50 +01:00
Matthias Schiffer
b4aaf8a1f8 gluon-respondd: add init script
Instead of starting gluon-respondd from a hotplug handler, add a proper
init script. The new init script has a restart_if_running argument which
is now used by the hotplug handler.
2016-02-02 09:18:13 +01:00
Matthias Schiffer
9004028cb4 Convert gluon-announce Lua code to C modules, rename to gluon-respondd
gluon-announced and gluon-announce are merged to gluon-respondd.
2016-02-02 09:18:12 +01:00
Matthias Schiffer
840d07dd48 Add utility library libgluonutil 2016-02-02 06:39:22 +01:00
Daniel Golle
4ce85afc22 gluon-status-page-api: support batadv-in-VLAN on ibss interface
introduce function to recurse down to the lowest layer-2 interface
corresponding to a given interface.
also re-introduce some of the previously removed input validation plus
some more to protect against glob and path based exploits.
2016-01-13 12:59:16 +01:00
Matthias Schiffer
0880159eb5 gluon-status-page: fix handling of interface names containing dots 2016-01-08 14:54:30 +01:00
Delta / Stefan
bbdc334b43 gluon-status-page: add TB to list of units for transfer volumes
Fixes #614
2016-01-07 18:09:30 +01:00
Matthias Schiffer
f23e024787 Convert site.conf to JSON during build
This will allow us to use its content from other languages than Lua as
well.
2016-01-02 23:49:25 +01:00
Matthias Schiffer
8ffdcaaa1b gluon-mesh-batman-adv-core: announce/neighbours.d: use batman-adv-visdata 2015-12-18 17:46:24 +01:00
Matthias Schiffer
939087cec9 gluon-status-page-api: neighbours-batadv: use batman-adv-visdata, increase interval 2015-12-18 17:46:24 +01:00
Matthias Schiffer
90a64ca87f gluon-status-page-api: use sse-multiplex 2015-12-18 17:46:24 +01:00
Matthias Schiffer
fa504dae8d gluon-neighbour-info: simplify and fix timeout calculation
The timeout was calculated incorrectly (in each iteration the span between
the start time and the current time was substracted from the timeout
again), and would often become negative, causing warnings in the kernel
log.
2015-12-18 17:46:24 +01:00
Matthias Schiffer
a3155c427a gluon-neighbour-info: fix a few compiler warnings 2015-12-18 17:46:24 +01:00
Matthias Schiffer
d3bc707caa gluon-neighbour-info: flush after writing the HTTP header
sse-multiplex likes to get the header as fast as possible.
2015-12-18 17:46:24 +01:00
Matthias Schiffer
c3150d821f gluon-announce{,d}: create a new UCI cursor for each run 2015-12-18 17:46:24 +01:00
Matthias Schiffer
077dbe3c08 gluon-status-page-api: decrease dyn/statistics event frequency
The statistics data is now cached for 5s, no need to send an event every
second. The new interval is 3s, which is coprime with the cache timeout.
2015-12-18 17:45:45 +01:00
Matthias Schiffer
48d24c2674 gluon-announce: enable caching 2015-12-18 17:43:16 +01:00
Matthias Schiffer
eba7ecbbc0 gluon-announced: add support for caching announced data 2015-12-18 17:43:12 +01:00
Matthias Schiffer
5927fd66db gluon-status-page: filter out duplicate events in statistics event stream
Allows simple handling of cached events.
2015-12-18 17:37:48 +01:00
Matthias Schiffer
5ecb8a7366 gluon-mesh-vpn-fastd: gluon-annouced: fix fastd status always being reported as enabled 2015-12-08 22:47:32 +01:00
Nils Schneider
0bb530d1c6 gluon-status-page: fix display of rx and tx traffic
On the status page statistics section counters for transmitted and received traffic were mixed up. Transmitted traffic was shown as received while received traffic was shown as being transmitted.

Fixes #586
2015-12-07 13:44:17 +01:00
Matthias Schiffer
9c7582afe0 gluon-luci-private-wifi: fix typo in code file and regenerate translation files (correctly this time) 2015-11-27 14:33:56 +01:00
Matthias Schiffer
7f0fe061dc gluon-luci-private-wifi: fix translation files 2015-11-27 09:49:12 +01:00
Matthias Schiffer
d428576ec5 Merge pull request #552 from freifunk-gluon/disable-mesh
gluon-mesh-batman-adv-core: keep disabled state even when the mesh interface section name is changed
2015-11-23 00:42:39 +01:00
Matthias Schiffer
81b2142e65 Merge branch 'patch-1' of https://github.com/ohrensessel/gluon 2015-11-22 23:28:39 +01:00
Matthias Schiffer
0335ce10e2 gluon-mesh-batman-adv-core: keep disabled state even when the mesh interface section name is changed
Is makes sense to always look for both ibss_radio* and mesh_radio* sections
to determine if the meshing should be enabled when regenerating these
sections. Doing this, the disabled state will survive updates changing the
section name (either updating from pre-2015.2 while keeping IBSS, or
changing from IBSS to 11s or vice-versa).

If both ibss_radio* and mesh_radio* sections exist, the disabled state will
be kept correctly for each section, the behaviour is changed only when
creating a section that didn't exist before.

Fixes #549
2015-11-18 03:01:18 +01:00
Matthias Schiffer
e528977100 gluon-site: set PKG_FILE_DEPENDS to site.conf and i18n/ only
PKG_FILE_DEPENDS caused the whole site repo to be hashed to determine if
gluon-site needed rebuilding. While this is normally no problem,
alternative build setups sometimes put the Gluon repo inside the site repo,
causing long build times and parallel build failures.
2015-11-18 02:39:05 +01:00
Leo Krueger
bc15b6c810 gluon-ebtables-filter-multicast: drop icmpv6 type 128 & 139, drop icmp
in a layer 2 mesh network, multicast pings cause a lot of traffic in the
network, significantly increasing the 'backgroudn noise' (= Grundrauschen)
and stressing nodes in the network.

this commit blacklists all icmpv4 multicast traffic as well as multicast
icmpv6 echo-requests and node iformation queries. as no application
depending on these types of multicast traffic is known, blacklisting is safe.
2015-11-12 21:16:37 +01:00
Matthias Schiffer
412e1ef147 gluon-core: fix removal of "OpenWrt" default WLAN interface
Fixes #534
2015-10-28 17:06:29 +01:00
Matthias Schiffer
3ddcf50b80 Drop htmode field from config, always use HT20
Fixes #487
2015-10-27 01:57:10 +01:00
Matthias Schiffer
3647cf1d18 Remove leftover file from gluon-radio-config 2015-10-27 01:57:10 +01:00
Matthias Schiffer
9b46a05de7 Merge pull request #450 from freifunk-gluon/status-page
gluon-status-page: new status page
2015-10-26 22:55:00 +01:00
Matthias Schiffer
557a073dc7 gluon-mesh-batman-adv-core/gluon-luci-portconfig: fix configuration of br-client ifname with multiple interfaces in lan_ifname
There are a few devices on which lan_ifname contains multiple interface
names separated by spaces.
2015-10-26 22:29:44 +01:00
Nils Schneider
84b6374970 gluon-client-bridge: basic br-client config and wireless AP
This package provides br-client and sets up a wireless AP interface for
clients.
2015-10-26 21:14:32 +01:00
Matthias Schiffer
22130e84e8 Merge gluon-radio-config into gluon-core
gluon-radio-config contained only a single file. The code has been adjusted
to allow creating a Gluon configuration without WLAN support by removing
the wifi24 and wifi5 sections from site.conf.
2015-10-26 20:59:56 +01:00
Matthias Schiffer
53211b5b46 Replace gluon-cron by micrond 2015-10-15 23:52:30 +02:00
Matthias Schiffer
d0a78ea8ba Merge branch 'opkg' 2015-10-15 22:28:41 +02:00
Matthias Schiffer
45d1d04ae3 Merge branch 'simple-tc' 2015-10-15 22:28:32 +02:00
Matthias Schiffer
2fefdeee63 gluon-mesh-batman-adv-core: neighbours.d/wifi: output empty object instead of empty list when there are no neighbours on an interface 2015-10-15 02:42:28 +02:00
Matthias Schiffer
26682b24b3 Replace gluon-simple-tc by non-Gluon-specific simple-tc
The Gluon-specific functions of the gluon-simple-tc package are moved to
gluon-mesh-vpn-fastd.
2015-10-15 02:38:47 +02:00
Jan-Philipp Litza
daa15290ab gluon-announce: Remove now unused collect.lua
The file promotes the probably unnecessary re-execution of the announce
scripts. Instead, gluon-announced should be queried using

    gluon-neighbour-info -d ::1 -p 1001 -t0 -r nodeinfo

if both gluon-announced and gluon-neighbour-info are present. But to not
depend on any of those, no script for this one-liner is provided.
2015-10-15 01:49:20 +02:00
Jan-Philipp Litza
bae6519279 gluon-alfred/gluon-status-page: Query gluon-announced
By not executing all scripts from gluon.announce themselves, both should
be considerably faster and lighter on RAM usage.
2015-10-15 01:49:20 +02:00
Jan-Philipp Litza
d2ff7d5c22 gluon-neighbour-info: Add -l and -c parameter, make event type for -s configurable 2015-10-15 01:49:20 +02:00
Matthias Schiffer
3725f7bca3 Merge remote-tracking branch 'origin/announce.d' 2015-10-15 01:31:05 +02:00
Matthias Schiffer
d5c334af6d gluon-core: replace opkg site configuration to make it more flexible
The new options allow specifying custom repositories and are evaluated
in an upgrade script, not during build.
2015-10-14 02:57:29 +02:00
Matthias Schiffer
b46d4fd537 gluon-mesh-batman-adv-core: make gateway selection class configurable
Fixes #401
2015-10-12 21:49:02 +02:00
Nils Schneider
9dffb1284f gluon-announce(d): preload functions, collectgarbage
By calling collectgarbage() at various places I was able to reduce heap
usage by ~270kb.
2015-10-12 20:54:03 +02:00
Nils Schneider
435ded0c60 gluon-announce: build a tree of functions first
collect_dir() will now pre-load all files and return a function that will
collect all information.
2015-10-12 20:54:03 +02:00
Matthias Schiffer
a22c808634 Merge pull request #466 from kb-light/11s-mesh-dev
gluon-mesh-batman-adv-core: prepare for 802.11s mesh
2015-10-11 23:01:08 +02:00
Matthias Schiffer
12f9df7e86 gluon-config-mode-core: don't throw error when no config mode modules are installed
The expert mode can still be useful without any cohfig mode modules.
2015-10-11 21:19:28 +02:00
Matthias Schiffer
05f146f817 Validate section names from site.conf in various packages 2015-10-11 19:34:14 +02:00
Ruben Barkow
06a2b2b1d1 gluon-luci-private-wifi: typo seperaten 2015-10-09 11:59:12 +02:00
Matthias Schiffer
98542b015d i18n: s/noeud/nœud/ 2015-10-08 22:16:25 +02:00
kb-light
955dc886a8 gluon-mesh-batman-adv-core: prepare for 802.11s mesh
keep macfilter and maclist config after fw-update
2015-09-22 10:48:09 +02:00
srauscher
16888d214d Add french translation 2015-09-17 07:28:09 +02:00
Alex
b465504ae8 add: info for 802.11s interface
additional information for commit 2a93c58042
2015-09-13 14:32:53 +02:00
Nils Schneider
014f5751c8 gluon-status-page-api: increase uhttp.max_requests to 32
Now that the status page api has been rewritten in C CPU load and memory
usage is much lower. Also, nodes with both ibss and 11s mesh and dual
band wifi may require up to 9 connections for a single client, thus the
previous limit of 12 seemed a little low.
2015-09-05 12:11:35 +02:00
Nils Schneider
8be372a590 gluon-status-page-api: rewrite stations in C 2015-09-05 12:11:33 +02:00
Nils Schneider
4b8f6c9835 gluon-status-page-api: rewrite neighbours-batadv in C 2015-09-05 11:47:44 +02:00
Nils Schneider
431ac81407 gluon-status-page-api: split API from gluon-status-page
This will make it easier to replace the API with C programs.
2015-09-05 11:47:44 +02:00
Nils Schneider
5e5dc5ab18 gluon-status-page: new status page 2015-09-04 20:50:18 +02:00
Nils Schneider
34752c7e0b br-client: convert option ifname to list ifname
Convert option ifname in br-client to use a list instead. This
simplifies adding and remove interfaces:

uci:add_to_set("network", "client", "ifname", "eth0")
uci:remove_from_set("network", "client", "ifname", "eth0")

An option ifname will be automatically converted to a list when
performing an upgrade.

Packages affected: gluon-mesh-batman-adv-core, gluon-luci-portconfig
2015-09-04 20:31:53 +02:00
Matthias Schiffer
faba9efb88 Merge branch 'jsonc-sink' of https://github.com/FreifunkBremen/gluon 2015-09-04 17:15:58 +02:00
Jan-Philipp Litza
961e6cc1c0 Add sink support to luci-lib-jsonc and use it where needed 2015-09-04 12:27:45 +02:00
Nils Schneider
96033758ab Merge pull request #473 from FreifunkBremen/batctl-if-lua
Don't fork batctl from announce scripts
2015-09-04 11:40:00 +02:00