aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Zubkov <green@qrator.net>2024-09-28 21:54:51 +0200
committerSam James <sam@gentoo.org>2024-09-29 01:28:25 +0100
commitba522492a3f9e057867f4d7f1d2491cd3a7dbfc3 (patch)
tree8c8f18a1d59fbe3f5b1ffbb0ce3f8a2f60edda4e
parentMakefile.inc: prepare for netifrc-0.7.11 (diff)
downloadnetifrc-ba522492a3f9e057867f4d7f1d2491cd3a7dbfc3.tar.gz
netifrc-ba522492a3f9e057867f4d7f1d2491cd3a7dbfc3.tar.bz2
netifrc-ba522492a3f9e057867f4d7f1d2491cd3a7dbfc3.zip
net: iproute2: fix missing quotes in test
Missing quotes cause incorrect evaluation of an empty string, causing the expression to be always true. Thus every route is considered "nodev" route, causing problems in cases where specific dev is required. Original "nodev" patch 7c6a8de0 contained bashism that forgave missing quoutes. But later it was fixed by 97a79cfd, and the missing quotes became critical. Signed-off-by: Alexander Zubkov <green@qrator.net> Closes: https://bugs.gentoo.org/940443 X-Gentoo-Bug: 940443 X-Gentoo-Bug-URL: https://bugs.gentoo.org/940443 Closes: https://github.com/gentoo/netifrc/pull/58 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net/iproute2.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index ca43496..4abc47c 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -290,7 +290,7 @@ _add_route()
# Process dev vs nodev routes
# Positional parameters are used for correct array handling
- if [ -n ${rtype} ]; then
+ if [ -n "${rtype}" ]; then
local nodev_routes="$(service_get_value "nodev_routes")"
service_set_value "nodev_routes" "${nodev_routes}
${family} route del ${rtype} ${cmd}"