From: jow Date: Thu, 6 Dec 2012 18:17:41 +0000 (+0000) Subject: xl2tpd: unconditionally configure daemon with nodefaultroute and usepeerdns (#12580) X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=11969159288cd0fbfe6b30de085fed4e481f42c3;p=packages.git xl2tpd: unconditionally configure daemon 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. git-svn-id: svn://svn.openwrt.org/openwrt/packages@34537 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/xl2tpd/files/l2tp.sh b/net/xl2tpd/files/l2tp.sh index b0d5d4ca6..867234dbe 100644 --- a/net/xl2tpd/files/l2tp.sh +++ b/net/xl2tpd/files/l2tp.sh @@ -13,8 +13,6 @@ proto_l2tp_init_config() { proto_config_add_string "password" proto_config_add_string "keepalive" proto_config_add_string "pppd_options" - proto_config_add_boolean "defaultroute" - proto_config_add_boolean "peerdns" proto_config_add_boolean "ipv6" proto_config_add_int "mtu" proto_config_add_string "server" @@ -45,14 +43,8 @@ proto_l2tp_setup() { /etc/init.d/xl2tpd start fi - 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="" - [ "$peerdns" = 0 ] && peerdns="" || peerdns="1" - if [ "$defaultroute" = 1 ]; then - defaultroute="defaultroute replacedefaultroute"; - else - defaultroute="nodefaultroute" - fi if [ "${demand:-0}" -gt 0 ]; then demand="precompiled-active-filter /etc/ppp/filter demand idle $demand" else @@ -67,8 +59,8 @@ proto_l2tp_setup() { mkdir -p /tmp/l2tp echo "${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}}" > "${optfile}" - echo "${peerdns:+usepeerdns}" >> "${optfile}" - echo "$defaultroute" >> "${optfile}" + echo "usepeerdns" >> "${optfile}" + echo "nodefaultroute" >> "${optfile}" echo "${username:+user \"$username\" password \"$password\"}" >> "${optfile}" echo "ipparam \"$config\"" >> "${optfile}" echo "ifname \"l2tp-$config\"" >> "${optfile}"