b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] mac80211 compat layer for OpenWrt
Date: Thu, 11 Feb 2016 23:52:05 +0100	[thread overview]
Message-ID: <2360276.GhZ0sleNGR@sven-edge> (raw)
In-Reply-To: <1674394.xTpvsLY2Zu@sven-edge>


[-- Attachment #1.1: Type: text/plain, Size: 2523 bytes --]

=2D-nextPart1949817.qKuBKHtrpB
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On Thursday 11 February 2016 23:25:56 Sven Eckelmann wrote:
[...]
> I've also attached the patch to build the current state of B.A.T.M.A.N. V on
> OpenWrt.

Btw. the previously proposed way to select the routing algorithm at runtime in 
OpenWrt requires an additional patch. The setting in /etc/config/network would 
look something like:

    config interface 'batnet'
            option mtu '1532'
            option proto 'batadv'
            option mesh 'bat0'
            option routing_algo 'BATMAN_IV'

Kind regards,
	Sven
=2D-nextPart1949817.qKuBKHtrpB
Content-Disposition: attachment; filename="0003-openwrt-feed-batman-adv-Allow-to-select-routing-algo.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0003-openwrt-feed-batman-adv-Allow-to-select-routing-algo.patch"

From: Sven Eckelmann <sven@open-mesh.com>
Date: Tue, 19 Jan 2016 12:40:10 +0100
Subject: [PATCH] openwrt-feed-batman-adv: Allow to select routing algorithm

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@open-mesh.com>

Forwarded: https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2016-January/014225.html
=2D--
 batman-adv/files/lib/netifd/proto/batadv.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/batman-adv/files/lib/netifd/proto/batadv.sh b/batman-adv/files/lib/netifd/proto/batadv.sh
index 632a209..1e0c9d0 100644
=2D-- a/batman-adv/files/lib/netifd/proto/batadv.sh
+++ b/batman-adv/files/lib/netifd/proto/batadv.sh
@@ -6,14 +6,18 @@ init_proto "$@"
 
 proto_batadv_init_config() {
 	proto_config_add_string "mesh"
+	proto_config_add_string "routing_algo"
 }
 
 proto_batadv_setup() {
 	local config="$1"
 	local iface="$2"
 
=2D	local mesh
=2D	json_get_vars mesh
+	local mesh routing_algo
+	json_get_vars mesh routing_algo
+
+	[ -n "$routing_algo" ] || routing_algo="BATMAN_IV"
+	echo "$routing_algo" > "/sys/module/batman_adv/parameters/routing_algo"
 
 	echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface"
 	proto_init_update "$iface" 1

=2D-nextPart1949817.qKuBKHtrpB--
This is a multi-part message in MIME format.

[-- Attachment #1.2: Type: text/plain, Size: 528 bytes --]

On Thursday 11 February 2016 23:25:56 Sven Eckelmann wrote:
[...]
> I've also attached the patch to build the current state of B.A.T.M.A.N. V on
> OpenWrt.

Btw. the previously proposed way to select the routing algorithm at runtime in 
OpenWrt requires an additional patch. The setting in /etc/config/network would 
look something like:

    config interface 'batnet'
            option mtu '1532'
            option proto 'batadv'
            option mesh 'bat0'
            option routing_algo 'BATMAN_IV'

Kind regards,
	Sven

[-- Attachment #1.3: 0003-openwrt-feed-batman-adv-Allow-to-select-routing-algo.patch --]
[-- Type: text/x-patch, Size: 1510 bytes --]

From: Sven Eckelmann <sven@open-mesh.com>
Date: Tue, 19 Jan 2016 12:40:10 +0100
Subject: [PATCH] openwrt-feed-batman-adv: Allow to select routing algorithm

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@open-mesh.com>

Forwarded: https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2016-January/014225.html
---
 batman-adv/files/lib/netifd/proto/batadv.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/batman-adv/files/lib/netifd/proto/batadv.sh b/batman-adv/files/lib/netifd/proto/batadv.sh
index 632a209..1e0c9d0 100644
--- a/batman-adv/files/lib/netifd/proto/batadv.sh
+++ b/batman-adv/files/lib/netifd/proto/batadv.sh
@@ -6,14 +6,18 @@ init_proto "$@"
 
 proto_batadv_init_config() {
 	proto_config_add_string "mesh"
+	proto_config_add_string "routing_algo"
 }
 
 proto_batadv_setup() {
 	local config="$1"
 	local iface="$2"
 
-	local mesh
-	json_get_vars mesh
+	local mesh routing_algo
+	json_get_vars mesh routing_algo
+
+	[ -n "$routing_algo" ] || routing_algo="BATMAN_IV"
+	echo "$routing_algo" > "/sys/module/batman_adv/parameters/routing_algo"
 
 	echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface"
 	proto_init_update "$iface" 1

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-02-11 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 22:25 [B.A.T.M.A.N.] mac80211 compat layer for OpenWrt Sven Eckelmann
2016-02-11 22:52 ` Sven Eckelmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2360276.GhZ0sleNGR@sven-edge \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).