From patchwork Sat Oct 29 07:18:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16778 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 1018B830EE; Sat, 29 Oct 2016 09:18:52 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=jFzldY2f; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; 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 Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 2043E8031C for ; Sat, 29 Oct 2016 09:18:50 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593CDC8FD0000000000002E17.dip0.t-ipconnect.de [IPv6:2003:c5:93cd:c8fd::2e17]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 9F99F1C8001; Sat, 29 Oct 2016 09:18:49 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1477725529; bh=HW9T+fh1lVE2Q7cWuWi+nJOCid4ADIdY8dkiVFBBiPo=; h=From:To:Cc:Subject:Date:From; b=jFzldY2fvxRWv9s5NRZmKlPY1Qrad2j4ciRKWrKHMAKctjsWxuehxNS592Jf2dOsx hEsuLM/fW7OVJ2XzwG97/LH9MbZnZ7YCAMYlYoghfe7KSskt5vqwe4iJb/0kehMIof H48a+WdsmULZwVNmWAfxulXnt3VKANPoqZRPtqfM= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 29 Oct 2016 09:18:43 +0200 Message-Id: <20161029071843.4614-1-sven@narfation.org> X-Mailer: git-send-email 2.10.1 Cc: a@unstable.cc Subject: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Detect missing primaryif during tp_send as error 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: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The throughput meter detects different situations as problems for the current test. It stops the test after these and reports it to userspace. This also has to be done when the primary interface disappeared during the test. Fixes: 98d7a766b645 ("batman-adv: throughput meter implementation") Reported-by: Joe Perches Signed-off-by: Sven Eckelmann --- net/batman-adv/tp_meter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 2333777..8af1611 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -837,6 +837,7 @@ static int batadv_tp_send(void *arg) primary_if = batadv_primary_if_get_selected(bat_priv); if (unlikely(!primary_if)) { err = BATADV_TP_REASON_DST_UNREACHABLE; + tp_vars->reason = err; goto out; }