summaryrefslogtreecommitdiffstats
path: root/main/opennhrp
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-10-14 11:21:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-10-14 11:21:26 +0000
commite8b6deb591bd7d7beb1c6bfe8bec841b9d6c0217 (patch)
tree372521cf13d2c9b7b4f7ab9aaa1289dcf5fbbe64 /main/opennhrp
parent779f392845829a88165b915580c72094ce652a97 (diff)
downloadaports-e8b6deb591bd7d7beb1c6bfe8bec841b9d6c0217.tar.bz2
aports-e8b6deb591bd7d7beb1c6bfe8bec841b9d6c0217.tar.xz
main/opennhrp: handle dns lookup failure properly
backport fix from upstream http://opennhrp.git.sourceforge.net/git/gitweb.cgi?p=opennhrp/opennhrp;a=commit;h=10a70c0fabdc3a90840a3ede5ef47480b82ce425
Diffstat (limited to 'main/opennhrp')
-rw-r--r--main/opennhrp/0001-peer-handle-dns-lookup-failure-properly.patch42
-rw-r--r--main/opennhrp/APKBUILD4
2 files changed, 45 insertions, 1 deletions
diff --git a/main/opennhrp/0001-peer-handle-dns-lookup-failure-properly.patch b/main/opennhrp/0001-peer-handle-dns-lookup-failure-properly.patch
new file mode 100644
index 000000000..c816d2d91
--- /dev/null
+++ b/main/opennhrp/0001-peer-handle-dns-lookup-failure-properly.patch
@@ -0,0 +1,42 @@
+From 10a70c0fabdc3a90840a3ede5ef47480b82ce425 Mon Sep 17 00:00:00 2001
+From: Timo Teras <timo.teras@iki.fi>
+Date: Wed, 14 Oct 2009 13:21:39 +0300
+Subject: [PATCH] peer: handle dns lookup failure properly
+
+---
+ nhrp/nhrp_peer.c | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c
+index fdeef17..aee2906 100644
+--- a/nhrp/nhrp_peer.c
++++ b/nhrp/nhrp_peer.c
+@@ -679,17 +679,17 @@ static void nhrp_peer_address_query_cb(struct nhrp_address_query *query,
+ address_query);
+ char host[64];
+
+- if (num_addr <= 0) {
++ if (num_addr > 0) {
++ nhrp_info("Resolved '%s' as %s",
++ peer->nbma_hostname,
++ nhrp_address_format(&addrs[0], sizeof(host), host));
++ peer->next_hop_address = addrs[0];
++ peer->afnum = nhrp_afnum_from_pf(peer->next_hop_address.type);
++ nhrp_peer_run_up_script(peer);
++ } else {
+ nhrp_error("Failed to resolve '%s'", peer->nbma_hostname);
+ nhrp_peer_restart_error(peer);
+ }
+-
+- nhrp_info("Resolved '%s' as %s",
+- peer->nbma_hostname,
+- nhrp_address_format(&addrs[0], sizeof(host), host));
+- peer->next_hop_address = addrs[0];
+- peer->afnum = nhrp_afnum_from_pf(peer->next_hop_address.type);
+- nhrp_peer_run_up_script(peer);
+ }
+
+ static void nhrp_peer_restart_cb(struct ev_timer *w, int revents)
+--
+1.6.5
+
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD
index e481bca31..6fedf05fd 100644
--- a/main/opennhrp/APKBUILD
+++ b/main/opennhrp/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=opennhrp
pkgver=0.11.2
-pkgrel=2
+pkgrel=3
pkgdesc="NBMA Next Hop Resolution Protocol daemon"
url="http://sourceforge.net/projects/opennhrp"
license="GPL-3"
@@ -10,6 +10,7 @@ makedepends="c-ares-dev"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
opennhrp-0.9.3-peer-up-bgp.patch
+ 0001-peer-handle-dns-lookup-failure-properly.patch
$pkgname.initd
$pkgname.confd
"
@@ -29,5 +30,6 @@ build() {
}
md5sums="3aace509ac79acbde3bb3e44e88798d5 opennhrp-0.11.2.tar.bz2
f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch
+7d4c31dbde10340eb0e053ae7804bf1e 0001-peer-handle-dns-lookup-failure-properly.patch
ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd
8eee86233728dc0d156bbfee6d98f338 opennhrp.confd"