Update to openresolv-3.10.0 with the following change:
Add allow_interfaces and deny_interfaces configuration knobs
This commit is contained in:
parent
568a64c5ec
commit
173e555c9e
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2007-2019 Roy Marples <roy@marples.name>
|
Copyright (c) 2007-2020 Roy Marples <roy@marples.name>
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2007-2019 Roy Marples
|
# Copyright (c) 2007-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# dnsmasq subscriber for resolvconf
|
# dnsmasq subscriber for resolvconf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2007-2019 Roy Marples
|
# Copyright (c) 2007-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# libc subscriber for resolvconf
|
# libc subscriber for resolvconf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2007-2016 Roy Marples
|
# Copyright (c) 2007-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# named subscriber for resolvconf
|
# named subscriber for resolvconf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2009-2019 Roy Marples
|
# Copyright (c) 2009-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# PowerDNS Recursor subscriber for resolvconf
|
# PowerDNS Recursor subscriber for resolvconf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2010-2018 Roy Marples
|
# Copyright (c) 2010-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# pdnsd subscriber for resolvconf
|
# pdnsd subscriber for resolvconf
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Copyright (c) 2007-2016 Roy Marples
|
.\" Copyright (c) 2007-2020 Roy Marples
|
||||||
.\" All rights reserved
|
.\" All rights reserved
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Copyright (c) 2009-2016 Roy Marples
|
.\" Copyright (c) 2009-2020 Roy Marples
|
||||||
.\" All rights reserved
|
.\" All rights reserved
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -61,6 +61,10 @@ Set to NO to disable
|
||||||
.Nm resolvconf
|
.Nm resolvconf
|
||||||
from running any subscribers.
|
from running any subscribers.
|
||||||
Defaults to YES.
|
Defaults to YES.
|
||||||
|
.It Sy allow_interfaces
|
||||||
|
If set, only these interfaces will be processed.
|
||||||
|
.It Sy deny_interfaces
|
||||||
|
If set, these interfaces will not be processed.
|
||||||
.It Sy interface_order
|
.It Sy interface_order
|
||||||
These interfaces will always be processed first.
|
These interfaces will always be processed first.
|
||||||
If unset, defaults to the following:-
|
If unset, defaults to the following:-
|
||||||
|
@ -71,7 +75,7 @@ lo lo[0-9]*
|
||||||
These interfaces will be processed next, unless they have a metric.
|
These interfaces will be processed next, unless they have a metric.
|
||||||
If unset, defaults to the following:-
|
If unset, defaults to the following:-
|
||||||
.Bd -compact -literal -offset indent
|
.Bd -compact -literal -offset indent
|
||||||
tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
|
tap[0-9]* tun[0-9]* vpn vpn[0-9]* wg[0-9]* ppp[0-9]* ippp[0-9]*
|
||||||
.Ed
|
.Ed
|
||||||
.It Sy inclusive_interfaces
|
.It Sy inclusive_interfaces
|
||||||
Ignore any exclusive marking for these interfaces.
|
Ignore any exclusive marking for these interfaces.
|
||||||
|
@ -212,7 +216,7 @@ openresolv ships with subscribers for the name servers
|
||||||
.Xr dnsmasq 8 ,
|
.Xr dnsmasq 8 ,
|
||||||
.Xr named 8 ,
|
.Xr named 8 ,
|
||||||
.Xr pdnsd 8 ,
|
.Xr pdnsd 8 ,
|
||||||
.Xr pdns_recursor 8 ,
|
.Xr pdns_recursor 1 ,
|
||||||
and
|
and
|
||||||
.Xr unbound 8 .
|
.Xr unbound 8 .
|
||||||
Each subscriber can create configuration files which should be included in
|
Each subscriber can create configuration files which should be included in
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2007-2019 Roy Marples
|
# Copyright (c) 2007-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
RESOLVCONF="$0"
|
RESOLVCONF="$0"
|
||||||
OPENRESOLV_VERSION="3.9.2"
|
OPENRESOLV_VERSION="3.10.0"
|
||||||
SYSCONFDIR=@SYSCONFDIR@
|
SYSCONFDIR=@SYSCONFDIR@
|
||||||
LIBEXECDIR=@LIBEXECDIR@
|
LIBEXECDIR=@LIBEXECDIR@
|
||||||
VARDIR=@VARDIR@
|
VARDIR=@VARDIR@
|
||||||
|
@ -34,7 +34,7 @@ RESTARTCMD=@RESTARTCMD@
|
||||||
|
|
||||||
if [ "$1" = "--version" ]; then
|
if [ "$1" = "--version" ]; then
|
||||||
echo "openresolv $OPENRESOLV_VERSION"
|
echo "openresolv $OPENRESOLV_VERSION"
|
||||||
echo "Copyright (c) 2007-2016 Roy Marples"
|
echo "Copyright (c) 2007-2020 Roy Marples"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ unset interface_order state_dir
|
||||||
# If you change this, change the test in VFLAG and libc.in as well
|
# If you change this, change the test in VFLAG and libc.in as well
|
||||||
local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1"
|
local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1"
|
||||||
|
|
||||||
dynamic_order="tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*"
|
dynamic_order="tap[0-9]* tun[0-9]* vpn vpn[0-9]* wg[0-9]* ppp[0-9]* ippp[0-9]*"
|
||||||
interface_order="lo lo[0-9]*"
|
interface_order="lo lo[0-9]*"
|
||||||
name_server_blacklist="0.0.0.0"
|
name_server_blacklist="0.0.0.0"
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; then
|
||||||
interface_order="$(cat "$SYSCONFDIR"/interface-order)"
|
interface_order="$(cat "$SYSCONFDIR"/interface-order)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IFACEDIR="$VARDIR/interfaces"
|
IFACEDIR="$VARDIR/interfaces"
|
||||||
METRICDIR="$VARDIR/metrics"
|
METRICDIR="$VARDIR/metrics"
|
||||||
PRIVATEDIR="$VARDIR/private"
|
PRIVATEDIR="$VARDIR/private"
|
||||||
|
@ -494,6 +495,23 @@ list_resolv()
|
||||||
fi
|
fi
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$cmd" = i ] || [ "$cmd" = "-i" ]; then
|
if [ "$cmd" = i ] || [ "$cmd" = "-i" ]; then
|
||||||
printf %s "$i "
|
printf %s "$i "
|
||||||
|
@ -605,7 +623,7 @@ make_vars()
|
||||||
SEARCH=
|
SEARCH=
|
||||||
NAMESERVERS=
|
NAMESERVERS=
|
||||||
LOCALNAMESERVERS=
|
LOCALNAMESERVERS=
|
||||||
|
|
||||||
if [ -n "${name_servers}${search_domains}" ]; then
|
if [ -n "${name_servers}${search_domains}" ]; then
|
||||||
eval "$(echo_prepend | parse_resolv)"
|
eval "$(echo_prepend | parse_resolv)"
|
||||||
fi
|
fi
|
||||||
|
@ -700,9 +718,11 @@ fi
|
||||||
|
|
||||||
# -l lists our resolv files, optionally for a specific interface
|
# -l lists our resolv files, optionally for a specific interface
|
||||||
if [ "$cmd" = l ] || [ "$cmd" = i ]; then
|
if [ "$cmd" = l ] || [ "$cmd" = i ]; then
|
||||||
|
ALLIFACES=true
|
||||||
list_resolv "$cmd" "$args"
|
list_resolv "$cmd" "$args"
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
ALLIFACES=false
|
||||||
|
|
||||||
# Restart a service or echo the command to restart a service
|
# Restart a service or echo the command to restart a service
|
||||||
if [ "$cmd" = r ] || [ "$cmd" = R ]; then
|
if [ "$cmd" = r ] || [ "$cmd" = R ]; then
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2009-2016 Roy Marples
|
# Copyright (c) 2009-2020 Roy Marples
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
|
|
||||||
# unbound subscriber for resolvconf
|
# unbound subscriber for resolvconf
|
||||||
|
|
Loading…
Reference in New Issue