aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp/fix-holding-time.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/opennhrp/fix-holding-time.patch')
-rw-r--r--main/opennhrp/fix-holding-time.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/opennhrp/fix-holding-time.patch b/main/opennhrp/fix-holding-time.patch
new file mode 100644
index 0000000000..3aee17dc05
--- /dev/null
+++ b/main/opennhrp/fix-holding-time.patch
@@ -0,0 +1,31 @@
+From: Timo Teräs <timo.teras@iki.fi>
+Date: Wed, 3 Nov 2010 07:03:53 +0000 (+0200)
+Subject: config: fix holding-time to apply to shortcut-target
+X-Git-Url: http://opennhrp.git.sourceforge.net/git/gitweb.cgi?p=opennhrp%2Fopennhrp;a=commitdiff_plain;h=94d1a7d;hp=f9b92c4dcb162670c5cd2226b40e0446c9d3c63a
+
+config: fix holding-time to apply to shortcut-target
+
+Fix the order of object checks to make the keyword apply
+to shortcut-target if in such context, and only after that
+to interface context.
+---
+
+diff --git a/nhrp/opennhrp.c b/nhrp/opennhrp.c
+index 053de99..f2ecd44 100644
+--- a/nhrp/opennhrp.c
++++ b/nhrp/opennhrp.c
+@@ -245,11 +245,11 @@ static int load_config(const char *config_file)
+ } else if (strcmp(word, "holding-time") == 0) {
+ peer = NULL;
+ read_word(in, &lineno, sizeof(word), word);
+- if (iface != NULL)
+- iface->holding_time = atoi(word);
+- else if (peer != NULL &&
++ if (peer != NULL &&
+ peer->type == NHRP_PEER_TYPE_LOCAL_ADDR)
+ peer->holding_time = atoi(word);
++ else if (iface != NULL)
++ iface->holding_time = atoi(word);
+ else
+ rc = 7;
+ } else if (strcmp(word, "cisco-authentication") == 0) {