summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-14 08:03:09 +0000
committerRoy Marples <roy@marples.name>2020-01-14 08:03:09 +0000
commit4be4f6a93b616eb296b7cb526dc841896d75de0b (patch)
tree0a799520cceccdc617ebe133d5d86b16de96bd2f
parent9c6b0045b9b890f58e6da5bed0af95a4f8eda704 (diff)
downloadopenresolv-4be4f6a93b616eb296b7cb526dc841896d75de0b.tar.xz
Don't use allow/deny configuration when listing known interfaces.
This should only be used for the actual processing of the information.
-rw-r--r--resolvconf.in27
1 files changed, 16 insertions, 11 deletions
diff --git a/resolvconf.in b/resolvconf.in
index 5f537a5..50792ab 100644
--- a/resolvconf.in
+++ b/resolvconf.in
@@ -59,6 +59,7 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; then
interface_order="$(cat "$SYSCONFDIR"/interface-order)"
fi
fi
+
IFACEDIR="$VARDIR/interfaces"
METRICDIR="$VARDIR/metrics"
PRIVATEDIR="$VARDIR/private"
@@ -495,20 +496,22 @@ list_resolv()
continue
fi
- if [ -n "$allow_interfaces" ]; then
- x=false
- for j in $allow_interfaces; do
+ if ! $ALLIFACES; then
+ if [ -n "$allow_interfaces" ]; then
+ x=false
+ for j in $allow_interfaces; do
+ if [ "$i" = "$j" ]; then
+ x=true
+ fi
+ done
+ $x || continue
+ fi
+ for j in $deny_interfaces; do
if [ "$i" = "$j" ]; then
- x=true
+ continue 2
fi
done
- $x || continue
fi
- for j in $deny_interfaces; do
- if [ "$i" = "$j" ]; then
- continue 2
- fi
- done
if [ "$cmd" = i ] || [ "$cmd" = "-i" ]; then
printf %s "$i "
@@ -620,7 +623,7 @@ make_vars()
SEARCH=
NAMESERVERS=
LOCALNAMESERVERS=
-
+
if [ -n "${name_servers}${search_domains}" ]; then
eval "$(echo_prepend | parse_resolv)"
fi
@@ -715,9 +718,11 @@ fi
# -l lists our resolv files, optionally for a specific interface
if [ "$cmd" = l ] || [ "$cmd" = i ]; then
+ ALLIFACES=true
list_resolv "$cmd" "$args"
exit $?
fi
+ALLIFACES=false
# Restart a service or echo the command to restart a service
if [ "$cmd" = r ] || [ "$cmd" = R ]; then