From patchwork Thu Feb 11 22:52:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5076 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Authentication-Results: open-mesh.org; dkim=pass reason="1024-bit key; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=RMdvr0im; dkim-adsp=pass; dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id B6BC08157E for ; Thu, 11 Feb 2016 23:52:06 +0100 (CET) Received: from sven-edge.localnet (p200300C593C061FD0000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c0:61fd::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 2708B1C8001 for ; Thu, 11 Feb 2016 23:52:06 +0100 (CET) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1455231126; bh=FcXw6RLohm9Y3jlNUutzb8D1pc1VgLuNku3HA/2P4b0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RMdvr0imR4zKy/oX1adSOV1PJK3XA5V3w2xPWFbI/FWsdEXlLnAEydyfA0k8dg1ci eA2BHVcvnXovwZvWHhYjBBAQygI4Ia0Y7VXOtnx0QUeEEEZLcTDosQkOMUSiSNSrfb isO6OcevTaBaX9YIba9sAqzi7DFqTTU+bDG2aKEM= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 11 Feb 2016 23:52:05 +0100 Message-ID: <2360276.GhZ0sleNGR@sven-edge> User-Agent: KMail/4.14.10 (Linux/4.3.0-1-amd64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <1674394.xTpvsLY2Zu@sven-edge> References: <1674394.xTpvsLY2Zu@sven-edge> MIME-Version: 1.0 Subject: Re: [B.A.T.M.A.N.] mac80211 compat layer for OpenWrt X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 22:52:07 -0000 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 From: Sven Eckelmann 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 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