diff options
Diffstat (limited to 'main/opennhrp/0001-config-really-fix-holding-time-to-apply-to-shortcut-.patch')
-rw-r--r-- | main/opennhrp/0001-config-really-fix-holding-time-to-apply-to-shortcut-.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/opennhrp/0001-config-really-fix-holding-time-to-apply-to-shortcut-.patch b/main/opennhrp/0001-config-really-fix-holding-time-to-apply-to-shortcut-.patch new file mode 100644 index 0000000000..da1e8ffefa --- /dev/null +++ b/main/opennhrp/0001-config-really-fix-holding-time-to-apply-to-shortcut-.patch @@ -0,0 +1,39 @@ +From 3554acce7fec0ce6e7560444c5e3975affb78260 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Tue, 18 Oct 2011 10:56:16 -0400 +Subject: [PATCH] config: really fix holding-time to apply to shortcut-target + +commit 94d1a7d4884346a5ba830ac209e1b746d23ec0c1 was supposed to +fix it, but it didn't fix resetting of the peer variable properly. +--- + nhrp/opennhrp.c | 9 +++++---- + 1 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/nhrp/opennhrp.c b/nhrp/opennhrp.c +index f2ecd44..0ff34ea 100644 +--- a/nhrp/opennhrp.c ++++ b/nhrp/opennhrp.c +@@ -243,15 +243,16 @@ static int load_config(const char *config_file) + NEED_PEER(); + peer->flags |= NHRP_PEER_FLAG_CISCO; + } else if (strcmp(word, "holding-time") == 0) { +- peer = NULL; + read_word(in, &lineno, sizeof(word), word); + if (peer != NULL && +- peer->type == NHRP_PEER_TYPE_LOCAL_ADDR) ++ peer->type == NHRP_PEER_TYPE_LOCAL_ADDR) { + peer->holding_time = atoi(word); +- else if (iface != NULL) ++ } else if (iface != NULL) { + iface->holding_time = atoi(word); +- else ++ peer = NULL; ++ } else { + rc = 7; ++ } + } else if (strcmp(word, "cisco-authentication") == 0) { + struct nhrp_buffer *buf; + struct nhrp_cisco_authentication_extension *auth; +-- +1.7.4.1 + |