diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch (renamed from main/opennhrp/reset-nat.patch) | 20 | ||||
-rw-r--r-- | main/opennhrp/0002-all-fix-includes-and-types-to-honor-standards.patch (renamed from main/opennhrp/fix-includes-and-types-to-honor-standards.patch) | 2 | ||||
-rw-r--r-- | main/opennhrp/0003-netlink-honor-configured-route-table-for-shortcut-de.patch (renamed from main/opennhrp/fix-shortcut-route-table.patch) | 15 | ||||
-rw-r--r-- | main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch (renamed from main/opennhrp/fix-shortcut-route-table-2.patch) | 13 | ||||
-rw-r--r-- | main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch | 37 | ||||
-rw-r--r-- | main/opennhrp/0006-modify-packet-destination-only-for-registration-requ.patch | 26 | ||||
-rw-r--r-- | main/opennhrp/0007-fix-race-condition-to-stop-processing-dns-requests.patch | 35 | ||||
-rw-r--r-- | main/opennhrp/APKBUILD | 47 |
8 files changed, 169 insertions, 26 deletions
diff --git a/main/opennhrp/reset-nat.patch b/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch index 5c8ebccecb..1bc766a4df 100644 --- a/main/opennhrp/reset-nat.patch +++ b/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch @@ -1,12 +1,14 @@ -commit 578db3f65caec301ceb402e5c7b51624ed1c4576 (HEAD, origin/master, origin/HEAD, master) -Author: Timo Teräs <timo.teras@iki.fi> -Date: Thu Jul 11 14:14:15 2013 +0300 +From 578db3f65caec301ceb402e5c7b51624ed1c4576 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Thu, 11 Jul 2013 14:14:15 +0300 +Subject: [PATCH] peer: reset interface nat cie when server does not detect nat - peer: reset interface nat cie when server does not detect nat - - fixes a corner case that system had broken routing, it gets fixed - without changing gre interface. for normal operation the nat cie is - reset by gre interface change hooks. +fixes a corner case that system had broken routing, it gets fixed +without changing gre interface. for normal operation the nat cie is +reset by gre interface change hooks. +--- + nhrp/nhrp_peer.c | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c index 97bbe48..2dbdeea 100644 @@ -22,4 +24,6 @@ index 97bbe48..2dbdeea 100644 /* If not re-registration, send a purge request for each subnet * we accept shortcuts to, to clear server redirection cache. */ +-- +2.4.6 diff --git a/main/opennhrp/fix-includes-and-types-to-honor-standards.patch b/main/opennhrp/0002-all-fix-includes-and-types-to-honor-standards.patch index 7d1aa9409f..12bba56e5e 100644 --- a/main/opennhrp/fix-includes-and-types-to-honor-standards.patch +++ b/main/opennhrp/0002-all-fix-includes-and-types-to-honor-standards.patch @@ -58,5 +58,5 @@ index be529d8..1217ae4 100644 struct { struct nlmsghdr n; -- -1.8.4 +2.4.6 diff --git a/main/opennhrp/fix-shortcut-route-table.patch b/main/opennhrp/0003-netlink-honor-configured-route-table-for-shortcut-de.patch index 106c3829dc..ab464da63b 100644 --- a/main/opennhrp/fix-shortcut-route-table.patch +++ b/main/opennhrp/0003-netlink-honor-configured-route-table-for-shortcut-de.patch @@ -1,3 +1,15 @@ +From 323a85eb76b83d8880e0640d94ead9395a3a4472 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Sat, 19 Apr 2014 17:21:56 +0300 +Subject: [PATCH] netlink: honor configured route-table for + shortcut-destination ifaces + +helpful if dynmic routing is used also internally and the routes +are placed on alternate table. +--- + nhrp/sysdep_netlink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/nhrp/sysdep_netlink.c b/nhrp/sysdep_netlink.c index 1217ae4..44063ad 100644 --- a/nhrp/sysdep_netlink.c @@ -11,3 +23,6 @@ index 1217ae4..44063ad 100644 return; type = NHRP_PEER_TYPE_LOCAL_ADDR; } else if (iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED) { +-- +2.4.6 + diff --git a/main/opennhrp/fix-shortcut-route-table-2.patch b/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch index 2e3c08cf37..a68409fecf 100644 --- a/main/opennhrp/fix-shortcut-route-table-2.patch +++ b/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch @@ -1,3 +1,13 @@ +From a7288181001144b4d44c4265624828045b80f988 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Sat, 19 Apr 2014 19:13:04 +0300 +Subject: [PATCH] netlink: additional fixes to route-table matching (fix + previous commit) + +--- + nhrp/sysdep_netlink.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + diff --git a/nhrp/sysdep_netlink.c b/nhrp/sysdep_netlink.c index 44063ad..74907bb 100644 --- a/nhrp/sysdep_netlink.c @@ -42,3 +52,6 @@ index 44063ad..74907bb 100644 if (rtm->rtm_table != iface->route_table || rtm->rtm_protocol == RTPROT_KERNEL) return; +-- +2.4.6 + diff --git a/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch b/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch new file mode 100644 index 0000000000..5ec9ee137a --- /dev/null +++ b/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch @@ -0,0 +1,37 @@ +From a33098aed9805f78ecd23c2936ecdbd588b60c62 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Wed, 27 May 2015 17:59:35 +0300 +Subject: [PATCH] do not establish shortcut entry if cie code indicates failure + +--- + nhrp/nhrp_peer.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c +index 9f8f45f..8aa7a64 100644 +--- a/nhrp/nhrp_peer.c ++++ b/nhrp/nhrp_peer.c +@@ -1210,14 +1210,18 @@ static void nhrp_peer_handle_resolution_reply(void *ctx, + if (cie == NULL) + goto ret; + +- nhrp_info("Received Resolution Reply %s/%d is at proto %s nbma %s", ++ nhrp_info("Received Resolution Reply %s/%d is at proto %s nbma %s (code %d)", + nhrp_address_format(&peer->protocol_address, + sizeof(dst), dst), + cie->hdr.prefix_length, + nhrp_address_format(&cie->protocol_address, + sizeof(tmp), tmp), + nhrp_address_format(&cie->nbma_address, +- sizeof(nbma), nbma)); ++ sizeof(nbma), nbma), ++ cie->hdr.code); ++ ++ if (cie->hdr.code != NHRP_CODE_SUCCESS) ++ goto ret; + + payload = nhrp_packet_extension(reply, + NHRP_EXTENSION_NAT_ADDRESS | +-- +2.4.6 + diff --git a/main/opennhrp/0006-modify-packet-destination-only-for-registration-requ.patch b/main/opennhrp/0006-modify-packet-destination-only-for-registration-requ.patch new file mode 100644 index 0000000000..4fb2a576d1 --- /dev/null +++ b/main/opennhrp/0006-modify-packet-destination-only-for-registration-requ.patch @@ -0,0 +1,26 @@ +From 409b4e18250ef32197191d37a9c5ade7abcf3594 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Wed, 27 May 2015 18:01:17 +0300 +Subject: [PATCH] modify packet destination only for registration requests + +--- + nhrp/nhrp_packet.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/nhrp/nhrp_packet.c b/nhrp/nhrp_packet.c +index 566a6cb..d428cd9 100644 +--- a/nhrp/nhrp_packet.c ++++ b/nhrp/nhrp_packet.c +@@ -762,7 +762,8 @@ static int nhrp_packet_receive_local(struct nhrp_packet *packet) + return FALSE; + } + +- if (packet->dst_peer->next_hop_address.type != PF_UNSPEC) { ++ if (packet->dst_peer->next_hop_address.type != PF_UNSPEC && ++ packet->hdr.type == NHRP_PACKET_REGISTRATION_REQUEST) { + /* Broadcast destinations gets rewritten as if destinied to + * our local address */ + packet->dst_protocol_address = +-- +2.4.6 + diff --git a/main/opennhrp/0007-fix-race-condition-to-stop-processing-dns-requests.patch b/main/opennhrp/0007-fix-race-condition-to-stop-processing-dns-requests.patch new file mode 100644 index 0000000000..b25c53a68d --- /dev/null +++ b/main/opennhrp/0007-fix-race-condition-to-stop-processing-dns-requests.patch @@ -0,0 +1,35 @@ +From 8be8f8df88490f6d9686fcbf2cd50a5b15e2c835 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Fri, 24 Jul 2015 10:34:13 +0300 +Subject: [PATCH] fix race condition to stop processing dns requests + +ev_timer_again stops the timer if .repeat is zero, but ares_timeout +returns zero timeout if there's events that are already expired. +This becomes issue if we were busy processing something else and +then c-ares timeouts expire meanwhile, we'd end up not handling them. +As a workaround schedule it with small timeout, while this can +postpone timeout handling quite a bit, in practice this should +work well enough. +--- + nhrp/nhrp_address.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/nhrp/nhrp_address.c b/nhrp/nhrp_address.c +index 1ac9fa3..9169cd8 100644 +--- a/nhrp/nhrp_address.c ++++ b/nhrp/nhrp_address.c +@@ -47,7 +47,10 @@ static void ares_prepare_cb(struct ev_loop *loop, struct ev_prepare *w, int reve + + tv = ares_timeout(r->channel, NULL, &tvbuf); + if (tv != NULL) { +- r->timeout.repeat = tv->tv_sec + tv->tv_usec * 1e-6; ++ if (tv->tv_sec || tv->tv_usec) ++ r->timeout.repeat = tv->tv_sec + tv->tv_usec * 1e-6; ++ else ++ r->timeout.repeat = 1e-6; + ev_timer_again(&r->timeout); + } else { + ev_timer_stop(&r->timeout); +-- +2.4.6 + diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD index c9aff1eceb..4aeb664f01 100644 --- a/main/opennhrp/APKBUILD +++ b/main/opennhrp/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=opennhrp pkgver=0.14.1 -pkgrel=5 +pkgrel=6 pkgdesc="NBMA Next Hop Resolution Protocol daemon" url="http://sourceforge.net/projects/opennhrp" arch="all" @@ -10,11 +10,15 @@ depends= makedepends="c-ares-dev linux-headers" subpackages="$pkgname-doc" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 + 0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch + 0002-all-fix-includes-and-types-to-honor-standards.patch + 0003-netlink-honor-configured-route-table-for-shortcut-de.patch + 0004-netlink-additional-fixes-to-route-table-matching-fix.patch + 0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch + 0006-modify-packet-destination-only-for-registration-requ.patch + 0007-fix-race-condition-to-stop-processing-dns-requests.patch + opennhrp-0.9.3-peer-up-bgp.patch - reset-nat.patch - fix-includes-and-types-to-honor-standards.patch - fix-shortcut-route-table.patch - fix-shortcut-route-table-2.patch $pkgname.initd $pkgname.confd " @@ -47,26 +51,35 @@ package() { install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/conf.d/opennhrp } md5sums="eb42ddb13e07ceb415b9ebb8eaca28ee opennhrp-0.14.1.tar.bz2 +26c9bb43830a667ff6e5a6729eb3c6b7 0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch +b2527e4e9d255b0b6f0c1dce2f5317e1 0002-all-fix-includes-and-types-to-honor-standards.patch +b1bd8599b606243d9c0777b069054f85 0003-netlink-honor-configured-route-table-for-shortcut-de.patch +c08a55fd6bcf5a746b4cf5fb1d924558 0004-netlink-additional-fixes-to-route-table-matching-fix.patch +b88d25303480b43f1fe5103b9cb71f71 0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch +594952bb2c3d459db213497e67907363 0006-modify-packet-destination-only-for-registration-requ.patch +2cca39a96d94e9fc784efaa96b2436ad 0007-fix-race-condition-to-stop-processing-dns-requests.patch f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch -2b31e177d56b18c942abb0e9d43e457d reset-nat.patch -751d1b77866aefb312f98f60a454904a fix-includes-and-types-to-honor-standards.patch -94d271781a44cc9ec0ff82e7ea4007af fix-shortcut-route-table.patch -d70e5683de8f596417873aebdbf53862 fix-shortcut-route-table-2.patch e923550bcb296eeb74f003f98e4d97cd opennhrp.initd 8eee86233728dc0d156bbfee6d98f338 opennhrp.confd" sha256sums="1517d53d688ffc165a1da20c344d96b4c53e60f34bd73c64e60cb67cfca4e9ab opennhrp-0.14.1.tar.bz2 +1e22e02cbf8fdc96f7baf8832242820f463b9d55f7b75f8d73ef07a03016d4fa 0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch +851b45722d61485608390089e34e965cc138e9bf306c0114ae5188974e7c1d85 0002-all-fix-includes-and-types-to-honor-standards.patch +201ff69b3053df260406d97debe7dc2124b9334121e8d6fb4ef3d48068e6f2ef 0003-netlink-honor-configured-route-table-for-shortcut-de.patch +62b5d5c0c989d5491408e6e874d42239c34831e9600df1fe1ea88127439094e6 0004-netlink-additional-fixes-to-route-table-matching-fix.patch +2374bc91bc4babf7b0669faf40fa7a822f9eb0e6971e4af0660635d4dd66d06c 0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch +8dbea0b390d6c77f92d6caf422e70014807178258c71627c069cd009f268ef35 0006-modify-packet-destination-only-for-registration-requ.patch +0c85facd3b66f5e08dc362c3cb61922f77637a4368cc4e989564c3d8e71458ca 0007-fix-race-condition-to-stop-processing-dns-requests.patch d348cc75694761124a7e05406d9e21e59251be185356bd3d3bec8dcc9dbbac73 opennhrp-0.9.3-peer-up-bgp.patch -2b362cd953023a1fd22f42071fc284c581f1c34128f98c9e409fe79f384e77f0 reset-nat.patch -56e23b367a985b55fc6d0b7ecdd8520a719f278005dbc057dd417d1c00061aea fix-includes-and-types-to-honor-standards.patch -0ba13c439be36eb40e5c04744eda67f6ccd50609f6fb16647debe7b7cb4c8500 fix-shortcut-route-table.patch -58cbad65215b3f81e233cc11f0187fd6722aeae263c0c1dcf3d98e914d33a912 fix-shortcut-route-table-2.patch 22cd14faf54886525e719acf803b5cd07ec209a6694f950642a723d5b5d02428 opennhrp.initd 83a7ad5e94546dbdfaabf0dd12c0d2e611b89cab06c600499e9453777e28928f opennhrp.confd" sha512sums="dd0d5debf86d195256995406909c7406d4b60dcdd3a47fca95fd7053b1691e1863b430ff9d65e8633c2d49c747abb4fdc10b45bdef0d0bfa733e94e33c476785 opennhrp-0.14.1.tar.bz2 +7d6d73dfc7c078d6af6f5df7b4e06703f40675a9746c9191c227b85cc857537502ab501c7e01085e36eafe39dc1a2468ebf139a92ac67522606968abe53e74cd 0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch +19a5822e9d6f5be06084213c11e2bb09a4283d2fe6a010cd04b9a3724208581b624c9edb323b6f84e06b1a9d67c2129341c171eeb9eedacc37ff43099c94ac30 0002-all-fix-includes-and-types-to-honor-standards.patch +3eb2cd6f485e194bb8db8e3560e6ad18056a41129b49c77fb035d1a6f0a25671619d78a39fe4df626aac86a7b2ca5d964e660809dff1c3f3514892bf0c324080 0003-netlink-honor-configured-route-table-for-shortcut-de.patch +0573502d0e43e0f63c39f54e41e57d58bc975dcc656682dc9128c0a67d24dc91b4db07ea7dfa2f8297e5bc0a0dfdc9975d155038107c4b7e6fbe45a8e7ab75a5 0004-netlink-additional-fixes-to-route-table-matching-fix.patch +46dc3a8bb2e919092388b20691adcf59f32f5d49b0b952c5187ada40f0ce9fa552e0f4334645a73002ef1970c18e1131c881af231a5956a5875cdc1111bdb259 0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch +a9c523c6c73c3376c3939bf04b873f1eba0d1f5855e2a979c6788a8ddabd2c9712539f8c8509174dc76b861036873384aef387fe08cfd22dcecece7098acc49d 0006-modify-packet-destination-only-for-registration-requ.patch +4c2e103bdf8c97fdfdbcea5b796dd72b2db3522b0e9eb3543a00fcb6a8b7dc38c8e0cd59baa9a0a474b1d5827c321e2733e5b5b6bd34e03903cfbdcd0ad76963 0007-fix-race-condition-to-stop-processing-dns-requests.patch 6ce107a2ad59331ab130108b49e80de5902d96002480f0465f7ad15b5146637a67982d2edaa392117a3f1820381b6b4a8985bef2a49364ce269c0bbc632d1739 opennhrp-0.9.3-peer-up-bgp.patch -53d45f89b2643c71734c2404c5f229ab8cf107ea9c2e2ed4f64ab03c825b2438670e606508c5d79afedd984171f0ea3546324917ad86bc7e1e2e36573a53d283 reset-nat.patch -bfa1da32bbdb0a804a578b4dcaa36b9b4e1116870b5546d7a8510ea1aacba611be8674f51147ce577f64ff64416bdba28231729f137fd9b5fb0a2d84e050d668 fix-includes-and-types-to-honor-standards.patch -a3d9ea893c68e7f59c8654811322facec89918d5c54292a7fc0e2b1a3505d9696fc0d6f2d7c81e80708929898097fecb3edaa67fbd94b2ccd1792ca7c87b51ac fix-shortcut-route-table.patch -eb6237ee25f510d1035e04e790d1725953843536e91640c5a1d8daca26ae8e90e1cc179bcaef3c2d5d908f2fa9b12cf666b78ee8a5695b5f1b5aa3596e686576 fix-shortcut-route-table-2.patch 97046d2ee2d9b5c2e91e6358807f797454d6daa129244d81a2e1e4afac739567d09425751e7d4a83922ce509a56d5d2f059117c408111fe8d7a2ef2543cba3f8 opennhrp.initd c998a0ba198e187c72d09ed3ba2e12fbd30c5d998ed06da01394058741c28a534f1c7e9d692f931ff00dac76c7d4e19e911f7d2ad48deb94f0cef8bd706c4315 opennhrp.confd" |