vpnmain.cgi: Set MTU to a default when editing an old connection

This field is required and therefore we need to initialize it
for old connections. Right now, the CGI throws an error message
when editing an existing connection without the MTU being filled
in.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2019-04-04 11:52:30 +01:00
parent aeecc7ae10
commit ab79dc43bf
2 changed files with 5 additions and 0 deletions

View File

@@ -1363,6 +1363,10 @@ END
$cgiparams{'MODE'} = "tunnel";
}
if ($cgiparams{'INTERFACE_MTU'} eq "") {
$cgiparams{'INTERFACE_MTU'} = 1500;
}
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) {
$cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'});
if ($cgiparams{'TYPE'} !~ /^(host|net)$/) {