Changeset 34536


Ignore:
Timestamp:
2012-12-06T19:17:21+01:00 (5 years ago)
Author:
jow
Message:

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.

Location:
trunk/package/network/services/ppp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/services/ppp/Makefile

    r34171 r34536  
    1111PKG_NAME:=ppp 
    1212PKG_VERSION:=2.4.5 
    13 PKG_RELEASE:=7 
     13PKG_RELEASE:=8 
    1414 
    1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • trunk/package/network/services/ppp/files/ppp.sh

    r33291 r34536  
    1717        proto_config_add_string "connect" 
    1818        proto_config_add_string "disconnect" 
    19         proto_config_add_boolean "defaultroute" 
    20         proto_config_add_boolean "peerdns" 
    2119        proto_config_add_boolean "ipv6" 
    2220        proto_config_add_boolean "authfail" 
     
    2725        local config="$1"; shift 
    2826 
    29         json_get_vars ipv6 peerdns defaultroute demand keepalive username password pppd_options 
     27        json_get_vars ipv6 demand keepalive username password pppd_options 
    3028        [ "$ipv6" = 1 ] || ipv6="" 
    31         [ "$peerdns" = 0 ] && peerdns="" || peerdns="1" 
    32         if [ "$defaultroute" = 1 ]; then 
    33                 defaultroute="defaultroute replacedefaultroute"; 
    34         else 
    35                 defaultroute="nodefaultroute" 
    36         fi 
    3729        if [ "${demand:-0}" -gt 0 ]; then 
    3830                demand="precompiled-active-filter /etc/ppp/filter demand idle $demand" 
     
    5244                ifname "${proto:-ppp}-$config" \ 
    5345                ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \ 
    54                 ${ipv6:++ipv6} $defaultroute \ 
    55                 ${peerdns:+usepeerdns} \ 
     46                ${ipv6:++ipv6} \ 
     47                nodefaultroute \ 
     48                usepeerdns \ 
    5649                $demand maxfail 1 \ 
    5750                ${username:+user "$username" password "$password"} \ 
Note: See TracChangeset for help on using the changeset viewer.