Commit Graph

742 Commits

Author SHA1 Message Date
Christof Schulze
7f66481a70 pretty-print 2016-09-09 00:22:45 +02:00
Christof Schulze
2c418a6e66 safety first: section names, removing old mesh_interfaces 2016-09-09 00:22:45 +02:00
Christof Schulze
ae42e979c1 make code more compact 2016-09-09 00:22:45 +02:00
Christof Schulze
39998f543e populate babel-interfaces with the content of /lib/gluon/core/dynamic/interfaces 2016-09-09 00:22:45 +02:00
Nils Schneider
33a12b006f gluon-radvd: HACK: free ebtables from bat0 2016-09-09 00:22:44 +02:00
Nils Schneider
20409f5727 gluon-radvd: run on local-node instead of br-client
On a layer 3 mesh, we'd like the default route to point to all node's
local-node interface for roaming to work.
2016-09-09 00:22:44 +02:00
Nils Schneider
e8acfaecb0 gluon-next-node: mark local-node ip6 as deprecated
Prevent the local-node ip6 from being eligible for source address
selection. This is highly undesireable in a layer 3 mesh.
2016-09-09 00:22:44 +02:00
Ruben Barkow
5035ccd3d1 gluon-config-mode-contact-info: define an "obligatory" option in site.conf (#843) 2016-09-09 00:22:00 +02:00
J0WI
546ac146c6 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-09 00:22:00 +02:00
Matthias Schiffer
3b3e03bd20 gluon-mesh-batman-adv-core: explicitly set primary MAC address using a dummy interface
Fixes #834
2016-09-09 00:22:00 +02:00
Matthias Schiffer
e795f61252 Reorganize MAC addresses, always explicitly set address for private WLAN
Fixes #842
2016-09-09 00:22:00 +02:00
Matthias Schiffer
0b3af14bf8 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-09 00:21:59 +02:00
Matthias Schiffer
50d982cad7 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-09 00:21:59 +02:00
Matthias Schiffer
2c3da87f7c gluon-mesh-batman-adv-core: move config not specific to batman-adv to gluon-core 2016-09-09 00:21:59 +02:00
Matthias Schiffer
74a80bf8d6 gluon-mesh-batman-adv-*, gluon-mesh-vpn-fastd: configure batman-adv through gluon_mesh proto 2016-09-09 00:21:59 +02:00
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