aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-11-04 15:00:35 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-11-05 09:11:06 +0200
commit6708e8870584ff77c2bcf0bad81a8bd0d34eb7d1 (patch)
tree2f1b775a96bd6d7c344d1e7375f7d66a5265d9bb
parenta0601e3759919e432c7edb59d15989f59556024e (diff)
downloadalpine_aports-6708e8870584ff77c2bcf0bad81a8bd0d34eb7d1.tar.bz2
alpine_aports-6708e8870584ff77c2bcf0bad81a8bd0d34eb7d1.tar.xz
alpine_aports-6708e8870584ff77c2bcf0bad81a8bd0d34eb7d1.zip
main/opennhrp: holding-time fix from upstream
(cherry picked from commit 286c5b85d334287f5b7441cdd86540f3ce8b9afa)
-rw-r--r--main/opennhrp/APKBUILD4
-rw-r--r--main/opennhrp/fix-holding-time.patch31
2 files changed, 34 insertions, 1 deletions
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD
index bd4b40d3bc..ee0ce82465 100644
--- a/main/opennhrp/APKBUILD
+++ b/main/opennhrp/APKBUILD
@@ -1,7 +1,7 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=opennhrp 2pkgname=opennhrp
3pkgver=0.12 3pkgver=0.12
4pkgrel=0 4pkgrel=1
5pkgdesc="NBMA Next Hop Resolution Protocol daemon" 5pkgdesc="NBMA Next Hop Resolution Protocol daemon"
6url="http://sourceforge.net/projects/opennhrp" 6url="http://sourceforge.net/projects/opennhrp"
7license="GPL-3" 7license="GPL-3"
@@ -10,6 +10,7 @@ makedepends="c-ares-dev"
10subpackages="$pkgname-doc" 10subpackages="$pkgname-doc"
11source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 11source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
12 opennhrp-0.9.3-peer-up-bgp.patch 12 opennhrp-0.9.3-peer-up-bgp.patch
13 fix-holding-time.patch
13 $pkgname.initd 14 $pkgname.initd
14 $pkgname.confd 15 $pkgname.confd
15 " 16 "
@@ -33,5 +34,6 @@ package() {
33} 34}
34md5sums="864e4253a0673bb6dcd6dd60ae5d69df opennhrp-0.12.tar.bz2 35md5sums="864e4253a0673bb6dcd6dd60ae5d69df opennhrp-0.12.tar.bz2
35f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch 36f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch
3787a9fce5fb62beeae927d4216e341ea1 fix-holding-time.patch
36ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd 38ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd
378eee86233728dc0d156bbfee6d98f338 opennhrp.confd" 398eee86233728dc0d156bbfee6d98f338 opennhrp.confd"
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 @@
1From: Timo Teräs <timo.teras@iki.fi>
2Date: Wed, 3 Nov 2010 07:03:53 +0000 (+0200)
3Subject: config: fix holding-time to apply to shortcut-target
4X-Git-Url: http://opennhrp.git.sourceforge.net/git/gitweb.cgi?p=opennhrp%2Fopennhrp;a=commitdiff_plain;h=94d1a7d;hp=f9b92c4dcb162670c5cd2226b40e0446c9d3c63a
5
6config: fix holding-time to apply to shortcut-target
7
8Fix the order of object checks to make the keyword apply
9to shortcut-target if in such context, and only after that
10to interface context.
11---
12
13diff --git a/nhrp/opennhrp.c b/nhrp/opennhrp.c
14index 053de99..f2ecd44 100644
15--- a/nhrp/opennhrp.c
16+++ b/nhrp/opennhrp.c
17@@ -245,11 +245,11 @@ static int load_config(const char *config_file)
18 } else if (strcmp(word, "holding-time") == 0) {
19 peer = NULL;
20 read_word(in, &lineno, sizeof(word), word);
21- if (iface != NULL)
22- iface->holding_time = atoi(word);
23- else if (peer != NULL &&
24+ if (peer != NULL &&
25 peer->type == NHRP_PEER_TYPE_LOCAL_ADDR)
26 peer->holding_time = atoi(word);
27+ else if (iface != NULL)
28+ iface->holding_time = atoi(word);
29 else
30 rc = 7;
31 } else if (strcmp(word, "cisco-authentication") == 0) {