diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-05-28 11:51:46 +0000 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-05-28 11:51:46 +0000 |
commit | 600e35bbae36ed5482c0816d077c86ab1a84c2ec (patch) | |
tree | 0beb21e1a4858b67ba52e59a2b4e94426a105e8e | |
parent | e0591ef0d2726fbb56261e888d59c83628d501e6 (diff) | |
download | vyatta-cfg-vpn-600e35bbae36ed5482c0816d077c86ab1a84c2ec.tar.gz vyatta-cfg-vpn-600e35bbae36ed5482c0816d077c86ab1a84c2ec.zip |
strongSwan: T2000: Add warning message if local prefix did not configured
-rwxr-xr-x | scripts/vpn-config.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index 871a96a..7f51fc1 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -670,6 +670,11 @@ if ($vcVPN->exists('ipsec')) { if ($remotesubnet_object == $localsubnet_object) { vpn_die(["vpn","ipsec","site-to-site","peer",$peer],"$vpn_cfg_err local prefix and remote prefix cannot be the same.\n"); } + my $check_local_route = qx(ip route show table 254 $localsubnet_object); + if (!$check_local_route){ + print "Warning: local prefix $localsubnet_object specified for peer \"$peer\"\n"; + print "is not configured on any interfaces\n"; + } if ($remotesubnet_object->contains($localsubnet_object)) { $needs_passthrough = 'true'; } |