mirror of https://github.com/hak5/openwrt-owl.git
ppp: unconditionally start pppd with nodefaultroute and usepeerdns (#12580)
Since the switch to netifd, proto handlers may always set the defaultroute and provide dns server addresses, netifd will decide in the generic code path whether the announced values are masked or not. Additionally protocol handlers should not modify the routing tables themselves and prevent any launched services from doing so. Remove the additional defaultroute and peerdns option handling from the ppp.sh protocol handler and rely on netifd to mask or not mask the values. SVN-Revision: 34536owl
parent
94c1d77886
commit
d221222907
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=ppp
|
PKG_NAME:=ppp
|
||||||
PKG_VERSION:=2.4.5
|
PKG_VERSION:=2.4.5
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
||||||
|
|
|
@ -16,8 +16,6 @@ ppp_generic_init_config() {
|
||||||
proto_config_add_string "pppd_options"
|
proto_config_add_string "pppd_options"
|
||||||
proto_config_add_string "connect"
|
proto_config_add_string "connect"
|
||||||
proto_config_add_string "disconnect"
|
proto_config_add_string "disconnect"
|
||||||
proto_config_add_boolean "defaultroute"
|
|
||||||
proto_config_add_boolean "peerdns"
|
|
||||||
proto_config_add_boolean "ipv6"
|
proto_config_add_boolean "ipv6"
|
||||||
proto_config_add_boolean "authfail"
|
proto_config_add_boolean "authfail"
|
||||||
proto_config_add_int "mtu"
|
proto_config_add_int "mtu"
|
||||||
|
@ -26,14 +24,8 @@ ppp_generic_init_config() {
|
||||||
ppp_generic_setup() {
|
ppp_generic_setup() {
|
||||||
local config="$1"; shift
|
local config="$1"; shift
|
||||||
|
|
||||||
json_get_vars ipv6 peerdns defaultroute demand keepalive username password pppd_options
|
json_get_vars ipv6 demand keepalive username password pppd_options
|
||||||
[ "$ipv6" = 1 ] || ipv6=""
|
[ "$ipv6" = 1 ] || ipv6=""
|
||||||
[ "$peerdns" = 0 ] && peerdns="" || peerdns="1"
|
|
||||||
if [ "$defaultroute" = 1 ]; then
|
|
||||||
defaultroute="defaultroute replacedefaultroute";
|
|
||||||
else
|
|
||||||
defaultroute="nodefaultroute"
|
|
||||||
fi
|
|
||||||
if [ "${demand:-0}" -gt 0 ]; then
|
if [ "${demand:-0}" -gt 0 ]; then
|
||||||
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
||||||
else
|
else
|
||||||
|
@ -51,8 +43,9 @@ ppp_generic_setup() {
|
||||||
nodetach ipparam "$config" \
|
nodetach ipparam "$config" \
|
||||||
ifname "${proto:-ppp}-$config" \
|
ifname "${proto:-ppp}-$config" \
|
||||||
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
|
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
|
||||||
${ipv6:++ipv6} $defaultroute \
|
${ipv6:++ipv6} \
|
||||||
${peerdns:+usepeerdns} \
|
nodefaultroute \
|
||||||
|
usepeerdns \
|
||||||
$demand maxfail 1 \
|
$demand maxfail 1 \
|
||||||
${username:+user "$username" password "$password"} \
|
${username:+user "$username" password "$password"} \
|
||||||
${connect:+connect "$connect"} \
|
${connect:+connect "$connect"} \
|
||||||
|
|
Loading…
Reference in New Issue