From patchwork Tue Jan 19 11:47:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 4975 Return-Path: Received-SPF: Neutral (access neither permitted nor denied) identity=mailfrom; client-ip=74.125.82.45; helo=mail-wm0-f45.google.com; envelope-from=sven@open-mesh.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=open-mesh.com Authentication-Results: open-mesh.org; dkim=pass reason="2048-bit key; unprotected key" header.d=open-mesh-com.20150623.gappssmtp.com header.i=@open-mesh-com.20150623.gappssmtp.com header.b=eXBzbpaq; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by open-mesh.org (Postfix) with ESMTPS id 97CD180719 for ; Tue, 19 Jan 2016 12:47:25 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id r129so86623564wmr.0 for ; Tue, 19 Jan 2016 03:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=v6epmxIaQqd40dTg0Oz4MWOaANxe8VndcOGxh099yTM=; b=eXBzbpaqQGhZMSNGxtY4L9gkPdYlG56/jXNPrHhg6miSj8/0tbVaiMYpsS14ad+kaZ YzYsOQQZABPuNflzLD0B4J0R4I8aty261yuc8bOXywcQsdC40/vGdrloY1B8qEytforq UNfHVZ8oexupDPfTMnx4pQnAZRcrpeM40d9PCf6Uz7o5rCwRdfrNHtdfkzH+2uySZVSL Q6ounzRUTtbpFlHzl1zBM5t8Y8PU2QygTCX4cJWt8LDdhJewuPPTAmK708whBxEX5zm/ 8oHMC/u1SI015ZHkXRs023Ur7mMOsdEuzaOcX+gkDCdmYktn7aJ99a8OKDRR/RSi/e7g STUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v6epmxIaQqd40dTg0Oz4MWOaANxe8VndcOGxh099yTM=; b=iRTV6RllwZbg/EvF9HTP1QypfZ2tXnpeb1CsiE+QJBBOxPKTJreXwQ7bh3bmfqiBN2 L/y6M1TUWIi69/TBVDTCt2D9cpw7no1I4jKlgS7xtC4X/h02iUUNm5v56iOErClivNkx MLbcAJjAAPyDtPWQ9dZD+fBe/Zl+0fKSarh8GfCCqqyyWGIghikKISOLbCd0wjWT5YzC 53VfhWmX/G2yjpDTmsge/ty9a0f6TsQBoxM6MT6RilNN4AadoEHScCFqyrKtk4W5FuGh fsjalKcUf2e0doquZ417udTAJ/3mWb5g5zlnL4nidpnCUxl21luKms+NNadsezUliRAa gubg== X-Gm-Message-State: AG10YORky1dmy2BXujmRsUPdd4X6UFPA7fGDQ8PPRC5Z/H5QyQqA45rotEOLMLTHaLhoaX99 X-Received: by 10.28.133.141 with SMTP id h135mr17720686wmd.70.1453204045029; Tue, 19 Jan 2016 03:47:25 -0800 (PST) Received: from sven-desktop.home.narfation.org (x4d05afc7.dyn.telefonica.de. [77.5.175.199]) by smtp.gmail.com with ESMTPSA id di6sm28136598wjb.12.2016.01.19.03.47.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2016 03:47:24 -0800 (PST) From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 19 Jan 2016 12:47:07 +0100 Message-Id: <1453204027-10948-1-git-send-email-sven@open-mesh.com> X-Mailer: git-send-email 2.7.0.rc3 Cc: Sven Eckelmann Subject: [B.A.T.M.A.N.] [PATCH] openwrt-feed-batman-adv: Allow to select routing algorithm 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: Tue, 19 Jan 2016 11:47:26 -0000 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 --- batman-adv-devel/files/lib/netifd/proto/batadv.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/batman-adv-devel/files/lib/netifd/proto/batadv.sh b/batman-adv-devel/files/lib/netifd/proto/batadv.sh index 632a209..1e0c9d0 100644 --- a/batman-adv-devel/files/lib/netifd/proto/batadv.sh +++ b/batman-adv-devel/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