aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-12-12 09:33:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-01-30 09:59:06 +0000
commitdde09736ef549cd8a7fc5603421b1a7480df735c (patch)
tree6b9f2495a2040f36465baf176c7dc77dae1f5ce4
parent659561c436ec0ba22e36144a06f4450469d9018e (diff)
downloadalpine_aports-dde09736ef549cd8a7fc5603421b1a7480df735c.tar.bz2
alpine_aports-dde09736ef549cd8a7fc5603421b1a7480df735c.tar.xz
alpine_aports-dde09736ef549cd8a7fc5603421b1a7480df735c.zip
main/opennhrp: upgrade to 0.14
(cherry picked from commit aabb95b012bfc9e6e0c0fb44b64dc0bb22c9186d)
-rw-r--r--main/opennhrp/01-packet-route-fix.patch48
-rw-r--r--main/opennhrp/APKBUILD8
2 files changed, 3 insertions, 53 deletions
diff --git a/main/opennhrp/01-packet-route-fix.patch b/main/opennhrp/01-packet-route-fix.patch
deleted file mode 100644
index e1edfb6ea3..0000000000
--- a/main/opennhrp/01-packet-route-fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From: Timo Teräs <timo.teras@iki.fi>
2Date: Thu, 23 Aug 2012 10:29:50 +0000 (+0300)
3Subject: packet: fix indefinite looping with bad routes
4X-Git-Url: http://opennhrp.git.sourceforge.net/git/gitweb.cgi?p=opennhrp%2Fopennhrp;a=commitdiff_plain;h=515a64f6c570761876f14f97c8eb206e950ee603
5
6packet: fix indefinite looping with bad routes
7
8If there's cycling routing, or just a route with gateway that would
9match the route itself, we could end up looping indefinitely. Add
10a fixed limit for route lookup recursion.
11---
12
13diff --git a/nhrp/nhrp_packet.c b/nhrp/nhrp_packet.c
14index f46b481..12dcf3c 100644
15--- a/nhrp/nhrp_packet.c
16+++ b/nhrp/nhrp_packet.c
17@@ -979,7 +979,7 @@ int nhrp_packet_route(struct nhrp_packet *packet)
18 struct nhrp_payload *payload;
19 struct nhrp_peer *peer;
20 char tmp[64];
21- int r;
22+ int i, r;
23
24 if (packet->dst_iface == NULL) {
25 nhrp_error("nhrp_packet_route called without destination interface");
26@@ -1005,7 +1005,7 @@ int nhrp_packet_route(struct nhrp_packet *packet)
27 proto_nexthop = packet->dst_peer->next_hop_address;
28 } else {
29 proto_nexthop = *dst;
30- do {
31+ for (i = 0; i < 4; i++) {
32 peer = nhrp_peer_route_full(
33 packet->dst_iface, &proto_nexthop, 0,
34 NHRP_PEER_TYPEMASK_ROUTE_VIA_NHS, src, cielist);
35@@ -1020,7 +1020,12 @@ int nhrp_packet_route(struct nhrp_packet *packet)
36 if (peer->next_hop_address.type == AF_UNSPEC)
37 break;
38 proto_nexthop = peer->next_hop_address;
39- } while (1);
40+ }
41+ if (i >= 4) {
42+ nhrp_error("Recursive routing for protocol address %s",
43+ nhrp_address_format(dst, sizeof(tmp), tmp));
44+ return FALSE;
45+ }
46
47 packet->dst_peer = nhrp_peer_get(peer);
48 }
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD
index bf580e91e9..5f3fcd4a6c 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.13.1 3pkgver=0.14
4pkgrel=1 4pkgrel=0
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"
7arch="all" 7arch="all"
@@ -11,7 +11,6 @@ makedepends="c-ares-dev"
11subpackages="$pkgname-doc" 11subpackages="$pkgname-doc"
12source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 12source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
13 opennhrp-0.9.3-peer-up-bgp.patch 13 opennhrp-0.9.3-peer-up-bgp.patch
14 01-packet-route-fix.patch
15 $pkgname.initd 14 $pkgname.initd
16 $pkgname.confd 15 $pkgname.confd
17 " 16 "
@@ -33,8 +32,7 @@ package() {
33 install -Dm755 "$srcdir"/opennhrp.initd "$pkgdir"/etc/init.d/opennhrp 32 install -Dm755 "$srcdir"/opennhrp.initd "$pkgdir"/etc/init.d/opennhrp
34 install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/conf.d/opennhrp 33 install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/conf.d/opennhrp
35} 34}
36md5sums="4c847b558946b07a446b052cc29eb02a opennhrp-0.13.1.tar.bz2 35md5sums="62e8f16dd3bdf0600e43fcb37aa40462 opennhrp-0.14.tar.bz2
37f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch 36f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch
38516e5ed18a476f934849f70d965a5c42 01-packet-route-fix.patch
39ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd 37ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd
408eee86233728dc0d156bbfee6d98f338 opennhrp.confd" 388eee86233728dc0d156bbfee6d98f338 opennhrp.confd"