diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-09-14 14:05:37 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-09-14 14:06:27 +0300 |
commit | 3c471f85eacd8b9d76c98cff4345f3bc84934001 (patch) | |
tree | f3a37128e7c5d5c065292868a3e9952fce394e53 /main/opennhrp | |
parent | 1c0672272ab592c48d7c2b5f6c892868377cc78e (diff) | |
download | aports-3c471f85eacd8b9d76c98cff4345f3bc84934001.tar.bz2 aports-3c471f85eacd8b9d76c98cff4345f3bc84934001.tar.xz |
main/opennhrp: 0.11.1-r1
fix for opennhrp script event handling
Diffstat (limited to 'main/opennhrp')
-rw-r--r-- | main/opennhrp/APKBUILD | 4 | ||||
-rw-r--r-- | main/opennhrp/opennhrp-0.11.1-fix.patch | 58 | ||||
-rw-r--r-- | main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch | 13 |
3 files changed, 61 insertions, 14 deletions
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD index 9d8a59d55..bf33e1b04 100644 --- a/main/opennhrp/APKBUILD +++ b/main/opennhrp/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=opennhrp pkgver=0.11.1 -pkgrel=0 +pkgrel=1 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 + opennhrp-0.11.1-fix.patch $pkgname.initd $pkgname.confd " @@ -29,5 +30,6 @@ build() { } md5sums="9cc1e99de2b132591d685eb5f9d70630 opennhrp-0.11.1.tar.bz2 f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch +0e6defecbb3f54814bc3580bb41b0e3f opennhrp-0.11.1-fix.patch 85821b61c02427146b866b7582157cfd opennhrp.initd 8eee86233728dc0d156bbfee6d98f338 opennhrp.confd" diff --git a/main/opennhrp/opennhrp-0.11.1-fix.patch b/main/opennhrp/opennhrp-0.11.1-fix.patch new file mode 100644 index 000000000..0f838a2c3 --- /dev/null +++ b/main/opennhrp/opennhrp-0.11.1-fix.patch @@ -0,0 +1,58 @@ +commit c24f2cf55eee9a5aefe27bcb34822a5737f170cf +Author: Timo Teras <timo.teras@iki.fi> +Date: Mon Sep 14 08:25:09 2009 +0300 + + peer: reset both events when script triggers + + otherwise we can get same callback twice. + +diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c +index b447784..e5721a5 100644 +--- a/nhrp/nhrp_peer.c ++++ b/nhrp/nhrp_peer.c +@@ -308,14 +308,16 @@ struct nhrp_peer *nhrp_peer_from_event(union nhrp_peer_event e, int revents) + + if (revents & EV_CHILD) { + peer = container_of(e.child, struct nhrp_peer, child); +- ev_timer_stop(&peer->timer); + } else if (revents & EV_TIMEOUT) { + peer = container_of(e.timer, struct nhrp_peer, timer); +- ev_child_stop(&peer->child); + } else { + NHRP_BUG_ON(revents != 0); + peer = container_of(e.child, struct nhrp_peer, child); + } ++ ++ ev_child_stop(&peer->child); ++ ev_timer_stop(&peer->timer); ++ + return peer; + } + +diff --git a/nhrp/nhrp_server.c b/nhrp/nhrp_server.c +index d928886..ad6e292 100644 +--- a/nhrp/nhrp_server.c ++++ b/nhrp/nhrp_server.c +@@ -195,13 +195,18 @@ static void nhrp_server_finish_reg(struct nhrp_pending_request *pr) + + static void nhrp_server_finish_cie_reg_cb(union nhrp_peer_event e, int revents) + { +- struct nhrp_peer *peer = nhrp_peer_from_event(e, revents); +- struct nhrp_pending_request *pr = peer->request; +- struct nhrp_packet *packet = pr->packet; +- struct nhrp_cie *cie = pr->cie; ++ struct nhrp_peer *peer; ++ struct nhrp_pending_request *pr; ++ struct nhrp_packet *packet; ++ struct nhrp_cie *cie; + struct nhrp_peer_selector sel; + char tmp[64], reason[32]; + ++ peer = nhrp_peer_from_event(e, revents); ++ pr = peer->request; ++ packet = pr->packet; ++ cie = pr->cie; ++ + peer->request = NULL; + nhrp_address_format(&peer->protocol_address, sizeof(tmp), tmp); + if (revents != 0 && nhrp_peer_event_ok(e, revents)) { diff --git a/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch b/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch deleted file mode 100644 index 67b44ab5d..000000000 --- a/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ru opennhrp-0.9.2.orig/nhrp/nhrp_peer.c opennhrp-0.9.2/nhrp/nhrp_peer.c ---- opennhrp-0.9.2.orig/nhrp/nhrp_peer.c 2009-02-02 13:12:46 +0000 -+++ opennhrp-0.9.2/nhrp/nhrp_peer.c 2009-02-02 13:36:51 +0000 -@@ -1260,7 +1260,8 @@ - { - char tmp[NHRP_PEER_FORMAT_LEN]; - -- NHRP_BUG_ON(peer->flags & NHRP_PEER_FLAG_REMOVED); -+ if (peer->flags & NHRP_PEER_FLAG_REMOVED) -+ return; - - nhrp_debug("Removing %s %s", - nhrp_peer_type[peer->type], |