Skip to content

Commit

Permalink
Don't force a network type on page load for VTI mode P2. Fixes #11226
Browse files Browse the repository at this point in the history
Also affects mode changes from/to VTI
  • Loading branch information
marcos-ng authored and vktg committed Mar 29, 2022
1 parent 030fab3 commit 544be7a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/usr/local/www/vpn_ipsec_phase2.php
Expand Up @@ -898,12 +898,18 @@ function change_mode() {
hideClass('opt_localid', false);
hideClass('opt_natid', true);
hideClass('opt_remoteid', false);
$('#localid_type').val('address');
disableInput('localid_type', false);
typesel_change_local(30);
$('#remoteid_type').val('address');
disableInput('remoteid_type', false);
typesel_change_remote(30);
address_is_blank = !/\S/.test($('#localid_type').val());
if (address_is_blank) {
$('#localid_type').val('address');
disableInput('localid_type', false);
typesel_change_remote(0);
}
address_is_blank = !/\S/.test($('#remoteid_address').val());
if (address_is_blank) {
$('#remoteid_type').val('address');
disableInput('remoteid_type', false);
typesel_change_remote(0);
}
$('#opt_localid_help').html("<?=$localid_help_vti?>");
$('#opt_remoteid_help').html("<?=$remoteid_help_vti?>");
} else {
Expand Down

0 comments on commit 544be7a

Please sign in to comment.