ppp: propagate master peerdns setting to dynamic slave interface
authorJo-Philipp Wich <jo@mein.io>
Mon, 6 Mar 2017 12:47:50 +0000 (13:47 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 7 Mar 2017 10:26:39 +0000 (11:26 +0100)
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>
package/network/services/ppp/Makefile
package/network/services/ppp/files/lib/netifd/ppp6-up
package/network/services/ppp/files/ppp.sh

index 2b04afddc4a3ecb396782840af674623a5fe1261..8b0daf22953f6c72b1ece888606fd0ce7eeaa6d6 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.7
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
index 07b6a43ca5c4cbe29f905d057cdb585511968d8f..8ad03223e593161d4aca2925ced68a6c54e25aa3 100755 (executable)
@@ -23,6 +23,7 @@ if [ -n "$AUTOIPV6" ]; then
        json_add_string proto "dhcpv6"
        [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
        [ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
+       [ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS
        json_close_object
        ubus call network add_dynamic "$(json_dump)"
 fi
index 9c27b3c280b5680cd56f3d8b18437e5d6e3b0c4d..73bc3161cdcb9f67bfd7875895a6230167792231 100755 (executable)
@@ -88,7 +88,7 @@ ppp_generic_setup() {
        local config="$1"; shift
        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
                ipv6=""
        elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
@@ -137,6 +137,7 @@ ppp_generic_setup() {
                ${ipv6:++ipv6} \
                ${autoipv6:+set AUTOIPV6=1} \
                ${ip6table:+set IP6TABLE=$ip6table} \
+               ${peerdns:+set PEERDNS=$peerdns} \
                nodefaultroute \
                usepeerdns \
                $demand $persist maxfail $maxfail \