diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-05-28 11:51:46 +0000 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2020-07-26 05:27:45 +0300 |
commit | 49c9d47c70351a3d47a77c75a0ae0dd976d2cad6 (patch) | |
tree | 7503f37d33630670cc550c7288cb4160dd2138c0 /scripts | |
parent | 0371f37d5fb72bc21382a5b3f747689ab5a281dd (diff) | |
download | vyatta-cfg-vpn-49c9d47c70351a3d47a77c75a0ae0dd976d2cad6.tar.gz vyatta-cfg-vpn-49c9d47c70351a3d47a77c75a0ae0dd976d2cad6.zip |
strongSwan: T2000: Add warning message if local prefix did not configured
Diffstat (limited to 'scripts')
-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 369e568..d8ecb7a 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'; } |