Commit Graph

705 Commits

Author SHA1 Message Date
T-X
d5829d87be gluon-mesh-batman-adv-core: disable bridge port learning on bat0 (#780)
The mesh side has become fairly huge in many communities. Up to
a few thousand entries can currently be found in the forwarding
database (fdb) of a bridge for its bridge port bat0.

The bridge fdb is kind of redundant to the batman-adv global translation
table here. Therefore this patch tries to reduce memory footprint by
following an approach similar to the IGMP/MLD split patchset approach:

Make the bridge oblivious not only regarding multicast listeners towards
the mesh but with this patch unicast hosts on the mesh, too.

If the destination of an ethernet frame is known by the bridge to be a
local one, then the frame is forwarded to the according port. If it is
unknown, then the frame is forwarded to the wifi AP interface and bat0.

mac80211 and batman-adv then know whether to drop or forward a frame
further through their own book-keeping.

Note that unicast-flood is not disabled for the wifi AP bridge port, nor
is learning disabled on the wifi AP. This is mainly to keep the
configuration in UCI and according setup scripts simple ;). However, not
disalbling unicast-flood on the wifi AP interface might also give a
minor latency improvement for newly joining wifi clients.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-08-22 23:26:07 +02:00
kb-light
2789aebcb2 gluon-luci-private-wifi: limit ssid to 32 characters (#848)
Fixes #845
2016-08-08 11:38:57 +02:00
Jan-Philipp Litza
d445cb772d gluon-radvd: Use procd in init script
The main advantage is that procd is capable of logging stderr to logd,
making errors easier to debug.
2016-07-30 20:27:20 +02:00
Matthias Schiffer
f3cb6d7b36
gluon-luci-portconfig: add setting for PoE passthrough
Fixes #328
2016-07-30 00:04:17 +02:00
Matthias Schiffer
b1a753e1c5
gluon-core: allow setting PoE passthrough default setting from site.conf 2016-07-30 00:00:39 +02:00
Matthias Schiffer
b241373640
gluon-luci-private-wifi: set MAC address if the driver provides one 2016-07-28 00:27:47 +02:00
Matthias Schiffer
279a409198
gluon-core: split get_wlan_mac_from_driver() out of get_wlan_mac() 2016-07-27 17:25:05 +02:00
Matthias Schiffer
806af27083
gluon-client-bridge, gluon-mesh-batman-adv-core: make macaddr variable local in upgrade script 2016-07-27 17:25:05 +02:00
Matthias Schiffer
7565839fc4 Merge pull request #674 from T-X/filter-igmp-mld
Filter IGMP+MLD
2016-07-27 17:24:43 +02:00
Matthias Schiffer
85674a5557
gluon-luci-admin: rename "Expert Mode" to "Advanced settings"
Use the common term; the "Expert Mode" never was a distinct mode of
operation anyways.
2016-07-27 02:38:39 +02:00
Matthias Schiffer
5e3b1f80b0
gluon-luci-admin: regenerate fr.po 2016-07-27 02:35:06 +02:00
Christof Schulze
65ee128c37
gluon-radvd: externalize arguments
The arguments are now provided by gluon-mesh-batman-adv-core, so
gluon-radvd can be used with other mesh protocols.

[Matthias Schiffer: removed PROVIDES dependency]
2016-07-27 01:24:33 +02:00
Matthias Schiffer
55d6f71cff
gluon-setup-mode: remove unneeded require 2016-07-26 01:11:03 +02:00
lemoer
8e8f794c24 gluon-neighbour-info: improve verbosity on wrong cli parameters (#829)
gluon-neighbour-info: improve verbosity on wrong cli parameters
2016-07-25 15:52:27 +02:00
Matthias Schiffer
2afe34efec
Use MAC addresses provided by WLAN drivers by default
Some drivers (mt76) don't support arbitrary MAC addresses. Use the
addresses provided by the driver (avoiding the primary address) by default,
but fall back to our has-based scheme when the driver doesn't provide
(enough) addresses.
2016-07-20 18:42:56 +02:00
Matthias Schiffer
c8bc4620d1
gluon-core: unify indentation in gluon/util.lua 2016-07-20 17:51:09 +02:00
Matthias Schiffer
849af9ade0
gluon-client-bridge, gluon-mesh-batman-adv-core: simplify VIF config functions 2016-07-20 15:44:36 +02:00
Matthias Schiffer
64fdc0d7ba
gluon-mesh-batman-adv-core: add sleep to autoupdater network stop script
Accidentially forgot to commit this. The sleep is necessary so netifd can
actually stop the WLAN interfaces after `wifi down`.
2016-07-19 15:49:07 +02:00
Jan-Tarek Butt
8f5a7c9001
gluon-mesh-batman-adv-core: stop WLAN and batman-adv before autoupdater upgrades
[Matthias Schiffer:
  - improve commit message
  - add pidof check
  - also call `wifi down`
]
2016-07-19 03:41:21 +02:00
Jan-Tarek Butt
1c1f490527
Minify all Lua code 2016-07-10 20:14:25 +02:00
Matthias Schiffer
42910c0606
ramips-mt7621: use phy1 MAC address as primary on DIR-860L B1 2016-07-10 15:51:07 +02:00
Matthias Schiffer
c913957e01
gluon-luci-wifi-config: fix to work with legacy configs using macaddr instead of path to identify radios 2016-07-09 23:32:46 +02:00
Matthias Schiffer
bae721a9bb
Add target ar71xx-mikrotik
Fixes #121

Based-on-patch-by: Tobias Hachmer <tobias@hachmer.de>
2016-06-23 00:29:28 +02:00
Matthias Schiffer
dc485f7356
gluon-core: make gluon.platform.match() match all boards when no boards are given 2016-06-23 00:07:25 +02:00
Sven Eckelmann
fa04fff88d ar71xx-generic: Add support for OpenMesh MR1750v2
The new MR1750v2 device support is only available in LEDE master. The
relevant patches have to backported to add support for them in Gluon

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2016-06-17 20:04:00 +02:00
Sven Eckelmann
3ccd516971 ar71xx-generic: Add support for OpenMesh OM2P-HSv3
The new OM2P-HSv3 device support is only available in LEDE master. The
relevant patches have to backported to add support for them in Gluon

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2016-06-17 20:04:00 +02:00
Thomas Weißschuh
0a936e4de5 gluon-batman-adv-core: respondd: add gateway_nexthop field 2016-06-02 16:14:13 +02:00
Jan-Philipp Litza
76c3456787 gluon-node-info: simplify respondd module code a bit 2016-05-27 22:40:17 +02:00
Jan-Philipp Litza
f7eda9381f respondd modules: Use proper formatting of doubles
Most doubles that are delivered via respondd have limited input
precision, but are converted with up to 17 digits of precision. That can
cause ugly blowups like 0.2800000000000001 in the output, which is
avoided by specifying better format strings (like "%.2f" in most cases).
2016-05-26 17:38:36 +02:00
Sven Eckelmann
780f7cad2a ar71xx-generic: Use eth0 as OpenMesh primary mac address
The OpenMesh devices have a sticker with the eth0 mac address on the
bottom. Also all other mac addresses are calculated based on this address.
Therefore, it is better to use this as primary mac address instead of the
WiFi mac address.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2016-05-23 21:39:27 +02:00
Linus Lüssing
4199b216c6 ebtables-segment-mld: Segment IGMP/MLD domain
This patch adds a new gluon-ebtables package to filter IGMP/MLD messages
via ebtables.

For one thing this reduces multicast overhead: About one third of all
ICMPv6 multicast traffic in Lübeck or Hamburg is MLD.

Furthermore it removes a potential Distributed Denial-of-Service vector
(see Gluon ticket #553).

Finally, it is a prerequisite for enabling bridge multicast snooping in
a decentral and robust fashion.

Note that IGMP/MLD are filtered for multicast traffic coming from
the mesh, too (new MULTICAST_IN), as unfortunately there seem to
be other queriers somewhere in the mesh at least for Freifunk
Lübeck. Also adding these rules to be prepared to anyone intentionally
or unintentionally disabling these filters on his/her node.

Node operators not running Gluon (for instance gateway nodes) should
make sure to either enable multicast_router towards bat0 or disable
multicast snooping entirely if they have a bridge on top of bat0.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-05-20 22:59:31 +02:00
Linus Lüssing
8e891b2cc4 ebtables-filter-mcast: Remove redundant allow-filter for hop-by-hop
ebtables actually skips any IPv6 extension headers like the hop-by-hop
one. So this rule is actually void.

The intend back then was to allow passing MLD messages into the mesh.
Since extension headers are skipped, the general icmpv6 rule will
actually match MLD messages. So the hop-by-hop rule is unnecessary,
too.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-05-20 02:04:25 +02:00
Matthias Schiffer
97879e80ad
gluon-config-mode-core: clean up reboot handling
Don't fork reboot process before all package hooks have been handled and
rendering is complete.

Replace debug.setfenv hack to close stdout with nixio.dup.

Fixes #772
2016-05-19 15:31:47 +02:00
Matthias Schiffer
4a60e5a02a
gluon-mesh-vpn-fastd: add missing iptables dependency confusing Kconfig
This was causing "recursive dependency" errors and potentially broken
configurations.
2016-05-18 01:24:11 +02:00
Sven Eckelmann
d30a6ff1db gluon-luci-admin: Fix uploaded image validation
The image validation currently fails on some devices (tested OpenMesh)
because it isn't done via sysupgrade. But the checks depend partially on
the integration in sysupgrade (e.g. via loops that can be stopped via
"break statements").

Instead of hacking its own version check, it is easier and better tested to
just use 'sysupgrade -T' like it is already done by LuCI.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2016-05-16 13:31:25 +02:00
Matthias Schiffer
cab23b1838
ar71xx-generic: switch default WAN/LAN assignment on Ubiquiti UAP Pro
Fixes #764
2016-05-14 01:02:25 +02:00
Matthias Schiffer
087112a09b
ar71xx-generic: add support for UniFi AC PRO/LITE (LITE untested)
Also backport some patches improving QCA956x support.
2016-05-14 00:48:10 +02:00
Matthias Schiffer
86ef9b0e97
Fix creation of IBSS interfaces on devices with two radios
Lua's tables are 1-based, so we must decrement the index by 1 to get the
desired MAC addresses. By not doing this, the second IBSS interface would
get the address with index 8, but only indices 0..7 are available.

Fixes: c73a12e0ea
2016-05-14 00:34:04 +02:00
kb-light
f68a5662b6 gluon-node-info: add a script to fix whitespaces within the coordinates
Signed-off-by: kb-light <freifunk@kb-light.de>
2016-04-28 09:34:33 +02:00
Matthias Schiffer
d77bfe9da9 gluon-mesh-batman-adv-core: fix rssid for setups without 11s 2016-04-27 21:07:46 +02:00
kb-light
d8092bce62 gluon-config-mode-mesh-vpn: provide contact-information for reboot-message (#671) 2016-04-27 17:08:42 +02:00
kb-light
269a8fbdd4 gluon-config-mode-geo-location: add ability to hide the altitude field (#693) 2016-04-27 12:37:30 +02:00
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