Fixes in templates for openvpn.conf

This commit is contained in:
Daniel Berteaud 2013-05-24 16:05:29 +02:00
parent e201d0a9b0
commit bc7246dd74
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
{
my $tunMtu = ${'openvpn-routed'}{Mtu} || '';
my $fragment = ${'openvpn-routed'}{Fragment};
my $fragment = ${'openvpn-routed'}{Fragment} || '';
my $cipher = ${'openvpn-routed'}{Cipher} || '';
my $redirectGW = ${'openvpn-routed'}{RedirectGateway} || '';
my $proto = ${'openvpn-routed'}{Protocol} || 'udp';
@ -32,7 +32,7 @@ else{
}
}
if (($proto eq 'udp') && ($fragment ne '')){
if (($proto eq 'udp') && ($fragment =~ /^\d+$/)){
$OUT .= "fragment $fragment\n";
}
$OUT .= "mssfix\n";

View File

@ -1,7 +1,7 @@
{
my $pushRoutes = ${'openvpn-routed'}{PushLocalNetworks} || 'enabled';
my $redirectGW = ${'openvpn-routed'}{RedirectGW} || 'disabled';
my $redirectGW = ${'openvpn-routed'}{RedirectGateway} || 'disabled';
use esmith::NetworksDB;
my $ndb = esmith::NetworksDB->open_ro() ||