Correctly push route for local network

This commit is contained in:
Daniel Berteaud 2014-12-03 21:54:49 +01:00
parent 496a2b678f
commit 6a3d60d9a8
1 changed files with 4 additions and 6 deletions

View File

@ -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";
}
}
}