openvpn: Properly handle fragment size.

Allow settings FRAGMENT=0.
This commit is contained in:
Michael Tremer
2012-06-20 20:53:10 +02:00
parent 6140e7e0c2
commit 6f7fcbf2ad

View File

@@ -359,7 +359,7 @@ sub writeserverconf {
if ($sovpnsettings{MSSFIX} eq 'on') {
print CONF "mssfix\n";
}
if ($sovpnsettings{FRAGMENT} ne '' && $sovpnsettings{'DPROTOCOL'} ne 'tcp') {
if (($sovpnsettings{FRAGMENT} ne '' && $sovpnsettings{FRAGMENT} ne 0) && $sovpnsettings{'DPROTOCOL'} ne 'tcp') {
print CONF "fragment $sovpnsettings{'FRAGMENT'}\n";
}
if ($sovpnsettings{KEEPALIVE_1} > 0 && $sovpnsettings{KEEPALIVE_2} > 0) {