aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
blob: 812a5074899257541ceafa4b0bf30a9efbfe4ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Sun, 14 Aug 2016 01:30:34 +0200
Subject: [PATCH] ip: fix an improper optimization: req.r.rtm_scope may be
 nonzero here

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
Upstream-Status: Backport
Signed-off-by: André Draszik <adraszik@tycoint.com>

 networking/libiproute/iproute.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index e674e9a0d..48dc6e3d9 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -362,10 +362,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
 		req.r.rtm_scope = RT_SCOPE_NOWHERE;
 
 	if (cmd != RTM_DELROUTE) {
+		req.r.rtm_scope = RT_SCOPE_UNIVERSE;
 		if (RTPROT_BOOT != 0)
 			req.r.rtm_protocol = RTPROT_BOOT;
-		if (RT_SCOPE_UNIVERSE != 0)
-			req.r.rtm_scope = RT_SCOPE_UNIVERSE;
 		if (RTN_UNICAST != 0)
 			req.r.rtm_type = RTN_UNICAST;
 	}
-- 
2.11.0