Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batman-adv allow the user to set the routing_algo #1014

Merged
merged 4 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/lime-docs/files/www/docs/lime-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ config lime network
option bmx7_pref_gw none # Force bmx7 to use a specific gateway to Internet (hostname must be used as identifier)
option bmx7_wifi_rate_max 'auto'
option bmx7_enable_pki false # Trust only nodes in /etc/bmx7/trustedNodes when set (default is to trust all nodes)
option batadv_routing_algo 'BATMAN_IV' # BATMAN_V uses throughput rather than packet loss (as in BATMAN_IV) for evaluating the quality of a link
option anygw_mac 'aa:aa:aa:%N1:%N2:aa' # Parametrizable with %Nn. Keep in mind that the ebtables rule will use a mask of ff:ff:ff:00:00:00 so br-lan will not forward anything coming in that matches the first 3 bytes of it's own anygw_mac (aa:aa:aa: by default)
# option autoap_enabled 0 # Requires lime-ap-watchping installed. If enabled AP SSID is changed to ERROR when network issues
# option autoap_hosts "8.8.8.8 141.1.1.1" # Requires lime-ap-watchping installed. Hosts used to check if the network is working fine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function batadv.configure(args)

uci:set("network", "bat0", "interface")
uci:set("network", "bat0", "proto", "batadv")
-- BATMAN_V uses throughput rather than packet loss (as in BATMAN_IV) for evaluating
-- the quality of a link. Still, by default we continue selecting BATMAN_IV
local routing_algo = config.get("network", "batadv_routing_algo", "BATMAN_IV")
uci:set("network", "bat0", "routing_algo", routing_algo)
uci:set("network", "bat0", "bridge_loop_avoidance", "1")
uci:set("network", "bat0", "multicast_mode", "0")

Expand Down
1 change: 1 addition & 0 deletions packages/lime-proto-batadv/tests/test_batadv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('LiMe proto Batman-adv #protobatadv', function()
proto.configure()

assert.is.equal('batadv', uci:get('network', 'bat0', 'proto'))
assert.is.equal('BATMAN_IV', uci:get('network', 'bat0', 'routing_algo'))
assert.is.equal('1', uci:get('network', 'bat0', 'bridge_loop_avoidance'))
assert.is.equal('0', uci:get('network', 'bat0', 'multicast_mode'))

Expand Down
1 change: 1 addition & 0 deletions packages/lime-system/files/etc/config/lime-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ config lime network
option bmx7_pref_gw none
option bmx7_wifi_rate_max 'auto'
option bmx7_enable_pki false
option batadv_routing_algo 'BATMAN_IV'
option anygw_mac "aa:aa:aa:%N1:%N2:aa"
option use_odhcpd false

Expand Down