mirror of https://github.com/hak5/openwrt.git
ppp: propagate master peerdns setting to dynamic slave interface
Honour the parent interfaces peerdns option when spawning a virtual DHCPv6 interface in order to avoid pulling in IPv6 DNS servers when the user opted to inhibit peer DNS servers in the configuration. Fixes #597. Signed-off-by: Jo-Philipp Wich <jo@mein.io>openwrt-18.06
parent
a8e0816490
commit
64de1cb1fd
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=ppp
|
PKG_NAME:=ppp
|
||||||
PKG_VERSION:=2.4.7
|
PKG_VERSION:=2.4.7
|
||||||
PKG_RELEASE:=10
|
PKG_RELEASE:=11
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
|
PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
|
||||||
|
|
|
@ -23,6 +23,7 @@ if [ -n "$AUTOIPV6" ]; then
|
||||||
json_add_string proto "dhcpv6"
|
json_add_string proto "dhcpv6"
|
||||||
[ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
|
[ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
|
||||||
[ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
|
[ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
|
||||||
|
[ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS
|
||||||
json_close_object
|
json_close_object
|
||||||
ubus call network add_dynamic "$(json_dump)"
|
ubus call network add_dynamic "$(json_dump)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -88,7 +88,7 @@ ppp_generic_setup() {
|
||||||
local config="$1"; shift
|
local config="$1"; shift
|
||||||
local localip
|
local localip
|
||||||
|
|
||||||
json_get_vars ipv6 ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff
|
json_get_vars ipv6 ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns
|
||||||
if [ "$ipv6" = 0 ]; then
|
if [ "$ipv6" = 0 ]; then
|
||||||
ipv6=""
|
ipv6=""
|
||||||
elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
|
elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
|
||||||
|
@ -137,6 +137,7 @@ ppp_generic_setup() {
|
||||||
${ipv6:++ipv6} \
|
${ipv6:++ipv6} \
|
||||||
${autoipv6:+set AUTOIPV6=1} \
|
${autoipv6:+set AUTOIPV6=1} \
|
||||||
${ip6table:+set IP6TABLE=$ip6table} \
|
${ip6table:+set IP6TABLE=$ip6table} \
|
||||||
|
${peerdns:+set PEERDNS=$peerdns} \
|
||||||
nodefaultroute \
|
nodefaultroute \
|
||||||
usepeerdns \
|
usepeerdns \
|
||||||
$demand $persist maxfail $maxfail \
|
$demand $persist maxfail $maxfail \
|
||||||
|
|
Loading…
Reference in New Issue