Commit Graph

727 Commits

Author SHA1 Message Date
Matthias Schiffer
1fb7766692 gluon-mesh-batman-adv-*: add gluon_mesh protocol handlers 2016-09-09 00:21:59 +02:00
Matthias Schiffer
b4aecddd6c gluon-core: add gluon_mesh netifd proto
This new protocol will allow configuring mesh interfaces independently of
the used mesh protocol.
2016-09-09 00:21:59 +02:00
Matthias Schiffer
5dd215a38f gluon-status-page-api: hide warning in upgrade script 2016-09-09 00:21:36 +02:00
Matthias Schiffer
48b3283c3e gluon-mesh-batman-adv-core, gluon-mesh-vpn-fastd: switch MAC address assignment
Switch to:

1. WAN
2. LAN
3. Mesh VPN

As WAN and LAN are setup in gluon-mesh-batman-adv-core (and will be moved
to gluon-core), while the mesh VPN has its own package, giving WAN and LAN
the first indices is preferable.
2016-09-09 00:21:36 +02:00
Matthias Schiffer
a1f1d476ce gluon-wan-dnsmasq: add interface name to link-local addresses
Fixes #854
2016-09-09 00:21:36 +02:00
Matthias Schiffer
1ba534d306 gluon-config-mode-mesh-vpn: fix indentation 2016-09-09 00:21:36 +02:00
Matthias Schiffer
58bd1f5979 Use a "pretty" hostname where possible
Fixes #414
2016-09-09 00:21:35 +02:00
Matthias Schiffer
53be0bec2d gluon-config-mode-*, gluon-luci-*: add escaping for many user- or site-defined strings
Allows weird release numbers, models and site names, and prepares support
for pretty hostnames.
2016-09-09 00:21:35 +02:00
Matthias Schiffer
38c0cb12f7 gluon-luci-theme: add HTML and URL escaping utility functions 2016-09-09 00:21:35 +02:00
kb-light
691531de7e gluon-mesh-batman-adv-core: use need_one_of() to check for valid mcast_rate 2016-09-09 00:21:35 +02:00
kb-light
bd4368d784 gluon-core: make wifi rates configurable by site.conf
and add documentation
2016-09-09 00:21:35 +02:00
Matthias Schiffer
9dd22916fc gluon-radvd: fix init script
Fixes #862
2016-09-09 00:21:35 +02:00
Linus Lüssing
8047684be0 gluon-core: reenable multicast snooping on WAN side
Just like we enabled multicast snooping on the batman-adv client bridge
again, let's do the same for the WAN side.

With one exception: The IGMP/MLD querier is kept disabled to avoid
becoming too "bossy"/"noisy" on a foreign network. The main router on
the WAN side should perform querying and by that enable
IGMP/MLD/snooping if it considers this appropriate there.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-09-09 00:21:35 +02:00
Linus Lüssing
e6244cfeff gluon-mesh-batman-adv-core: reenable multicast snooping
A few issues with the bridge snooping were identified and fixed
upstream in OpenWRT:

* "firewall: Allow IGMP and MLD input on WAN" (r45613)
* "kernel: bridge: backport two snooping related patches" (r45783)
* netifd: "bridge: Fix multicast_to_unicast feature by hairpin+isolate"
  (OW: "netifd: update to the latest version, adds multicast-to-unicast fixes" (r46719))
* "kernel: bridge, multicast-to-unicast: assign src after pskb_may_pull()" (r46721)
* "kernel: bridge, multicast-to-unicast: fix echoes on STA" (46765)

These have very likely caused issues with the bridge snooping before,
which led to disabling it in the past. Let's reenable the multicast
snooping now that they were fixed for reduced multicast overhead on the
wifi.

Advantages are the following:

This mildly reduces overhead on the mesh layer. And significantly reduces
overhead on the AP interface and therefore significantly increases
available airtime (the currently most significant scalability bottleneck).

Secondly removes an easy, often accidental node-local Denial-of-Service
vector based on multicast flooding / streaming.

Thirdly, makes node-local multicast streaming feasible.

Finally should noticably increase battery life of mobile devices.

