summaryrefslogtreecommitdiff
path: root/net-misc/iputils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /net-misc/iputils
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'net-misc/iputils')
-rw-r--r--net-misc/iputils/Manifest12
-rw-r--r--net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch34
-rw-r--r--net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch86
-rw-r--r--net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch190
-rw-r--r--net-misc/iputils/iputils-20180629.ebuild2
-rw-r--r--net-misc/iputils/iputils-20190515.ebuild4
-rw-r--r--net-misc/iputils/iputils-20190709-r1.ebuild203
-rw-r--r--net-misc/iputils/iputils-20190709.ebuild2
-rw-r--r--net-misc/iputils/iputils-99999999.ebuild2
9 files changed, 526 insertions, 9 deletions
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index becb8b106725..7e08effac1cd 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -2,6 +2,9 @@ AUX iputils-20150815-nonroot-floodping.patch 406 BLAKE2B 18c9adf92bb64ddae4a62aa
AUX iputils-20180629-fix-ping-on-musl.patch 1514 BLAKE2B 32085fa6a7b21a6d5d0d5bba9ca59931f01489dd69ef57f1422e95d3fb2cac151fbfd437b933feb00753a6d3f3eaa0c63ed7eea81021e8a1bb8b26ec7dd6584d SHA512 d78aeaf4c746412855344b248c518218570103c082afd6fe8ee0c38ae2bf9a33d34c85ce5a846accd6442f8ec0f7a8727b5b747bd8a5adada53e1188e6e770df
AUX iputils-20180629-musl.patch 1718 BLAKE2B cd701f102a57743ba5494645c78b5c70004623530d8c82f20b2dc6b7d006c422fc23ac9493040ab9eccbcf87874b8db6ab394620a4ea61a7eb2e33e32761290f SHA512 0f623a1644592211b8935b6a7556a2a2c95151ac9b291e574bb1e9a5371fd72f27994867f8d599bca22a402627213807338d6cac17d17e7d175eab847658398d
AUX iputils-20190515-fix-setcap.patch 1706 BLAKE2B e90392bfe79201cbf88e2c6356b9f24d014e845cd65b29d66532dcabc8672df7f47e2bde0d6f267c4aff63f55bd4949ac91ab9d411c71c183586cbe47d6064f9 SHA512 769111d6bfd124d37125554993ea8c47dde2f6d917226597af9521db92fc31417b48648945bffb54f11201f230cb46d820f5a1ded027e1ee8e781d935841507b
+AUX iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch 1134 BLAKE2B cb6a700f3b0681e6abf5bfcfed3b5b4736aeba481e1b5334193cc32dab8e21134ed729d1b6b098495e46f59416f9d2c29f186b87143adcb2824f08058c7792ce SHA512 4e8bd9d4ae752dcdcb169eec1c42bc16d3f89cd1579140db74c3883da54145faea875513aca4bf8241208253b8950590fd615fe2ea7e448d431d509ff2e8dc03
+AUX iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch 2852 BLAKE2B a9375c41ba6dde249ec2a0a287eef68228198c7132dd145550c55a6f42b29d2e53160ef9a99455e0f60e2bb738f1a2dbeff016f2ce6903ead58c75bdcafeb618 SHA512 e9f322620ce2e10830c7127fdb64e68ea7bad59620e8b1ffd10ec9ee9f49f74500f0efe25de62feb0e1dd3cbd37af744263b53deeae8d78d44a6b9d335686afc
+AUX iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch 7935 BLAKE2B 550fc998feb6accae244baf8334d522ffcd6c464756f465c17298bef5338c8e746345026b72c95ff86aa14ef85223ca8cad4e00040f66b4e7aab3526296fc411 SHA512 1da0f189d47cb0b31cea5d1ea8081fbb2be0e55fb5b206cb366dce467bf0e557a2b77b2c8007993bdc91006a5f290269ae70e5d7e50f7fa5bdde93b0079d4e07
AUX rarpd.conf.d 250 BLAKE2B 5370ad1151911132ffff03952bc74ba2727eb71fb824b0d3f6ccd6dfad3aafd9c6ab2e0a4171ce2b34fd716d982362778c88154e5028db48836d4cc6c62b7c69 SHA512 8ff4c38b4f51f92ec6d66a446272e0cd9d958c3075162c5a4aa47eb54bb69f27045b888f8a547394ab3de51bdb69f14b8df528785a8c967fa33ab0c4db329338
AUX rarpd.init.d 583 BLAKE2B 527579b7cc8211af9910702ff730b0911cd84dc2efe8c5272b78e8be5bf656ee7a938a3c3cdaa6a1b8e51fa221f6ff71f3cef4e48b932995b0e66a35a5d7a838 SHA512 926feed1792799ba63afd9a67111c7c3bf8157b758190a5f1587c25b016aa82cdeb4fbffa41ffa5012f2c3dae05fb8f4c0f0bf0ae2b3048c1299d9489ce1bada
DIST iputils-20180629.tar.gz 195094 BLAKE2B 81bf6ef427eac0769ea3f95c20294b46c81f9c619551234eb265b3a428998a96cf3df0cdc7499f9eea280c1999e899e87c3f4a863141de251a9c509840bc83b3 SHA512 16b8f5ad1cf88083ebaee0a71fddb14bb0a904336fd0baebfcca86c27ac0773553b21d12790b05cab7661d6432c75bbb1523e871e5e1b77faacd13ccc84f4476
@@ -10,8 +13,9 @@ DIST iputils-20190709.tar.gz 404101 BLAKE2B 38e66366cc13a77b7da1a85afe7245891c6c
DIST iputils-manpages-20180629.tar.xz 29804 BLAKE2B 15983cc97bc6b6853c193f046687f10be11902f7e1d2dc2eec6c58edd1926f10152108d378858b0d7eb2d2908f038965b05515c4927aedc460282a22307883ad SHA512 1c5b0bab8496a3f3d9b5080029221231a497d9a5e91c61bd0ddd0b63fd51572d052801294aafd08e1dc8ad448b82cdaf48c72f0b08cc143f9c144f3db6848d9a
DIST iputils-manpages-20190515.tar.xz 27556 BLAKE2B adf3eb5c7f3fd71fa24ff48daffd367ba6abc0377bca45ddc439803d177bf668f7dfc7bd3da7a06e89d9ffdd68f2bb0dbb9aa0ac150c98cd1f2b207a68d4fb46 SHA512 4013fe05c592ccc09d6b947ee59d56515bfe49e9a9d5610225d4a2b8c5034a7f1e8dc41c214cf03ce909d36bc5a8438541ad302cddeb1f0b4359a9b9c85ad4b2
DIST iputils-manpages-20190709.tar.xz 27588 BLAKE2B 9780a96dfde077625a7a499182511066ede63ca364d2de729403354af7cea6b25629da1408ee2081f9da1b21756ee956d04642ea36d05ee02ef7ef05b66c1ad5 SHA512 4de796666426574bd134f4c4ea4d560d8e3eae8bd8ac19b89793fe252a1ef9eebd1833cafb72a2987118f3061eaf00da8a2468e8bced1568611f9391a1203066
-EBUILD iputils-20180629.ebuild 3969 BLAKE2B d48b246f78d0da70cb869550a250c83fca055b5e77ec4a962fc6ac615c40c8cbd737d474b3bb042d848870f3ec8eca5fd75484142ab07aa433cc606acd1449b5 SHA512 52fb6be372a3ca7ae303cd1a1cf3599a52304c9d593a2eed32fe50cbc75f64b1d413a97451c6f9129c0a45a5cbb57888d2aa8c1bf8135b30b278de85d3923f94
-EBUILD iputils-20190515.ebuild 4923 BLAKE2B e7c4bb2ac6393f93e3294559091b4a339a76a2e21e0b787b92cf631b9799486a701ca5e5e5f1b77910a9edecc00b68661f5e789f336fce9c9321ec3656e4faa9 SHA512 48037b05394e88e60ee399d9560f59529e3b195e10b8a5137b11377a6e4240a11aa2409f0e5d74ac753a72fd42c414edff975fff78d77c20de6e46a9c7c116a5
-EBUILD iputils-20190709.ebuild 4836 BLAKE2B 55184f1602f8880d6d19661768a573ae4af056d8283deb4bf0d530902eca962c6c764c4e9e8a33251805197881b6ace917b996405640968dc63818676ba60222 SHA512 c86911890d5848509a3bcdbb3d50050e7ee8f95b9bc0eb40fa7f502edcc49ef554fe9c1ab14654432859f0b3392a2efe662bec3f7c6c3cd9d4b3f6d18dadb066
-EBUILD iputils-99999999.ebuild 4843 BLAKE2B a866f2ad14eaeabca1136cf5376da08c219f3106bedff2cf880936c6afb38edcf04ed9852111614f2bbcf9b4d2b34e5bd41f0fb50c5572394666c604321b904f SHA512 d93c23ba2a5ffcb252c5adbab9502ac65e0628a8a8847bc2cd9ea720253eb5f96206326be7f605385a27b0270d5a2baeb88955d6712f8cf3d28b27e12d060f52
+EBUILD iputils-20180629.ebuild 3967 BLAKE2B af20e42d35c953f1ffe002bdd9f93f43933cccabdac0ea577e51d38cf11d6b5f0ba4302ff4117c953168e9a2ec032e2e35b33161123ad925104ed99502b20743 SHA512 8d36e3d54595762dd29cf0591b4d0c40bebdbd799aa201adcbf799183d02e88c8b9cb16e4be83ef31b93a92e4f452cff312b01e4fdee6820b05129d7148a57bc
+EBUILD iputils-20190515.ebuild 4919 BLAKE2B 4971db4c7e34487f58cd8475e5d5f1a8c4019ff74c14d9cb0dbbebe34c75d98033073c8faae6a6bbfc0b9ec70cead5bcbf3d69c532e418bb72b6c07a98f5323c SHA512 fcd0be342b6f865ca0b12e30d98f347b44d11dcf2871914a0e657c27d0cb9dfdae9c289cde19825fbd2c7aa7a3d5d10ce5cd31d0f585df58196977e1606f6cbe
+EBUILD iputils-20190709-r1.ebuild 5063 BLAKE2B d97633c9ce56d4b155467cfd4b638f2ab5a132fe5636661e7d75b4e82b58ec6414dfa4e7c6d8cfddbfe26dfdb7fe028f87a5188e02777789482a5c8dde027ccb SHA512 2e0b5202f12a6ab5c0123b57a56de6d88f76094237517a37434f61b7f304687df6dedc1fd18697ed9a2954632aa30847dc40680486ee28e9e72db0f517a1032d
+EBUILD iputils-20190709.ebuild 4832 BLAKE2B 568c48b41ebc6130dd0bc57a300bebd1e3f1994c5cea2f844dd43573e3e9fc24488784307649048ea83a30bcdc0696c56974f83a3a9a07a87d94c539d1fee6af SHA512 861e080265a15292a6c45adff6aec359b2f4cee26ce91d3d3a1ae01a9b06325f421d9016b27d68ff878e0432bd48a7adfade6b1828747ddbf1b90b9a924f02b0
+EBUILD iputils-99999999.ebuild 4839 BLAKE2B 36de576375669cde223c1a8e37225d9527969434238e1a12475679968ef2a76b1d696214c2b2e029d4480246e8d047a797484499da1324ad783296afd4c334ac SHA512 c600edbeb543af780408ac536c5fd89384c3b487aab5ea02cc0c17184b1f351f1d9ecde4f018085d16daf58ddaf2907378683b2f3ae450b91705461d3e54f404
MISC metadata.xml 1625 BLAKE2B c29d113e691929f035c7dffbe52e043c1552941565a51021efe401a299aebb5d818ff33a1c99ae086bdc5ecd5a1063db5180b8bd1107dc103e45a8c9450913d2 SHA512 86d64befb808172b14c5e5c53fdc901d51f380045dcc5f42cf770ec03c1722a78677824c2a4823357bdce438edc92cf3d3340436968935c615fa49c4173cc17e
diff --git a/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch b/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
new file mode 100644
index 000000000000..715ed45041b5
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
@@ -0,0 +1,34 @@
+From 18f14be80466ddc8fb17a400be82764a779c8dcd Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Wed, 31 Jul 2019 21:28:12 +0100
+Subject: [PATCH] arping: revert partially - fix sent vs received packages
+ return value
+
+Commit 84ca65ca980315c73f929fed8b6f16bbd698c3a0 caused regression. The
+arping -D needs return value evaluation that was the earlier default, in
+other cases the new return value should be correct.
+
+Addresses: https://github.com/iputils/iputils/issues/209
+See-also: https://github.com/void-linux/void-packages/issues/13304
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+---
+ arping.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/arping.c b/arping.c
+index 77c9c56..2c87c15 100644
+--- a/arping.c
++++ b/arping.c
+@@ -792,7 +792,11 @@ static int event_loop(struct run_state *ctl)
+ close(tfd);
+ freeifaddrs(ctl->ifa0);
+ rc |= finish(ctl);
+- rc |= (ctl->sent != ctl->received);
++ if (ctl->dad && ctl->quit_on_reply)
++ /* Duplicate address detection mode return value */
++ rc |= !(ctl->brd_sent != ctl->received);
++ else
++ rc |= (ctl->sent != ctl->received);
+ return rc;
+ }
+
diff --git a/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch b/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
new file mode 100644
index 000000000000..9814707d7239
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
@@ -0,0 +1,86 @@
+From: Benjamin Poirier <benjamin.poirier@gmail.com>
+Date: Thu, 26 Dec 2019 10:44:03 +0900
+Subject: ping: fix main loop over multiple addrinfo results
+
+Despite what the log of commit f68eec0eafad ("ping: perform dual-stack ping
+by default") says, main() was not designed to loop over multiple addresses
+returned by getaddrinfo(). This is apparent because until commit
+db11bc96a68c ("ping: make command to return from main()"), ping{4,6}_run()
+never returned (they always exited). After commit db11bc96a68c, we
+encounter unexpected situations if getaddrinfo returns multiple results and
+ping{4,6}_run() return != 0.
+
+For example (notice echo reply is not received):
+
+ root@vsid:/src/iputils# ./builddir/ping/ping -w1 google.com
+ PING google.com(nrt12s22-in-x0e.1e100.net (2404:6800:4004:80c::200e)) 56 data bytes
+
+ --- google.com ping statistics ---
+ 1 packets transmitted, 0 received, 100% packet loss, time 0ms
+
+ PING (216.58.197.142) 56(84) bytes of data.
+
+ --- ping statistics ---
+ 1 packets transmitted, 0 received, 100% packet loss, time -1002ms
+
+ root@vsid:/src/iputils#
+
+Establish the following convention:
+
+* return value >= 0 -> exit with this code (same behavior as before commit
+ db11bc96a68c)
+
+* return value < 0 -> go on to next addrinfo result
+
+The second case will be used in the following patch.
+
+Fixes: db11bc96a68c ("ping: make command to return from main()")
+Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
+Origin: https://github.com/iputils/iputils/commit/c249e48bb865e731896b7d8ceaf4bca7d28768b6
+Bug-Debian: https://bugs.debian.org/947921
+See-also: https://github.com/iputils/iputils/pull/244
+---
+ ping.c | 6 +++++-
+ ping6_common.c | 1 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/ping.c b/ping.c
+index 34653be..ae687b4 100644
+--- a/ping.c
++++ b/ping.c
+@@ -495,8 +495,11 @@ main(int argc, char **argv)
+ error(2, 0, _("unknown protocol family: %d"), ai->ai_family);
+ }
+
+- if (ret_val == 0)
++ if (ret_val >= 0)
+ break;
++ /* ret_val < 0 means to go on to next addrinfo result, there
++ * better be one. */
++ assert(ai->ai_next);
+ }
+
+ freeaddrinfo(result);
+@@ -504,6 +507,7 @@ main(int argc, char **argv)
+ return ret_val;
+ }
+
++/* return >= 0: exit with this code, < 0: go on to next addrinfo result */
+ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock)
+ {
+ static const struct addrinfo hints = {
+diff --git a/ping6_common.c b/ping6_common.c
+index 6cc5404..731dc6d 100644
+--- a/ping6_common.c
++++ b/ping6_common.c
+@@ -551,6 +551,7 @@ int niquery_option_handler(const char *opt_arg)
+ return ret;
+ }
+
++/* return >= 0: exit with this code, < 0: go on to next addrinfo result */
+ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock)
+ {
+ static const struct addrinfo hints = {
+--
+2.25.0.rc2
+
diff --git a/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch b/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
new file mode 100644
index 000000000000..a308fb7c9f63
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
@@ -0,0 +1,190 @@
+From: Benjamin Poirier <benjamin.poirier@gmail.com>
+Date: Wed, 25 Dec 2019 13:33:12 +0900
+Subject: ping: try next addrinfo on connect failure
+
+On hosts that have routing rules matching on the outgoing interface [1],
+getaddrinfo() may return results sorted in a suboptimal order because it is
+not aware of the network interface passed to ping via the "-I" option. In
+particular, address reachability detection may fail and getaddrinfo() will
+return ipv6 results first, even though the only routes available are ipv4.
+
+Improve user experience by trying next addrinfo entry if we encounter a
+failure at connect() time because of missing or unreachable routes.
+
+[1] For example, on switches running Cumulus Linux, the default VRF is used
+for front ports and a "mgmt" VRF is used for the management interface, which
+also handles all DNS traffic. (VRFs apply different routing rules based on
+the iif/oif, ie. influenced by SO_BINDTODEVICE.) In the default vrf, it's
+possible to ping an ipv4 address via the mgmt vrf by specifying "-I mgmt".
+However, that will fail if the target host is specified by name, has a AAAA
+record and there is no ipv6 route to it.
+
+Since libc commit 5ddb5bf5fb, getaddrinfo() does a udp connect to result
+addresses to check if there is a route to them. This is to implement
+RFC3484 ยง6 Rule 1 ("Avoid unusable destinations") which is part of the
+algorithm to order results. getaddrinfo() is unaware of ping's "-I" option
+and tries to connect its socket via the default vrf, which has no ipv6 route
+to the target host (and, in fact, no ipv4 route either). Following this
+failure, getaddrinfo() returns results ordered according to
+/etc/gai.conf (Rule 6) - by default, ipv6 first.
+
+ping tries only the first entry returned by getaddrinfo() and fails to
+connect to it because there is no ipv6 route to the host, even in the mgmt
+vrf. However, if getaddrinfo() had ordered the ipv4 result first or ping
+had tried the next addrinfo entry (the ipv4 one), ping could connect a udp
+socket to it and later successfully exchange icmp messages with it.
+
+Example:
+
+ cumulus@act-5812-10:~$ ip vrf list
+ Name Table
+ -----------------------
+ mgmt 1001
+ cumulus@act-5812-10:~$ ip vrf identify
+ cumulus@act-5812-10:~$ # --> default vrf
+ cumulus@act-5812-10:~$
+ cumulus@act-5812-10:~$ ip rule
+ 99: from all to 10.230.0.53 ipproto udp dport 53 lookup mgmt
+ 99: from all to 10.20.249.1 ipproto udp dport 53 lookup mgmt
+ 1000: from all lookup [l3mdev-table]
+ 32765: from all lookup local
+ 32766: from all lookup main
+ 32767: from all lookup default
+
+ cumulus@act-5812-10:~$ ip route
+
+ cumulus@act-5812-10:~$ ip -6 route
+ ::1 dev lo proto kernel metric 256 pref medium
+
+ cumulus@act-5812-10:~$ ip route show vrf mgmt
+ default via 10.230.130.1 dev eth0
+ unreachable default metric 4278198272
+ 10.230.130.0/24 dev eth0 proto kernel scope link src 10.230.130.211
+ 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
+
+ cumulus@act-5812-10:~$ ip -6 route show vrf mgmt
+ ::1 dev mgmt proto kernel metric 256 pref medium
+ anycast fe80:: dev eth0 proto kernel metric 0 pref medium
+ fe80::/64 dev eth0 proto kernel metric 256 pref medium
+ ff00::/8 dev eth0 metric 256 pref medium
+ unreachable default dev lo metric 4278198272 pref medium
+
+ cumulus@act-5812-10:~$ host google.com
+ google.com has address 172.217.0.46
+ google.com has IPv6 address 2607:f8b0:4005:802::200e
+ google.com mail is handled by 30 alt2.aspmx.l.google.com.
+ google.com mail is handled by 40 alt3.aspmx.l.google.com.
+ google.com mail is handled by 20 alt1.aspmx.l.google.com.
+ google.com mail is handled by 10 aspmx.l.google.com.
+ google.com mail is handled by 50 alt4.aspmx.l.google.com.
+
+Success with numeric address
+
+ cumulus@act-5812-10:~$ ping -n -c1 -I mgmt 172.217.0.46
+ ping: Warning: source address might be selected on device other than mgmt.
+ PING 172.217.0.46 (172.217.0.46) from 10.230.130.211 mgmt: 56(84) bytes of data.
+ 64 bytes from 172.217.0.46: icmp_seq=1 ttl=51 time=4.68 ms
+
+ --- 172.217.0.46 ping statistics ---
+ 1 packets transmitted, 1 received, 0% packet loss, time 0ms
+ rtt min/avg/max/mdev = 4.675/4.675/4.675/0.000 ms
+
+Failure with host by name
+
+ cumulus@act-5812-10:~$ ping -n -c1 -I mgmt google.com
+ connect: No route to host
+
+Success when running in the mgmt vrf because getaddrinfo()'s address
+reachability test is effective and ipv4 result(s) are ordered first.
+
+ cumulus@act-5812-10:~$ ip vrf exec mgmt ping -n -c1 google.com
+ PING google.com (172.217.0.46) 56(84) bytes of data.
+ 64 bytes from 172.217.0.46: icmp_seq=1 ttl=51 time=4.65 ms
+
+ --- google.com ping statistics ---
+ 1 packets transmitted, 1 received, 0% packet loss, time 0ms
+ rtt min/avg/max/mdev = 4.650/4.650/4.650/0.000 ms
+
+For demonstration purposes, the following configuration allows one to
+reproduce a similar problem. Starting from a host with a vanilla
+configuration, default ipv4 route using eth0, no ipv6 global routes:
+
+ root@vsid:~# ip route
+ default via 192.168.15.1 dev eth0
+ 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.100
+
+ root@vsid:~# ip -6 route
+ ::1 dev lo proto kernel metric 256 pref medium
+ fe80::/64 dev eth0 proto kernel metric 256 pref medium
+
+ root@vsid:~# ip rou flush table main
+
+ root@vsid:~# ip rou add table 1 192.168.15.0/24 dev eth0
+
+ root@vsid:~# ip rou add table 1 default via 192.168.15.1
+
+ root@vsid:~# ip rule
+ 0: from all lookup local
+ 32766: from all lookup main
+ 32767: from all lookup default
+ root@vsid:~# ip rule add pref 1 to 192.168.15.1 ipproto udp dport 53 lookup 1
+ root@vsid:~# ip rule add pref 2 oif eth0 lookup 1
+ root@vsid:~# ping -c1 -I eth0 google.com
+
+ ping: connect: Network is unreachable
+
+With the current patch
+
+ root@vsid:~# /src/iputils/builddir/ping/ping -c1 -I eth0 google.com
+ PING (172.217.174.110) from 192.168.15.100 eth0: 56(84) bytes of data.
+ 64 bytes from nrt12s28-in-f14.1e100.net (172.217.174.110): icmp_seq=1 ttl=53 time=11.3 ms
+
+ --- ping statistics ---
+ 1 packets transmitted, 1 received, 0% packet loss, time 0ms
+ rtt min/avg/max/mdev = 11.313/11.313/11.313/0.000 ms
+
+Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
+Origin: https://github.com/iputils/iputils/commit/2705c8248281fbb8efaa5326ab1d0ed0a670bd3d
+Bug-Debian: https://bugs.debian.org/947921
+See-also: https://github.com/iputils/iputils/pull/244
+---
+ ping.c | 3 +++
+ ping6_common.c | 7 ++++++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/ping.c b/ping.c
+index 34653be..013c4e6 100644
+--- a/ping.c
++++ b/ping.c
+@@ -628,6 +628,9 @@ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock)
+ error(2, errno, _("cannot set broadcasting"));
+ if (connect(probe_fd, (struct sockaddr *)&dst, sizeof(dst)) == -1)
+ error(2, errno, "connect");
++ } else if ((errno == EHOSTUNREACH || errno == ENETUNREACH) && ai->ai_next) {
++ close(probe_fd);
++ return -1;
+ } else
+ error(2, errno, "connect");
+ }
+diff --git a/ping6_common.c b/ping6_common.c
+index 6cc5404..bc1030b 100644
+--- a/ping6_common.c
++++ b/ping6_common.c
+@@ -651,8 +651,13 @@ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock
+ firsthop.sin6_family = AF_INET6;
+
+ firsthop.sin6_port = htons(1025);
+- if (connect(probe_fd, (struct sockaddr *)&firsthop, sizeof(firsthop)) == -1)
++ if (connect(probe_fd, (struct sockaddr *)&firsthop, sizeof(firsthop)) == -1) {
++ if ((errno == EHOSTUNREACH || errno == ENETUNREACH) && ai->ai_next) {
++ close(probe_fd);
++ return -1;
++ }
+ error(2, errno, "connect");
++ }
+ alen = sizeof source6;
+ if (getsockname(probe_fd, (struct sockaddr *)&source6, &alen) == -1)
+ error(2, errno, "getsockname");
+--
+2.25.0.rc2
+
diff --git a/net-misc/iputils/iputils-20180629.ebuild b/net-misc/iputils/iputils-20180629.ebuild
index db782177e0bc..2136a71b72f7 100644
--- a/net-misc/iputils/iputils-20180629.ebuild
+++ b/net-misc/iputils/iputils-20180629.ebuild
@@ -24,7 +24,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://github.com/iputils/iputils/archive/s${MY_PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${MY_PV}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Network monitoring tools including ping and ping6"
diff --git a/net-misc/iputils/iputils-20190515.ebuild b/net-misc/iputils/iputils-20190515.ebuild
index 4e88cd742043..dbeb6834c857 100644
--- a/net-misc/iputils/iputils-20190515.ebuild
+++ b/net-misc/iputils/iputils-20190515.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# For released versions, we precompile the man/html pages and store
@@ -19,7 +19,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Network monitoring tools including ping and ping6"
diff --git a/net-misc/iputils/iputils-20190709-r1.ebuild b/net-misc/iputils/iputils-20190709-r1.ebuild
new file mode 100644
index 000000000000..de8b4a40ad6e
--- /dev/null
+++ b/net-misc/iputils/iputils-20190709-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors. This avoids ugly issues while
+# building stages, and reduces depedencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag and tar ${S}/doc folder.
+
+EAPI="7"
+
+PLOCALES="ja"
+
+inherit fcaps flag-o-matic l10n meson systemd toolchain-funcs
+
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
+
+LICENSE="BSD GPL-2+ rdisc"
+SLOT="0"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle nls rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute6"
+
+BDEPEND="virtual/pkgconfig"
+
+LIB_DEPEND="
+ caps? ( sys-libs/libcap[static-libs(+)] )
+ idn? ( net-dns/libidn2:=[static-libs(+)] )
+ ipv6? (
+ ssl? (
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ !gcrypt? (
+ nettle? ( dev-libs/nettle[static-libs(+)] )
+ !nettle? (
+ libressl? ( dev-libs/libressl:0=[static-libs(+)] )
+ !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+ )
+ )
+ )
+ )
+ nls? ( sys-devel/gettext[static-libs(+)] )
+"
+
+RDEPEND="
+ arping? ( !net-misc/arping )
+ rarpd? ( !net-misc/rarpd )
+ traceroute6? ( !net-analyzer/traceroute )
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ static? ( ${LIB_DEPEND} )
+"
+
+if [[ ${PV} == "99999999" ]] ; then
+ DEPEND+="
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-ns-stylesheets
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ "
+fi
+
+[ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-arping-revert-partially-fix-sent-vs-received-package.patch
+ "${FILESDIR}"/${P}-ping-try-next-addrinfo-on-connect-failure.patch
+ "${FILESDIR}"/${P}-ping-fix-main-loop-over-multiple-addrinfo-results.patch
+)
+
+src_prepare() {
+ use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
+
+ default
+
+ l10n_get_locales > po/LINGUAS || die
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local emesonargs=(
+ -DUSE_CAP="$(usex caps true false)"
+ -DUSE_IDN="$(usex idn true false)"
+ -DBUILD_ARPING="$(usex arping true false)"
+ -DBUILD_CLOCKDIFF="$(usex clockdiff true false)"
+ -DBUILD_PING="true"
+ -DBUILD_RARPD="$(usex rarpd true false)"
+ -DBUILD_RDISC="$(usex rdisc true false)"
+ -DENABLE_RDISC_SERVER="$(usex rdisc true false)"
+ -DBUILD_TFTPD="$(usex tftpd true false)"
+ -DBUILD_TRACEPATH="$(usex tracepath true false)"
+ -DBUILD_TRACEROUTE6="$(usex ipv6 $(usex traceroute6 true false) false)"
+ -DBUILD_NINFOD="false"
+ -DNINFOD_MESSAGES="false"
+ -DNO_SETCAP_OR_SUID="true"
+ -Dsystemdunitdir="$(systemd_get_systemunitdir)"
+ -DUSE_GETTEXT="$(usex nls true false)"
+ )
+
+ if use ipv6 && use ssl ; then
+ emesonargs+=(
+ -DUSE_CRYPTO="$(usex gcrypt gcrypt $(usex nettle nettle openssl))"
+ )
+ else
+ emesonargs+=(
+ -DUSE_CRYPTO="none"
+ )
+ fi
+
+ if [[ "${PV}" == 99999999 ]] ; then
+ emesonargs+=(
+ -DBUILD_HTML_MANS="$(usex doc true false)"
+ -DBUILD_MANS="true"
+ )
+ else
+ emesonargs+=(
+ -DBUILD_HTML_MANS="false"
+ -DBUILD_MANS="false"
+ )
+ fi
+
+ meson_src_configure
+}
+
+src_compile() {
+ tc-export CC
+ meson_src_compile
+}
+
+src_install() {
+ meson_src_install
+
+ dodir /bin
+ local my_bin
+ for my_bin in $(usex arping arping '') ping ; do
+ mv "${ED}"/usr/bin/${my_bin} "${ED}"/bin/ || die
+ done
+ dosym ping /bin/ping4
+
+ if use tracepath ; then
+ dosym tracepath /usr/bin/tracepath4
+ fi
+
+ if use ipv6 ; then
+ dosym ping /bin/ping6
+
+ if use tracepath ; then
+ dosym tracepath /usr/bin/tracepath6
+ dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+ fi
+ fi
+
+ if [[ "${PV}" != 99999999 ]] ; then
+ local -a man_pages
+ local -a html_man_pages
+
+ while IFS= read -r -u 3 -d $'\0' my_bin
+ do
+ my_bin=$(basename "${my_bin}")
+ [[ -z "${my_bin}" ]] && continue
+
+ if [[ -f "${S}/doc/${my_bin}.8" ]] ; then
+ man_pages+=( ${my_bin}.8 )
+ fi
+
+ if [[ -f "${S}/doc/${my_bin}.html" ]] ; then
+ html_man_pages+=( ${my_bin}.html )
+ fi
+ done 3< <(find "${ED}"/{bin,usr/bin,usr/sbin} -type f -perm -a+x -print0 2>/dev/null)
+
+ pushd doc &>/dev/null || die
+ doman "${man_pages[@]}"
+ if use doc ; then
+ docinto html
+ dodoc "${html_man_pages[@]}"
+ fi
+ popd &>/dev/null || die
+ else
+ if use doc ; then
+ mv "${ED}"/usr/share/${PN} "${ED}"/usr/share/doc/${PF}/html || die
+ fi
+ fi
+}
+
+pkg_postinst() {
+ fcaps cap_net_raw \
+ bin/ping \
+ $(usex arping 'bin/arping' '') \
+ $(usex clockdiff 'usr/bin/clockdiff' '')
+}
diff --git a/net-misc/iputils/iputils-20190709.ebuild b/net-misc/iputils/iputils-20190709.ebuild
index a0cc3dfdbee1..bdf494ae2e6f 100644
--- a/net-misc/iputils/iputils-20190709.ebuild
+++ b/net-misc/iputils/iputils-20190709.ebuild
@@ -19,7 +19,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Network monitoring tools including ping and ping6"
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index c93df8292544..cc025fe8be3e 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -19,7 +19,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Network monitoring tools including ping and ping6"