From ab79dc43bf66f66b0c34a10158d46e4727d4df6a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 4 Apr 2019 11:52:30 +0100 Subject: [PATCH] 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 --- config/rootfiles/core/130/filelists/files | 1 + html/cgi-bin/vpnmain.cgi | 4 ++++ 2 files changed, 5 insertions(+) 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)$/) { -- 2.39.2