Commit Graph

753 Commits

Author SHA1 Message Date
Matthias Schiffer
2796f66fcb Merge pull request #976 from FreifunkVogtland/batadv-netlink
Switch from batman-adv v14/v15 debugfs to netlink
2016-12-13 01:20:27 +01:00
Matthias Schiffer
182c21eddc
gluon-site: convert site.conf to JSON in compile instead of install step 2016-12-11 15:19:09 +01:00
Sven Eckelmann
22946b14b6 gluon-mesh-batman-adv-core: Switch from debugfs to batadv netlink
The batadv debugfs requires large memory blocks to write the text debug
tables. This is inefficient for large tables like the global translation
table or the originators table.

The memory requirement can be reduced by using netlink. It copies smaller
packets in a binary format to the userspace program. The respondd module of
gluon-mesh-batman-adv-core can therefore parse larger originator tables
without causing an OOM on systems which are tight on memory.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2016-12-11 12:03:12 +01:00
Sven Eckelmann
6ac5b9cbc8 gluon-status-page-api: Switch from debugfs to batadv netlink
The batadv debugfs requires large memory blocks to write the text debug
tables. This is inefficient for large tables like the global translation
table or the originators table.

The memory requirement can be reduced by using netlink. It copies smaller
packets in a binary format to the userspace program. gluon-status-page-api
can therefore parse larger originator tables without causing an OOM on
systems which are tight on memory.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2016-12-11 12:03:12 +01:00
Ruben Barkow
ff0ad20752 gluon-config-mode-core: hand over more info to the reboot screen (#930) 2016-12-11 03:13:28 +01:00
Matthias Schiffer
9a06a98651
gluon-respondd: add delay to mesh-wide multicast requests
Mesh-wide multicast requests are answered with a random delay of up to 10s.
2016-12-11 00:42:41 +01:00
Matthias Schiffer
8c4403ba11
gluon-client-bridge, gluon-mesh-batman-adv-core: switch roles of br-client and local-node interfaces
MAC and IP addresses are switched. This makes the gluon-client-bridge
package more useful for different routing protocols that don't need a
unique address on the client bridge.

As a side effect, gluon-radvd is now using the next-node address, which had
been considered before, but was dismissed to avoid having gluon-radvd
depend on gluon-next-node and gluon-mesh-batman-adv. This will be useful
for announcing default routes via gluon-radvd.

One downside is that this introduces a minor dependency on batman-adv in
gluon-respondd: the hotplug script that checked for the client interface
before will now check for local-node. This doesn't really matter: for mesh
protocols without a local-node interface, the check will do nothing (which
makes sense, as there is no interface to bind to for mesh-wide respondd).
2016-12-10 23:43:44 +01:00
Matthias Schiffer
d2373590e0
gluon-core: add support for removing sysctl settings 2016-12-10 23:43:44 +01:00
Matthias Schiffer
3fc9154d1d
gluon-batman-adv-core: merge gluon-next-node into gluon-batman-adv-core 2016-12-10 23:43:44 +01:00
Matthias Schiffer
fb85d96d5e
gluon-next-node: don't require next_node.ip6
The next-node interface may be useful with IPv4 only or even just a MAC
address. This prepares merging gluon-next-node into gluon-batman-adv-core.
2016-12-10 23:43:23 +01:00
Jan-Philipp Litza
fcf3abd9c4 gluon-respondd: restart on state change of client iface
Because we unconditionally appended `-i br-client` to the command line of
respondd, it wasn't restarted when br-client changed state. Now, we use a
jsonfilter expression on the network.interface dump data, similar to how the
other interface names are generated, and only add the interface to the argument
list if it is up.
2016-12-09 10:43:24 +01:00
Jan-Philipp Litza
d8bb97831b gluon-respondd: Use procd in initscript and to restart on network changes 2016-12-08 23:30:57 +01:00
Matthias Schiffer
cb86fce29f
gluon-respondd: make setup.d script executable 2016-12-08 23:02:23 +01:00
Christof Schulze
ca57cdfe77 gluon-respondd: make initialisation mesh protocol agnostic (#946) 2016-12-08 17:44:29 +01:00
rubo77
2a101ddd56
gluon-core: add dirty flag to gluon-version, add site-version 2016-12-06 20:05:34 +01:00
Matthias Schiffer
b32ed384c7 gluon-mesh-batman-adv-core: respondd: correctly detect lower interface types (#954)
Fixes #941
2016-12-03 13:22:22 +01:00
Matthias Schiffer
1f3e789463
gluon-next-node: fix ebtables rules without next_node.ip4 2016-11-30 15:27:06 +01:00
Ruben Barkow
34deeac380 gluon-config-mode-geo-location: make the label for altitude definable in the site folder (#883) 2016-11-30 13:13:59 +01:00
Matthias Schiffer
20fc162b38
gluon-core, gluon-setup-mode: fix WAN/LAN assignment on CPE210
The interfaces were accidentially switched when the CPE210 was separated
from the CPE510 code.
2016-11-22 20:01:13 +01:00
viisauksena
539081d315 gluon-mesh-vpn-fastd: make fastd syslog level configurable (#915) 2016-11-06 00:01:49 +01:00
Brother-Lal
740c60c7e4 gluon-status-page: add hint to enable JavaScript if it is disabled (#913) 2016-10-24 14:43:12 +02:00
Brother-Lal
e80f751a85 fix error in statuspage if cookies are disabled (#912)
If cookies are disabled, the Statuspage only displays an empty ("Not connected")
This checks if the localStorage API is available and working and only uses it in this case
Also allows better backwards compatibility.
2016-10-24 14:18:01 +02:00
Jan-Tarek Butt
85c66b3bf8
gluon-autoupdater: double quote $1 to prevent globbing and word splitting 2016-10-10 05:44:27 +02:00
Matthias Schiffer
4e2888f7a2
gluon-wan-dnsmasq: fix handling of static DNS servers
Fixes #886
2016-09-18 22:39:22 +02:00
Matthias Schiffer
b902ddd8df
gluon-next-node: make IPv4 next-node address optional
If next_node.ip4 is not set or gluon-next-node is not used, prefix4 will
now be optional as well.
2016-09-10 17:15:16 +02:00
Ruben Barkow
d03c88afb4 gluon-config-mode-contact-info: define an "obligatory" option in site.conf (#843) 2016-09-07 06:44:57 +02:00
J0WI
d2fb547a3f gluon-status-page: removed obsolete css prefixes (#877)
None of them are used by modern browsers anymore, so it's safe to remove them.
2016-09-07 06:03:57 +02:00
Matthias Schiffer
d05cee5b55
gluon-mesh-batman-adv-core: explicitly set primary MAC address using a dummy interface
Fixes #834
2016-09-07 02:14:43 +02:00
Matthias Schiffer
6cddaedfc7
Reorganize MAC addresses, always explicitly set address for private WLAN
Fixes #842
2016-09-07 02:14:42 +02:00
Matthias Schiffer
4f39be09c9
gluon-core: migrate custom batadv interfaces to gluon_mesh proto
Users may have defined additional mesh interfaces. Properly migrate these
to avoid subtly breaking the network config (and make them ready for new
mesh protocols).
2016-09-07 02:14:42 +02:00
Matthias Schiffer
9a5a8e0ab0
gluon-client-bridge: add LAN interfaces to client bridge by default (instead of doing this in the batman-adv-specific scripts)
This allows to weaken the gluon-mesh-batman-adv-core dependency of
gluon-luci-portconfig to gluon-client-bridge.
2016-09-07 02:14:42 +02:00
Matthias Schiffer
8434896014
gluon-mesh-batman-adv-core: move config not specific to batman-adv to gluon-core 2016-09-07 02:14:42 +02:00
Matthias Schiffer
d1e6dfb7e3
gluon-mesh-batman-adv-*, gluon-mesh-vpn-fastd: configure batman-adv through gluon_mesh proto 2016-09-07 02:14:42 +02:00
Matthias Schiffer
b7380decc2
gluon-mesh-batman-adv-*: add gluon_mesh protocol handlers 2016-09-07 02:14:42 +02:00
Matthias Schiffer
5cd6295265
gluon-core: add gluon_mesh netifd proto
This new protocol will allow configuring mesh interfaces independently of
the used mesh protocol.
2016-09-07 02:14:42 +02:00
Matthias Schiffer
d70788adbc
gluon-status-page-api: hide warning in upgrade script 2016-08-30 22:09:40 +02:00
Matthias Schiffer
2331cb194e
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-08-30 21:25:40 +02:00
Matthias Schiffer
051fd926ef
gluon-wan-dnsmasq: add interface name to link-local addresses
Fixes #854
2016-08-28 22:04:47 +02:00
Matthias Schiffer
e0ed7dde85
gluon-config-mode-mesh-vpn: fix indentation 2016-08-27 16:39:30 +02:00
Matthias Schiffer
7e0075584d
Use a "pretty" hostname where possible
Fixes #414
2016-08-27 16:33:37 +02:00
Matthias Schiffer
819c7d59f1
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-08-27 15:18:13 +02:00
Matthias Schiffer
79a49a1515
gluon-luci-theme: add HTML and URL escaping utility functions 2016-08-27 13:19:42 +02:00
kb-light
81280d8e18 gluon-mesh-batman-adv-core: use need_one_of() to check for valid mcast_rate 2016-08-27 07:12:07 +02:00
kb-light
6ff94aca35 gluon-core: make wifi rates configurable by site.conf
and add documentation
2016-08-27 07:11:58 +02:00
Matthias Schiffer
c84bb17915
Merge branch 'enable-multicast-snooping' of https://github.com/T-X/gluon 2016-08-26 21:05:30 +02:00
Matthias Schiffer
e5acba5fbc
gluon-radvd: fix init script
Fixes #862
2016-08-24 13:07:29 +02:00
Linus Lüssing
6594ba314c 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-08-23 00:21:26 +02:00
Linus Lüssing
2a51d94fbb 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-08-23 00:15:27 +02:00
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