From: Michael Tremer Date: Thu, 4 Apr 2019 10:52:30 +0000 (+0100) Subject: vpnmain.cgi: Set MTU to a default when editing an old connection X-Git-Tag: v2.23-core131~56 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=ab79dc43bf66f66b0c34a10158d46e4727d4df6a 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 --- diff --git a/config/rootfiles/core/130/filelists/files b/config/rootfiles/core/130/filelists/files index ab1e82fcbc..248a2c7533 100644 --- a/config/rootfiles/core/130/filelists/files +++ b/config/rootfiles/core/130/filelists/files @@ -14,6 +14,7 @@ srv/web/ipfire/cgi-bin/ids.cgi srv/web/ipfire/cgi-bin/logs.cgi/ids.dat srv/web/ipfire/cgi-bin/logs.cgi/log.dat srv/web/ipfire/cgi-bin/ovpnmain.cgi +srv/web/ipfire/cgi-bin/vpnmain.cgi usr/local/bin/ipsec-interfaces usr/local/bin/suricatactrl usr/local/bin/update-ids-ruleset diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 00282d50b2..ecf860d85b 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -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)$/) {