summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <kim.hagen@external.t-mobile.nl>2017-06-15 13:17:46 +0200
committerKim Hagen <kim.hagen@external.t-mobile.nl>2017-06-15 13:17:46 +0200
commit045f56ca36a2467be7701831fedb033a99ebb7bc (patch)
treee8e75a94d4d13bd2d15f56355657a41fe5192c54
parent8355ac77fc9000f358f728291133f5d0eb8363e3 (diff)
downloadvyatta-cfg-vpn-045f56ca36a2467be7701831fedb033a99ebb7bc.tar.gz
vyatta-cfg-vpn-045f56ca36a2467be7701831fedb033a99ebb7bc.zip
add configuration option to set leftsubnet
-rwxr-xr-xscripts/dmvpn-config.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/dmvpn-config.pl b/scripts/dmvpn-config.pl
index 81b4808..11b2fd1 100755
--- a/scripts/dmvpn-config.pl
+++ b/scripts/dmvpn-config.pl
@@ -124,6 +124,9 @@ if ( $vcVPN->exists('ipsec') ) {
my $authprefix =
$vcVPN->returnValue("ipsec profile $profile authentication remote-prefix");
+ my $lauthprefix =
+ $vcVPN->returnValue("ipsec profile $profile authentication local-prefix");
+
#
# ESP group
#
@@ -226,6 +229,7 @@ if ( $vcVPN->exists('ipsec') ) {
}
$leftsourceip = "\tleftsourceip=$lip\n";
$genout .= "\tleftid=$authid\n" if defined $authid;
+ $genout .= "\tleftsubnet=$lauthprefix\n" if defined $lauthprefix;
$genout .= "\trightsubnetwithin=$authprefix\n" if defined $authprefix;
my $right = '%any';