]> git.ipfire.org Git - people/fbuehrle/ipfire-2.x.git/commitdiff
vpnmain.cgi: Set MTU to a default when editing an old connection
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Apr 2019 10:52:30 +0000 (11:52 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Apr 2019 10:53:11 +0000 (11:53 +0100)
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>
config/rootfiles/core/130/filelists/files
html/cgi-bin/vpnmain.cgi

index ab1e82fcbc0de07f1a02a98c5d45fd23de37125e..248a2c7533a69181f0031fbb7462377c5c4c2133 100644 (file)
@@ -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
index 00282d50b2d9c8eefa93157345c05e22ca86d9b3..ecf860d85b5ab90ab4036547677f5d4c1b19b59a 100644 (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)$/) {