Commit 5c5c3286 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy, ipsec) flip ipv4/ipv6 subnet in ipsec phase2, closes...

(legacy, ipsec) flip ipv4/ipv6 subnet in ipsec phase2, closes https://github.com/opnsense/core/issues/446

(cherry picked from commit d0940e86)
parent 20083b96
...@@ -458,6 +458,11 @@ $( document ).ready(function() { ...@@ -458,6 +458,11 @@ $( document ).ready(function() {
typesel_change_remote(<?=$pconfig['remoteid_netbits']?>); typesel_change_remote(<?=$pconfig['remoteid_netbits']?>);
<?php <?php
endif; ?> endif; ?>
$( document ).ready(function() {
// hook in, ipv4/ipv6 selector events
hook_ipv4v6('ipv4v6net', 'network-id');
});
}); });
function change_mode() { function change_mode() {
...@@ -617,8 +622,6 @@ function change_protocol() { ...@@ -617,8 +622,6 @@ function change_protocol() {
//]]> //]]>
</script> </script>
<?php <?php
if (isset($input_errors) && count($input_errors) > 0) { if (isset($input_errors) && count($input_errors) > 0) {
print_input_errors($input_errors); print_input_errors($input_errors);
...@@ -715,7 +718,7 @@ endforeach; ...@@ -715,7 +718,7 @@ endforeach;
<td> <td>
<input name="localid_address" type="text" id="localid_address" size="28" value="<?=$pconfig['localid_address'];?>" /> <input name="localid_address" type="text" id="localid_address" size="28" value="<?=$pconfig['localid_address'];?>" />
/ /
<select name="localid_netbits" id="localid_netbits"> <select name="localid_netbits" data-network-id="localid_address" class="ipv4v6net" id="localid_netbits">
<?php for ($i = 128; $i >= 0; $i--) : <?php for ($i = 128; $i >= 0; $i--) :
?> ?>
<option value="<?=$i; <option value="<?=$i;
...@@ -754,7 +757,7 @@ endfor; ?> ...@@ -754,7 +757,7 @@ endfor; ?>
<td> <td>
<input name="natlocalid_address" type="text" class="formfld unknown ipv4v6" id="natlocalid_address" size="28" value="<?=isset($pconfig['natlocalid_address']) ? $pconfig['natlocalid_address'] : "";?>" /> <input name="natlocalid_address" type="text" class="formfld unknown ipv4v6" id="natlocalid_address" size="28" value="<?=isset($pconfig['natlocalid_address']) ? $pconfig['natlocalid_address'] : "";?>" />
/ /
<select name="natlocalid_netbits" class="formselect ipv4v6" id="natlocalid_netbits"> <select name="natlocalid_netbits" data-network-id="natlocalid_address" class="formselect ipv4v6net" id="natlocalid_netbits">
<?php for ($i = 128; $i >= 0; $i--) : <?php for ($i = 128; $i >= 0; $i--) :
?> ?>
<option value="<?=$i;?>" <?php if (isset($pconfig['natlocalid_netbits']) && $i == $pconfig['natlocalid_netbits']) { <option value="<?=$i;?>" <?php if (isset($pconfig['natlocalid_netbits']) && $i == $pconfig['natlocalid_netbits']) {
...@@ -814,7 +817,7 @@ endif; ?> ...@@ -814,7 +817,7 @@ endif; ?>
<tr> <tr>
<td><a id="help_for_proto" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Protocol"); ?></td> <td><a id="help_for_proto" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="protocol" class="formselect" onchange="change_protocol()"> <select name="protocol" id="proto" class="formselect" onchange="change_protocol()">
<?php <?php
foreach (array('esp' => 'ESP','ah' => 'AH') as $proto => $protoname) : foreach (array('esp' => 'ESP','ah' => 'AH') as $proto => $protoname) :
?> ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment