Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
Fixed Start with WAN and Respond to DNS settings not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
RMerl committed Sep 18, 2012
1 parent 862ed60 commit ac2d892
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion README-merlin.txt
@@ -1,4 +1,4 @@
Asuswrt-Merlin - build 3.0.0.4.220.17 (16-Sept-2012)
Asuswrt-Merlin - build 3.0.0.4.220.18 (xx-Sept-2012)
====================================================


Expand Down Expand Up @@ -288,6 +288,11 @@ https://github.com/RMerl/asuswrt-merlin

History
-------
3.0.0.4.220.18:
- FIXED: OpenVPN 'Start with WAN' and 'Respond to DNS' settings were
not properly saved.


3.0.0.4.220.17:
- NEW: Rebased on 3.0.0.4.220, which includes:
* Fixes to IPv6 6rd
Expand Down
8 changes: 4 additions & 4 deletions release/src/router/httpd/web.c
Expand Up @@ -1451,7 +1451,7 @@ int validate_instance(webs_t wp, char *name)
// This seems to create default values for each unit.
// Is it really necessary? lan_ does not seem to use it.
#ifdef RTCONFIG_OPENVPN
else if(strncmp(name, "vpn_server", 10)==0) {
else if(strncmp(name, "vpn_server_", 11)==0) {
for(i=1;i<3;i++) {
sprintf(prefix, "vpn_server%d_", i);
value = websGetVar(wp, strcat_r(prefix, name+11, tmp), NULL);
Expand All @@ -1461,7 +1461,7 @@ int validate_instance(webs_t wp, char *name)
}
}
}
else if(strncmp(name, "vpn_client", 10)==0) {
else if(strncmp(name, "vpn_client_", 11)==0) {
for(i=1;i<3;i++) {
sprintf(prefix, "vpn_client%d_", i);
value = websGetVar(wp, strcat_r(prefix, name+11, tmp), NULL);
Expand Down Expand Up @@ -1591,7 +1591,7 @@ static int validate_apply(webs_t wp) {
}
#endif
#ifdef RTCONFIG_OPENVPN
else if(!strncmp(name, "vpn_server", 10) && unit!=-1) {
else if(!strncmp(name, "vpn_server_", 11) && unit!=-1) {
snprintf(prefix, sizeof(prefix), "vpn_server%d_", unit);
(void)strcat_r(prefix, name+11, tmp);

Expand All @@ -1601,7 +1601,7 @@ static int validate_apply(webs_t wp) {
_dprintf("set %s=%s\n", tmp, value);
}
}
else if(!strncmp(name, "vpn_client", 10) && unit!=-1) {
else if(!strncmp(name, "vpn_client_", 11) && unit!=-1) {
snprintf(prefix, sizeof(prefix), "vpn_client%d_", unit);
(void)strcat_r(prefix, name+11, tmp);

Expand Down
2 changes: 1 addition & 1 deletion release/src/router/shared/defaults.c
Expand Up @@ -1288,7 +1288,7 @@ struct nvram_tuple router_defaults[] = {
{ "vpn_crt_server2_key", "" },
{ "vpn_crt_server2_dh", "" },
{ "vpn_client_unit", "1" },
{ "vpn_client_eas", "" },
{ "vpn_clientx_eas", "" },
{ "vpn_client1_poll", "0" },
{ "vpn_client1_if", "tun" },
{ "vpn_client1_bridge", "1" },
Expand Down

0 comments on commit ac2d892

Please sign in to comment.