summaryrefslogtreecommitdiff
path: root/net-misc/iputils/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
commit185fa19bbf68a4d4dca534d2b46729207a177f16 (patch)
treea8a537b82fda83a0799c2ca9887f212558363aa7 /net-misc/iputils/files
parentc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (diff)
gentoo resync : 11.05.2021
Diffstat (limited to 'net-misc/iputils/files')
-rw-r--r--net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch11
-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/files/iputils-20200821-fclose.patch45
-rw-r--r--net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch43
-rw-r--r--net-misc/iputils/files/iputils-20200821-install-sbindir.patch29
7 files changed, 0 insertions, 438 deletions
diff --git a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
deleted file mode 100644
index 50e108b09e85..000000000000
--- a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iputils-s20150815/ping.h
-+++ iputils-s20150815/ping.h
-@@ -61,7 +61,7 @@
-
- #define MAXWAIT 10 /* max seconds to wait for response */
- #define MININTERVAL 10 /* Minimal interpacket gap */
--#define MINUSERINTERVAL 200 /* Minimal allowed interval for non-root */
-+#define MINUSERINTERVAL 0 /* Minimal allowed interval for non-root */
-
- #define SCHINT(a) (((a) <= MININTERVAL) ? MININTERVAL : (a))
-
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
deleted file mode 100644
index 715ed45041b5..000000000000
--- a/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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
deleted file mode 100644
index 9814707d7239..000000000000
--- a/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-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
deleted file mode 100644
index a308fb7c9f63..000000000000
--- a/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-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/files/iputils-20200821-fclose.patch b/net-misc/iputils/files/iputils-20200821-fclose.patch
deleted file mode 100644
index cc370f0a5561..000000000000
--- a/net-misc/iputils/files/iputils-20200821-fclose.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e1c3d09b412ad0d022178344b8cbf748dc60f17f Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 24 Jan 2021 23:29:27 -0500
-Subject: [PATCH] tftpd: recvfile: avoid closing the file twice
-
-The close_stream function calls fclose, so don't call it again.
-
-This resolves an abort in glibc:
-
- Message: Process 1038079 (tftpd) of user 65534 dumped core.
-
- Stack trace of thread 1038079:
- #0 0x00007f5f650ed204 raise (libc.so.6 + 0x39204)
- #1 0x00007f5f650d6547 abort (libc.so.6 + 0x22547)
- #2 0x00007f5f6512f25f n/a (libc.so.6 + 0x7b25f)
- #3 0x00007f5f651372fa n/a (libc.so.6 + 0x832fa)
- #4 0x00007f5f65138dc2 n/a (libc.so.6 + 0x84dc2)
- #5 0x00007f5f65124b2f fclose (libc.so.6 + 0x70b2f)
- #6 0x000055571a50de73 recvfile (tftpd + 0x2e73)
- #7 0x000055571a50e064 tftp (tftpd + 0x3064)
- #8 0x000055571a50e387 tftpd_inetd (tftpd + 0x3387)
- #9 0x000055571a50e50f main (tftpd + 0x350f)
- #10 0x00007f5f650d7e6d __libc_start_main (libc.so.6 + 0x23e6d)
- #11 0x000055571a50d3ca _start (tftpd + 0x23ca)
-
-Fixes: 5d6be65 ("tftpd: remove global variables by using a run state struct")
-
-Reviewed-by: Petr Vorel <pvorel@suse.cz>
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- tftpd/tftpd.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
-index 42998f9b..a09d32ba 100644
---- a/tftpd/tftpd.c
-+++ b/tftpd/tftpd.c
-@@ -387,7 +387,6 @@ void recvfile(struct run_state *ctl, struct formats *pf)
- write_behind(ctl->file, pf->f_convert);
- if (close_stream(ctl->file))
- syslog(LOG_ERR, "tftpd: write error: %s\n", strerror(errno));
-- fclose(ctl->file); /* close data file */
-
- ap->th_opcode = htons((uint16_t)ACK); /* send the "final" ack */
- ap->th_block = htons(block);
diff --git a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
deleted file mode 100644
index 5b69e5c88fb7..000000000000
--- a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 469b41ac89b9f6772ea31df8379669d205be95f8 Mon Sep 17 00:00:00 2001
-From: Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt>
-Date: Mon, 24 Aug 2020 19:34:53 +0100
-Subject: [PATCH] common: fix infinite loop when getrandom fails
-
-Fixes: https://github.com/iputils/iputils/issues/291
----
- iputils_common.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/iputils_common.c b/iputils_common.c
-index 58eacd0..c41f201 100644
---- a/iputils_common.c
-+++ b/iputils_common.c
-@@ -98,18 +98,24 @@ static unsigned int iputil_srand_fallback(void)
- void iputils_srand(void)
- {
- unsigned int i;
-+
- #if HAVE_GETRANDOM
- ssize_t ret;
-
-- while ((ret = getrandom(&i, sizeof(i), GRND_NONBLOCK)) != sizeof(i)) {
-- switch(errno) {
-+ do {
-+ errno = 0;
-+ ret = getrandom(&i, sizeof(i), GRND_NONBLOCK);
-+ switch (errno) {
-+ case 0:
-+ break;
- case EINTR:
- continue;
- default:
- i = iputil_srand_fallback();
-- break;
-+ goto done;
- }
-- }
-+ } while (ret != sizeof(i));
-+ done:
- #else
- i = iputil_srand_fallback();
- #endif
diff --git a/net-misc/iputils/files/iputils-20200821-install-sbindir.patch b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
deleted file mode 100644
index cb1575841ccd..000000000000
--- a/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8d1420f3019cd1caccf2ffa15a5873f0c61ab529 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 24 Jan 2021 22:39:03 -0500
-Subject: [PATCH] tftpd: install into sbindir
-
-The xinet.d config expects the daemon to live in sbindir.
-
-Closes: https://github.com/iputils/iputils/pull/310
-
-Reviewed-by: Petr Vorel <pvorel@suse.cz>
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- tftpd/meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tftpd/meson.build b/tftpd/meson.build
-index 6e508a24..b4cf6812 100644
---- a/tftpd/meson.build
-+++ b/tftpd/meson.build
-@@ -3,7 +3,8 @@ inc = include_directories('..')
- executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h],
- include_directories : inc,
- link_with : [libcommon],
-- install: true)
-+ install: true,
-+ install_dir: sbindir)
-
- subs = configuration_data()
- subs.set('sbindir', sbindir)