}
FORM_dnsadd=${FORM_dnsadd:-192.168.1.1}
-
if empty "$FORM_submit"; then
FORM_wan_proto=${wan_proto:-$(nvram get wan_proto)}
case "$FORM_wan_proto" in
*) FORM_wan_proto="none";;
esac
- # detect pptp package and compile option
- [ -x /sbin/ifup.pptp ] && {
- PPTP_OPTION="radio|wan_proto|$FORM_wan_proto|pptp|PPTP<br />"
- PPTP_SERVER_OPTION="field|PPTP Server IP|pptp_server_ip|hidden
-text|pptp_server_ip|$FORM_pptp_server_ip"
- }
- [ -x /sbin/ifup.pppoe ] && {
- PPPOE_OPTION="radio|wan_proto|$FORM_wan_proto|pppoe|PPPoE<br />"
- }
-
# pptp, dhcp and static common
FORM_wan_ipaddr=${wan_ipaddr:-$(nvram get wan_ipaddr)}
FORM_wan_netmask=${wan_netmask:-$(nvram get wan_netmask)}
save_setting network ppp_idletime "$FORM_ppp_idletime"
save_setting network ppp_redialperiod "$FORM_ppp_redialperiod"
save_setting network ppp_mtu "$FORM_ppp_mtu"
+
+ save_setting network wan_ifname "ppp0"
+ save_setting network pptp_ifname "vlan1"
+ save_setting network pppoe_ifname "vlan1"
case "$FORM_ppp_redial" in
demand)
;;
esac
;;
+ *)
+ save_setting network wan_ifname "vlan1"
+ ;;
esac
}
fi
+# detect pptp package and compile option
+[ -x /sbin/ifup.pptp ] && {
+ PPTP_OPTION="radio|wan_proto|$FORM_wan_proto|pptp|PPTP<br />"
+ PPTP_SERVER_OPTION="field|PPTP Server IP|pptp_server_ip|hidden
+text|pptp_server_ip|$FORM_pptp_server_ip"
+}
+[ -x /sbin/ifup.pppoe ] && {
+ PPPOE_OPTION="radio|wan_proto|$FORM_wan_proto|pppoe|PPPoE<br />"
+}
+
+
header "Network" "WAN" "WAN settings" ' onLoad="modechange()" ' "$SCRIPT_NAME"
cat <<EOF