Merge pull request #241 from ecsv/batman-adv-2016.4-maint-2016-10-29
[feed/routing.git] / batman-adv / patches / 0003-batman-adv-Detect-missing-primaryif-during-tp_send-a.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Sat, 29 Oct 2016 09:18:43 +0200
3 Subject: [PATCH] batman-adv: Detect missing primaryif during tp_send as error
4
5 The throughput meter detects different situations as problems for the
6 current test. It stops the test after these and reports it to userspace.
7 This also has to be done when the primary interface disappeared during the
8 test.
9
10 Fixes: 98d7a766b645 ("batman-adv: throughput meter implementation")
11 Reported-by: Joe Perches <joe@perches.com>
12 Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 ---
14 net/batman-adv/tp_meter.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
18 index 2333777..8af1611 100644
19 --- a/net/batman-adv/tp_meter.c
20 +++ b/net/batman-adv/tp_meter.c
21 @@ -837,6 +837,7 @@ static int batadv_tp_send(void *arg)
22 primary_if = batadv_primary_if_get_selected(bat_priv);
23 if (unlikely(!primary_if)) {
24 err = BATADV_TP_REASON_DST_UNREACHABLE;
25 + tp_vars->reason = err;
26 goto out;
27 }
28