The ap_isolation setting only supports boolean values. So setting an empty
string as ap_isolation is not supported by batctl.
Fixes: f5205d7d24 ("batman-adv: upgrade package to latest release 2014.2.0")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
B.A.T.M.A.N. V support additional settings which are hardif specific. The
batadv_hardif proto has to expose them to allow automatic configuration.
The default configuration would be:
config interface 'bat0_hardif_eth0'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'eth0'
option mtu '1536'
option 'elp_interval' 500
# string like '1mbit' is accepted instead of kbit for override
option 'throughput_override' '0'
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.16 - 5.2)
* coding style cleanups and refactoring
* implement multicast-to-unicast support for multiple targets
* deprecate sysfs support and make it optional
* refresh DAT entry timeouts on incoming ARP Replies
* bugs squashed:
- fix multicast tt/tvlv worker locking
- drop roam tvlv handler when unregistering mesh interface
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Although batman-adv config is cycled in config_foreach, changes
are made in the network config. Thus, this one has to be committed.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
batman-adv allows to configure three different objects:
* batadv hardif
- network interface used by batadv meshif to transport the batman-adv
packets
- its master interface is set to the batadv meshif
* batadv (meshif/softif)
- virtual interface that emulates a normal 802.3 interface on top
- encapsulates traffic and forwards it via the batadv hardifs
* batadv vlan
- potential VLAN ID on top of batadv meshif
- allows filtering of traffic from specific VIDs
While batadv vlan objects were already represented as an own proto
"batadv_vlan", the batadv meshif could never be fully configured using
/etc/config/network. Instead, parts of its configuration were stored in
/etc/config/batman_adv and some in the interfaces with the "batadv" proto.
To increase the confusion, the "batadv" proto wasn't used to define the
batadv meshif but to identify batadv (slave) hardifs. The batman-adv
meshifs were also never created directly but only when a hardif was
configured. The actual modification of the configuration settings was then
applied using a hotplug script hack. The batadv meshif network interface
could therefore only be created when an hardif was available and not
manipulated with ifup/ifdown. Also `/etc/init.d/network reload` didn't
modify the batadv meshif interface configuration correctly.
The "batadv" is now renamed to "batadv_hardif" and a new "batadv" proto is
used to configure the main (meshif) network interface with all its
configuration.
A simple network configuration with WiFi & ethernet interfaces and static
IP on top of bat0 would look like:
# batadv meshif bat0
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms 1
option ap_isolation 0
option bonding 0
option fragmentation 1
#option gw_bandwidth '10000/2000'
option gw_mode 'off'
#option gw_sel_class 20
option log_level 0
option orig_interval 1000
option bridge_loop_avoidance 1
option distributed_arp_table 1
option multicast_mode 1
option network_coding 0
option hop_penalty 30
option isolation_mark '0x00000000/0x00000000'
# add *single* wifi-iface with network bat0_hardif_wlan as hardif to bat0
config interface 'bat0_hardif_wlan'
option mtu '1536'
option proto 'batadv_hardif'
option master 'bat0'
# option ifname is filled out by the wifi-iface
# add eth0 as hardif to bat0
config interface 'bat0_hardif_eth0'
option proto 'batadv_hardif'
option master 'bat0'
option ifname 'eth0'
option mtu '1536'
# configure IP on bat0
config interface 'bat0_lan'
option ifname 'bat0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
Signed-off-by: Sven Eckelmann <sven@narfation.org>
hop_penalty is the last remaining setting which is directly writing to
sysfs instead of using a implementation (sysfs vs. netlink) abstraction
layer. batctl now provides a wrapper function that allows the script to
directly use it to take care of communicating with the driver.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The batctl tool should be used for modifying settings in the batman-adv
driver to keep the scripts consistent and allow to use the correct way of
communicating with the kernel (sysfs vs. netlink).
The gw_mode, gw_bandwidth and gw_sel_class options are all handled by
the same gw_mode command in batctl and thus have to be combined depending
on the "gw_mode" value.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The batctl binary is currently optional for batman-adv installations. But
new configuration settings will only be exposed via generic netlink. The
batctl tool will therefore be required to modify them.
batctl must therefore no longer depend on batman-adv but batman-adv must
depend on batctl. Some already implemented settings are already moved to
batctl.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
It is not necessary to install each file manually to the target path. A
simple recursive copy is enough.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
OpenWrt is able since a while to automatically install all files in ./src/
to the PKG_BUILD_DIR. It is no longer necessary to provide special
Build/Prepare rules to do so.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Users may want to know what options can be specified and in which form they
have to specified. A commented out list of settings is helpful here while
making it not necessary to copy the default settings from batman-adv to
this config all the time.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.16)
* coding style cleanups and refactoring
* mark licenses clearer, change UAPI header from ISC to MIT
* bugs squashed:
- fix packet checksum handling in receive path
- fix handling of large number of interfaces
- fix netlink dumping of gateways and BLA claims+backbones
Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv must make sure that ether_setup is already declared via
linux/netdevice.h before the preprocessor can patch the use of it in
batman-adv. Otherwise it is tried to also patch the declaration of
ether_setup.
Fixes: 8da2f5cbb1 ("batman-adv: upgrade package to latest release 2017.2")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
* support latest kernels (3.2 - 4.11)
* remove bridge loop avoidance addresses from translation table
* allow to build B.A.T.M.A.N. V without cfg80211 integration on Linux <
* 3.16
* coding style cleanups and refactoring
* bugs squashed:
- fix interface reference counter on fragmentation errors
- avoid double free on fragment merge error
- fix support for up to 16 fragments
- fix build of multicast compatibility code on some architectures
Signed-off-by: Sven Eckelmann <sven@narfation.org>
There is no vis_mode in the batman-adv kernel module since batman-adv
2014.0.0. So don't expose such a setting in uci.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
The new setting for aggregated_ogms was read from the correct config key.
But the setting was applied to the wrong file. Also the value to set was
not read from the correct variable.
Reported-by: Edward Beech <initialed85@gmail.com>
Fixes: 2d654c0af1 ("batman-adv: upgrade package to latest release 2012.0.0")
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* support latest kernels (3.2 - 4.10)
* change installation path back to $INSTALL_MOD_DIR/updates/net/batman-adv
* add simple (re)broadcast avoidance
* reduce multicast TT and TVLV update delays under B.A.T.M.A.N. V
* support B.A.T.M.A.N. V throughput detection when using VLANs on top of WiFi
* improve documentation of sysfs and debugfs files
* coding style cleanups and refactoring
* bugs squashed:
- detect missing primaryif during tp_send as error
- fix re-adding of previously removed interfaces via rtnetlink
- fix rare race conditions on interface removal
- handle allocation error when generating TT responses
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The CONFIG_MODULE_STRIPPED hack broke some time ago, as it is undefined too
late (after the headers using it have been included by compat-hacks.h).
Undefine CONFIG_MODULE_STRIPPED at the top of compat-hacks.h instead to
make the module version available to batctl again.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
The network config section for proto batadv now allows to select the
routing algorithm via the option routing_algo. This allows to chose between
BATMAN_IV and BATMAN_V when BATMAN_V is released. This option is only
useful when a new batman-adv device is created and not when only a device
is added to an already existing batman-adv device.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
The content of this file should actually be included somehow in
backport.git so it will become part of the mac80211 package. Still keep
this for now in a separate file so it is easier to extract them.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
With the introduction of the Extended Isolation component[1]
a new option is required by batman-adv: the isolation_mark.
This patch adds support for it in the configuration file
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Extended-isolation
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>