diff options
-rw-r--r-- | meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch | 43 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb | 10 |
2 files changed, 38 insertions, 15 deletions
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch index bd3ae476b..24c134fca 100644 --- a/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch +++ b/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch | |||
@@ -2,9 +2,15 @@ Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html | |||
2 | 2 | ||
3 | Upstream-Status: Pending | 3 | Upstream-Status: Pending |
4 | 4 | ||
5 | diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h | 5 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
6 | --- inetutils-1.8.orig/ping/ping_common.h 2010-05-15 20:55:47.000000000 +0930 | 6 | --- |
7 | +++ inetutils-1.8/ping/ping_common.h 2010-12-01 12:19:08.000000000 +1030 | 7 | ping/ping_common.h | 20 ++++++++++++++++++++ |
8 | 1 file changed, 20 insertions(+) | ||
9 | |||
10 | diff --git a/ping/ping_common.h b/ping/ping_common.h | ||
11 | index 1dfd1b5..3bfbd12 100644 | ||
12 | --- a/ping/ping_common.h | ||
13 | +++ b/ping/ping_common.h | ||
8 | @@ -17,10 +17,14 @@ | 14 | @@ -17,10 +17,14 @@ |
9 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
10 | along with this program. If not, see `http://www.gnu.org/licenses/'. */ | 16 | along with this program. If not, see `http://www.gnu.org/licenses/'. */ |
@@ -20,18 +26,32 @@ diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h | |||
20 | #include <icmp.h> | 26 | #include <icmp.h> |
21 | #include <error.h> | 27 | #include <error.h> |
22 | #include <progname.h> | 28 | #include <progname.h> |
23 | @@ -66,13 +70,19 @@ | 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 | ||
24 | (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\ | 43 | (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\ |
25 | } while (0) | 44 | } while (0) |
26 | 45 | ||
27 | +#ifdef HAVE_IPV6 | 46 | +#ifdef HAVE_IPV6 |
28 | /* Not sure about this step*/ | 47 | /* FIXME: Adjust IPv6 case for options and their consumption. */ |
29 | #define _PING_BUFLEN(p, USE_IPV6) ((USE_IPV6)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \ | 48 | #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \ |
30 | ((p)->ping_datalen + sizeof (icmphdr_t))) | 49 | (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)) |
50 | |||
31 | +#else | 51 | +#else |
32 | +#define _PING_BUFLEN(p, USE_IPV6) ((p)->ping_datalen + sizeof (icmphdr_t)) | 52 | +#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN) |
33 | +#endif | 53 | +#endif |
34 | 54 | + | |
35 | +#ifdef HAVE_IPV6 | 55 | +#ifdef HAVE_IPV6 |
36 | typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest, | 56 | typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest, |
37 | struct sockaddr_in6 * from, struct icmp6_hdr * icmp, | 57 | struct sockaddr_in6 * from, struct icmp6_hdr * icmp, |
@@ -40,7 +60,7 @@ diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h | |||
40 | 60 | ||
41 | typedef int (*ping_efp) (int code, | 61 | typedef int (*ping_efp) (int code, |
42 | void *closure, | 62 | void *closure, |
43 | @@ -81,13 +91,17 @@ | 63 | @@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code, |
44 | struct ip * ip, icmphdr_t * icmp, int datalen); | 64 | struct ip * ip, icmphdr_t * icmp, int datalen); |
45 | 65 | ||
46 | union event { | 66 | union event { |
@@ -58,3 +78,6 @@ diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h | |||
58 | }; | 78 | }; |
59 | 79 | ||
60 | typedef struct ping_data PING; | 80 | typedef struct ping_data PING; |
81 | -- | ||
82 | 2.8.3 | ||
83 | |||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb index 58e760bcb..8db6b7417 100644 --- a/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb +++ b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb | |||
@@ -29,17 +29,18 @@ SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec9 | |||
29 | inherit autotools gettext update-alternatives texinfo | 29 | inherit autotools gettext update-alternatives texinfo |
30 | 30 | ||
31 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" | 31 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" |
32 | noipv6="${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}" | ||
33 | 32 | ||
34 | PACKAGECONFIG ??= "ftp uucpd \ | 33 | PACKAGECONFIG ??= "ftp uucpd \ |
35 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ |
35 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ | ||
36 | " | 36 | " |
37 | PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline" | 37 | PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline" |
38 | PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline" | 38 | PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline" |
39 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" | 39 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" |
40 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no," | ||
41 | PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," | ||
40 | 42 | ||
41 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ | 43 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ |
42 | ${noipv6} \ | ||
43 | inetutils_cv_path_login=${base_bindir}/login \ | 44 | inetutils_cv_path_login=${base_bindir}/login \ |
44 | --with-libreadline-prefix=${STAGING_LIBDIR} \ | 45 | --with-libreadline-prefix=${STAGING_LIBDIR} \ |
45 | --enable-rpath=no \ | 46 | --enable-rpath=no \ |
@@ -56,8 +57,7 @@ do_install_append () { | |||
56 | install -m 0755 -d ${D}${base_sbindir} | 57 | install -m 0755 -d ${D}${base_sbindir} |
57 | install -m 0755 -d ${D}${sbindir} | 58 | install -m 0755 -d ${D}${sbindir} |
58 | install -m 0755 -d ${D}${sysconfdir}/xinetd.d | 59 | install -m 0755 -d ${D}${sysconfdir}/xinetd.d |
59 | mv ${D}${bindir}/ping ${D}${base_bindir}/ | 60 | mv ${D}${bindir}/ping* ${D}${base_bindir}/ |
60 | mv ${D}${bindir}/ping6 ${D}${base_bindir}/ | ||
61 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ | 61 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ |
62 | mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ | 62 | mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ |
63 | mv ${D}${bindir}/hostname ${D}${base_bindir}/ | 63 | mv ${D}${bindir}/hostname ${D}${base_bindir}/ |
@@ -135,7 +135,7 @@ ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig" | |||
135 | ALTERNATIVE_${PN}-ping = "ping" | 135 | ALTERNATIVE_${PN}-ping = "ping" |
136 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | 136 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" |
137 | 137 | ||
138 | ALTERNATIVE_${PN}-ping6 = "ping6" | 138 | ALTERNATIVE_${PN}-ping6 = "${@bb.utils.contains('PACKAGECONFIG', 'ping6', 'ping6', '', d)}" |
139 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | 139 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" |
140 | 140 | ||
141 | 141 | ||