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 332da05..2205174 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 @@ -19,12 +19,10 @@ elsif ($pushRoutes eq 'enabled'){ my $mask = $network->prop('Mask'); my $gw = $network->prop('Router') || ''; my $vpn = $network->prop('VPN') || ''; - if ($gw ne '') { - $route .= "push \"route $addr $mask"; - $route .= " $gw" if ($vpn eq ''); - $OUT .= "$route\"\n"; - } + next if (($network->prop('VPNRouted') || 'no') eq 'yes'); + $route .= "push \"route $addr $mask"; + $route .= " $gw" if ($vpn eq '' && $gw ne ''); + $OUT .= "$route\"\n"; } } - }