diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-networking/recipes-support/ndisc6 | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/ndisc6')
4 files changed, 264 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch new file mode 100644 index 0000000000..eeae5326d9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch @@ -0,0 +1,34 @@ +From 1ee2c998933c4a3d7e7b386352cbdb12f270774c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 6 Sep 2017 20:50:48 -0700 +Subject: [PATCH] autogen: Do not symlink gettext.h from build host + +This will create a dependency on build host having gettext +installed which may not always be the case. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Inappropriate [Cross-compile specific] + autogen.sh | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index 3371011..bbc7add 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -25,12 +25,6 @@ echo "Running autoreconf ..." + autoreconf -sfi + unlink po/Makevars.template + +-for d in /usr /usr/local /opt/gettext /usr/pkg $HOME ; do +- if test -f $d/share/gettext/gettext.h ; then +- ln -sf $d/share/gettext/gettext.h include/gettext.h +- fi +-done +- + test -f "include/gettext.h" || { + echo "Error: can't find <gettext.h> convenience C header." + echo "Please put a link to it by hand as include/gettext.h" +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch new file mode 100644 index 0000000000..dc58b5b79e --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch @@ -0,0 +1,124 @@ +From 3a7d5396e633e6c02a4583be7faf3d79d0d33748 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Aug 2017 11:14:41 -0700 +Subject: [PATCH 1/2] replace VLAIS with malloc/free pair + +Makes it compatible with non-gnu compilers + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/trace-icmp.c | 7 +++++-- + src/trace-tcp.c | 14 ++++++++++---- + src/trace-udp.c | 7 +++++-- + 3 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/src/trace-icmp.c b/src/trace-icmp.c +index 842938e..c76cb54 100644 +--- a/src/trace-icmp.c ++++ b/src/trace-icmp.c +@@ -43,16 +43,19 @@ send_echo_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + struct + { + struct icmp6_hdr ih; +- uint8_t payload[plen - sizeof (struct icmp6_hdr)]; ++ uint8_t *payload; + } packet; + memset (&packet, 0, plen); ++ packet.payload = malloc(plen - sizeof (struct icmp6_hdr)); + + packet.ih.icmp6_type = ICMP6_ECHO_REQUEST; + packet.ih.icmp6_id = htons (getpid ()); + packet.ih.icmp6_seq = htons ((ttl << 8) | (n & 0xff)); + (void)port; + +- return send_payload (fd, &packet.ih, plen, ttl); ++ ssize_t ret = send_payload (fd, &packet.ih, plen, ttl); ++ free(packet.payload); ++ return ret; + } + + +diff --git a/src/trace-tcp.c b/src/trace-tcp.c +index 940f918..62d22ff 100644 +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -54,10 +54,11 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + struct + { + struct tcphdr th; +- uint8_t payload[plen - sizeof (struct tcphdr)]; ++ uint8_t *payload; + } packet; + + memset (&packet, 0, sizeof (packet)); ++ packet.payload = malloc(plen - sizeof (struct tcphdr)); + packet.th.th_sport = sport; + packet.th.th_dport = port; + packet.th.th_seq = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ()); +@@ -65,7 +66,9 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + packet.th.th_flags = TH_SYN | (ecn ? (TH_ECE | TH_CWR) : 0); + packet.th.th_win = htons (TCP_WINDOW); + +- return send_payload (fd, &packet, plen, ttl); ++ ssize_t ret = send_payload (fd, &packet, plen, ttl); ++ free(packet.payload); ++ return ret; + } + + +@@ -131,10 +134,11 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + struct + { + struct tcphdr th; +- uint8_t payload[plen - sizeof (struct tcphdr)]; ++ uint8_t *payload; + } packet; + + memset (&packet, 0, sizeof (packet)); ++ packet.payload = malloc(plen - sizeof (struct tcphdr)); + packet.th.th_sport = sport; + packet.th.th_dport = port; + packet.th.th_ack = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ()); +@@ -142,7 +146,9 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + packet.th.th_flags = TH_ACK; + packet.th.th_win = htons (TCP_WINDOW); + +- return send_payload (fd, &packet, plen, ttl); ++ ssize_t ret = send_payload (fd, &packet, plen, ttl); ++ free(packet.payload); ++ return ret; + } + + +diff --git a/src/trace-udp.c b/src/trace-udp.c +index 4adde6b..a6cbb07 100644 +--- a/src/trace-udp.c ++++ b/src/trace-udp.c +@@ -46,9 +46,10 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + struct + { + struct udphdr uh; +- uint8_t payload[plen - sizeof (struct udphdr)]; ++ uint8_t *payload; + } packet; + memset (&packet, 0, plen); ++ packet.payload = malloc(plen - sizeof (struct udphdr)); + + (void)n; + packet.uh.uh_sport = sport; +@@ -61,7 +62,9 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) + /*if (plen > sizeof (struct udphdr)) + packet.payload[0] = (uint8_t)ttl;*/ + +- return send_payload (fd, &packet, plen, ttl); ++ ssize_t ret = send_payload (fd, &packet, plen, ttl); ++ free(packet.payload); ++ return ret; + } + + +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch new file mode 100644 index 0000000000..3cc2ba80c2 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch @@ -0,0 +1,30 @@ +From 2a50154fbce38fd36be7e14f5cd4a8b03c65c72f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Aug 2017 11:15:37 -0700 +Subject: [PATCH 2/2] Do not undef _GNU_SOURCE + +There are functions from tcp.h which are under _GNU_SOURCE +in musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/trace-tcp.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/trace-tcp.c b/src/trace-tcp.c +index 62d22ff..380008e 100644 +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -21,7 +21,6 @@ + # include <config.h> + #endif + +-#undef _GNU_SOURCE + #define _DEFAULT_SOURCE 1 + + #include <string.h> +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb new file mode 100644 index 0000000000..cebc1d9cd8 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "This package includes some useful diagnostics tools for \ +IPv6 networks, including ndisc6, rdisc6, tcptraceroute6 and traceroute6." +SECTION = "net" +HOMEPAGE = "http://www.remlab.net/ndisc6/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +PV = "1.0.4+git${SRCPV}" +SRCREV = "4c794b5512d23c649def1f94a684225dcbb6ac3e" +SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \ + file://0001-replace-VLAIS-with-malloc-free-pair.patch \ + file://0002-Do-not-undef-_GNU_SOURCE.patch \ + file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools gettext + +EXTRA_OECONF += "PERL=${USRBINPATH}/perl" + +LDFLAGS += "-fuse-ld=gold" +LDFLAGS_remove_riscv64 = "-fuse-ld=gold" + +TOOLCHAIN = "gcc" + +USE_NLS = "yes" + +do_configure_prepend() { + cp ${STAGING_DATADIR_NATIVE}/gettext/gettext.h ${S}/include + ${S}/autogen.sh +} + +do_install_append () { + rm -rf ${D}${localstatedir} + # Enable SUID bit for applications that need it + chmod 4555 ${D}${bindir}/rltraceroute6 + chmod 4555 ${D}${bindir}/ndisc6 + chmod 4555 ${D}${bindir}/rdisc6 +} +ALLOW_EMPTY_${PN} = "1" + +# Split into seperate packages since we normal don't want them all +# The main package is left empty and therefore not created. +PACKAGES += "${PN}-ndisc6 ${PN}-tcpspray6 ${PN}-rdisc6 \ + ${PN}-tcptraceroute6 ${PN}-rltraceroute6 \ + ${PN}-tracert6 ${PN}-rdnssd ${PN}-misc" +FILES_${PN} = "" +FILES_${PN}-ndisc6 = "${bindir}/ndisc6" +FILES_${PN}-tcpspray6 = "${bindir}/tcpspray6" +FILES_${PN}-rdisc6 = "${bindir}/rdisc6" +FILES_${PN}-tcptraceroute6 = "${bindir}/tcptraceroute6" +FILES_${PN}-rltraceroute6 = "${bindir}/rltraceroute6" +FILES_${PN}-tracert6 = "${bindir}/tracert6" +FILES_${PN}-rdnssd = "${sbindir}/rdnssd ${sysconfdir}/rdnssd" +FILES_${PN}-misc = "${bindir}/dnssort ${bindir}/name2addr ${bindir}/tcpspray ${bindir}/addr2name" + +DESCRIPTION_${PN}-ndisc6 = "ICMPv6 Neighbor Discovery tool. \ +Performs IPv6 neighbor discovery in userland. Replaces arping from the \ +IPv4 world." +DESCRIPTION_${PN}-rdisc6 = "ICMPv6 Router Discovery tool. \ +Queries IPv6 routers on the network for advertised prefixes. Can be used \ +to detect rogue IPv6 routers, monitor legitimate IPv6 routers." +DESCRITPION_${PN}-tcpspray6 = "Performs bandwidth measurements of TCP \ +sessions between the local system and a remote echo server in either IPv6 \ +or IPv4." + +DESCRITPION_${PN}-rdnssd = "Daemon to autoconfigure the list of DNS \ +servers through slateless IPv6 autoconfiguration." + +# The tcptraceroute6 and tracert6 commands depend on rltraceroute6 to +# perform the actual trace operation. +RDEPENDS_${PN}-tcptraceroute6 = "${PN}-rltraceroute6" +RDEPENDS_${PN}-tracert6 = "${PN}-rltraceroute6" +RDEPENDS_${PN}-misc += "perl" + |