blob: 3aee17dc05bf8a60777dba32b0b169f91db27d66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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) {
|