Skip to content

Commit

Permalink
interfaces: GIF/GRE IPv6 remote defaults to 128
Browse files Browse the repository at this point in the history
It would probably make sense to tighten validation as well, but for
this we first need to decide how we are going to implement the mode
where prefixlen is set to the actual value given and remote address
being omitted (see PR).

PR: https://forum.opnsense.org/index.php?topic=29654.0
  • Loading branch information
fichtner committed Aug 4, 2022
1 parent e76f15c commit 111a256
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/www/interfaces_gif_edit.php
Expand Up @@ -143,7 +143,7 @@ interface_configure(false, $confif);
<body>
<script>
$( document ).ready(function() {
hook_ipv4v6('ipv4v6net', 'network-id');
hook_ipv4v6('ipv4v6net', 'network-id', '128');
});
</script>
<?php include("fbegin.inc"); ?>
Expand Down
2 changes: 1 addition & 1 deletion src/www/interfaces_gre_edit.php
Expand Up @@ -113,7 +113,7 @@ interface_configure(false, $confif);
<body>
<script>
$( document ).ready(function() {
hook_ipv4v6('ipv4v6net', 'network-id');
hook_ipv4v6('ipv4v6net', 'network-id', '128');
});
</script>
<?php include("fbegin.inc"); ?>
Expand Down
4 changes: 2 additions & 2 deletions src/www/javascript/opnsense_legacy.js
Expand Up @@ -35,7 +35,7 @@
* @param classname: classname to hook on to, select list of netmasks
* @param data_id: data field reference to network input field
*/
function hook_ipv4v6(classname, data_id)
function hook_ipv4v6(classname, data_id, prefixlen)
{
$("select."+classname).each(function(){
var selectlist_id = $(this).attr('id');
Expand All @@ -49,7 +49,7 @@ function hook_ipv4v6(classname, data_id)
$("#"+selectlist_id+' option[value=' + i + ']').show()
}
if ((type === undefined && val == '') || type === '4') {
net = '64';
net = prefixlen == undefined ? '64' : prefixlen;
}
type = '6';
} else {
Expand Down

0 comments on commit 111a256

Please sign in to comment.