summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2014-08-25 18:49:16 +0200
committerKim Hagen <khagen@multi-development.com>2014-08-25 18:49:16 +0200
commit77e5d5fc0acab1f072e6c4ba86099bf532edb916 (patch)
tree241576a920020e17eb1e72b681ff28b72b6c7cc1
parent08fc61fe8a4331b9160548bcaa493ed154931b94 (diff)
downloadvyos-nhrp-77e5d5fc0acab1f072e6c4ba86099bf532edb916.tar.gz
vyos-nhrp-77e5d5fc0acab1f072e6c4ba86099bf532edb916.zip
Set holding-time only if exists and not empty
-rw-r--r--scripts/vyos-update-nhrp.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl
index 6e170e3..663332c 100644
--- a/scripts/vyos-update-nhrp.pl
+++ b/scripts/vyos-update-nhrp.pl
@@ -215,7 +215,9 @@ sub tunnel_config {
if ($tunnel_Config->returnValue("$tunnel_ID cisco-authentication") ne "") {
push(@conf_file, " cisco-authentication ", $tunnel_Config->returnValue("$tunnel_ID cisco-authentication") , "\n");
}
- push(@conf_file, " holding-time", " ", $tunnel_Config->returnValue("$tunnel_ID holding-time") , "\n");
+ if ( $tunnel_Config->exists("$tunnel_ID shortcut-target") && ($tunnel_Config->returnValue("$tunnel_ID holding-time") ne "")) {
+ push(@conf_file, " holding-time", " ", $tunnel_Config->returnValue("$tunnel_ID holding-time") , "\n");
+ }
if ($tunnel_Config->exists("$tunnel_ID shortcut")) {
push(@conf_file, " shortcut\n");
}