aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-10-29 03:18:43 -0400
committerSimon Wunderlich <sw@simonwunderlich.de>2016-11-04 07:27:39 -0400
commite13258f38e927b61cdb5f4ad25309450d3b127d1 (patch)
tree7aff8e664704feeda9cf96deed3b61681782c8b6
parent27915aa61060fd8954a68a86657784705955088a (diff)
batman-adv: Detect missing primaryif during tp_send as error
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 <joe@perches.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
-rw-r--r--net/batman-adv/tp_meter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 2333777f919d..8af1611b8ab2 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)
837 primary_if = batadv_primary_if_get_selected(bat_priv); 837 primary_if = batadv_primary_if_get_selected(bat_priv);
838 if (unlikely(!primary_if)) { 838 if (unlikely(!primary_if)) {
839 err = BATADV_TP_REASON_DST_UNREACHABLE; 839 err = BATADV_TP_REASON_DST_UNREACHABLE;
840 tp_vars->reason = err;
840 goto out; 841 goto out;
841 } 842 }
842 843