summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2016-08-14 01:30:34 +0200
committerDenys Vlasenko2016-08-14 01:30:34 +0200
commit34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 (patch)
tree1ad12e1f8f228fc71106597951f05faf5dfb0631
parent98c50f93fe494be5547188813c367299db80dbc5 (diff)
downloadbusybox-34ecc3b7aefdd6c31e8691bd5485037bbabedbd4.zip
busybox-34ecc3b7aefdd6c31e8691bd5485037bbabedbd4.tar.gz
ip: fix an improper optimization: req.r.rtm_scope may be nonzero here
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/libiproute/iproute.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index e674e9a..48dc6e3 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;
}