Changeset 34537


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

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/xl2tpd/files/l2tp.sh

    r32575 r34537  
    1414        proto_config_add_string "keepalive" 
    1515        proto_config_add_string "pppd_options" 
    16         proto_config_add_boolean "defaultroute" 
    17         proto_config_add_boolean "peerdns" 
    1816        proto_config_add_boolean "ipv6" 
    1917        proto_config_add_int "mtu" 
     
    4644        fi 
    4745 
    48         json_get_vars ipv6 peerdns defaultroute demand keepalive username password pppd_options 
     46        json_get_vars ipv6 demand keepalive username password pppd_options 
    4947        [ "$ipv6" = 1 ] || ipv6="" 
    50         [ "$peerdns" = 0 ] && peerdns="" || peerdns="1" 
    51         if [ "$defaultroute" = 1 ]; then 
    52                 defaultroute="defaultroute replacedefaultroute"; 
    53         else 
    54                 defaultroute="nodefaultroute" 
    55         fi 
    5648        if [ "${demand:-0}" -gt 0 ]; then 
    5749                demand="precompiled-active-filter /etc/ppp/filter demand idle $demand" 
     
    6860 
    6961        echo "${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}}" > "${optfile}" 
    70         echo "${peerdns:+usepeerdns}" >> "${optfile}" 
    71         echo "$defaultroute" >> "${optfile}" 
     62        echo "usepeerdns" >> "${optfile}" 
     63        echo "nodefaultroute" >> "${optfile}" 
    7264        echo "${username:+user \"$username\" password \"$password\"}" >> "${optfile}" 
    7365        echo "ipparam \"$config\"" >> "${optfile}" 
Note: See TracChangeset for help on using the changeset viewer.