From: Timo Teräs 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) {