Note: bridge querier is disabled for br-wan. We want to avoid becoming
too "bossy"/"noisy" on a foreign network.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2016-09-09 00:21:35 +02:00
T-X
0bc0199516 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-09-09 00:21:35 +02:00
kb-light
4ad4217716 gluon-luci-private-wifi: limit ssid to 32 characters (#848)
Fixes #845
2016-09-09 00:21:34 +02:00
Jan-Philipp Litza
b2eeaf6565 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-09-09 00:21:34 +02:00
Matthias Schiffer
d309814be9 gluon-luci-portconfig: add setting for PoE passthrough
Fixes #328
2016-09-09 00:21:33 +02:00
Matthias Schiffer
04ed2ecea7 gluon-core: allow setting PoE passthrough default setting from site.conf 2016-09-09 00:21:33 +02:00
Matthias Schiffer
f3e171a2dc gluon-luci-private-wifi: set MAC address if the driver provides one 2016-09-09 00:21:33 +02:00
Matthias Schiffer
4fcf5e73dd gluon-core: split get_wlan_mac_from_driver() out of get_wlan_mac() 2016-09-09 00:21:33 +02:00
Matthias Schiffer
53a494d25f gluon-client-bridge, gluon-mesh-batman-adv-core: make macaddr variable local in upgrade script 2016-09-09 00:21:33 +02:00
Matthias Schiffer
ca8bff68d6 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-09-09 00:21:32 +02:00
Matthias Schiffer
5a3d7268dd gluon-luci-admin: regenerate fr.po 2016-09-09 00:21:32 +02:00
Christof Schulze
5bf7a7eea5 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-09-09 00:21:32 +02:00
Matthias Schiffer
412d9df0c3 gluon-setup-mode: remove unneeded require 2016-09-09 00:20:37 +02:00
lemoer
4d18a4e611 gluon-neighbour-info: improve verbosity on wrong cli parameters (#829)
gluon-neighbour-info: improve verbosity on wrong cli parameters
2016-09-09 00:20:37 +02:00
Matthias Schiffer
3595c8eb57 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-09-09 00:20:37 +02:00
Matthias Schiffer
ca1b03b29e gluon-core: unify indentation in gluon/util.lua 2016-09-09 00:20:37 +02:00
Matthias Schiffer
f321af9889 gluon-client-bridge, gluon-mesh-batman-adv-core: simplify VIF config functions 2016-09-09 00:20:37 +02:00
Matthias Schiffer
d82b207b16 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-09-09 00:20:36 +02:00
Jan-Tarek Butt
45ae67bb4c 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-09-09 00:20:36 +02:00
Jan-Tarek Butt
13286d3768 Minify all Lua code 2016-09-09 00:20:36 +02:00
Matthias Schiffer
debf8fd013 ramips-mt7621: use phy1 MAC address as primary on DIR-860L B1 2016-09-09 00:20:36 +02:00
Matthias Schiffer
c4f21cdfe0 gluon-luci-wifi-config: fix to work with legacy configs using macaddr instead of path to identify radios 2016-09-09 00:20:36 +02:00
Matthias Schiffer
bfb0002bb5 Add target ar71xx-mikrotik
Fixes #121

Based-on-patch-by: Tobias Hachmer <tobias@hachmer.de>
2016-09-09 00:20:35 +02:00
Matthias Schiffer
5bfb8e4ef6 gluon-core: make gluon.platform.match() match all boards when no boards are given 2016-09-09 00:20:35 +02:00
Sven Eckelmann
2b46abac1c 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-09-09 00:20:34 +02:00
Sven Eckelmann
ef932b1825 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-09-09 00:20:34 +02:00
Thomas Weißschuh
529233e2b4 gluon-batman-adv-core: respondd: add gateway_nexthop field 2016-09-09 00:20:34 +02:00
Jan-Philipp Litza
8546c3b8bd gluon-node-info: simplify respondd module code a bit 2016-09-09 00:20:32 +02:00
Jan-Philipp Litza
94d2fb6d22 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-09-09 00:20:32 +02:00
Sven Eckelmann
bdf5adc76c 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-09-09 00:20:32 +02:00
Linus Lüssing
0cd6f95e9f 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-09-09 00:20:32 +02:00
Linus Lüssing
460e795f93 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-09-09 00:20:32 +02:00
Matthias Schiffer
fe00c4ea53 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-09-09 00:20:31 +02:00
Matthias Schiffer
bbd86a8ae9 gluon-mesh-vpn-fastd: add missing iptables dependency confusing Kconfig
This was causing "recursive dependency" errors and potentially broken
configurations.
2016-09-09 00:20:31 +02:00
Sven Eckelmann
1159957dfc 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-09-09 00:20:31 +02:00
Matthias Schiffer
c6bdd68553 ar71xx-generic: switch default WAN/LAN assignment on Ubiquiti UAP Pro
Fixes #764
2016-09-09 00:20:31 +02:00
Matthias Schiffer
7c0f77b566 ar71xx-generic: add support for UniFi AC PRO/LITE (LITE untested)
Also backport some patches improving QCA956x support.
2016-09-09 00:20:31 +02:00