Correctly push route for local network

tags/0.1.3_el5 0.1.3_el5
Daniel Berteaud 10 years ago
parent 496a2b678f
commit 6a3d60d9a8
  1. 10
      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";
}
}
}

Loading…
Cancel
Save