Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbcLGHKJ (ORCPT ); Wed, 7 Dec 2016 02:10:09 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:58398 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbcLGHKG (ORCPT ); Wed, 7 Dec 2016 02:10:06 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joe Perches , Sven Eckelmann , Simon Wunderlich Subject: [PATCH 4.8 32/35] batman-adv: Detect missing primaryif during tp_send as error Date: Wed, 7 Dec 2016 08:08:48 +0100 Message-Id: <20161207070724.023619371@linuxfoundation.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161207070722.410336250@linuxfoundation.org> References: <20161207070722.410336250@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 34 4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sven Eckelmann commit e13258f38e927b61cdb5f4ad25309450d3b127d1 upstream. 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: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Reported-by: Joe Perches Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/tp_meter.c | 1 + 1 file changed, 1 insertion(+) --- 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; }