Fixing IPv6 DNS resolution for RPKI-RTR TCP transport, see upstream 4e23b499696da81acf0ed5ad181573b94ccdb9a3

This commit is contained in:
Alarig Le Lay 2020-01-11 19:00:37 +01:00
parent d62705b70e
commit 9e602d89e5
3 changed files with 38 additions and 1 deletions

View file

@ -1,5 +1,6 @@
AUX initd-bird-2 1172 BLAKE2B 6eb8369c0872e64caa360345411ead57f6213cf891fd21e5547044cceb7462c09453910d9d1d2572445035b7b85f5131fc13625a98610ac13838aa14ef676302 SHA512 b058df1281f1d8a4098e5737de1831645e09dbf7ffe516ab27221f61c0988aba1d1d8a87d34a599ce3cf5afc378b92c299b9758d0190f9fc4243a26291b5e5f8
AUX initd-v4-bird-1.3.8 801 BLAKE2B 09d9045299972580280fbb6d8745378a75b3a9e647b965d9033e6493df67ea268afba8ab95c46208894f330ff3607d90502653072eb73c130d1841cab9e604c2 SHA512 e878792e589317b743c53fa9fd1f5a4e04c6c97a64946a3e47a910c35d32ad265dcd860935e91950cddb97e1f6ab43c02157a5349e4bd4529cdd1539ca7cf879
AUX initd-v6-bird-1.3.8 802 BLAKE2B a9dc698f9dfde93314fe1b0f4c8005d9b5f14e4133ebad124f4283a50d990c946bda88b1d55227ed6bf9f33caf0d716b0a8540adf592fbf156297c20ab8a3b1c SHA512 6adb2b7c22696e53644bb5331bcb1b6e84026e41086f6f538c40073a7daa3b0ce3a14e041c2615a72cbe151d6fa8f81b543f85d421f019440ef5b6fd0a556ad9
AUX ipv6-rpki-2.0.7.patch 713 BLAKE2B d171a27126a81514dc5c9c5476446456e5822f5759cd7a5823b103d62ccd7e54ef18138198b729f92e326168a06cf15144cbe6064d527354e8adcb9ae09d53da SHA512 062ebc81b55ccc46784b0276a54d356676430ffc4e6a0e2b1b8fbe43a628382b6148210eac04a9b715ec25920e6a7af160030f3688083fd99279ce657f2c61e8
DIST bird-2.0.7.tar.gz 1993395 BLAKE2B ceb88d811d254e57e089ef4b4e1e4f34fd96d4622d9f5563cc8694323c060e99d6cdfccfeb5d8c885b9431dc71e96d5cc04e4344901a7c7d899f4249e7503720 SHA512 48ca63be923285dd282e80d7e2b240256953fd7ad4f6eaa5dcba2648f3f148be20198bc8c6e7e888aac1588ecb005a4f4c03e979853e76ea6f8680643a874b35
EBUILD bird-2.0.7.ebuild 825 BLAKE2B efa29eb7ab66033a1187916f708c75e894519b4109e22a82feff710b5ec6fe50573e9dc4eae8ac8e910275dbcfc42411e4a4fc15ace9d4124d346a829aa85177 SHA512 c89f767221063ec8c24b8eeb7f9a9e1dd414ca3725899851bbbf0d9ca0791b3fc453c8b3b850cd77ab08d791adedf0bf08737b2cfd1f37c90921a77ead07e989
EBUILD bird-2.0.7.ebuild 921 BLAKE2B 15aac9e42cda5e1f91313117c3b13a7925733bac2e2e67b22ae8781cbf585b97d9af0ece2b79f538bbdbea10a93095e347b87bccff0a75e484ad1e019dac6d16 SHA512 96bef68c3c18fb22670ca7a784f3ebce1a215e856feac5ea83caf11dc93e0f1a15e917f7d391fac4ecb988c1d206b7d2256e6988553232f86236b8dcdb3eef93

View file

@ -3,6 +3,8 @@
EAPI=7
inherit eutils
DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6"
HOMEPAGE="http://bird.network.cz"
SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
@ -27,6 +29,11 @@ src_configure() {
$(use_enable libssh)
}
src_prepare() {
eapply -p0 "${FILESDIR}/ipv6-rpki-${PV}.patch"
eapply_user
}
src_install() {
if use client; then
dobin birdc

View file

@ -0,0 +1,29 @@
diff --git a/proto/rpki/transport.c b/proto/rpki/transport.c
index 182667be..9dcb7c5c 100644
--- proto/rpki/transport.c
+++ proto/rpki/transport.c
@@ -26,7 +26,6 @@
static ip_addr
rpki_hostname_autoresolv(const char *host)
{
- ip_addr addr = {};
struct addrinfo *res;
struct addrinfo hints = {
.ai_family = AF_UNSPEC,
@@ -44,12 +43,10 @@ rpki_hostname_autoresolv(const char *host)
return IPA_NONE;
}
- sockaddr sa = {
- .sa = *res->ai_addr,
- };
-
+ ip_addr addr = IPA_NONE;
uint unused;
- sockaddr_read(&sa, res->ai_family, &addr, NULL, &unused);
+
+ sockaddr_read((sockaddr *) res->ai_addr, res->ai_family, &addr, NULL, &unused);
freeaddrinfo(res);
return addr;