diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-08-14 01:30:34 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-08-14 01:30:34 +0200 |
commit | 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 (patch) | |
tree | 1ad12e1f8f228fc71106597951f05faf5dfb0631 | |
parent | 98c50f93fe494be5547188813c367299db80dbc5 (diff) | |
download | busybox-w32-34ecc3b7aefdd6c31e8691bd5485037bbabedbd4.tar.gz busybox-w32-34ecc3b7aefdd6c31e8691bd5485037bbabedbd4.tar.bz2 busybox-w32-34ecc3b7aefdd6c31e8691bd5485037bbabedbd4.zip |
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.c | 3 |
1 files changed, 1 insertions, 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,) | |||
362 | req.r.rtm_scope = RT_SCOPE_NOWHERE; | 362 | req.r.rtm_scope = RT_SCOPE_NOWHERE; |
363 | 363 | ||
364 | if (cmd != RTM_DELROUTE) { | 364 | if (cmd != RTM_DELROUTE) { |
365 | req.r.rtm_scope = RT_SCOPE_UNIVERSE; | ||
365 | if (RTPROT_BOOT != 0) | 366 | if (RTPROT_BOOT != 0) |
366 | req.r.rtm_protocol = RTPROT_BOOT; | 367 | req.r.rtm_protocol = RTPROT_BOOT; |
367 | if (RT_SCOPE_UNIVERSE != 0) | ||
368 | req.r.rtm_scope = RT_SCOPE_UNIVERSE; | ||
369 | if (RTN_UNICAST != 0) | 368 | if (RTN_UNICAST != 0) |
370 | req.r.rtm_type = RTN_UNICAST; | 369 | req.r.rtm_type = RTN_UNICAST; |
371 | } | 370 | } |