summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-03-06 09:36:11 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-06 23:12:27 +0000
commite96a537f11968c387f1228214f3acbf5d9896c8f (patch)
tree5e1d640fd3661eda6a03f71a35c39b77633fae11 /meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
parentf08b1e12a024e02ad3d6c1472030f82aa477b076 (diff)
downloadpoky-e96a537f11968c387f1228214f3acbf5d9896c8f.tar.gz
inetutils: Import version 1.9.4
In order to have more robust stand-alone network tools in oe-core, bring in inetutils from meta-openembedded/meta-networking. This imports the recipes as of git commit: commit 408204073e6bdcd8ac586e05d5b75213417673f2 Author: Martin Jansa <martin.jansa@gmail.com> Date: Thu Aug 16 20:39:15 2018 +0000 inetutils: fix build with glibc-2.28 (From OE-Core rev: ace6911e663709f07ca73aa72f6bb4f4111b2749) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch')
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
new file mode 100644
index 0000000000..24c134fcac
--- /dev/null
+++ b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
@@ -0,0 +1,83 @@
1Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
2
3Upstream-Status: Pending
4
5Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
6---
7 ping/ping_common.h | 20 ++++++++++++++++++++
8 1 file changed, 20 insertions(+)
9
10diff --git a/ping/ping_common.h b/ping/ping_common.h
11index 1dfd1b5..3bfbd12 100644
12--- a/ping/ping_common.h
13+++ b/ping/ping_common.h
14@@ -17,10 +17,14 @@
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see `http://www.gnu.org/licenses/'. */
17
18+#include <config.h>
19+
20 #include <netinet/in_systm.h>
21 #include <netinet/in.h>
22 #include <netinet/ip.h>
23+#ifdef HAVE_IPV6
24 #include <netinet/icmp6.h>
25+#endif
26 #include <icmp.h>
27 #include <error.h>
28 #include <progname.h>
29@@ -62,7 +66,12 @@ struct ping_stat
30 want to follow the traditional behaviour of ping. */
31 #define DEFAULT_PING_COUNT 0
32
33+#ifdef HAVE_IPV6
34 #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN)
35+#else
36+#define PING_HEADER_LEN (ICMP_MINLEN)
37+#endif
38+
39 #define PING_TIMING(s) ((s) >= sizeof (struct timeval))
40 #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */
41
42@@ -74,13 +83,20 @@ struct ping_stat
43 (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
44 } while (0)
45
46+#ifdef HAVE_IPV6
47 /* FIXME: Adjust IPv6 case for options and their consumption. */
48 #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
49 (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN))
50
51+#else
52+#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)
53+#endif
54+
55+#ifdef HAVE_IPV6
56 typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
57 struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
58 int datalen);
59+#endif
60
61 typedef int (*ping_efp) (int code,
62 void *closure,
63@@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code,
64 struct ip * ip, icmphdr_t * icmp, int datalen);
65
66 union event {
67+#ifdef HAVE_IPV6
68 ping_efp6 handler6;
69+#endif
70 ping_efp handler;
71 };
72
73 union ping_address {
74 struct sockaddr_in ping_sockaddr;
75+#ifdef HAVE_IPV6
76 struct sockaddr_in6 ping_sockaddr6;
77+#endif
78 };
79
80 typedef struct ping_data PING;
81--
822.8.3
83