From bc7246dd740f47b6c9f5aa619fc59ddf5228753c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 24 May 2013 16:05:29 +0200 Subject: [PATCH] Fixes in templates for openvpn.conf --- root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/60options | 4 ++-- root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/70routes | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/60options b/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/60options index 792d1af..41a33c5 100644 --- a/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/60options +++ b/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/60options @@ -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"; diff --git a/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/70routes b/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/70routes index 146929c..332da05 100644 --- a/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/70routes +++ b/root/etc/e-smith/templates/etc/openvpn/routed/openvpn.conf/70routes @@ -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() ||