summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support')
-rw-r--r--meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch31
-rw-r--r--meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb26
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch79
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-init-busybox.patch77
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-remove-bashism.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service16
-rw-r--r--meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb39
-rw-r--r--meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch51
-rw-r--r--meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch105
-rw-r--r--meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch63
-rw-r--r--meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf44
-rw-r--r--meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd58
-rw-r--r--meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb134
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb29
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc9
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch17
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb57
-rw-r--r--meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb33
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc83
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb8
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq1
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper62
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service17
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf298
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf84
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init117
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch66
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service14
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket14
-rw-r--r--meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb71
-rw-r--r--meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb46
-rw-r--r--meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb45
-rw-r--r--meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb90
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron5
-rw-r--r--meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb33
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb14
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch31
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb21
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch115
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch249
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch87
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch13
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch36
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch207
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch23
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch220
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch26
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch61
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf8
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample40
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb96
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch97
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch63
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch39
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch48
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch13
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch58
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch193
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb63
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb10
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb4
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch20
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch184
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb49
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch184
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb44
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch22
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch176
-rw-r--r--meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb44
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch74
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest5
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb62
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch44
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch41
-rw-r--r--meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb36
-rw-r--r--meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb52
-rw-r--r--meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.31.bb27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb31
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch124
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb76
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch379
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb56
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb22
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb71
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netperf/files/init62
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch58
-rw-r--r--meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb66
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb13
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init107
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/nis.inc31
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service12
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb47
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch67
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service14
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb62
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch16
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb40
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch26
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch164
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch21
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch228
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb137
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch27
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf17
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd84
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list1
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service11
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate54
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default7
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp1
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service11
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb172
-rw-r--r--meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb29
-rw-r--r--meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb40
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch618
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch22
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch17
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch41
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service12
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper512
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch26
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch50
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb110
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn104
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf1
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service12
-rw-r--r--meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb67
-rw-r--r--meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb20
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch122
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb25
-rw-r--r--meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb13
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb17
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch17
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch126
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch74
-rw-r--r--meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb35
-rw-r--r--meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch99
-rw-r--r--meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb132
-rw-r--r--meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch54
-rw-r--r--meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb24
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch36
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest5
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb51
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch75
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch15
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb36
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service14
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch42
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb39
-rw-r--r--meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch47
-rw-r--r--meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb45
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc17
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb4
-rw-r--r--meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.9.3.bb16
-rw-r--r--meta-openembedded/meta-networking/recipes-support/wireshark/README45
-rw-r--r--meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch53
-rw-r--r--meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb73
-rw-r--r--meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb18
241 files changed, 12499 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch
new file mode 100644
index 000000000..ec89b7a53
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch
@@ -0,0 +1,27 @@
+From 38c97e590fde19213f6ba31e72d1c227db869427 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 31 Aug 2014 22:28:38 -0700
+Subject: [PATCH] aoe-stat.in: no bashism
+
+The checkbashisms shows there is no bashism, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ aoe-stat.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/aoe-stat.in b/aoe-stat.in
+index 50e6ac6..0c1d6f5 100755
+--- a/aoe-stat.in
++++ b/aoe-stat.in
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+ # aoe-stat - collate and present information about AoE storage
+ # Copyright 2012, CORAID, Inc., and licensed under GPL v.2.
+
+--
+1.7.9.5
+
diff --git a/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch
new file mode 100644
index 000000000..726d8c564
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch
@@ -0,0 +1,31 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 0c56ade..79f2e2b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -68,17 +68,17 @@ clean :
+ rm -f ${CONF_SCRIPTS} ${AOE_PING_OBJ} ${AOE_CFG_OBJ} ${SANCHECK_OBJ} ${PROGS}
+
+ aoeping : ${AOE_PING_OBJ}
+- ${CC} ${CFLAGS} -o $@ ${AOE_PING_OBJ}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_PING_OBJ}
+ aoeping.o : aoeping.c dat.h fns.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ linux.o : linux.c config.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ aoecfg: ${AOE_CFG_OBJ}
+- ${CC} ${CFLAGS} -o $@ ${AOE_CFG_OBJ}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_CFG_OBJ}
+ aoecfg.o : aoecfg.c dat.h fns.h
+ ${CC} ${CFLAGS} -o $@ -c $<
+ aoe-sancheck : ${SANCHECK_OBJ}
+- -$(CC) $(CFLAGS) -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
++ -$(CC) $(CFLAGS) ${LDFLAGS} -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
+ aoe-sancheck.o : aoe-sancheck.c
+ -$(CC) $(CFLAGS) -o $@ -c $<
+
diff --git a/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
new file mode 100644
index 000000000..9b73b442a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
@@ -0,0 +1,26 @@
+SUMMARY = "ATA over Ethernet Tools"
+DESCRIPTION = " \
+The aoetools are programs for users of the ATA over Ethernet (AoE)network \
+storage protocol, a simple protocol for using storage over anethernet LAN. \
+The vblade program (storage target) exports a blockdevice using AoE. \
+"
+HOMEPAGE = "http://sourceforge.net/projects/${BPN}"
+SECTION = "admin"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+RRECOMMENDS_${PN} = "kernel-module-aoe"
+
+SRC_URI = "http://sourceforge.net/projects/${BPN}/files/${BPN}/${BPN}-${PV}.tar.gz \
+ file://aoe-stat-no-bashism.patch \
+ file://makefile-add-ldflags.patch \
+ "
+SRC_URI[md5sum] = "bff30daa988a65f69d4448ce4726a6db"
+SRC_URI[sha256sum] = "fb5e2cd0de7644cc1ec04ee3aeb43211cf7445a0c19e13d6b3ed5a8fbdf215ff"
+
+# EXTRA_OEMAKE is typically: -e MAKEFLAGS=
+# the -e causes problems as CFLAGS is modified in the Makefile.
+EXTRA_OEMAKE = ""
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch
new file mode 100644
index 000000000..e8be45e6b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch
@@ -0,0 +1,79 @@
+From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 30 Mar 2017 12:33:51 -0700
+Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags
+
+This leaves room for setting CFLAGS in environment
+which OE uses to pass tweaks
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 15 +++++++--------
+ extensions/Makefile | 5 ++++-
+ 2 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7bead0d..336db6b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,15 +7,13 @@ LIBDIR:=$(PREFIX)/lib
+ BINDIR:=$(PREFIX)/sbin
+ MANDIR:=$(PREFIX)/man
+ man8dir=$(MANDIR)/man8
+-INITDIR:=/etc/rc.d/init.d
++INITDIR:=/etc/init.d
+ SYSCONFIGDIR:=/etc/sysconfig
+ DESTDIR:=
+
+ MANS = arptables.8 arptables-save.8 arptables-restore.8
+
+-COPT_FLAGS:=-O2
+-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
+-
++ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\"
+ ifndef ARPT_LIBDIR
+ ARPT_LIBDIR:=$(LIBDIR)/arptables
+ endif
+@@ -25,13 +23,13 @@ include extensions/Makefile
+ all: arptables libarptc/libarptc.a
+
+ arptables.o: arptables.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+
+ arptables-standalone.o: arptables-standalone.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+
+ libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+
+ libarptc/libarptc.a: libarptc/libarptc.o
+ $(AR) rcs $@ $<
+@@ -53,7 +51,8 @@ scripts: arptables-save arptables-restore arptables.sysv
+ install -m 0755 arptables-restore_ $(DESTDIR)$(BINDIR)/arptables-restore
+ cat arptables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > arptables.sysv_
+ if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
+- if test -d $(DESTDIR)$(INITDIR); then install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi
++ install -d $(DESTDIR)$(INITDIR)
++ install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables
+ rm -f arptables-save_ arptables-restore_ arptables.sysv_
+
+ .PHONY: install-man
+diff --git a/extensions/Makefile b/extensions/Makefile
+index 0189cc9..b046425 100644
+--- a/extensions/Makefile
++++ b/extensions/Makefile
+@@ -4,4 +4,7 @@ EXT_FUNC+=standard mangle CLASSIFY MARK
+ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
+
+ extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
+- $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
++
++extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
++ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch
new file mode 100644
index 000000000..0875344fe
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch
@@ -0,0 +1,30 @@
+arptables: fix the redefinition of 'arpt_get_target'
+
+Upstream-Status: Pending
+
+This function is already defined as a static inline function in
+include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the
+inline will not work, and the redefinition error will happen
+
+Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
+index 35736db..addd3f9 100644
+--- a/libarptc/libarptc_incl.c
++++ b/libarptc/libarptc_incl.c
+@@ -11,14 +11,6 @@
+ /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See
+ COPYING for details). */
+
+-#ifndef __OPTIMIZE__
+-STRUCT_ENTRY_TARGET *
+-GET_TARGET(STRUCT_ENTRY *e)
+-{
+- return (void *)e + e->target_offset;
+-}
+-#endif
+-
+ static int sockfd = -1;
+ static void *arptc_fn = NULL;
+
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-init-busybox.patch b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-init-busybox.patch
new file mode 100644
index 000000000..24956c4ca
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-init-busybox.patch
@@ -0,0 +1,77 @@
+Index: arptables-v0.0.3-4/arptables.sysv
+===================================================================
+--- arptables-v0.0.3-4.orig/arptables.sysv 2010-03-22 16:28:03.000000000 +0300
++++ arptables-v0.0.3-4/arptables.sysv 2010-03-22 16:27:51.000000000 +0300
+@@ -12,10 +12,10 @@
+ # config: __SYSCONFIG__/arptables
+
+ source /etc/init.d/functions
+-source /etc/sysconfig/network
++# source /etc/sysconfig/network
+
+ # Check that networking is up.
+-[ ${NETWORKING} = "no" ] && exit 0
++# [ ${NETWORKING} = "no" ] && exit 0
+
+ [ -x __EXEC_PATH__/arptables ] || exit 1
+ [ -x __EXEC_PATH__/arptables-save ] || exit 1
+@@ -28,32 +28,30 @@
+ desc="Arp filtering"
+
+ start() {
+- echo -n $"Starting $desc ($prog): "
++ echo -n "Starting $desc ($prog): "
+ __EXEC_PATH__/arptables-restore < __SYSCONFIG__/arptables || RETVAL=1
+
+ if [ $RETVAL -eq 0 ]; then
+- success "$prog startup"
+- rm -f /var/lock/subsys/$prog
++ echo "$prog ok"
++ touch /var/lock/subsys/$prog
+ else
+- failure "$prog startup"
++ echo "$prog failed"
+ fi
+
+- echo
+ return $RETVAL
+ }
+
+ stop() {
+- echo -n $"Stopping $desc ($prog): "
++ echo -n "Stopping $desc ($prog): "
+ __EXEC_PATH__/arptables-restore < /dev/null || RETVAL=1
+
+ if [ $RETVAL -eq 0 ]; then
+- success "$prog shutdown"
+- rm -f %{_localstatedir}/lock/subsys/$prog
++ echo "$prog stopped"
++ rm -f /var/lock/subsys/$prog
+ else
+- failure "$prog shutdown"
++ echo "$prog failed to stop"
+ fi
+
+- echo
+ return $RETVAL
+ }
+
+@@ -63,15 +61,14 @@
+ }
+
+ save() {
+- echo -n $"Saving $desc ($prog): "
++ echo -n "Saving $desc ($prog): "
+ __EXEC_PATH__/arptables-save > __SYSCONFIG__/arptables || RETVAL=1
+
+ if [ $RETVAL -eq 0 ]; then
+- success "$prog saved"
++ echo "$prog saved"
+ else
+- failure "$prog saved"
++ echo "$prog is not saved"
+ fi
+- echo
+ }
+
+ case "$1" in
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-remove-bashism.patch b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-remove-bashism.patch
new file mode 100644
index 000000000..f332658bc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-remove-bashism.patch
@@ -0,0 +1,37 @@
+From cd312bc0e3686404428878d23b8888cba09a20e1 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 18 Sep 2014 19:46:58 -0700
+Subject: [PATCH] arptables.sysv: remove bashism
+
+Use "." to replace of "source", and change /bin/bash to /bin/sh, the
+echo $"foo" works well in busybox.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ arptables.sysv | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arptables.sysv b/arptables.sysv
+index 7a90bd2..7710376 100644
+--- a/arptables.sysv
++++ b/arptables.sysv
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # init script for arptables
+ #
+@@ -11,7 +11,7 @@
+ #
+ # config: __SYSCONFIG__/arptables
+
+-source /etc/init.d/functions
++. /etc/init.d/functions
+ # source /etc/sysconfig/network
+
+ # Check that networking is up.
+--
+1.7.9.5
+
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service
new file mode 100644
index 000000000..f9fd56df0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Arp filtering arptables
+After=network.target
+Requires=network.target
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
+ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
+ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
+RemainAfterExit=yes
+ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null"
+ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables"
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb b/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
new file mode 100644
index 000000000..cec1d1f77
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Administration tool for arp packet filtering"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+SRCREV = "f4ab8f63f11a72f14687a6646d04ae1bae3fa45f"
+PV = "0.0.4+git${SRCPV}"
+
+SRC_URI = " \
+ git://git.netfilter.org/arptables \
+ file://0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch \
+ file://arptables-init-busybox.patch \
+ file://arptables-arpt-get-target-fix.patch \
+ file://arptables-remove-bashism.patch \
+ file://arptables.service \
+"
+SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
+SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
+
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE_${PN} = "arptables.service"
+
+inherit systemd
+
+EXTRA_OEMAKE = "'BINDIR=${sbindir}' 'MANDIR=${mandir}'"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
+ fi
+}
+
+RDEPENDS_${PN} += "perl"
+
+# the install target is not multi-job safe, but it doesn't do much
+# so we just install serially
+#
+PARALLEL_MAKEINST = "-j1"
diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
new file mode 100644
index 000000000..0a72c6b2c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
@@ -0,0 +1,40 @@
+From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:37:48 -0400
+Subject: [PATCH] build: don't ignore CFLAGS from environment
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We need to take them into account so as to behave nicely towards
+build environments which expect to be able to set them, e.g. for
+optimisation flags, or debug options.
+
+Therefore they need to be added to the compiler command line of
+every source file, and in addition, the same CFLAGS that were
+used during compilation must also always be used during linking!
+
+Upstream-Status: Pending
+
+Signed-off-by: André Draszik <git@andred.net>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ brctl/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/brctl/Makefile.in b/brctl/Makefile.in
+index e1956d6..eff260c 100644
+--- a/brctl/Makefile.in
++++ b/brctl/Makefile.in
+@@ -34,7 +34,7 @@ install: $(PROGRAMS)
+ $(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
+
+ brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a
+- $(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
++ $(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
+
+ %.o: %.c brctl.h
+ $(CC) $(CFLAGS) $(INCLUDE) -c $<
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
new file mode 100644
index 000000000..3f65761f5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
@@ -0,0 +1,51 @@
+From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:48:33 -0400
+Subject: [PATCH] libbridge: Modifying the AR to cross toolchain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Makefile uses the host “ar” tool when it should be using the ar from
+the target toolchain.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ configure.ac | 1 +
+ libbridge/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8b2e2ea..8426b7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,10 @@ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
+index 7932bfe..bd55e9b 100644
+--- a/libbridge/Makefile.in
++++ b/libbridge/Makefile.in
+@@ -1,7 +1,7 @@
+
+ KERNEL_HEADERS=-I@KERNEL_HEADERS@
+
+-AR=ar
++AR=@AR@
+ RANLIB=@RANLIB@
+
+ CC=@CC@
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
new file mode 100644
index 000000000..8a23a3070
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
@@ -0,0 +1,33 @@
+From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:18:20 -0400
+Subject: [PATCH] include missing kernel header
+
+Fixes errors like
+
+| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type
+| In file included from ../libbridge/libbridge.h:24:0,
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ libbridge/libbridge.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
+index c038b92..fd09306 100644
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -24,6 +24,7 @@
+ #include <sys/time.h>
+ #include <netinet/in.h>
+
++#include <linux/in6.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
new file mode 100644
index 000000000..1c87c48bf
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Tools for ethernet bridging"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
+
+SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606"
+
+SRC_URI = "\
+ git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \
+ file://kernel-headers.patch \
+ file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
+ file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \
+"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "sysfsutils"
+
+inherit autotools-brokensep update-alternatives
+
+ALTERNATIVE_${PN} = "brctl"
+ALTERNATIVE_PRIORITY[brctl] = "100"
+ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
+
+EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
+
+do_install_append () {
+ install -d ${D}/${datadir}/bridge-utils
+ install -d ${D}/${sysconfdir}/network/if-pre-up.d
+ install -d ${D}/${sysconfdir}/network/if-post-down.d
+}
+
+RRECOMMENDS_${PN} = "kernel-module-bridge"
diff --git a/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
new file mode 100644
index 000000000..5dd4c7d77
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
@@ -0,0 +1,105 @@
+From 7e1ae687916fd5878ee755afbdea6b10494e0b92 Mon Sep 17 00:00:00 2001
+From: Alexey Firago <alexey_firago@mentor.com>
+Date: Wed, 26 Jul 2017 23:21:25 +0300
+Subject: [PATCH] cmake: Install libcares.pc
+
+Prepare and install libcares.pc file during cmake build, so libraries
+using pkg-config to find libcares will not fail.
+
+Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
+---
+ CMakeLists.txt | 21 +++++++++++++++++++++
+ libcares.pc.cmakein | 20 ++++++++++++++++++++
+ 2 files changed, 41 insertions(+)
+ create mode 100644 libcares.pc.cmakein
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 364b6c7..0016b67 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -173,21 +173,29 @@ ADD_DEFINITIONS(${SYSFLAGS})
+
+
+ # Tell C-Ares about libraries to depend on
++# Also pass these libraries to pkg-config file
++SET(CARES_PRIVATE_LIBS_LIST)
+ IF (HAVE_LIBRESOLV)
+ LIST (APPEND CARES_DEPENDENT_LIBS resolv)
++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv")
+ ENDIF ()
+ IF (HAVE_LIBNSL)
+ LIST (APPEND CARES_DEPENDENT_LIBS nsl)
++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl")
+ ENDIF ()
+ IF (HAVE_LIBSOCKET)
+ LIST (APPEND CARES_DEPENDENT_LIBS socket)
++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket")
+ ENDIF ()
+ IF (HAVE_LIBRT)
+ LIST (APPEND CARES_DEPENDENT_LIBS rt)
++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt")
+ ENDIF ()
+ IF (WIN32)
+ LIST (APPEND CARES_DEPENDENT_LIBS ws2_32)
++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32")
+ ENDIF ()
++string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}")
+
+
+ # When checking for symbols, we need to make sure we set the proper
+@@ -489,6 +497,13 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
+ # Write ares_config.h configuration file. This is used only for the build.
+ CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
+
++# Pass required CFLAGS to pkg-config in case of static library
++IF (CARES_STATIC)
++ SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
++ENDIF()
++
++# Write ares_config.h configuration file. This is used only for the build.
++CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
+
+ # TRANSFORM_MAKEFILE_INC
+ #
+@@ -625,6 +640,12 @@ IF (CARES_INSTALL)
+ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR})
+ ENDIF ()
+
++# pkg-config file
++IF (CARES_INSTALL)
++ SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR})
++ENDIF ()
++
+ # Legacy chain-building variables (provided for compatibility with old code).
+ # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
+ SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
+diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein
+new file mode 100644
+index 0000000..f29fede
+--- /dev/null
++++ b/libcares.pc.cmakein
+@@ -0,0 +1,20 @@
++#***************************************************************************
++# Project ___ __ _ _ __ ___ ___
++# / __|____ / _` | '__/ _ \/ __|
++# | (_|_____| (_| | | | __/\__ \
++# \___| \__,_|_| \___||___/
++#
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: c-ares
++URL: http://daniel.haxx.se/projects/c-ares/
++Description: asynchronous DNS lookup library
++Version: @VERSION@
++Requires:
++Requires.private:
++Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
++Libs: -L${libdir} -lcares
++Libs.private: @CARES_PRIVATE_LIBS@
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
new file mode 100644
index 000000000..70e497f5f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
@@ -0,0 +1,24 @@
+# Copyright (c) 2012-2014 LG Electronics, Inc.
+SUMMARY = "c-ares is a C library that resolves names asynchronously."
+HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac"
+SRCREV = "3be1924221e1326df520f8498d704a5c4c8d0cce"
+PV = "1.13.0+gitr${SRCPV}"
+
+SRC_URI = "\
+ git://github.com/c-ares/c-ares.git \
+ file://cmake-install-libcares.pc.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+PACKAGES =+ "${PN}-utils"
+
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-utils = "${bindir}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
new file mode 100644
index 000000000..92a2dbd93
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
@@ -0,0 +1,63 @@
+ chrony: fix build failure for arma9
+
+ Eliminate references to syscalls not available
+ for ARM_EABI. Also add a dependency on libseccomp
+ which is needed for scfilter to work.
+
+ Set PACKAGECONFIG to not enable scfilter, since
+ kernel CONFIG_SECCOMP is unlikely to be set. This
+ aligns the usage of libseccomp with that of other packages.
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Joe Slater <jslater@windriver.com>
+
+ Refresh patch for new upstream version.
+
+ Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
+
+--- a/sys_linux.c
++++ b/sys_linux.c
+@@ -465,14 +465,14 @@ SYS_Linux_EnableSystemCallFilter(int lev
+ const int syscalls[] = {
+ /* Clock */
+ SCMP_SYS(adjtimex), SCMP_SYS(clock_gettime), SCMP_SYS(gettimeofday),
+- SCMP_SYS(settimeofday), SCMP_SYS(time),
++ SCMP_SYS(settimeofday),
+ /* Process */
+ SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getpid),
+- SCMP_SYS(getrlimit), SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
++ SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
+ SCMP_SYS(rt_sigprocmask), SCMP_SYS(set_tid_address), SCMP_SYS(sigreturn),
+ SCMP_SYS(wait4),
+ /* Memory */
+- SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap), SCMP_SYS(mmap2),
++ SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap2),
+ SCMP_SYS(mprotect), SCMP_SYS(mremap), SCMP_SYS(munmap), SCMP_SYS(shmdt),
+ /* Filesystem */
+ SCMP_SYS(access), SCMP_SYS(chmod), SCMP_SYS(chown), SCMP_SYS(chown32),
+@@ -483,14 +483,21 @@
+ SCMP_SYS(bind), SCMP_SYS(connect), SCMP_SYS(getsockname),
+ SCMP_SYS(recvfrom), SCMP_SYS(recvmmsg), SCMP_SYS(recvmsg),
+ SCMP_SYS(sendmmsg), SCMP_SYS(sendmsg), SCMP_SYS(sendto),
+- /* TODO: check socketcall arguments */
+- SCMP_SYS(socketcall),
+ /* General I/O */
+ SCMP_SYS(_newselect), SCMP_SYS(close), SCMP_SYS(open), SCMP_SYS(openat), SCMP_SYS(pipe),
+- SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex), SCMP_SYS(select),
++ SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex),
+ SCMP_SYS(set_robust_list), SCMP_SYS(write),
+ /* Miscellaneous */
+ SCMP_SYS(getrandom), SCMP_SYS(sysinfo), SCMP_SYS(uname),
++ /* not always available */
++#if ! defined(__ARM_EABI__)
++ SCMP_SYS(time),
++ SCMP_SYS(getrlimit),
++ SCMP_SYS(select),
++ SCMP_SYS(mmap),
++ /* TODO: check socketcall arguments */
++ SCMP_SYS(socketcall),
++#endif
+ };
+
+ const int socket_domains[] = {
diff --git a/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf
new file mode 100644
index 000000000..8d226d31a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf
@@ -0,0 +1,44 @@
+# Use public NTP servers from the pool.ntp.org project.
+# Please consider joining the pool project if possible by running your own
+# server(s).
+# If you are a vendor distributing a product using chrony, you *MUST*
+# read and comply with http://www.pool.ntp.org/vendors.html
+pool 0.openembedded.pool.ntp.org iburst
+
+# Use a local timeserver in preference to the pool, if it's reachable.
+#server 192.168.22.22 iburst minpoll 2 prefer
+
+# Sync to pulse-per-second from an onboard GPS.
+#refclock PPS /dev/pps0 poll 0 prefer
+# You'll want to enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO in your kernel,
+# and an entry something like this in your device tree:
+# pps {
+# compatible = "pps-gpio";
+# gpios = <&ps7_gpio_0 56 0>;
+# };
+
+# In first three updates step the system clock instead of slew
+# if the adjustment is larger than 1 second.
+makestep 1.0 3
+
+# Record the rate at which the system clock gains/loses time,
+# improving accuracy after reboot
+driftfile /var/lib/chrony/drift
+
+# Enable kernel synchronization of the hardware real-time clock (RTC).
+rtcsync
+
+# Allow NTP client access from local network.
+#allow 192.168/16
+
+# Serve time even if not synchronized to any NTP server.
+#local stratum 10
+
+# Specify file containing keys for NTP authentication.
+#keyfile /etc/chrony.keys
+
+# Specify directory for log files.
+logdir /var/log/chrony
+
+# Select which information is logged.
+#log measurements statistics tracking
diff --git a/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd
new file mode 100644
index 000000000..04f1b681c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+# System V init script for chrony
+# Adapted from the script already in meta-networking for ntpd
+
+### BEGIN INIT INFO
+# Provides: chrony
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Start chrony time daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/chronyd
+PIDFILE=/var/run/chronyd.pid
+
+test -x $DAEMON -a -r /etc/chrony.conf || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+# Functions to do individual actions
+startdaemon(){
+ echo -n "Starting chronyd: "
+ start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- "$@"
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping chronyd: "
+ start-stop-daemon --stop --quiet --oknodo -p $PIDFILE
+ echo "done"
+}
+
+case "$1" in
+ start)
+ startdaemon
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload | restart | reload)
+ stopdaemon
+ startdaemon
+ ;;
+ status)
+ status /usr/sbin/chronyd;
+ exit $?
+ ;;
+ *)
+ echo "Usage: chronyd { start | stop | status | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb b/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb
new file mode 100644
index 000000000..8b90a354e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb
@@ -0,0 +1,134 @@
+SUMMARY = "Versatile implementation of the Network Time Protocol"
+DESCRIPTION = "Chrony can synchronize the system clock with NTP \
+servers, reference clocks (e.g. GPS receiver), and manual input using \
+wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) \
+server and peer to provide a time service to other computers in the \
+network. \
+\
+It is designed to perform well in a wide range of conditions, \
+including intermittent network connections, heavily congested \
+networks, changing temperatures (ordinary computer clocks are \
+sensitive to temperature), and systems that do not run continuously, or \
+run on a virtual machine. \
+\
+Typical accuracy between two machines on a LAN is in tens, or a few \
+hundreds, of microseconds; over the Internet, accuracy is typically \
+within a few milliseconds. With a good hardware reference clock \
+sub-microsecond accuracy is possible. \
+\
+Two programs are included in chrony: chronyd is a daemon that can be \
+started at boot time and chronyc is a command-line interface program \
+which can be used to monitor chronyd's performance and to change \
+various operating parameters whilst it is running. \
+\
+This recipe produces two binary packages: 'chrony' which contains chronyd, \
+the configuration file and the init script, and 'chronyc' which contains \
+the client program only."
+
+HOMEPAGE = "https://chrony.tuxfamily.org/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \
+ file://chrony.conf \
+ file://chronyd \
+ file://arm_eabi.patch \
+"
+SRC_URI[md5sum] = "f4c4eb0dc92f35ee4bb7d3dcd8029ecb"
+SRC_URI[sha256sum] = "329f6718dd8c3ece3eee78be1f4821cbbeb62608e7d23f25da293cfa433c4116"
+
+DEPENDS = "pps-tools"
+
+# Note: Despite being built via './configure; make; make install',
+# chrony does not use GNU Autotools.
+inherit update-rc.d systemd
+
+# Configuration options:
+# - For command line editing support in chronyc, you may specify either
+# 'editline' or 'readline' but not both. editline is smaller, but
+# many systems already have readline for other purposes so you might want
+# to choose that instead. However, beware license incompatibility
+# since chrony is GPLv2 and readline versions after 6.0 are GPLv3+.
+# You can of course choose neither, but if you're that tight on space
+# consider dropping chronyc entirely (you can use it remotely with
+# appropriate chrony.conf options).
+# - Security-related:
+# - 'sechash' is omitted by default because it pulls in nss which is huge.
+# - 'privdrop' allows chronyd to run as non-root; would need changes to
+# chrony.conf and init script.
+# - 'scfilter' enables support for system call filtering, but requires the
+# kernel to have CONFIG_SECCOMP enabled.
+PACKAGECONFIG ??= "editline \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[readline] = "--without-editline,--without-readline,readline"
+PACKAGECONFIG[editline] = ",--without-editline,libedit"
+PACKAGECONFIG[sechash] = "--without-tomcrypt,--disable-sechash,nss"
+PACKAGECONFIG[privdrop] = ",--disable-privdrop,libcap"
+PACKAGECONFIG[scfilter] = "--enable-scfilter,--without-seccomp,libseccomp"
+PACKAGECONFIG[ipv6] = ",--disable-ipv6,"
+PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+
+# --disable-static isn't supported by chrony's configure script.
+DISABLE_STATIC = ""
+
+do_configure() {
+ ./configure --sysconfdir=${sysconfdir} --bindir=${bindir} --sbindir=${sbindir} \
+ --localstatedir=${localstatedir} --datarootdir=${datadir} \
+ ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+ # Binaries
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/chronyc ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -m 0755 ${S}/chronyd ${D}${sbindir}
+
+ # Config file
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir}
+
+ # System V init script
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d
+
+ # systemd unit configuration file
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
+
+ # Variable data (for drift and/or rtc file)
+ install -d ${D}${localstatedir}/lib/chrony
+
+ # Log files
+ install -d ${D}${localstatedir}/log/chrony
+
+ # Fix hard-coded paths in config files and init scripts
+ sed -i -e 's!/var/!${localstatedir}/!g' -e 's!/etc/!${sysconfdir}/!g' \
+ -e 's!/usr/sbin/!${sbindir}/!g' -e 's!/usr/bin/!${bindir}/!g' \
+ ${D}${sysconfdir}/chrony.conf \
+ ${D}${sysconfdir}/init.d/chronyd \
+ ${D}${systemd_unitdir}/system/chronyd.service
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
+ sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
+}
+
+FILES_${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}"
+CONFFILES_${PN} = "${sysconfdir}/chrony.conf"
+INITSCRIPT_NAME = "chronyd"
+INITSCRIPT_PARAMS = "defaults"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "chronyd.service"
+
+# It's probably a bad idea to run chrony and another time daemon on
+# the same system. systemd includes the SNTP client 'timesyncd', which
+# will be disabled by chronyd.service, however it will remain on the rootfs
+# wasting 150 kB unless you put 'PACKAGECONFIG_remove_pn-systemd = "timesyncd"'
+# in a conf file or bbappend somewhere.
+RCONFLICTS_${PN} = "ntp ntimed"
+
+# Separate the client program into its own package
+PACKAGES =+ "chronyc"
+FILES_chronyc = "${bindir}/chronyc"
diff --git a/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb b/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
new file mode 100644
index 000000000..198e3ef98
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem."
+HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils"
+SECTION = "otherosfs"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PV = "6.7"
+
+SRCREV = "8101a07871f185c7044fa2ca221b282ab4607c8b"
+SRC_URI = "git://git.samba.org/cifs-utils.git \
+ file://0001-mount.cifs-Remove-data_blob.h-include.patch \
+ "
+
+S = "${WORKDIR}/git"
+DEPENDS += "libtalloc"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap"
+# when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install_append is needed
+PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils"
+# when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install_append is needed
+PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 libtalloc keyutils"
+PACKAGECONFIG[cifsidmap] = "--enable-cifsidmap,--disable-cifsidmap,keyutils samba"
+PACKAGECONFIG[cifsacl] = "--enable-cifsacl,--disable-cifsacl,samba"
+PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disable-pam,libpam keyutils"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+ # Remove empty /usr/bin and /usr/sbin directories since the mount helper
+ # is installed to /sbin
+ rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
+}
+
+FILES_${PN} += "${base_libdir}/security"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug"
+RRECOMMENDS_${PN} = "kernel-module-cifs"
diff --git a/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch b/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch
new file mode 100644
index 000000000..07f2a5726
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
+
+From 272d523a57a4e8791d625a479128613be5e401f5 Mon Sep 17 00:00:00 2001
+From: Thomas Witt <pyromaniac@exherbo.org>
+Date: Wed, 15 Mar 2017 20:20:44 +0000
+Subject: [PATCH] mount.cifs: Remove data_blob.h include
+
+data_blob.h includes talloc.h from libtalloc, but that is only marked as
+a dependency for cifs.upcall. No symbols from that header are used by
+cifs.mount, so remove it to avoid the libtalloc dependency
+
+Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
+---
+ mount.cifs.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/mount.cifs.c b/mount.cifs.c
+index 13b71ef..2612feb 100644
+--- a/mount.cifs.c
++++ b/mount.cifs.c
+@@ -61,7 +61,6 @@
+ #include "mount.h"
+ #include "util.h"
+ #include "resolve_host.h"
+-#include "data_blob.h"
+
+ #ifndef MS_MOVE
+ #define MS_MOVE 8192
+--
+1.9.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb
new file mode 100644
index 000000000..31875ea50
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb
@@ -0,0 +1,25 @@
+require cim-schema.inc
+
+SECTION = "doc"
+
+LICENSE = "DMTF"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-Doc.zip \
+ file://LICENSE \
+ "
+SRC_URI[md5sum] = "3d01940bc1085c6c42184c25fb61f739"
+SRC_URI[sha256sum] = "3174cf0f8657b19d80dc59e184778d8e553da424728cb2966fe9d5428dd84267"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_unpack() {
+ unzip -q ${DL_DIR}/cim_schema_${PV}Final-Doc.zip -d ${S}
+ cp -f ${FILE_DIRNAME}/files/LICENSE ${WORKDIR}/
+}
+
+do_install() {
+ install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}-docs
+ cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/doc/cim-schema-${PV}-docs
+}
+
+FILES_${PN} = "${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
new file mode 100644
index 000000000..90ea882b7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
@@ -0,0 +1,29 @@
+require cim-schema.inc
+
+LICENSE = "DMTF"
+
+RCONFLICTS_${PN} = "cim-schema-final"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2500/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
+ file://LICENSE \
+"
+SRC_URI[md5sum] = "ee4ad6441a2b65ca60a3abc53e3ec629"
+SRC_URI[sha256sum] = "a44d67881325e267ef46b72eabe0c69f90470b1033b1ce7c26d9ba99072adb50"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_install() {
+ install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
+ install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
+ install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
+
+ cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
+ chown -R root:root ${D}${datadir}/mof/cimv${PV}
+ for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
+ sed -i -e 's/\r//g' $i
+ done
+ ln -s cimv${PV} ${D}${datadir}/mof/cim-current
+ ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
+}
+
+FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb
new file mode 100644
index 000000000..a14de46db
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb
@@ -0,0 +1,34 @@
+require cim-schema.inc
+
+LICENSE = "DMTF"
+
+RCONFLICTS_${PN} = "cim-schema-exper"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-MOFs.zip \
+ file://LICENSE \
+"
+SRC_URI[md5sum] = "a9bdf17c7374e3b5b7adeaac4842c4ad"
+SRC_URI[sha256sum] = "dbfa3064ea427acd71a4bebbc172ca2dc44b0b09a6d83b0945b9ffa988a9058a"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_unpack() {
+ unzip -q ${DL_DIR}/cim_schema_${PV}Final-MOFs.zip -d ${S}
+ cp -f ${FILE_DIRNAME}/files/LICENSE ${WORKDIR}/
+}
+
+do_install() {
+ install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
+ install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
+ install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
+
+ cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
+ chown -R root:root ${D}${datadir}/mof/cimv${PV}/
+ for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
+ sed -i -e 's/\r//g' $i
+ done
+ ln -s cimv${PV} ${D}${datadir}/mof/cim-current
+ ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
+}
+
+FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc
new file mode 100644
index 000000000..b9171e474
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc
@@ -0,0 +1,9 @@
+SUMMARY = "Common Information Model (CIM) Schema"
+DESCRIPTION = "Common Information Model (CIM) is a model for describing overall\
+management information in a network or enterprise environment. CIM\
+consists of a specification and a schema. The specification defines the\
+details for integration with other management models. The schema\
+provides the actual model descriptions."
+
+HOMEPAGE = "http://www.dmtf.org/"
+SECTION = "libs"
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE
new file mode 100644
index 000000000..54a28120e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE
@@ -0,0 +1,34 @@
+// Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF).
+// All rights reserved.
+// DMTF is a not-for-profit association of industry members dedicated
+// to promoting enterprise and systems management and interoperability.
+// DMTF specifications and documents may be reproduced by
+// members and non-members, provided that correct attribution is given.
+// As DMTF specifications may be revised from time to time,
+// the particular version and release date should always be noted.
+//
+// Implementation of certain elements of this standard or proposed
+// standard may be subject to third party patent rights, including
+// provisional patent rights (herein "patent rights"). DMTF makes
+// no representations to users of the standard as to the existence
+// of such rights, and is not responsible to recognize, disclose, or
+// identify any or all such third party patent right, owners or
+// claimants, nor for any incomplete or inaccurate identification or
+// disclosure of such rights, owners or claimants. DMTF shall have no
+// liability to any party, in any manner or circumstance, under any
+// legal theory whatsoever, for failure to recognize, disclose, or
+// identify any such third party patent rights, or for such party's
+// reliance on the standard or incorporation thereof in its product,
+// protocols or testing procedures. DMTF shall have no liability to
+// any party implementing such standard, whether such implementation
+// is foreseeable or not, nor to any patent owner or claimant, and shall
+// have no liability or responsibility for costs or losses incurred if
+// a standard is withdrawn or modified after publication, and shall be
+// indemnified and held harmless by any party implementing the
+// standard from any and all claims of infringement by a patent owner
+// for such implementations.
+//
+// For information about patents held by third-parties which have
+// notified the DMTF that, in their opinion, such patent may relate to
+// or impact implementations of DMTF standards, visit
+// http://www.dmtf.org/about/policies/disclosures.php.
diff --git a/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE b/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE
new file mode 100644
index 000000000..54a28120e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE
@@ -0,0 +1,34 @@
+// Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF).
+// All rights reserved.
+// DMTF is a not-for-profit association of industry members dedicated
+// to promoting enterprise and systems management and interoperability.
+// DMTF specifications and documents may be reproduced by
+// members and non-members, provided that correct attribution is given.
+// As DMTF specifications may be revised from time to time,
+// the particular version and release date should always be noted.
+//
+// Implementation of certain elements of this standard or proposed
+// standard may be subject to third party patent rights, including
+// provisional patent rights (herein "patent rights"). DMTF makes
+// no representations to users of the standard as to the existence
+// of such rights, and is not responsible to recognize, disclose, or
+// identify any or all such third party patent right, owners or
+// claimants, nor for any incomplete or inaccurate identification or
+// disclosure of such rights, owners or claimants. DMTF shall have no
+// liability to any party, in any manner or circumstance, under any
+// legal theory whatsoever, for failure to recognize, disclose, or
+// identify any such third party patent rights, or for such party's
+// reliance on the standard or incorporation thereof in its product,
+// protocols or testing procedures. DMTF shall have no liability to
+// any party implementing such standard, whether such implementation
+// is foreseeable or not, nor to any patent owner or claimant, and shall
+// have no liability or responsibility for costs or losses incurred if
+// a standard is withdrawn or modified after publication, and shall be
+// indemnified and held harmless by any party implementing the
+// standard from any and all claims of infringement by a patent owner
+// for such implementations.
+//
+// For information about patents held by third-parties which have
+// notified the DMTF that, in their opinion, such patent may relate to
+// or impact implementations of DMTF standards, visit
+// http://www.dmtf.org/about/policies/disclosures.php.
diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch
new file mode 100644
index 000000000..c9195b4f4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch
@@ -0,0 +1,24 @@
+support cross-compile for linux-os.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp ctdb-2.5.1.orig/configure ctdb-2.5.1/configure
+--- ctdb-2.5.1.orig/configure 2015-05-07 16:24:28.545000238 +0900
++++ ctdb-2.5.1/configure 2015-05-07 16:28:20.894000244 +0900
+@@ -10692,10 +10692,16 @@ if test x"$libreplace_cv_HAVE_GETADDRINF
+ # see bug 5910, use our replacements if we detect
+ # a broken system.
+ if test "$cross_compiling" = yes; then :
++ case "$target_os" in
++ *linux*)
++ ;;
++ *)
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "cannot run test program while cross compiling
+ See \`config.log' for more details" "$LINENO" 5; }
++ ;;
++ esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
new file mode 100644
index 000000000..1294fe41b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
@@ -0,0 +1,17 @@
+link rep_snprintf from lib/replace/snprintf.o for ltdbtool
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+Index: ctdb-2.5.6/Makefile.in
+===================================================================
+--- ctdb-2.5.6.orig/Makefile.in
++++ ctdb-2.5.6/Makefile.in
+@@ -176,7 +176,7 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.
+ @echo Linking $@
+ $(WRAPPER) $(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
+
+-bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ)
++bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ) lib/replace/snprintf.o
+ @echo Linking $@
+ $(WRAPPER) $(CC) $(CFLAGS) -o $@ $+ $(LIB_FLAGS)
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch
new file mode 100644
index 000000000..a7e987b85
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch
@@ -0,0 +1,25 @@
+From f02ff7383f1cc0c118732352ccbae476c7b3b3ba Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 17 Nov 2015 16:17:00 -0500
+Subject: [PATCH] service: ensure the PID directory is created
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ config/ctdb.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config/ctdb.service b/config/ctdb.service
+index ea37c30..8537105 100644
+--- a/config/ctdb.service
++++ b/config/ctdb.service
+@@ -5,6 +5,7 @@ After=network.target
+ [Service]
+ Type=forking
+ LimitCORE=infinity
++RuntimeDirectory=/run/ctdb
+ PIDFile=/run/ctdb/ctdbd.pid
+ ExecStart=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid start
+ ExecStop=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid stop
+--
+2.1.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb
new file mode 100644
index 000000000..b5a60645c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "CTDB is a cluster implementation of the TDB database \
+used by Samba and other projects to store temporary data. If an \
+application is already using TDB for temporary data it is very easy \
+to convert that application to be cluster aware and use CTDB instead."
+HOMEPAGE = "https://ctdb.samba.org/"
+LICENSE = "GPL-2.0+ & LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+ file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
+ "
+
+SRC_URI = "https://ftp.samba.org/pub/${BPN}/${BP}.tar.gz \
+ file://01-support-cross-compile-for-linux-os.patch \
+ file://02-link-rep_snprintf-for-ltdbtool.patch \
+ file://service-ensure-the-PID-directory-is-created.patch \
+ "
+
+SRC_URI[md5sum] = "efc50109f90a4c790124c35e4ba234ad"
+SRC_URI[sha256sum] = "fc1cdd7efcc91afc629f21408281bba5da107b9c17e74bdee2f28a532d14f874"
+
+inherit autotools-brokensep pkgconfig systemd
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libtdb] = "--without-included-tdb,--with-included-tdb,libtdb"
+
+PARALLEL_MAKE = ""
+
+DEPENDS += "popt libtevent libtalloc libldb"
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+# ctdbd_wrapper requires pgrep, hence procps
+RDEPENDS_${PN} += "procps"
+
+do_configure() {
+ oe_runconf
+}
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service
+ sed -i -e 's,\([=\ ]\)/run/,\1${localstatedir}/run/,' ${D}${systemd_unitdir}/system/ctdb.service
+
+ rm -r ${D}/${localstatedir}/run
+}
+
+# The systemd service is disabled by default, as the service will fail to
+# start without /etc/ctdb/nodes. If the user supplies this, they can re-enable
+# the service.
+SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "ctdb.service"
+
+# onnode is a shell script with bashisms and bash #!
+RDEPENDS_${PN} += "bash"
diff --git a/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
new file mode 100644
index 000000000..340f57dc7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
@@ -0,0 +1,33 @@
+SUMMARY = "C++ library for client-side URL transfers"
+HOMEPAGE = "http://www.curlpp.org/"
+SECTION = "libdevel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "curl"
+DEPENDS_class-native = "curl-native"
+
+SRC_URI = "git://github.com/jpbarrette/curlpp.git"
+
+SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig binconfig
+
+do_install_append () {
+ sed -i 's,${STAGING_DIR_TARGET},,g' ${D}${libdir}/pkgconfig/curlpp.pc
+}
+
+PACKAGES =+ "libcurlpp libcurlpp-dev libcurlpp-staticdev"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+
+FILES_lib${BPN}-dev = "${includedir} \
+ ${libdir}/pkgconfig \
+ ${bindir}/*-config \
+"
+
+FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
new file mode 100644
index 000000000..4f4bbf144
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -0,0 +1,83 @@
+SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server"
+HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SECTION = "net"
+# GPLv3 was added in version 2.41 as license option
+LICENSE = "GPLv2 | GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504"
+
+#at least versions 2.69 and prior are moved to the archive folder on the server
+SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
+ file://init \
+ file://dnsmasq.conf \
+ file://dnsmasq-resolvconf.service \
+ file://dnsmasq-noresolvconf.service \
+"
+
+inherit pkgconfig update-rc.d systemd
+
+INITSCRIPT_NAME = "dnsmasq"
+INITSCRIPT_PARAMS = "defaults"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[dbus] = ",,dbus"
+PACKAGECONFIG[idn] = ",,libidn"
+PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack"
+PACKAGECONFIG[lua] = ",,lua"
+PACKAGECONFIG[resolvconf] = ",,,resolvconf"
+EXTRA_OEMAKE = "\
+ 'COPTS=${@bb.utils.contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}"
+
+do_compile_append() {
+ # build dhcp_release
+ cd ${S}/contrib/lease-tools
+ oe_runmake
+}
+
+do_install () {
+ oe_runmake "PREFIX=${D}${prefix}" \
+ "BINDIR=${D}${bindir}" \
+ "MANDIR=${D}${mandir}" \
+ install
+ install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d
+ install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
+ install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
+
+ install -d ${D}${systemd_unitdir}/system
+
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
+ install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
+ else
+ install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
+ fi
+
+ install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir}
+
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'dbus', d)}" ]; then
+ install -d ${D}${sysconfdir}/dbus-1/system.d
+ install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/
+ fi
+ if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
+ install -d ${D}${sysconfdir}/resolvconf/update.d/
+ install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles
+ install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir}
+ fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "dnsmasq.service"
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
new file mode 100644
index 000000000..0991dd8b9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
@@ -0,0 +1,30 @@
+From be1b3d2d0f1608cba5efee73d6aac5ad0709041b Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 9 Sep 2014 10:24:58 -0400
+Subject: [PATCH] Upstream-status: Inappropriate [OE specific]
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 73ea23e..ed3eeb9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,8 +59,8 @@ idn2_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFI
+ idn2_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --libs libidn2`
+ ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack`
+ ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
+-lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2`
+-lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2`
++lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua`
++lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua`
+ nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
+ nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
+ gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
+--
+2.9.5
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb
new file mode 100644
index 000000000..4d1dc6e69
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.78.bb
@@ -0,0 +1,8 @@
+require dnsmasq.inc
+
+SRC_URI += "\
+ file://lua.patch \
+"
+
+SRC_URI[dnsmasq-2.78.md5sum] = "3bb97f264c73853f802bf70610150788"
+SRC_URI[dnsmasq-2.78.sha256sum] = "c92e5d78aa6353354d02aabf74590d08980bb1385d8a00b80ef9bc80430aa1dc"
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
new file mode 100644
index 000000000..f52ce4e8f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
@@ -0,0 +1 @@
+d root root 0755 /run/dnsmasq none
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
new file mode 100644
index 000000000..0c64fab00
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=DNS forwarder and DHCP server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dnsmasq.pid
+ExecStartPre=/usr/bin/dnsmasq --test
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
+ExecStop=/bin/kill $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper
new file mode 100644
index 000000000..db54d467e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# Borrowing heavily from the dnsmasq initscript's version of support for
+# resolvconf, intended for use in systemd-only configurations.
+#
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/dnsmasq
+NAME=dnsmasq
+
+# Most configuration options in /etc/default/dnsmasq are deprecated
+# but still honoured.
+if [ -r /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+start_resolvconf()
+{
+ # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
+ # Then dnsmasq won't be providing local DNS, so don't add it to
+ # the resolvconf server set.
+ for interface in $DNSMASQ_EXCEPT
+ do
+ [ $interface = lo ] && return
+ done
+
+ if [ -x /sbin/resolvconf ] ; then
+ echo "nameserver 127.0.0.1" |
+ /sbin/resolvconf -a lo.$NAME
+ fi
+ return 0
+}
+
+stop_resolvconf()
+{
+ if [ -x /sbin/resolvconf ] ; then
+ /sbin/resolvconf -d lo.$NAME
+ fi
+ return 0
+}
+
+case "$1" in
+ start)
+ start_resolvconf
+ exit 0
+ ;;
+ stop)
+ stop_resolvconf
+ exit 0
+ ;;
+ restart)
+ stop_resolvconf
+ start_resolvconf
+ exit 0
+ ;;
+ *)
+ echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
new file mode 100644
index 000000000..2980f7def
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=DNS forwarder and DHCP server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dnsmasq.pid
+ExecStartPre=/usr/bin/dnsmasq --test
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
+ExecStartPost=/usr/bin/dnsmasq-resolvconf-helper start
+ExecStopPre=/usr/bin/dnsmasq-resolvconf-helper stop
+ExecStop=/bin/kill $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
new file mode 100755
index 000000000..9e5ab9f81
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
@@ -0,0 +1,298 @@
+# Configuration file for dnsmasq.
+#
+# Format is one option per line, legal options are the same
+# as the long options legal on the command line. See
+# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
+
+# Listen on this specific port instead of the standard DNS port
+# (53). Setting this to zero completely disables DNS function,
+# leaving only DHCP and/or TFTP.
+#port=5353
+
+# Change these lines if you want dnsmasq to serve MX records.
+# Only one of mx-host and mx-target need be set, the other defaults
+# to the name of the host running dnsmasq.
+#mx-host=
+#mx-target=
+#selfmx
+#localmx
+
+# The following two options make you a better netizen, since they
+# tell dnsmasq to filter out queries which the public DNS cannot
+# answer, and which load the servers (especially the root servers)
+# uneccessarily. If you have a dial-on-demand link they also stop
+# these requests from bringing up the link uneccessarily.
+
+# Never forward plain names (with a dot or domain part)
+domain-needed
+# Never forward addresses in the non-routed address spaces.
+bogus-priv
+
+
+# Uncomment this to filter useless windows-originated DNS requests
+# which can trigger dial-on-demand links needlessly.
+# Note that (amongst other things) this blocks all SRV requests,
+# so don't use it if you use eg Kerberos.
+#filterwin2k
+
+# Change this line if you want dns to get its upstream servers from
+# somewhere other that /etc/resolv.conf
+#resolv-file=
+
+# By default, dnsmasq will send queries to any of the upstream
+# servers it knows about and tries to favour servers to are known
+# to be up. Uncommenting this forces dnsmasq to try each query
+# with each server strictly in the order they appear in
+# /etc/resolv.conf
+#strict-order
+
+# If you don't want dnsmasq to read /etc/resolv.conf or any other
+# file, getting its servers for this file instead (see below), then
+# uncomment this
+#no-resolv
+
+# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
+# files for changes and re-read them then uncomment this.
+#no-poll
+
+# Add other name servers here, with domain specs if they are for
+# non-public domains.
+#server=/localnet/192.168.0.1
+
+# Add local-only domains here, queries in these domains are answered
+# from /etc/hosts or DHCP only.
+#local=/localnet/
+
+# Add domains which you want to force to an IP address here.
+# The example below send any host in doubleclick.net to a local
+# webserver.
+#address=/doubleclick.net/127.0.0.1
+
+# You no longer (as of version 1.7) need to set these to enable
+# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the
+# "dip" group to achieve this.
+#user=
+#group=
+
+# If you want dnsmasq to listen for requests only on specified interfaces
+# (and the loopback) give the name of the interface (eg eth0) here.
+# Repeat the line for more than one interface.
+#interface=
+# Or you can specify which interface _not_ to listen on
+#except-interface=
+# Or which to listen on by address (remember to include 127.0.0.1 if
+# you use this.)
+#listen-address=127.0.0.1
+
+# On systems which support it, dnsmasq binds the wildcard address,
+# even when it is listening on only some interfaces. It then discards
+# requests that it shouldn't reply to. This has the advantage of
+# working even when interfaces come and go and change address. If you
+# want dnsmasq to really bind only the interfaces it is listening on,
+# uncomment this option. About the only time you may need this is when
+# running another nameserver on the same machine.
+#bind-interfaces
+
+# If you don't want dnsmasq to read /etc/hosts, uncomment the
+# following line.
+#no-hosts
+# or if you want it to read another file, as well as /etc/hosts, use
+# this.
+#addn-hosts=/etc/banner_add_hosts
+
+# Set this (and domain: see below) if you want to have a domain
+# automatically added to simple names in a hosts-file.
+#expand-hosts
+
+# Set the domain for dnsmasq. this is optional, but if it is set, it
+# does the following things.
+# 1) Allows DHCP hosts to have fully qualified domain names, as long
+# as the domain part matches this setting.
+# 2) Sets the "domain" DHCP option thereby potentially setting the
+# domain of all systems configured by DHCP
+# 3) Provides the domain part for "expand-hosts"
+#domain=thekelleys.org.uk
+
+# Uncomment this to enable the integrated DHCP server, you need
+# to supply the range of addresses available for lease and optionally
+# a lease time. If you have more than one network, you will need to
+# repeat this for each network on which you want to supply DHCP
+# service.
+#dhcp-range=192.168.0.50,192.168.0.150,12h
+#dhcp-range=10.0.0.10,10.0.0.200,2h
+
+# This is an example of a DHCP range where the netmask is given. This
+# is needed for networks we reach the dnsmasq DHCP server via a relay
+# agent. If you don't know what a DHCP relay agent is, you probably
+# don't need to worry about this.
+#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
+
+# This is an example of a DHCP range with a network-id, so that
+# some DHCP options may be set only for this network.
+#dhcp-range=red,192.168.0.50,192.168.0.150
+
+# Supply parameters for specified hosts using DHCP. There are lots
+# of valid alternatives, so we will give examples of each. Note that
+# IP addresses DO NOT have to be in the range given above, they just
+# need to be on the same network. The order of the parameters in these
+# do not matter, it's permissble to give name,adddress and MAC in any order
+
+# Always allocate the host with ethernet address 11:22:33:44:55:66
+# The IP address 192.168.0.60
+#dhcp-host=11:22:33:44:55:66,192.168.0.60
+
+# Always set the name of the host with hardware address
+# 11:22:33:44:55:66 to be "fred"
+#dhcp-host=11:22:33:44:55:66,fred
+
+# Always give the host with ethernet address 11:22:33:44:55:66
+# the name fred and IP address 192.168.0.60 and lease time 45 minutes
+#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
+
+# Give the machine which says it's name is "bert" IP address
+# 192.168.0.70 and an infinite lease
+#dhcp-host=bert,192.168.0.70,infinite
+
+# Always give the host with client identifier 01:02:02:04
+# the IP address 192.168.0.60
+#dhcp-host=id:01:02:02:04,192.168.0.60
+
+# Always give the host with client identifier "marjorie"
+# the IP address 192.168.0.60
+#dhcp-host=id:marjorie,192.168.0.60
+
+# Enable the address given for "judge" in /etc/hosts
+# to be given to a machine presenting the name "judge" when
+# it asks for a DHCP lease.
+#dhcp-host=judge
+
+# Never offer DHCP service to a machine whose ethernet
+# address is 11:22:33:44:55:66
+#dhcp-host=11:22:33:44:55:66,ignore
+
+# Ignore any client-id presented by the machine with ethernet
+# address 11:22:33:44:55:66. This is useful to prevent a machine
+# being treated differently when running under different OS's or
+# between PXE boot and OS boot.
+#dhcp-host=11:22:33:44:55:66,id:*
+
+# Send extra options which are tagged as "red" to
+# the machine with ethernet address 11:22:33:44:55:66
+#dhcp-host=11:22:33:44:55:66,net:red
+
+# Send extra options which are tagged as "red" to any machine whose
+# DHCP vendorclass string includes the substring "Linux"
+#dhcp-vendorclass=red,Linux
+
+# Send extra options which are tagged as "red" to any machine one
+# of whose DHCP userclass strings includes the substring "accounts"
+#dhcp-userclass=red,accounts
+
+# If this line is uncommented, dnsmasq will read /etc/ethers and act
+# on the ethernet-address/IP pairs found there just as if they had
+# been given as --dhcp-host options. Useful if you keep
+# MAC-address/host mappings there for other purposes.
+#read-ethers
+
+# Send options to hosts which ask for a DHCP lease.
+# See RFC 2132 for details of available options.
+# Note that all the common settings, such as netmask and
+# broadcast address, DNS server and default route, are given
+# sane defaults by dnsmasq. You very likely will not need any
+# any dhcp-options. If you use Windows clients and Samba, there
+# are some options which are recommended, they are detailed at the
+# end of this section.
+# For reference, the common options are:
+# subnet mask - 1
+# default router - 3
+# DNS server - 6
+# broadcast address - 28
+
+# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
+#dhcp-option=42,192.168.0.4,10.10.0.5
+
+# Set the NTP time server address to be the same machine as
+# is running dnsmasq
+#dhcp-option=42,0.0.0.0
+
+# Set the NIS domain name to "welly"
+#dhcp-option=40,welly
+
+# Set the default time-to-live to 50
+#dhcp-option=23,50
+
+# Set the "all subnets are local" flag
+#dhcp-option=27,1
+
+# Send the etherboot magic flag and then etherboot options (a string).
+#dhcp-option=128,e4:45:74:68:00:00
+#dhcp-option=129,NIC=eepro100
+
+# Specify an option which will only be sent to the "red" network
+# (see dhcp-range for the declaration of the "red" network)
+#dhcp-option=red,42,192.168.1.1
+
+# The following DHCP options set up dnsmasq in the same way as is specified
+# for the ISC dhcpcd in
+# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
+# adapted for a typical dnsmasq installation where the host running
+# dnsmasq is also the host running samba.
+# you may want to uncomment them if you use Windows clients and Samba.
+#dhcp-option=19,0 # option ip-forwarding off
+#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
+#dhcp-option=45,0.0.0.0 # netbios datagram distribution server
+#dhcp-option=46,8 # netbios node type
+#dhcp-option=47 # empty netbios scope.
+
+
+# Set the boot filename and tftpd server name and address
+# for BOOTP. You will only need this is you want to
+# boot machines over the network.
+#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
+
+# Set the limit on DHCP leases, the default is 150
+#dhcp-lease-max=150
+
+# The DHCP server needs somewhere on disk to keep its lease database.
+# This defaults to a sane location, but if you want to change it, use
+# the line below.
+#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
+
+# Set the cachesize here.
+#cache-size=150
+
+# If you want to disable negative caching, uncomment this.
+#no-negcache
+
+# Normally responses which come form /etc/hosts and the DHCP lease
+# file have Time-To-Live set as zero, which conventionally means
+# do not cache further. If you are happy to trade lower load on the
+# server for potentially stale date, you can set a time-to-live (in
+# seconds) here.
+#local-ttl=
+
+# If you want dnsmasq to detect attempts by Verisign to send queries
+# to unregistered .com and .net hosts to its sitefinder service and
+# have dnsmasq instead return the correct NXDOMAIN response, uncomment
+# this line. You can add similar lines to do the same for other
+# registries which have implemented wildcard A records.
+#bogus-nxdomain=64.94.110.11
+
+# If you want to fix up DNS results from upstream servers, use the
+# alias option. This only works for IPv4.
+# This alias makes a result of 1.2.3.4 appear as 5.6.7.8
+#alias=1.2.3.4,5.6.7.8
+# and this maps 1.2.3.x to 5.6.7.x
+#alias=1.2.3.0,5.6.7.0,255.255.255.0
+
+# For debugging purposes, log each DNS query as it passes through
+# dnsmasq.
+#log-queries
+
+# Include a another lot of configuration options.
+#conf-file=/etc/dnsmasq.more.conf
+
+
+
+
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf
new file mode 100755
index 000000000..06cd25cec
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# Script to update the resolver list for dnsmasq
+#
+# N.B. Resolvconf may run us even if dnsmasq is not (yet) running.
+# If dnsmasq is installed then we go ahead and update the resolver list
+# in case dnsmasq is started later.
+#
+# Assumption: On entry, PWD contains the resolv.conf-type files.
+#
+# This file is part of the dnsmasq package.
+#
+
+set -e
+
+RUN_DIR="/run/dnsmasq"
+RSLVRLIST_FILE="${RUN_DIR}/resolv.conf"
+TMP_FILE="${RSLVRLIST_FILE}_new.$$"
+MY_NAME_FOR_RESOLVCONF="dnsmasq"
+
+[ -x /usr/bin/dnsmasq ] || exit 0
+[ -x /lib/resolvconf/list-records ] || exit 1
+
+PATH=/bin:/sbin
+
+report_err() { echo "$0: Error: $*" >&2 ; }
+
+# Stores arguments (minus duplicates) in RSLT, separated by spaces
+# Doesn't work properly if an argument itself contains whitespace
+uniquify()
+{
+ RSLT=""
+ while [ "$1" ] ; do
+ for E in $RSLT ; do
+ [ "$1" = "$E" ] && { shift ; continue 2 ; }
+ done
+ RSLT="${RSLT:+$RSLT }$1"
+ shift
+ done
+}
+
+if [ ! -d "$RUN_DIR" ] && ! mkdir --parents --mode=0755 "$RUN_DIR" ; then
+ report_err "Failed trying to create directory $RUN_DIR"
+ exit 1
+fi
+
+RSLVCNFFILES=""
+for F in $(/lib/resolvconf/list-records --after "lo.$MY_NAME_FOR_RESOLVCONF") ; do
+ case "$F" in
+ "lo.$MY_NAME_FOR_RESOLVCONF")
+ # Omit own record
+ ;;
+ lo.*)
+ # Include no more records after one for a local nameserver
+ RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
+ break
+ ;;
+ *)
+ RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
+ ;;
+ esac
+done
+
+NMSRVRS=""
+if [ "$RSLVCNFFILES" ] ; then
+ uniquify $(sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' $RSLVCNFFILES)
+ NMSRVRS="$RSLT"
+fi
+
+# Dnsmasq uses the mtime of $RSLVRLIST_FILE, with a resolution of one second,
+# to detect changes in the file. This means that if a resolvconf update occurs
+# within one second of the previous one then dnsmasq may fail to notice the
+# more recent change. To work around this problem we sleep one second here
+# if necessary in order to ensure that the new mtime is different.
+if [ -f "$RSLVRLIST_FILE" ] && [ "$(stat -c %X "$RSLVRLIST_FILE")" = "$(date +%s)" ] ; then
+ sleep 1
+fi
+
+clean_up() { rm -f "$TMP_FILE" ; }
+trap clean_up EXIT
+: >| "$TMP_FILE"
+for N in $NMSRVRS ; do echo "nameserver $N" >> "$TMP_FILE" ; done
+mv -f "$TMP_FILE" "$RSLVRLIST_FILE"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init
new file mode 100644
index 000000000..51c95dfed
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init
@@ -0,0 +1,117 @@
+#!/bin/sh
+DAEMON=/usr/bin/dnsmasq
+NAME=dnsmasq
+DESC="DNS forwarder and DHCP server"
+ARGS="-7 /etc/dnsmasq.d"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+if [ -r /etc/default/$NAME ]
+then
+ . /etc/default/$NAME
+fi
+
+DNSMASQ_CONF="/etc/dnsmasq.conf"
+test "/etc/dnsmasq.d/*" != '/etc/dnsmasq.d/*' && DNSMASQ_CONF="${DNSMASQ_CONF} /etc/dnsmasq.d/*"
+
+test -z "${PIDFILE}" && PIFILE="/run/dnsmasq.pid"
+
+if [ -z "$IGNORE_RESOLVCONF" ]
+then
+ egrep -h -q '^no-resolv' ${DNSMASQ_CONF} && IGNORE_RESOLVCONF="yes"
+fi
+
+# RESOLV_CONF:
+# If the resolvconf package is installed then use the resolv conf file
+# that it provides as the default. Otherwise use /etc/resolv.conf as
+# the default.
+#
+# If IGNORE_RESOLVCONF is set in /etc/default/dnsmasq or an explicit
+# filename is set there then this inhibits the use of the resolvconf-provided
+# information.
+#
+# Note that if the resolvconf package is installed it is not possible to
+# override it just by configuration in /etc/dnsmasq.conf, it is necessary
+# to set IGNORE_RESOLVCONF=yes in /etc/default/dnsmasq.
+
+test -z "$RESOLV_CONF" -a "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf && \
+ RESOLV_CONF=/run/dnsmasq/resolv.conf
+
+start_resolvconf()
+{
+ if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
+ then
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
+ fi
+ :
+}
+
+stop_resolvconf()
+{
+ if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
+ then
+ /sbin/resolvconf -d lo.$NAME
+ fi
+ :
+}
+
+case "$1" in
+ start)
+ echo -n "starting $DESC: $NAME... "
+ test -d /var/lib/misc/ || mkdir /var/lib/misc/
+ start-stop-daemon -S -x $DAEMON -- $ARGS \
+ ${RESOLV_CONF:+ -r $RESOLV_CONF} \
+ ${PIDFILE:+ -x $PIDFILE}
+ test $? -eq 0 && start_resolvconf
+ echo "done."
+ ;;
+ stop)
+ echo -n "stopping $DESC: $NAME... "
+ stop_resolvconf
+ start-stop-daemon -K -x $DAEMON
+ echo "done."
+ ;;
+ status)
+ echo -n "dnsmasq "
+ start-stop-daemon -q -K -t -x $DAEMON
+ RET=$?
+ if [ "$RET" = "0" ]; then
+ PID=`cat ${PIDFILE}`
+ echo "($PID) is running"
+ else
+ echo "is not running"
+ exit $RET
+ fi
+ ;;
+ restart)
+ echo "restarting $DESC: $NAME... "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ reload)
+ echo -n "reloading $DESC: $NAME... "
+ killall -HUP $(basename ${DAEMON})
+ echo "done."
+ ;;
+ systemd-start-resolvconf)
+ start_resolvconf
+ ;;
+ systemd-stop-resolvconf)
+ stop_resolvconf
+ ;;
+ systemd-exec)
+ test -d /var/lib/misc/ || mkdir /var/lib/misc/
+ exec $DAEMON --keep-in-foreground $ARGS \
+ ${RESOLV_CONF:+ -r $RESOLV_CONF} \
+ ${PIDFILE:+ -x $PIDFILE}
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb b/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb
new file mode 100644
index 000000000..ca59bd217
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb
@@ -0,0 +1,35 @@
+SUMMARY = "DNSSEC and DLV configuration and priming tool"
+DESCRIPTION = "\
+DNSSEC configuration and priming tool. Keys are required until the root \
+is signed, as well as for local unpublished DNSSEC keys to be preloaded \
+into the recursive nameserver. These DNSSEC configuration files can be \
+directly included in the bind or unbound nameserver configuration files. \
+dnssec-conf includes a commandline configuration client for Bind and \
+Unbound, known DNSSEC keys, URL's to official publication pages of keys, \
+and harvested keys, as well a script to harvest DNSKEY's from DNS. \
+See also: system-config-dnssec"
+HOMEPAGE = "https://github.com/xelerance/dnssec-conf"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
+DEPENDS += "xmlto-native docbook-xml-dtd4-native \
+ docbook-xsl-stylesheets-native libxslt-native"
+
+SRC_URI = "git://github.com/xelerance/dnssec-conf.git"
+SRCREV = "8e799683736b4a7b5e5e78f98fba0a6f48393537"
+
+S = "${WORKDIR}/git"
+
+do_install () {
+ rm -rf ${D}
+ make PREFIX=${prefix} DESTDIR=${D} ETCDIR=${D}${sysconfdir} install
+ # We no longer ship trust anchors. Most of these are in the DLV Registry now.
+ # and it prevents the problem of shipping outdated trust anchors.
+ # For DLV, we ship the ISC DLV Registry key
+ rm -rf ${D}${sysconfdir}/pki/dnssec-keys/harvest/*
+ rm -rf ${D}${sysconfdir}/pki/dnssec-keys/production/reverse/*
+ install -d -m 0755 ${D}${sysconfdir}/sysconfig
+ install -m 0644 packaging/fedora/dnssec.sysconfig ${D}${sysconfdir}/sysconfig/dnssec
+}
+
+RDEPENDS_${PN} = "python"
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
new file mode 100644
index 000000000..f86235076
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
@@ -0,0 +1,66 @@
+From 07150f3a27681e034f18ab2ed2b68914c1e10af6 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Sat, 18 Jul 2015 05:03:57 +0900
+Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements
+
+This is not completely safe, but it's the least invasive fix.
+
+Upstream-Status: pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.ac | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3b32614..94ec002 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -519,13 +519,10 @@ have_ioloop=no
+
+ if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
+ AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #include <sys/epoll.h>
+-
+- int main()
+- {
+- return epoll_create(5) < 1;
+- }
++ ], [
++ epoll_create(5) < 1;
+ ], [
+ i_cv_epoll_works=yes
+ ], [
+@@ -653,7 +650,7 @@ fi
+ dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
+ dnl * It may also be broken in AIX.
+ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #define _XOPEN_SOURCE 600
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -662,7 +659,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+ #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
+ possibly broken posix_fallocate
+ #endif
+- int main() {
++ ], [
+ int fd = creat("conftest.temp", 0600);
+ int ret;
+ if (fd == -1) {
+@@ -671,8 +668,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+ }
+ ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
+ unlink("conftest.temp");
+- return ret;
+- }
+ ], [
+ i_cv_posix_fallocate_works=yes
+ ], [
+--
+1.8.4.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
new file mode 100644
index 000000000..65ae9bf91
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
@@ -0,0 +1,38 @@
+From be9b3809b86fe593dbb16f0b981b3d315a27b799 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 22 Oct 2017 22:10:41 -0700
+Subject: [PATCH] doveadm: Fix parallel build
+
+Sometimes dovetail build fails with errors like
+
+doveadm-util.o: file not recognized: File truncated
+collect2: error: ld returned 1 exit status
+make[4]: *** [Makefile:812: test-doveadm-util] Error 1
+
+This is partial backport from
+
+https://github.com/dovecot/core/commit/b200bc3875fa06d42c8619865cc306c3297fcacc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/doveadm/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am
+index c644646..6ae9144 100644
+--- a/src/doveadm/Makefile.am
++++ b/src/doveadm/Makefile.am
+@@ -180,8 +180,8 @@ test_libs = \
+ ../lib/liblib.la
+ test_deps = $(noinst_LTLIBRARIES) $(test_libs)
+
+-test_doveadm_util_SOURCES = test-doveadm-util.c
+-test_doveadm_util_LDADD = doveadm-util.o $(test_libs) $(MODULE_LIBS)
++test_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c
++test_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS)
+ test_doveadm_util_DEPENDENCIES = $(test_deps)
+
+ check: check-am check-test
+--
+2.14.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service
new file mode 100644
index 000000000..ca250ea5d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Dovecot IMAP/POP3 email server
+After=local-fs.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/dovecot
+ExecStart=@SBINDIR@/dovecot -F
+ExecReload=/bin/kill -HUP $MAINPID
+NonBlocking=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket
new file mode 100644
index 000000000..556e1a850
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket
@@ -0,0 +1,14 @@
+[Unit]
+Description=Dovecot IMAP/POP3 email server activation socket
+
+[Socket]
+#dovecot expects separate IPv4 and IPv6 sockets
+BindIPv6Only=ipv6-only
+ListenStream=0.0.0.0:143
+ListenStream=[::]:143
+ListenStream=0.0.0.0:993
+ListenStream=[::]:993
+KeepAlive=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb
new file mode 100644
index 000000000..5ebda19eb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
+HOMEPAGE = "https://www.dovecot.org/"
+DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
+SECTION = "mail"
+LICENSE = "LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b"
+
+SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
+ file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
+ file://dovecot.service \
+ file://dovecot.socket \
+ file://0001-doveadm-Fix-parallel-build.patch \
+ "
+
+SRC_URI[md5sum] = "d61d1e923a22f9062cc9f47696882666"
+SRC_URI[sha256sum] = "e9483d68a7698d701bc06124fcf6e1b1f16380c2986c7ec0cf4e1475b9d0c218"
+
+DEPENDS = "openssl xz zlib bzip2 libcap icu"
+
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+inherit autotools pkgconfig systemd useradd
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
+
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+
+# From native build in armv7a-hf/eglibc
+CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
+ i_cv_gmtime_max_time_t=32 \
+ i_cv_signed_time_t=yes \
+ i_cv_mmap_plays_with_write=yes \
+ i_cv_fd_passing=yes \
+ i_cv_c99_vsnprintf=yes \
+ lib_cv___va_copy=yes \
+ lib_cv_va_copy=yes \
+ lib_cv_va_val_copy=yes \
+ "
+
+# hardcode epoll() to avoid running unsafe tests
+# BSD needs kqueue and uclibc poll()
+EXTRA_OECONF = " --with-ioloop=epoll \
+ --with-systemdsystemunitdir=${systemd_unitdir}/system"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+ install -d 755 ${D}/etc/dovecot
+ touch 644 ${D}/etc/dovecot/dovecot.conf
+ install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
+ -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
+GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
+
+FILES_${PN} += "${libdir}/dovecot/*plugin.so \
+ ${libdir}/dovecot/libfs_compress.so \
+ ${libdir}/dovecot/libssl_iostream_openssl.so"
+FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
+FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
+FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch
new file mode 100644
index 000000000..90dd1f861
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+Subject: Makefile.in: fix permission bits for drbd.service
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ scripts/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile.in b/scripts/Makefile.in
+index 402b93b..4a45407 100644
+--- a/scripts/Makefile.in
++++ b/scripts/Makefile.in
+@@ -65,7 +65,7 @@ endif
+ # yes, debian apparently allows installing both types from the same package
+ ifneq ($(initscripttype),sysv) # "systemd" or "both"
+ install -d $(DESTDIR)$(systemdunitdir)
+- install -m 755 drbd.service $(DESTDIR)$(systemdunitdir)/
++ install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
+ install -d $(DESTDIR)/lib/drbd/
+ install -m 755 drbd $(DESTDIR)/lib/drbd/
+ install -d $(DESTDIR)$(tmpfilesdir)/
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb
new file mode 100644
index 000000000..81f1cfec5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Distributed block device driver for Linux"
+DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
+DRBD mirrors a block device over the network to another machine.\
+Think of it as networked raid 1. It is a building block for\
+setting up high availability (HA) clusters."
+HOMEPAGE = "http://www.drbd.org/"
+SECTION = "admin"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+SRC_URI = "http://www.linbit.com/downloads/drbd/utils/archive/${BP}.tar.gz \
+ file://0001-Makefile.in-fix-permission-bits-for-drbd.service.patch \
+ "
+SRC_URI[md5sum] = "76ed6d3190cd77b00890f3365353124b"
+SRC_URI[sha256sum] = "297b77c9b3f88de2e7dae459234f2753ea4fc2805282b2d276e35cf51e292913"
+
+SYSTEMD_SERVICE_${PN} = "drbd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+inherit autotools-brokensep systemd
+
+EXTRA_OECONF = " \
+ --with-initdir=/etc/init.d \
+ --without-pacemaker \
+ --without-rgmanager \
+ --without-bashcompletion \
+ --with-distro debian \
+ --with-initscripttype=both \
+ --with-systemdunitdir=${systemd_unitdir}/system \
+ --without-manual\
+ "
+
+do_install_append() {
+ # don't install empty /var/lock to avoid conflict with base-files
+ rm -rf ${D}${localstatedir}/lock
+}
+
+RDEPENDS_${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy"
+
+# The drbd items are explicitly put under /lib when installed.
+#
+FILES_${PN} += "/run"
+FILES_${PN} += "${nonarch_base_libdir}/drbd \
+ ${nonarch_libdir}/drbd \
+ ${nonarch_libdir}/tmpfiles.d"
+FILES_${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
new file mode 100644
index 000000000..6414f7305
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
@@ -0,0 +1,24 @@
+If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
+does not build drbd.ko here. Under this circumstance do_install
+task is going to fail with a below error:
+-- snip --
+| install: cannot stat ‘drbd.ko’: No such file or directory
+| make[1]: *** [install] Error 1
+-- snip --
+
+So, check for kernel module existence before installing.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+--- drbd-9.0.1-1/drbd/Makefile 2016-07-03 06:54:19.421538690 -0700
++++ drbd-9.0.1-1/drbd/Makefile_mod 2016-07-03 06:53:18.938801628 -0700
+@@ -158,7 +158,7 @@ else
+ fi
+ install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ set -e ; for ko in $(MODOBJS); do \
+- install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
++ [ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
+ done
+ ifeq ($(DESTDIR),/)
+ ifeq ($(shell uname -r),$(KERNELRELEASE))
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb b/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
new file mode 100644
index 000000000..fa4d10b4c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Distributed block device driver for Linux"
+DESCRIPTION = "DRBD is a block device which is designed to build high \
+ availability clusters. This is done by mirroring a whole \
+ block device via (a dedicated) network. You could see \
+ it as a network raid-1."
+HOMEPAGE = "http://oss.linbit.com/drbd/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+DEPENDS = "virtual/kernel"
+
+SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \
+ file://check_existence_of_modules_before_installing.patch"
+
+SRC_URI[md5sum] = "c1dd58043f46e9926b579aa65d4ea980"
+SRC_URI[sha256sum] = "87f72d46db9bad926415b3ab9f5f1397de8c581d2e2ec1addbdd5ce2604e6123"
+inherit module
+
+EXTRA_OEMAKE += "KDIR='${STAGING_KERNEL_DIR}'"
+
+do_install () {
+ oe_runmake install DESTDIR="${D}"
+}
+
+PNBLACKLIST[drbd] = "implicit declaration of function 'setup_timer'; 4.15 head file issue?"
diff --git a/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb b/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
new file mode 100644
index 000000000..2da73e775
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
@@ -0,0 +1,45 @@
+SUMMARY = "User configurable send-only Mail Transfer Agent"
+DESCRIPTION = "ESMTP is a user-configurable relay-only MTA \
+with a sendmail-compatible syntax, based on libESMTP and \
+supporting the AUTH (including the CRAM-MD5 and NTLM SASL \
+mechanisms) and StartTLS SMTP extensions."
+HOMEPAGE = "http://esmtp.sourceforge.net/"
+SECTION = "net"
+
+DEPENDS = "libesmtp"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.bz2"
+
+# Have to set this or we get -L/lib in LDFLAGS
+EXTRA_OECONF = "--with-libesmtp=${STAGING_EXECPREFIXDIR}"
+
+inherit autotools update-alternatives
+
+ALTERNATIVE_${PN} = "sendmail"
+
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/esmtp"
+ALTERNATIVE_PRIORITY = "10"
+
+ALTERNATIVE_${PN}-doc += "mailq.1 newaliases.1 sendmail.1"
+ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
+ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
+ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
+
+SRC_URI[md5sum] = "79a9c1f9023d53f35bb82bf446150a72"
+SRC_URI[sha256sum] = "a0d26931bf731f97514da266d079d8bc7d73c65b3499ed080576ab606b21c0ce"
+
+do_install_append() {
+ # only one file /usr/lib/sendmail in ${D}${libdir}
+ rm -rf ${D}${libdir}
+}
+
+pkg_postinst_${PN}_linuxstdbase () {
+ # /usr/lib/sendmial is required by LSB core test
+ [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+}
+
+FILES_${PN} += "${libdir}/"
diff --git a/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb b/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
new file mode 100644
index 000000000..1d78288c8
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP"
+HOMEPAGE = "http://www.fetchmail.info/"
+DESCRIPTION = "Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC."
+SECTION = "mail"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbb509e0303f5ded1cbfc0cc8705f28c"
+
+DEPENDS = "openssl"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "61b66faad044afa26e142bb1791aa2b3"
+SRC_URI[sha256sum] = "79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850"
+
+inherit autotools gettext python-dir pythonnative
+
+EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}"
+
+PACKAGES =+ "fetchmail-python"
+FILES_fetchmail-python = "${libdir}/${PYTHON_DIR}/*"
diff --git a/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb b/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb
new file mode 100644
index 000000000..82e3bf073
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb
@@ -0,0 +1,25 @@
+SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts"
+DESCRIPTION = "fping is a ping like program which uses the Internet Control \
+Message Protocol (ICMP) echo request to determine if a target host is \
+responding. fping differs from ping in that you can specify any number of \
+targets on the command line, or specify a file containing the lists of \
+targets to ping. Instead of sending to one target until it times out or \
+replies, fping will send out a ping packet and move on to the next target \
+in a round-robin fashion."
+HOMEPAGE = "http://www.fping.org/"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=09d77789fe32be35acde9637a5ee39b1"
+
+SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz"
+SRC_URI[md5sum] = "2e17cb655aa4eb59b5a4a38a89e746ed"
+SRC_URI[sha256sum] = "09b8960e235341bae6000085d38106357eae656a79e0119bd27e816c9003656a"
+
+S = "${WORKDIR}/fping-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-ipv4"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb b/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb
new file mode 100644
index 000000000..0fd5f6fed
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb
@@ -0,0 +1,37 @@
+SUMMARY = "fwknop - Single Packet Authorization"
+HOMEPAGE = "http://www.cipherdyne.org/fwknop/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ "
+inherit autotools-brokensep
+
+SRC_URI = "http://www.cipherdyne.org/${BPN}/download/${BPN}-${PV}.tar.bz2 \
+ "
+
+SRC_URI[md5sum] = "e2c49e9674888a028bd443a55c3aaa22"
+SRC_URI[sha256sum] = "5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4"
+
+DEPENDS = "libpcap gpgme"
+
+EXTRA_OECONF = " --with-iptables=/usr/sbin/iptables \
+ "
+
+do_configure () {
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config
+
+ aclocal
+ libtoolize --automake --copy --force
+ autoconf
+ autoheader
+ automake -a
+ oe_runconf
+}
+
+PACKAGES =+ "${PN}-client ${PN}-daemon"
+
+FILES_${PN}-client = "${bindir}/fwknop"
+FILES_${PN}-daemon = "${sbindir}/fwknopd \
+ ${sysconfdir}/fwknop/access.conf \
+ ${sysconfdir}/fwknop/fwknopd.conf"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest b/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest
new file mode 100644
index 000000000..14e96191f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+pdir=`dirname $0`
+cd ${pdir}/tests
+for i in ./benchmark ./test-geoip-city ; do
+ ${i} 1>/dev/null 2>&1;
+ if [ $? == 0 ]; then
+ echo PASS: $i;
+ else
+ echo FAIL: $i;
+ fi;
+done
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest
new file mode 100644
index 000000000..5404c247b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# The tests contain hard-coded relative paths and must be
+# executed from $pdir.
+#
+pdir=`dirname $0`
+cd ${pdir}
+for i in t/*.t ; do
+ perl ${i} 1>/dev/null 2>&1;
+ if [ $? == 0 ]; then
+ echo PASS: $i;
+ else
+ echo FAIL: $i;
+ fi;
+done
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb
new file mode 100644
index 000000000..95147bdad
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb
@@ -0,0 +1,35 @@
+#
+# Copyright (C) 2014, 2015 Wind River Systems, Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+SUMMARY = "GeoIP perl API library to access location database"
+DESCRIPTION = "perl library for country/city/organization to IP address or hostname mapping"
+HOMEPAGE = "http://www.maxmind.com/app/ip-location"
+SECTION = "libdevel"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b7a36f55e8ba62aadd74e4f0886a405e"
+
+S = "${WORKDIR}/git"
+SRCREV = "47f7d49bd15cfc2e5f8c0f5c4068dc8bb0e10e96"
+SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https; \
+ file://run-ptest \
+"
+
+DEPENDS += "geoip"
+
+inherit cpan ptest
+
+EXTRA_CPANFLAGS = "LIBS='-L${STAGING_LIBDIR}' INC='-I${STAGING_INCDIR}'"
+
+
+# perl scripts and some special small data files
+#
+do_install_ptest () {
+ install -d -m 0755 ${D}${PTEST_PATH}/t/data
+
+ install ${S}/t/*.t* ${D}${PTEST_PATH}/t
+ install ${S}/t/data/* ${D}${PTEST_PATH}/t/data
+}
+
+FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Geo/IP/.debug"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb
new file mode 100644
index 000000000..3527d0cba
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb
@@ -0,0 +1,90 @@
+SUMMARY = "C library for country/city/organization to IP address or hostname mapping"
+DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \
+address or hostname originates from. It uses a file based database that is \
+accurate as of March 2003. This database simply contains IP blocks as keys, and \
+countries as values. This database should be more complete and accurate than \
+using reverse DNS lookups."
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "libdevel"
+
+SRC_URI = "git://github.com/maxmind/geoip-api-c.git \
+ http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz;apply=no;name=GeoIP-dat \
+ http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz;apply=no;name=GeoIPv6-dat \
+ http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz;apply=no;name=GeoLiteCity-dat \
+ http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz;apply=no;name=GeoLiteCityv6-dat \
+ file://run-ptest \
+"
+SRCREV = "3169a8a88808c8df862e0b0355f99c738cce9f7e"
+
+SRC_URI[GeoIP-dat.md5sum] = "37c84ead332dda0362a5ac7b049b72d4"
+SRC_URI[GeoIP-dat.sha256sum] = "79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07"
+
+SRC_URI[GeoIPv6-dat.md5sum] = "e75b84a4044e81d6d4484e33816bc762"
+SRC_URI[GeoIPv6-dat.sha256sum] = "a009b0f21968d2868e6dd19d14f3c3b8cd60ae84a4bfc2970df34d771a04811e"
+
+SRC_URI[GeoLiteCity-dat.md5sum] = "4b6588d0bfe1af22e267ac90aa97f769"
+SRC_URI[GeoLiteCity-dat.sha256sum] = "8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7"
+
+SRC_URI[GeoLiteCityv6-dat.md5sum] = "ad0cb42518af7f752499425dca0952bb"
+SRC_URI[GeoLiteCityv6-dat.sha256sum] = "eda67f4204ba9fa5204a53cdb629167cca9394c712f5378bc723a8c29c0b440f"
+
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \
+ file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-static \
+ --disable-dependency-tracking "
+
+do_install() {
+ make DESTDIR=${D} install
+ install -d ${D}/${datadir}/GeoIP
+ install ${WORKDIR}/GeoIP.dat ${D}/${datadir}/GeoIP/
+ install ${WORKDIR}/GeoIPv6.dat ${D}/${datadir}/GeoIP/
+ install ${WORKDIR}/GeoLiteCity.dat ${D}/${datadir}/GeoIP/
+ install ${WORKDIR}/GeoLiteCityv6.dat ${D}/${datadir}/GeoIP/
+ ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat
+}
+
+PACKAGES =+ "${PN}-database"
+FILES_${PN}-database = ""
+FILES_${PN}-database += "${datadir}/GeoIP/*"
+
+# We cannot do much looking up without databases.
+#
+RDEPENDS_${PN} += "${PN}-database"
+
+inherit ptest
+
+do_configure_ptest() {
+ sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \
+ -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \
+ ${S}/test/Makefile.am
+
+ if ! grep "^testdir = " ${S}/test/Makefile.am ; then
+ sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \
+ -i ${S}/test/Makefile.am
+ fi
+
+ sed -i -e "s:/usr/local/share:/usr/share:g" \
+ ${S}/test/benchmark.c
+
+ sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \
+ ${S}/test/test-geoip-city.c \
+ ${S}/test/test-geoip-isp.c \
+ ${S}/test/test-geoip-asnum.c \
+ ${S}/test/test-geoip-netspeed.c \
+ ${S}/test/test-geoip-org.c \
+ ${S}/test/test-geoip-region.c
+}
+
+
+do_install_ptest() {
+ oe_runmake -C test DESTDIR=${D} install-testPROGRAMS
+ install ${S}/test/*.txt ${D}${PTEST_PATH}/tests
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
new file mode 100644
index 000000000..134cfed1f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
@@ -0,0 +1,11 @@
+# The following UserId and LicenseKey are required placeholders:
+UserId 999999
+LicenseKey 000000000000
+
+# Include one or more of the following ProductIds:
+# * GeoLite2-City - GeoLite 2 City
+# * GeoLite2-Country - GeoLite2 Country
+# * 506 - GeoLite Legacy Country
+# * 517 - GeoLite Legacy ASN
+# * 533 - GeoLite Legacy City
+ProductIds GeoLite2-City GeoLite2-Country 506 517 533
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
new file mode 100644
index 000000000..40597a856
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
@@ -0,0 +1,5 @@
+# top of crontab
+MAILTO=your@email.com
+
+32 11 * * 4 /usr/local/bin/geoipupdate
+# end of crontab
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
new file mode 100644
index 000000000..f4eb2b799
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
+DESCRIPTION = "update databases for GeoIP"
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "net"
+
+DEPENDS = "zlib curl"
+
+SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.5.0/geoipupdate-2.5.0.tar.gz \
+ file://GeoIP.conf \
+ file://geoipupdate.cron \
+ "
+SRC_URI[md5sum] = "28f633c49ec87ab01ad3c0fb0228a696"
+SRC_URI[sha256sum] = "5119fd0e338cd083e886228b26679c64bcbaade8a815be092aecf865a610ab26"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "\
+file://ChangeLog.md;md5=11d2e31df0de2be3ccc3e2286c4dafcb \
+"
+FILES_${PN} = "/usr/share/GeoIP \
+ /etc/GeoIP.conf \
+ /etc/cron.d/geoipupdate.cron \
+ /usr/bin/geoipupdate \
+"
+inherit autotools
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}
+ install -d ${D}/${sysconfdir}/cron.d
+ install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
+ install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
new file mode 100644
index 000000000..ea28b34aa
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Configure network interfaces for parallel routing"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
+
+
+SRCREV = "42bfbb9beb924672ca86b86e9679ac3d6b87d992"
+SRC_URI = "git://anonscm.debian.org/collab-maint/ifenslave.git"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${S}/ifenslave ${D}${sbindir}/
+
+ install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
+ install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
+ install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
+ install -m 0644 -D ${S}/debian/ifenslave.8 ${D}${mandir}/man8/ifenslave.8
+}
+
+FILES_${PN}-doc_remove = "${mandir}"
+FILES_${PN} += "${mandir}/man8/ifenslave.8"
+
+RDEPENDS_${PN} = "man"
diff --git a/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb b/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb
new file mode 100644
index 000000000..0c8e494c1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb
@@ -0,0 +1,14 @@
+SUMMARY = "iftop does for network usage what top(1) does for CPU usage"
+HOMEPAGE = "http://www.ex-parrot.com/pdw/iftop/"
+SECTION = "net"
+DEPENDS = "libpcap ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=76498170798db0f4f0fb685a225f702f"
+
+SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz"
+SRC_URI[md5sum] = "7e6decb4958e8a4890cccac335239f24"
+SRC_URI[sha256sum] = "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97"
+
+inherit autotools-brokensep
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch b/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
new file mode 100644
index 000000000..38d306475
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
@@ -0,0 +1,31 @@
+From fd80c0599083013a1b583feba5d7473f52b35938 Mon Sep 17 00:00:00 2001
+From: Mariia Movchan <mmovchan@cisco.com>
+Date: Tue, 6 Mar 2018 16:03:39 +0200
+Subject: [PATCH] Makefile: pass extra linker flags
+
+Fixes
+ERROR: QA Issue: No GNU_HASH in the elf binary
+
+Upstream-Status: Pending
+
+Signed-off-by: Mariia Movchan <mmovchan@cisco.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8beff8f..047f02a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@ LIBS?=
+ VERSION=0.2.2
+ CC?=gcc
+ CFLAGS?=-O2 -g -Wall
+-LDFLAGS=$(LIBS)
++LDFLAGS+=$(LIBS)
+
+ ifeq ($(USE_GEOIP),yes)
+ ifeq ($(USE_DYN_GEOIP),yes)
+--
+2.15.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb b/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb
new file mode 100644
index 000000000..b45642404
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6."
+HOMEPAGE = "https://github.com/nmav/ipcalc"
+
+SECTION = "net"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+SRCREV = "8348808a7869ca8f25a5b5deeaa418c2f6d52758"
+SRC_URI = "\
+ git://github.com/nmav/ipcalc.git;protocol=https; \
+ file://0001-Makefile-pass-extra-linker-flags.patch \
+"
+
+export USE_GEOIP = "no"
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -m 0755 ${S}/ipcalc ${D}/${bindir}
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch
new file mode 100644
index 000000000..5c0914745
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch
@@ -0,0 +1,115 @@
+From 9135ca401186fb14e5e5110bbb04d1ccc480360a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Nov 2016 04:15:44 +0000
+Subject: [PATCH] Fix build with clang
+
+Fixes for following errors found by clang
+
+src/racoon/eaytest.c:316:6: error: comparison of array 'dnstr_w1' not equal to a null pointer is always true
+ [-Werror,-Wtautological-pointer-compare]
+ if (dnstr_w1 != NULL) {
+ ^~~~~~~~ ~~~~
+src/racoon/eaytest.c:326:6: error: comparison of array 'dnstr_w1' not equal to a null pointer is always true
+ [-Werror,-Wtautological-pointer-compare]
+ if (dnstr_w1 != NULL) {
+ ^~~~~~~~ ~~~~
+
+src/racoon/isakmp.c:1134:11: error: promoted type 'int' of K&R function parameter is not compatible with the
+ parameter type 'u_int8_t' (aka 'unsigned char') declared in a previous prototype [-Werror,-Wknr-promoted-parameter]
+ u_int8_t etype;
+ ^
+src/racoon/isakmp.c:184:48: note: previous declaration is here
+ struct sockaddr *, struct sockaddr *, u_int8_t));
+ ^
+ 1 error generated.
+
+src/racoon/racoonctl.c:1457:15: error: incompatible pointer types passing 'struct evt_async *' to parameter of type
+ 'caddr_t' (aka 'char *') [-Werror,-Wincompatible-pointer-types]
+ print_cfg(ec, len);
+ ^~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/racoon/eaytest.c | 4 ++--
+ src/racoon/isakmp.c | 10 +++++-----
+ src/racoon/racoonctl.c | 7 +++----
+ 3 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/src/racoon/eaytest.c b/src/racoon/eaytest.c
+index 1474bdc..d609e4f 100644
+--- a/src/racoon/eaytest.c
++++ b/src/racoon/eaytest.c
+@@ -313,7 +313,7 @@ certtest(ac, av)
+
+ printf("exact match: succeed.\n");
+
+- if (dnstr_w1 != NULL) {
++ if (dnstr_w1[0] != '\0') {
+ asn1dn = eay_str2asn1dn(dnstr_w1, strlen(dnstr_w1));
+ if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
+ errx(1, "asn1dn length wrong for wildcard 1\n");
+@@ -323,7 +323,7 @@ certtest(ac, av)
+ printf("wildcard 1 match: succeed.\n");
+ }
+
+- if (dnstr_w1 != NULL) {
++ if (dnstr_w1[0] != '\0') {
+ asn1dn = eay_str2asn1dn(dnstr_w2, strlen(dnstr_w2));
+ if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
+ errx(1, "asn1dn length wrong for wildcard 2\n");
+diff --git a/src/racoon/isakmp.c b/src/racoon/isakmp.c
+index 2672f7a..da7ebe8 100644
+--- a/src/racoon/isakmp.c
++++ b/src/racoon/isakmp.c
+@@ -567,7 +567,7 @@ isakmp_main(msg, remote, local)
+
+ /* it must be responder's 1st exchange. */
+ if (isakmp_ph1begin_r(msg, remote, local,
+- isakmp->etype) < 0)
++ (u_int8_t)isakmp->etype) < 0)
+ return -1;
+ break;
+
+@@ -1128,10 +1128,10 @@ isakmp_ph1begin_i(rmconf, remote, local)
+
+ /* new negotiation of phase 1 for responder */
+ static int
+-isakmp_ph1begin_r(msg, remote, local, etype)
+- vchar_t *msg;
+- struct sockaddr *remote, *local;
+- u_int8_t etype;
++isakmp_ph1begin_r(vchar_t *msg,
++ struct sockaddr *remote,
++ struct sockaddr *local,
++ u_int8_t etype)
+ {
+ struct isakmp *isakmp = (struct isakmp *)msg->v;
+ struct ph1handle *iph1;
+diff --git a/src/racoon/racoonctl.c b/src/racoon/racoonctl.c
+index da28ecd..bbf068e 100644
+--- a/src/racoon/racoonctl.c
++++ b/src/racoon/racoonctl.c
+@@ -1299,9 +1299,8 @@ print_evt(evtdump)
+ * Print ISAKMP mode config info (IP and banner)
+ */
+ void
+-print_cfg(buf, len)
+- caddr_t buf;
+- int len;
++print_cfg(caddr_t buf,
++ int len)
+ {
+ struct evt_async *evtdump = (struct evt_async *)buf;
+ struct isakmp_data *attr;
+@@ -1454,7 +1453,7 @@ handle_recv(combuf)
+ else if (evt_quit_event == ec->ec_type) {
+ switch (ec->ec_type) {
+ case EVT_PHASE1_MODE_CFG:
+- print_cfg(ec, len);
++ print_cfg((caddr_t)ec, len);
+ break;
+ default:
+ print_evt(ec);
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch
new file mode 100644
index 000000000..630ecdb5f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch
@@ -0,0 +1,249 @@
+From 7d9585be093c9cb2428b373c0b0088bb778942d0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 Mar 2017 21:37:47 -0700
+Subject: [PATCH] Fix header issues found with musl libc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libipsec/ipsec_strerror.h | 3 +++
+ src/libipsec/libpfkey.h | 4 +++-
+ src/racoon/admin.c | 2 +-
+ src/racoon/backupsa.c | 6 +++---
+ src/racoon/cftoken.l | 4 ++++
+ src/racoon/logger.h | 3 +++
+ src/racoon/misc.h | 3 +++
+ src/racoon/missing/crypto/sha2/sha2.h | 3 +++
+ src/racoon/netdb_dnssec.h | 3 +++
+ src/racoon/pfkey.c | 1 -
+ src/racoon/plog.h | 2 ++
+ src/racoon/str2val.h | 3 +++
+ src/racoon/vmbuf.h | 3 +++
+ src/setkey/extern.h | 3 ++-
+ src/setkey/setkey.c | 1 -
+ 15 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/src/libipsec/ipsec_strerror.h b/src/libipsec/ipsec_strerror.h
+index 2b4264f..dac66a1 100644
+--- a/src/libipsec/ipsec_strerror.h
++++ b/src/libipsec/ipsec_strerror.h
+@@ -34,6 +34,9 @@
+ #ifndef _IPSEC_STRERROR_H
+ #define _IPSEC_STRERROR_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ extern int __ipsec_errcode;
+ extern void __ipsec_set_strerror __P((const char *));
+
+diff --git a/src/libipsec/libpfkey.h b/src/libipsec/libpfkey.h
+index 61d2f2a..f7991b7 100644
+--- a/src/libipsec/libpfkey.h
++++ b/src/libipsec/libpfkey.h
+@@ -34,6 +34,9 @@
+ #ifndef _LIBPFKEY_H
+ #define _LIBPFKEY_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ #ifndef KAME_LIBPFKEY_H
+ #define KAME_LIBPFKEY_H
+
+@@ -43,7 +46,6 @@
+
+ #define PRIORITY_OFFSET_POSITIVE_MAX 0x3fffffff
+ #define PRIORITY_OFFSET_NEGATIVE_MAX 0x40000000
+-
+ struct sadb_msg;
+ extern void pfkey_sadump __P((struct sadb_msg *));
+ extern void pfkey_sadump_withports __P((struct sadb_msg *));
+diff --git a/src/racoon/admin.c b/src/racoon/admin.c
+index 4b1875b..03ea3f8 100644
+--- a/src/racoon/admin.c
++++ b/src/racoon/admin.c
+@@ -36,7 +36,6 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+-#include <sys/signal.h>
+ #include <sys/stat.h>
+ #include <sys/un.h>
+
+@@ -46,6 +45,7 @@
+ #include PATH_IPSEC_H
+
+
++#include <signal.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/src/racoon/backupsa.c b/src/racoon/backupsa.c
+index 82d74ca..95307ca 100644
+--- a/src/racoon/backupsa.c
++++ b/src/racoon/backupsa.c
+@@ -276,9 +276,9 @@ do { \
+ GETNEXTNUM(sa_args.a_keylen, strtoul);
+ GETNEXTNUM(sa_args.flags, strtoul);
+ GETNEXTNUM(sa_args.l_alloc, strtoul);
+- GETNEXTNUM(sa_args.l_bytes, strtouq);
+- GETNEXTNUM(sa_args.l_addtime, strtouq);
+- GETNEXTNUM(sa_args.l_usetime, strtouq);
++ GETNEXTNUM(sa_args.l_bytes, strtoull);
++ GETNEXTNUM(sa_args.l_addtime, strtoull);
++ GETNEXTNUM(sa_args.l_usetime, strtoull);
+ GETNEXTNUM(sa_args.seq, strtoul);
+
+ #undef GETNEXTNUM
+diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l
+index 1701922..787f4a9 100644
+--- a/src/racoon/cftoken.l
++++ b/src/racoon/cftoken.l
+@@ -77,6 +77,10 @@
+
+ #include "cfparse.h"
+
++#ifndef GLOB_TILDE
++#define GLOB_TILDE 0
++#endif
++
+ int yyerrorcount = 0;
+
+ #if defined(YIPS_DEBUG)
+diff --git a/src/racoon/logger.h b/src/racoon/logger.h
+index 3fd3e94..67af5f0 100644
+--- a/src/racoon/logger.h
++++ b/src/racoon/logger.h
+@@ -34,6 +34,9 @@
+ #ifndef _LOGGER_H
+ #define _LOGGER_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ struct log {
+ int head;
+ int siz;
+diff --git a/src/racoon/misc.h b/src/racoon/misc.h
+index 3e758d9..30d9825 100644
+--- a/src/racoon/misc.h
++++ b/src/racoon/misc.h
+@@ -34,6 +34,9 @@
+ #ifndef _MISC_H
+ #define _MISC_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ #define BIT2STR(b) bit2str(b, sizeof(b)<<3)
+
+ #ifdef HAVE_FUNC_MACRO
+diff --git a/src/racoon/missing/crypto/sha2/sha2.h b/src/racoon/missing/crypto/sha2/sha2.h
+index 42bcc2a..c043dfe 100644
+--- a/src/racoon/missing/crypto/sha2/sha2.h
++++ b/src/racoon/missing/crypto/sha2/sha2.h
+@@ -40,6 +40,9 @@
+ #ifndef __SHA2_H__
+ #define __SHA2_H__
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/src/racoon/netdb_dnssec.h b/src/racoon/netdb_dnssec.h
+index a11209d..98fd813 100644
+--- a/src/racoon/netdb_dnssec.h
++++ b/src/racoon/netdb_dnssec.h
+@@ -34,6 +34,9 @@
+ #ifndef _NETDB_DNSSEC_H
+ #define _NETDB_DNSSEC_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ #ifndef T_CERT
+ #define T_CERT 37 /* defined by RFC2538 section 2 */
+ #endif
+diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
+index 8f26c19..a06c30e 100644
+--- a/src/racoon/pfkey.c
++++ b/src/racoon/pfkey.c
+@@ -59,7 +59,6 @@
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #include <sys/queue.h>
+-#include <sys/sysctl.h>
+
+ #include <net/route.h>
+ #include <net/pfkeyv2.h>
+diff --git a/src/racoon/plog.h b/src/racoon/plog.h
+index ed43c8b..920c850 100644
+--- a/src/racoon/plog.h
++++ b/src/racoon/plog.h
+@@ -34,6 +34,8 @@
+ #ifndef _PLOG_H
+ #define _PLOG_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
+ #ifdef HAVE_STDARG_H
+ #include <stdarg.h>
+ #else
+diff --git a/src/racoon/str2val.h b/src/racoon/str2val.h
+index 4a7cec1..d3d698e 100644
+--- a/src/racoon/str2val.h
++++ b/src/racoon/str2val.h
+@@ -34,6 +34,9 @@
+ #ifndef _STR2VAL_H
+ #define _STR2VAL_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ extern caddr_t val2str __P((const char *, size_t));
+ extern char *str2val __P((const char *, int, size_t *));
+
+diff --git a/src/racoon/vmbuf.h b/src/racoon/vmbuf.h
+index 3f2f4ea..8287a00 100644
+--- a/src/racoon/vmbuf.h
++++ b/src/racoon/vmbuf.h
+@@ -34,6 +34,9 @@
+ #ifndef _VMBUF_H
+ #define _VMBUF_H
+
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
++
+ /*
+ * bp v
+ * v v
+diff --git a/src/setkey/extern.h b/src/setkey/extern.h
+index 6f439fa..a1d9d14 100644
+--- a/src/setkey/extern.h
++++ b/src/setkey/extern.h
+@@ -1,6 +1,7 @@
+ /* $NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $ */
+
+-
++#undef __P
++#define __P(protos) protos /* ANSI C prototypes */
+
+ void parse_init __P((void));
+ int parse __P((FILE **));
+diff --git a/src/setkey/setkey.c b/src/setkey/setkey.c
+index c400faa..51f8b75 100644
+--- a/src/setkey/setkey.c
++++ b/src/setkey/setkey.c
+@@ -40,7 +40,6 @@
+ #include <sys/socket.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
+-#include <sys/sysctl.h>
+ #include <err.h>
+ #include <netinet/in.h>
+ #include <net/pfkeyv2.h>
+--
+2.12.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch
new file mode 100644
index 000000000..d5602c03d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch
@@ -0,0 +1,33 @@
+From 738a9857be9c92ad2f70be88ccee238e3154a936 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe.macdonald@windriver.com>
+Date: Wed, 2 Oct 2013 14:20:37 -0400
+Subject: [PATCH] racoon/pfkey: avoid potential null-pointer dereference
+
+Building with -Werror=maybe-uninitialized revealed that 'remote' from
+pk_recvmigrate() could be used with uninitialized data in
+migrate_sp_ike_addresses(). Ensure it is always at a minimum assigned
+NULL.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
+---
+ src/racoon/pfkey.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
+index d00b166..e0dc1db 100644
+--- a/src/racoon/pfkey.c
++++ b/src/racoon/pfkey.c
+@@ -3352,7 +3352,7 @@ pk_recvmigrate(mhp)
+ struct sockaddr *old_saddr, *new_saddr;
+ struct sockaddr *old_daddr, *new_daddr;
+ struct sockaddr *old_local, *old_remote;
+- struct sockaddr *local, *remote;
++ struct sockaddr *local, *remote = NULL;
+ struct sadb_x_kmaddress *kmaddr;
+ struct sadb_x_policy *xpl;
+ struct sadb_x_ipsecrequest *xisr_list;
+--
+1.7.9.5
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch
new file mode 100644
index 000000000..13e9d73fc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch
@@ -0,0 +1,87 @@
+From e48b9097dce7bc2bfbb9e9c542124d3b5cebab39 Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Wed, 5 Mar 2014 13:39:14 +0000
+Subject: [PATCH] Don't link against libfl
+
+We can remove all references to yywrap by adding "%option noyywrap" statements
+to each flex source file that doesn't override yywrap. After this, we no longer
+need to link against libfl and so no longer get errors about undefined
+references to yylex.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+Upstream-status: Submitted 2014-03-11
+ see http://sourceforge.net/p/ipsec-tools/mailman/ipsec-tools-devel/thread/CANyK_8ewmxGA3vBVJW6s1APXPmxPR%2BDFWZ61EL8pCt288aKQ6w%40mail.gmail.com/#msg32088797
+---
+ src/libipsec/Makefile.am | 1 -
+ src/racoon/Makefile.am | 2 +-
+ src/racoon/cftoken.l | 2 ++
+ src/setkey/Makefile.am | 1 -
+ src/setkey/token.l | 2 ++
+ 5 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/libipsec/Makefile.am b/src/libipsec/Makefile.am
+index 6a4e3b3..df1e106 100644
+--- a/src/libipsec/Makefile.am
++++ b/src/libipsec/Makefile.am
+@@ -26,7 +26,6 @@ libipsec_la_SOURCES = \
+ # version is current:revision:age.
+ # See: http://www.gnu.org/manual/libtool-1.4.2/html_chapter/libtool_6.html#SEC32
+ libipsec_la_LDFLAGS = -version-info 0:1:0
+-libipsec_la_LIBADD = $(LEXLIB)
+
+ noinst_HEADERS = ipsec_strerror.h
+
+diff --git a/src/racoon/Makefile.am b/src/racoon/Makefile.am
+index dbaded9..0662957 100644
+--- a/src/racoon/Makefile.am
++++ b/src/racoon/Makefile.am
+@@ -38,7 +38,7 @@ racoon_SOURCES = \
+ cftoken.l cfparse.y prsa_tok.l prsa_par.y
+ EXTRA_racoon_SOURCES = isakmp_xauth.c isakmp_cfg.c isakmp_unity.c throttle.c \
+ isakmp_frag.c nattraversal.c security.c $(MISSING_ALGOS)
+-racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(LEXLIB) \
++racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) \
+ $(SECCTX_OBJS) vmbuf.o sockmisc.o misc.o ../libipsec/libipsec.la
+ racoon_DEPENDENCIES = \
+ $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(SECCTX_OBJS) \
+diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l
+index 490242c..1701922 100644
+--- a/src/racoon/cftoken.l
++++ b/src/racoon/cftoken.l
+@@ -106,6 +106,8 @@ static int incstackp = 0;
+ static int yy_first_time = 1;
+ %}
+
++%option noyywrap
++
+ /* common seciton */
+ nl \n
+ ws [ \t]+
+diff --git a/src/setkey/Makefile.am b/src/setkey/Makefile.am
+index 746c1f1..389e6cf 100644
+--- a/src/setkey/Makefile.am
++++ b/src/setkey/Makefile.am
+@@ -13,7 +13,6 @@ setkey_SOURCES = \
+
+ setkey_LDFLAGS = ../libipsec/libipsec.la
+ setkey_DEPENDENCIES = ../libipsec/libipsec.la
+-setkey_LDADD = $(LEXLIB)
+
+ noinst_HEADERS = vchar.h extern.h
+ man8_MANS = setkey.8
+diff --git a/src/setkey/token.l b/src/setkey/token.l
+index ad3d843..eb23b76 100644
+--- a/src/setkey/token.l
++++ b/src/setkey/token.l
+@@ -88,6 +88,8 @@
+ #endif
+ %}
+
++%option noyywrap
++
+ /* common section */
+ nl \n
+ ws [ \t]+
+--
+1.9.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
new file mode 100644
index 000000000..e9dd84aaa
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
@@ -0,0 +1,30 @@
+From a5c59f6a1479947d33dba5191724cc5fc88a614b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 10:39:57 -0700
+Subject: [PATCH 2/2] cfparse: clear memory equal to size of array
+
+Fixes compiler error
+cfparse.y: In function 'set_isakmp_proposal':
+cfparse.y:2567:3: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/racoon/cfparse.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/racoon/cfparse.y b/src/racoon/cfparse.y
+index 0d9bd67..5d9c67b 100644
+--- a/src/racoon/cfparse.y
++++ b/src/racoon/cfparse.y
+@@ -2564,7 +2564,7 @@ set_isakmp_proposal(rmconf)
+ plog(LLV_DEBUG2, LOCATION, NULL,
+ "encklen=%d\n", s->encklen);
+
+- memset(types, 0, ARRAYLEN(types));
++ memset(types, 0, sizeof(types));
+ types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
+ types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
+ types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
+--
+2.12.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch
new file mode 100644
index 000000000..8d270a62b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch
@@ -0,0 +1,13 @@
+Index: ipsec-tools-0.8.1/configure.ac
+===================================================================
+--- ipsec-tools-0.8.1.orig/configure.ac 2013-01-08 12:43:29.000000000 +0000
++++ ipsec-tools-0.8.1/configure.ac 2014-07-18 07:51:30.045555880 +0000
+@@ -6,7 +6,7 @@
+ AC_CONFIG_SRCDIR([configure.ac])
+ AC_CONFIG_HEADERS(config.h)
+
+-AM_INIT_AUTOMAKE(dist-bzip2)
++AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+ AC_ENABLE_SHARED(no)
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch
new file mode 100644
index 000000000..5286376ac
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch
@@ -0,0 +1,36 @@
+[PATCH] fix CVE-2015-4047
+
+Upstream-Status: Backport
+
+http://www.openwall.com/lists/oss-security/2015/05/20/1
+
+racoon/gssapi.c in IPsec-Tools 0.8.2 allows remote attackers to cause
+a denial of service (NULL pointer dereference and IKE daemon crash) via
+a series of crafted UDP requests.
+
+https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-4047
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ src/racoon/gssapi.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/racoon/gssapi.c b/src/racoon/gssapi.c
+index e64b201..1ad3b42 100644
+--- a/src/racoon/gssapi.c
++++ b/src/racoon/gssapi.c
+@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1)
+ gss_name_t princ, canon_princ;
+ OM_uint32 maj_stat, min_stat;
+
++ if (iph1->rmconf == NULL) {
++ plog(LLV_ERROR, LOCATION, NULL, "no remote config\n");
++ return -1;
++ }
++
+ gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
+ if (gps == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n");
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch
new file mode 100644
index 000000000..bd0796554
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2016-10396.patch
@@ -0,0 +1,207 @@
+Upstream-Status: Backport [https://anonscm.debian.org/cgit/pkg-ipsec-tools/pkg-ipsec-tools.git/plain/debian/patches/CVE-2016-10396.patch?id=62ac12648a4eb7c5ba5dba0f81998d1acf310d8b]
+
+Fix CVE-2016-10396.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+Description: Fix remotely exploitable DoS. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10396
+Source: vendor; https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51682
+Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867986
+
+Index: pkg-ipsec-tools/src/racoon/isakmp_frag.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp_frag.c
++++ pkg-ipsec-tools/src/racoon/isakmp_frag.c
+@@ -1,4 +1,4 @@
+-/* $NetBSD: isakmp_frag.c,v 1.5 2009/04/22 11:24:20 tteras Exp $ */
++/* $NetBSD: isakmp_frag.c,v 1.5.36.1 2017/04/21 16:50:42 bouyer Exp $ */
+
+ /* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */
+
+@@ -173,6 +173,43 @@ vendorid_frag_cap(gen)
+ return ntohl(hp[MD5_DIGEST_LENGTH / sizeof(*hp)]);
+ }
+
++static int
++isakmp_frag_insert(struct ph1handle *iph1, struct isakmp_frag_item *item)
++{
++ struct isakmp_frag_item *pitem = NULL;
++ struct isakmp_frag_item *citem = iph1->frag_chain;
++
++ /* no frag yet, just insert at beginning of list */
++ if (iph1->frag_chain == NULL) {
++ iph1->frag_chain = item;
++ return 0;
++ }
++
++ do {
++ /* duplicate fragment number, abort (CVE-2016-10396) */
++ if (citem->frag_num == item->frag_num)
++ return -1;
++
++ /* need to insert before current item */
++ if (citem->frag_num > item->frag_num) {
++ if (pitem != NULL)
++ pitem->frag_next = item;
++ else
++ /* insert at the beginning of the list */
++ iph1->frag_chain = item;
++ item->frag_next = citem;
++ return 0;
++ }
++
++ pitem = citem;
++ citem = citem->frag_next;
++ } while (citem != NULL);
++
++ /* we reached the end of the list, insert */
++ pitem->frag_next = item;
++ return 0;
++}
++
+ int
+ isakmp_frag_extract(iph1, msg)
+ struct ph1handle *iph1;
+@@ -224,39 +261,43 @@ isakmp_frag_extract(iph1, msg)
+ item->frag_next = NULL;
+ item->frag_packet = buf;
+
+- /* Look for the last frag while inserting the new item in the chain */
+- if (item->frag_last)
+- last_frag = item->frag_num;
++ /* Check for the last frag before inserting the new item in the chain */
++ if (item->frag_last) {
++ /* if we have the last fragment, indices must match */
++ if (iph1->frag_last_index != 0 &&
++ item->frag_last != iph1->frag_last_index) {
++ plog(LLV_ERROR, LOCATION, NULL,
++ "Repeated last fragment index mismatch\n");
++ racoon_free(item);
++ vfree(buf);
++ return -1;
++ }
+
+- if (iph1->frag_chain == NULL) {
+- iph1->frag_chain = item;
+- } else {
+- struct isakmp_frag_item *current;
++ last_frag = iph1->frag_last_index = item->frag_num;
++ }
+
+- current = iph1->frag_chain;
+- while (current->frag_next) {
+- if (current->frag_last)
+- last_frag = item->frag_num;
+- current = current->frag_next;
+- }
+- current->frag_next = item;
++ /* insert fragment into chain */
++ if (isakmp_frag_insert(iph1, item) == -1) {
++ plog(LLV_ERROR, LOCATION, NULL,
++ "Repeated fragment index mismatch\n");
++ racoon_free(item);
++ vfree(buf);
++ return -1;
+ }
+
+- /* If we saw the last frag, check if the chain is complete */
++ /* If we saw the last frag, check if the chain is complete
++ * we have a sorted list now, so just walk through */
+ if (last_frag != 0) {
++ item = iph1->frag_chain;
+ for (i = 1; i <= last_frag; i++) {
+- item = iph1->frag_chain;
+- do {
+- if (item->frag_num == i)
+- break;
+- item = item->frag_next;
+- } while (item != NULL);
+-
++ if (item->frag_num != i)
++ break;
++ item = item->frag_next;
+ if (item == NULL) /* Not found */
+ break;
+ }
+
+- if (item != NULL) /* It is complete */
++ if (i > last_frag) /* It is complete */
+ return 1;
+ }
+
+@@ -291,15 +332,9 @@ isakmp_frag_reassembly(iph1)
+ }
+ data = buf->v;
+
++ item = iph1->frag_chain;
+ for (i = 1; i <= frag_count; i++) {
+- item = iph1->frag_chain;
+- do {
+- if (item->frag_num == i)
+- break;
+- item = item->frag_next;
+- } while (item != NULL);
+-
+- if (item == NULL) {
++ if (item->frag_num != i) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "Missing fragment #%d\n", i);
+ vfree(buf);
+@@ -308,6 +343,7 @@ isakmp_frag_reassembly(iph1)
+ }
+ memcpy(data, item->frag_packet->v, item->frag_packet->l);
+ data += item->frag_packet->l;
++ item = item->frag_next;
+ }
+
+ out:
+Index: pkg-ipsec-tools/src/racoon/isakmp_inf.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp_inf.c
++++ pkg-ipsec-tools/src/racoon/isakmp_inf.c
+@@ -720,6 +720,7 @@ isakmp_info_send_nx(isakmp, remote, loca
+ #endif
+ #ifdef ENABLE_FRAG
+ iph1->frag = 0;
++ iph1->frag_last_index = 0;
+ iph1->frag_chain = NULL;
+ #endif
+
+Index: pkg-ipsec-tools/src/racoon/isakmp.c
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/isakmp.c
++++ pkg-ipsec-tools/src/racoon/isakmp.c
+@@ -1072,6 +1072,7 @@ isakmp_ph1begin_i(rmconf, remote, local)
+ iph1->frag = 1;
+ else
+ iph1->frag = 0;
++ iph1->frag_last_index = 0;
+ iph1->frag_chain = NULL;
+ #endif
+ iph1->approval = NULL;
+@@ -1176,6 +1177,7 @@ isakmp_ph1begin_r(msg, remote, local, et
+ #endif
+ #ifdef ENABLE_FRAG
+ iph1->frag = 0;
++ iph1->frag_last_index = 0;
+ iph1->frag_chain = NULL;
+ #endif
+ iph1->approval = NULL;
+Index: pkg-ipsec-tools/src/racoon/handler.h
+===================================================================
+--- pkg-ipsec-tools.orig/src/racoon/handler.h
++++ pkg-ipsec-tools/src/racoon/handler.h
+@@ -1,4 +1,4 @@
+-/* $NetBSD: handler.h,v 1.25 2010/11/17 10:40:41 tteras Exp $ */
++/* $NetBSD: handler.h,v 1.26 2017/01/24 19:23:56 christos Exp $ */
+
+ /* Id: handler.h,v 1.19 2006/02/25 08:25:12 manubsd Exp */
+
+@@ -141,6 +141,7 @@ struct ph1handle {
+ #endif
+ #ifdef ENABLE_FRAG
+ int frag; /* IKE phase 1 fragmentation */
++ int frag_last_index;
+ struct isakmp_frag_item *frag_chain; /* Received fragments */
+ #endif
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch
new file mode 100644
index 000000000..36efc4917
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch
@@ -0,0 +1,23 @@
+squahes below warning
+ warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
+
+Seen with glibc 2.20
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: ipsec-tools-0.8.2/src/include-glibc/glibc-bugs.h
+===================================================================
+--- ipsec-tools-0.8.2.orig/src/include-glibc/glibc-bugs.h 2006-09-09 09:22:08.000000000 -0700
++++ ipsec-tools-0.8.2/src/include-glibc/glibc-bugs.h 2014-09-03 22:27:22.551563888 -0700
+@@ -4,7 +4,11 @@
+ #define __GLIBC_BUGS_H__ 1
+
+ #define _XOPEN_SOURCE 500
++/* Legacy feature macro.*/
+ #define _BSD_SOURCE
++/* New feature macro that provides everything _BSD_SOURCE and
++ * _SVID_SOURCE provided and possibly more. */
++#define _DEFAULT_SOURCE
+
+ #include <features.h>
+ #include <sys/types.h>
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch
new file mode 100644
index 000000000..e82db087c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch
@@ -0,0 +1,220 @@
+racoon: Resend UPDATE message when received EINTR message
+
+Upstream-Status: Pending
+
+While kernel is processing the UPDATE message which is sent from racoon,
+it maybe interrupted by system signal and if this case happens,
+kernel responds with an EINTR message to racoon and kernel fails to
+establish the corresponding SA.
+Fix this problem by resend the UPDATE message when EINTR(Interrupted
+system call) error happens.
+
+Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
+---
+--- a/src/libipsec/libpfkey.h
++++ b/src/libipsec/libpfkey.h
+@@ -92,6 +92,12 @@
+ u_int16_t ctxstrlen; /* length of security context string */
+ };
+
++struct update_msg_info {
++ struct sadb_msg *update_msg;
++ int so;
++ int len;
++};
++
+ /* The options built into libipsec */
+ extern int libipsec_opt;
+ #define LIBIPSEC_OPT_NATT 0x01
+--- a/src/libipsec/pfkey.c
++++ b/src/libipsec/pfkey.c
+@@ -1219,7 +1219,8 @@
+ }
+ #endif
+
+-
++struct update_msg_info update_msg_send = {NULL, 0, 0};
++
+ /* sending SADB_ADD or SADB_UPDATE message to the kernel */
+ static int
+ pfkey_send_x1(struct pfkey_send_sa_args *sa_parms)
+@@ -1483,10 +1484,24 @@
+
+ /* send message */
+ len = pfkey_send(sa_parms->so, newmsg, len);
+- free(newmsg);
+
+- if (len < 0)
+- return -1;
++ if (newmsg->sadb_msg_type == SADB_UPDATE) {
++ if (update_msg_send.update_msg)
++ free(update_msg_send.update_msg);
++ update_msg_send.update_msg = newmsg;
++ update_msg_send.so = sa_parms->so;
++ update_msg_send.len = len;
++
++ if (len < 0) {
++ free(update_msg_send.update_msg);
++ update_msg_send.update_msg = NULL;
++ return -1;
++ }
++ } else {
++ free(newmsg);
++ if (len < 0)
++ return -1;
++ }
+
+ __ipsec_errcode = EIPSEC_NO_ERROR;
+ return len;
+--- a/src/racoon/session.c
++++ b/src/racoon/session.c
+@@ -100,6 +100,8 @@
+
+ #include "sainfo.h"
+
++extern struct update_msg_info update_msg_send;
++
+ struct fd_monitor {
+ int (*callback)(void *ctx, int fd);
+ void *ctx;
+@@ -348,6 +350,11 @@
+ close_sockets();
+ backupsa_clean();
+
++ if (update_msg_send.update_msg) {
++ free(update_msg_send.update_msg);
++ update_msg_send.update_msg = NULL;
++ }
++
+ plog(LLV_INFO, LOCATION, NULL, "racoon process %d shutdown\n", getpid());
+
+ exit(0);
+--- a/src/racoon/pfkey.c
++++ b/src/racoon/pfkey.c
+@@ -103,10 +103,12 @@
+ #include "crypto_openssl.h"
+ #include "grabmyaddr.h"
++#include "../libipsec/libpfkey.h"
+
+ #if defined(SADB_X_EALG_RIJNDAELCBC) && !defined(SADB_X_EALG_AESCBC)
+ #define SADB_X_EALG_AESCBC SADB_X_EALG_RIJNDAELCBC
+ #endif
+
++extern struct update_msg_info update_msg_send;
+ /* prototype */
+ static u_int ipsecdoi2pfkey_aalg __P((u_int));
+ static u_int ipsecdoi2pfkey_ealg __P((u_int));
+@@ -253,6 +255,13 @@
+ s_pfkey_type(msg->sadb_msg_type),
+ strerror(msg->sadb_msg_errno));
+
++ if (msg->sadb_msg_errno == EINTR &&
++ update_msg_send.update_msg) {
++ plog(LLV_DEBUG, LOCATION, NULL,
++ "pfkey update resend\n");
++ send(update_msg_send.so, (void *)update_msg_send.update_msg, (socklen_t)update_msg_send.len, 0);
++ }
++
+ goto end;
+ }
+
+@@ -498,6 +507,11 @@
+ {
+ flushsp();
+
++ if (update_msg_send.update_msg) {
++ free(update_msg_send.update_msg);
++ update_msg_send.update_msg = NULL;
++ }
++
+ if (pfkey_send_spddump(lcconf->sock_pfkey) < 0) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "libipsec sending spddump failed: %s\n",
+@@ -1295,6 +1309,8 @@
+ return 0;
+ }
+
++int update_received = 0;
++
+ static int
+ pk_recvupdate(mhp)
+ caddr_t *mhp;
+@@ -1307,6 +1323,13 @@
+ int incomplete = 0;
+ struct saproto *pr;
+
++ update_received = 1;
++
++ if (update_msg_send.update_msg) {
++ free(update_msg_send.update_msg);
++ update_msg_send.update_msg = NULL;
++ }
++
+ /* ignore this message because of local test mode. */
+ if (f_local)
+ return 0;
+@@ -4163,3 +4186,8 @@
+
+ return buf;
+ }
++
++int receive_from_isakmp()
++{
++ return pfkey_handler(NULL, lcconf->sock_pfkey);
++}
+--- a/src/racoon/pfkey.h
++++ b/src/racoon/pfkey.h
+@@ -71,5 +71,6 @@
+ extern u_int32_t pk_getseq __P((void));
+ extern const char *sadbsecas2str
+ __P((struct sockaddr *, struct sockaddr *, int, u_int32_t, int));
++extern int receive_from_isakmp __P((void));
+
+ #endif /* _PFKEY_H */
+--- a/src/racoon/isakmp_quick.c
++++ b/src/racoon/isakmp_quick.c
+@@ -774,6 +774,8 @@
+ return error;
+ }
+
++extern int update_received;
++
+ /*
+ * send to responder
+ * HDR*, HASH(3)
+@@ -892,6 +894,11 @@
+ }
+ plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n");
+
++ while (!update_received)
++ receive_from_isakmp();
++
++ update_received = 0;
++
+ /* Do ADD for responder */
+ if (pk_sendadd(iph2) < 0) {
+ plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n");
+@@ -1035,6 +1042,11 @@
+ }
+ plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n");
+
++ while (!update_received)
++ receive_from_isakmp();
++
++ update_received = 0;
++
+ /* Do ADD for responder */
+ if (pk_sendadd(iph2) < 0) {
+ plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n");
+@@ -1989,6 +2001,11 @@
+ }
+ plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n");
+
++ while (!update_received)
++ receive_from_isakmp();
++
++ update_received = 0;
++
+ /* Do ADD for responder */
+ if (pk_sendadd(iph2) < 0) {
+ plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n");
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch
new file mode 100644
index 000000000..e272bc20f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch
@@ -0,0 +1,26 @@
+Subject: [PATCH] ipsec-tools: racoon: check several invalid ivm
+
+Upstream-Status: Pending
+
+Add checking for invalid ivm, or it will crash racoon.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+---
+ isakmp_cfg.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff -urpN a/src/racoon/isakmp_cfg.c b/src/racoon/isakmp_cfg.c
+--- a/src/racoon/isakmp_cfg.c
++++ b/src/racoon/isakmp_cfg.c
+@@ -171,6 +171,11 @@ isakmp_cfg_r(iph1, msg)
+ iph1->mode_cfg->last_msgid != packet->msgid )
+ iph1->mode_cfg->ivm =
+ isakmp_cfg_newiv(iph1, packet->msgid);
++ if(iph1->mode_cfg->ivm == NULL) {
++ plog(LLV_ERROR, LOCATION, NULL,
++ "failed to create new IV\n");
++ return;
++ }
+ ivm = iph1->mode_cfg->ivm;
+
+ dmsg = oakley_do_decrypt(iph1, msg, ivm->iv, ivm->ive);
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch
new file mode 100644
index 000000000..de1bdb407
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch
@@ -0,0 +1,61 @@
+Subject: [PATCH] ipsec-tools: racoon: check several invalid pointers
+
+Upstream-Status: Pending
+
+Add checking for invalid pointers, or it will crash racoon.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+---
+ ipsec_doi.c | 5 +++--
+ isakmp_cfg.c | 7 +++++++
+ isakmp_quick.c | 6 ++++--
+ 3 files changed, 14 insertions(+), 4 deletions(-)
+
+diff -urpN a/src/racoon/ipsec_doi.c b/src/racoon/ipsec_doi.c
+--- a/src/racoon/ipsec_doi.c
++++ b/src/racoon/ipsec_doi.c
+@@ -3374,8 +3374,9 @@ ipsecdoi_chkcmpids( idt, ids, exact )
+
+ /* handle wildcard IDs */
+
+- if (idt == NULL || ids == NULL)
+- {
++ if (idt == NULL || ids == NULL ||
++ idt->v == NULL || idt->l == 0 ||
++ ids->v == NULL || ids->l == 0) {
+ if( !exact )
+ {
+ plog(LLV_DEBUG, LOCATION, NULL,
+diff -urpN a/src/racoon/isakmp_cfg.c b/src/racoon/isakmp_cfg.c
+--- a/src/racoon/isakmp_cfg.c
++++ b/src/racoon/isakmp_cfg.c
+@@ -1138,6 +1138,13 @@ isakmp_cfg_newiv(iph1, msgid)
+ return NULL;
+ }
+
++ if (iph1->ivm == NULL || iph1->ivm->iv == NULL ||
++ iph1->ivm->iv->v == NULL || iph1->ivm->iv->l == 0) {
++ plog(LLV_ERROR, LOCATION, NULL,
++ "isakmp_cfg_newiv called with invalid IV management\n");
++ return NULL;
++ }
++
+ if (ics->ivm != NULL)
+ oakley_delivm(ics->ivm);
+
+diff -urpN a/src/racoon/isakmp_quick.c b/src/racoon/isakmp_quick.c
+--- a/src/racoon/isakmp_quick.c
++++ b/src/racoon/isakmp_quick.c
+@@ -2243,8 +2243,10 @@ get_proposal_r(iph2)
+ int error = ISAKMP_INTERNAL_ERROR;
+
+ /* check the existence of ID payload */
+- if ((iph2->id_p != NULL && iph2->id == NULL)
+- || (iph2->id_p == NULL && iph2->id != NULL)) {
++ if ((iph2->id_p != NULL &&
++ (iph2->id == NULL || iph2->id->v == NULL || iph2->id->l == 0)) ||
++ (iph2->id != NULL &&
++ (iph2->id_p == NULL || iph2->id_p->v == NULL || iph2->id_p->l == 0))) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "Both IDs wasn't found in payload.\n");
+ return ISAKMP_NTYPE_INVALID_ID_INFORMATION;
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf
new file mode 100644
index 000000000..6b507508b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf
@@ -0,0 +1,8 @@
+# Defaults for racoon service
+# sourced by racoon.service
+# installed at /etc/default/racoon by the maintainer scripts
+#
+# This is a POSIX shell fragment
+#
+# Arguments to pass to racoon
+RACOON_ARGS=""
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample
new file mode 100644
index 000000000..2948a4a35
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample
@@ -0,0 +1,40 @@
+#
+# NOTE: This file will not be used if you use racoon-tool(8) to manage your
+# IPsec connections. racoon-tool will process racoon-tool.conf(5) and
+# generate a configuration (/var/lib/racoon/racoon.conf) and use it, instead
+# of this file.
+#
+# Simple racoon.conf
+#
+#
+# Please look in /usr/share/doc/racoon/examples for
+# examples that come with the source.
+#
+# Please read racoon.conf(5) for details, and alsoread setkey(8).
+#
+#
+# Also read the Linux IPSEC Howto up at
+# http://www.ipsec-howto.org/t1.html
+#
+log notify;
+path pre_shared_key "/etc/racoon/psk.txt";
+path certificate "/etc/racoon/certs";
+
+#remote 172.31.1.1 {
+# exchange_mode main,aggressive;
+# proposal {
+# encryption_algorithm 3des;
+# hash_algorithm sha1;
+# authentication_method pre_shared_key;
+# dh_group modp1024;
+# }
+# generate_policy off;
+#}
+#
+#sainfo address 192.168.203.10[any] any address 192.168.22.0/24[any] any {
+# pfs_group modp768;
+# encryption_algorithm 3des;
+# authentication_algorithm hmac_md5;
+# compression_algorithm deflate;
+#}
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service
new file mode 100644
index 000000000..a10e77027
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Racoon IKEv1 key management daemon for IPSEC
+After=syslog.target network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/racoon
+ExecStart=@SBINDIR@/racoon $RACOON_ARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
new file mode 100644
index 000000000..5cbeb15ad
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -0,0 +1,96 @@
+DESCRIPTION = "IPsec-Tools is a port of KAME's IPsec utilities to the \
+Linux-2.6 IPsec implementation."
+HOMEPAGE = "http://ipsec-tools.sourceforge.net/"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/libipsec/pfkey.c;beginline=6;endline=31;md5=bc9b7ff40beff19fe6bc6aef26bd2b24"
+
+DEPENDS = "virtual/kernel openssl readline flex-native bison-native"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV}.tar.bz2 \
+ file://0002-Don-t-link-against-libfl.patch \
+ file://configure.patch \
+ file://0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch \
+ file://racoon-check-invalid-pointers.patch \
+ file://racoon-check-invalid-ivm.patch \
+ file://glibc-2.20.patch \
+ file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \
+ file://racoon.conf.sample \
+ file://racoon.conf \
+ file://racoon.service \
+ file://fix-CVE-2015-4047.patch \
+ file://0001-Fix-build-with-clang.patch \
+ file://0001-Fix-header-issues-found-with-musl-libc.patch \
+ file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
+ file://fix-CVE-2016-10396.patch \
+ "
+SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
+SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
+
+inherit autotools systemd
+
+# Options:
+# --enable-adminport enable admin port
+# --enable-rc5 enable RC5 encryption (patented)
+# --enable-idea enable IDEA encryption (patented)
+# --enable-gssapi enable GSS-API authentication
+# --enable-hybrid enable hybrid, both mode-cfg and xauth support
+# --enable-frag enable IKE fragmentation payload support
+# --enable-stats enable statistics logging function
+# --enable-dpd enable dead peer detection
+# --enable-samode-unspec enable to use unspecified a mode of SA
+# --disable-ipv6 disable ipv6 support
+# --enable-natt enable NAT-Traversal (yes/no/kernel)
+# --enable-natt-versions=list list of supported NAT-T versions delimited by coma.
+# --with-kernel-headers=/lib/modules/<uname>/build/include
+# where your Linux Kernel headers are installed
+# --with-readline support readline input (yes by default)
+# --with-flex use directiory (default: no)
+# --with-flexlib=<LIB> specify flex library.
+# --with-openssl=DIR specify OpenSSL directory
+# --with-libradius=DIR specify libradius path (like/usr/pkg)
+# --with-libpam=DIR specify libpam path (like/usr/pkg)
+#
+# Note: if you give it the actual kernel headers it won't build, it actually
+# needs to point at the linux-libc-headers version of the kernel headers.
+#
+EXTRA_OECONF = "--with-kernel-headers=${STAGING_INCDIR} \
+ --with-readline \
+ --with-openssl=${STAGING_LIBDIR}/.. \
+ --without-libradius \
+ --disable-security-context \
+ --enable-shared \
+ --enable-dpd \
+ --enable-natt=yes \
+ --sysconfdir=${sysconfdir}/racoon \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}"
+
+# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527
+CFLAGS += "-fno-strict-aliasing"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,"
+PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux,"
+
+SYSTEMD_SERVICE_${PN} = "racoon.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/racoon
+ install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system
+
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service
+
+ install -d ${D}${sysconfdir}/default/
+ install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon
+ fi
+}
+
+FILES_${PN} += "${sysconfdir}/racoon/racoon.conf \
+ ${sysconfdir}/default/racoon"
diff --git a/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch
new file mode 100644
index 000000000..7c3dfe4a8
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch
@@ -0,0 +1,97 @@
+From 58292175115bae7a4c3600d3022e59ea57213025 Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <jianchuan.wang@windriver.com>
+Date: Mon, 12 Jan 2015 15:53:23 +0800
+Subject: [PATCH] Modify the Makefile for cross compile.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+---
+ Makefile | 23 ++++++-----------------
+ libipvs/Makefile | 3 +--
+ 2 files changed, 7 insertions(+), 19 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e4e03cc..461c021 100644
+--- a/Makefile
++++ b/Makefile
+@@ -35,10 +35,9 @@ ARCH = $(shell uname -m)
+ RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR = $(shell rpm --eval '%_specdir')
+
+-CC = gcc
+ INCLUDE =
+ SBIN = $(BUILD_ROOT)/sbin
+-MANDIR = usr/man
++MANDIR = usr/share/man
+ MAN = $(BUILD_ROOT)/$(MANDIR)/man8
+ INIT = $(BUILD_ROOT)/etc/rc.d/init.d
+ MKDIR = mkdir
+@@ -62,17 +61,7 @@ RPMBUILD = $(shell \
+ echo "/bin/rpm"; \
+ fi )
+
+-ifeq (,$(FORCE_GETOPT))
+-LIB_SEARCH = /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib
+-POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
+- if [ -f $$i/libpopt.a ]; then \
+- if nm $$i/libpopt.a | fgrep -q poptGetContext; then \
+- echo "-lpopt"; \
+- break; \
+- fi; \
+- fi; \
+-done)
+-endif
++POPT_LIB = -lpopt
+
+ ifneq (,$(POPT_LIB))
+ POPT_DEFINE = -DHAVE_POPT
+@@ -81,7 +70,7 @@ endif
+ OBJS = ipvsadm.o config_stream.o dynamic_array.o
+ LIBS = $(POPT_LIB)
+ ifneq (0,$(HAVE_NL))
+-LIBS += -lnl
++LIBS += -lnl-3 -lnl-genl-3
+ endif
+ DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
+ -DPE_LIST=\"$(PE_LIST)\" $(POPT_DEFINE)
+@@ -91,13 +80,13 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h ]; then \
+
+ .PHONY = all clean install dist distclean rpm rpms
+
+-all: libs ipvsadm
++all: ipvsadm
+
+ libs:
+ make -C libipvs
+
+-ipvsadm: $(OBJS) $(STATIC_LIBS)
+- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm: $(OBJS) libs
++ $(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
+
+ install: all
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
+diff --git a/libipvs/Makefile b/libipvs/Makefile
+index a527a7f..b7300ec 100644
+--- a/libipvs/Makefile
++++ b/libipvs/Makefile
+@@ -1,6 +1,5 @@
+ # Makefile for libipvs
+
+-CC = gcc
+ CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS += -DLIBIPVS_USE_NL
+@@ -18,7 +17,7 @@ SHARED_LIB = libipvs.so
+ all: $(STATIC_LIB) $(SHARED_LIB)
+
+ $(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
+- ar rv $@ $^
++ $(AR) rv $@ $^
+
+ $(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
+ $(CC) -shared -Wl,-soname,$@ -o $@ $^
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch
new file mode 100644
index 000000000..7896d6d1e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch
@@ -0,0 +1,63 @@
+From 2686213259b15df9cf1d969c5a14d62f14cfbaae Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <jianchuan.wang@windriver.com>
+Date: Thu, 8 Jan 2015 17:37:11 +0800
+Subject: [PATCH 2/2] Replace nl_handle to nl_sock.
+
+The nl_handle was replace with nl_sock in the libnl-3.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+---
+ libipvs/libipvs.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/libipvs/libipvs.c b/libipvs/libipvs.c
+index a157e18..21a9bfa 100644
+--- a/libipvs/libipvs.c
++++ b/libipvs/libipvs.c
+@@ -32,7 +32,7 @@ static void* ipvs_func = NULL;
+ struct ip_vs_getinfo ipvs_info;
+
+ #ifdef LIBIPVS_USE_NL
+-static struct nl_handle *sock = NULL;
++static struct nl_sock *sock = NULL;
+ static int family, try_nl = 1;
+ #endif
+
+@@ -73,7 +73,7 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
+ {
+ int err = EINVAL;
+
+- sock = nl_handle_alloc();
++ sock = nl_socket_alloc();
+ if (!sock) {
+ nlmsg_free(msg);
+ return -1;
+@@ -88,7 +88,7 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
+
+ /* To test connections and set the family */
+ if (msg == NULL) {
+- nl_handle_destroy(sock);
++ nl_socket_free(sock);
+ sock = NULL;
+ return 0;
+ }
+@@ -104,12 +104,12 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
+
+ nlmsg_free(msg);
+
+- nl_handle_destroy(sock);
++ nl_socket_free(sock);
+
+ return 0;
+
+ fail_genl:
+- nl_handle_destroy(sock);
++ nl_socket_free(sock);
+ sock = NULL;
+ nlmsg_free(msg);
+ errno = err;
+--
+1.8.3.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch
new file mode 100644
index 000000000..800114f2c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch
@@ -0,0 +1,39 @@
+From 2f4cdf70cf92d3a9503d8ff045ba277db40bb4e7 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Monday, 13 Apr 2015 14:12:37 -0400
+Subject: [PATCH] ipvsadm: remove dependency on bash
+
+The save/restore scripts are very simple and don't depend on any BASH
+features at all, so switch the interpreter to /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ ipvsadm-restore | 2 +-
+ ipvsadm-save | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ipvsadm-restore b/ipvsadm-restore
+index f24e1b3..a9fa8bc 100644
+--- a/ipvsadm-restore
++++ b/ipvsadm-restore
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-restore - Restore IPVS rules
+ #
+ # A very simple wrapper to restore IPVS rules
+diff --git a/ipvsadm-save b/ipvsadm-save
+index f4d399e..af51638 100644
+--- a/ipvsadm-save
++++ b/ipvsadm-save
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-save - Save IPVS rules
+ #
+ # A very simple wrapper to save IPVS rules
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch
new file mode 100644
index 000000000..1bf1eed4c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 461c021..8bc9cde 100644
+--- a/Makefile
++++ b/Makefile
+@@ -86,7 +86,7 @@ libs:
+ make -C libipvs
+
+ ipvsadm: $(OBJS) libs
+- $(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
+
+ install: all
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
diff --git a/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
new file mode 100644
index 000000000..b35a9f4a4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Linux Virtual Server administration Utility"
+HOMEPAGE = "http://www.linux-vs.org/software/index.html"
+DESCRIPTION = "Ipvsadm is used to set up, maintain or inspect the virtual server \
+table in the Linux kernel. The Linux Virtual Server can be used to \
+build scalable network services based on a cluster of two or more nodes. \
+The active node of the cluster redirects service requests to a \
+collection of server hosts that will actually perform the services. \
+Supported features include two protocols (TCP and UDP), three packet-forwarding \
+methods (NAT, tunneling, and direct routing), and eight load balancing algorithms \
+(round robin, weighted round robin, least-connec-tion, weighted least-connection, \
+locality-based least-connection, locality-based least-connection with replication, \
+destination-hashing, and source-hashing)."
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://README;beginline=40;endline=56;md5=a54cba37b64924aa5008881607942892"
+
+DEPENDS += "libnl popt"
+
+SRC_URI = "http://www.linuxvirtualserver.org/software/kernel-2.6/${BP}.tar.gz \
+ file://0001-Modify-the-Makefile-for-cross-compile.patch \
+ file://0002-Replace-nl_handle-to-nl_sock.patch \
+ file://0003-ipvsadm-remove-dependency-on-bash.patch \
+ file://makefile-add-ldflags.patch \
+"
+
+SRC_URI[md5sum] = "eac3ba3f62cd4dea2da353aeddd353a8"
+SRC_URI[sha256sum] = "6d6c46fecb1c532a892616b4445c73b71730e8790d5630f60269fd9cbee0eb2d"
+
+do_compile() {
+ oe_runmake \
+ CC="${CC} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3 -L${STAGING_LIBDIR}" \
+ all
+}
+
+do_install() {
+ oe_runmake 'BUILD_ROOT=${D}' install
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch
new file mode 100644
index 000000000..90c4ce75e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch
@@ -0,0 +1,48 @@
+diff -Nurp libesmtp-1.0.6.org/crammd5/Makefile.am libesmtp-1.0.6/crammd5/Makefile.am
+--- libesmtp-1.0.6.org/crammd5/Makefile.am 2010-08-08 23:45:57.000000000 +0800
++++ libesmtp-1.0.6/crammd5/Makefile.am 2014-11-17 11:17:21.663624295 +0800
+@@ -2,7 +2,7 @@
+
+ libdir = @plugindir@
+
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+
+ lib_LTLIBRARIES = sasl-cram-md5.la
+diff -Nurp libesmtp-1.0.6.org/login/Makefile.am libesmtp-1.0.6/login/Makefile.am
+--- libesmtp-1.0.6.org/login/Makefile.am 2010-08-08 23:45:56.000000000 +0800
++++ libesmtp-1.0.6/login/Makefile.am 2014-11-17 11:17:54.339623018 +0800
+@@ -2,7 +2,7 @@
+
+ libdir = @plugindir@
+
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+
+ lib_LTLIBRARIES = sasl-login.la
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+diff -Nurp libesmtp-1.0.6.org/ntlm/Makefile.am libesmtp-1.0.6/ntlm/Makefile.am
+--- libesmtp-1.0.6.org/ntlm/Makefile.am 2010-08-08 23:45:56.000000000 +0800
++++ libesmtp-1.0.6/ntlm/Makefile.am 2014-11-17 11:18:10.551622385 +0800
+@@ -2,7 +2,7 @@
+
+ libdir = @plugindir@
+
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+
+ lib_LTLIBRARIES = sasl-ntlm.la
+diff -Nurp libesmtp-1.0.6.org/plain/Makefile.am libesmtp-1.0.6/plain/Makefile.am
+--- libesmtp-1.0.6.org/plain/Makefile.am 2010-08-08 23:45:54.000000000 +0800
++++ libesmtp-1.0.6/plain/Makefile.am 2014-11-17 11:18:33.355621494 +0800
+@@ -2,7 +2,7 @@
+
+ libdir = @plugindir@
+
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+
+ lib_LTLIBRARIES = sasl-plain.la
diff --git a/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
new file mode 100644
index 000000000..d0d203ead
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
@@ -0,0 +1,19 @@
+Use HAVE_WORKING_SNPRINTF to check for snprintf()
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libesmtp-1.0.6/missing.h
+===================================================================
+--- libesmtp-1.0.6.orig/missing.h
++++ libesmtp-1.0.6/missing.h
+@@ -43,7 +43,7 @@ int strncasecmp (const char *a, const ch
+ void *memrchr (const void *a, int c, size_t len);
+ #endif
+
+-#ifndef HAVE_SNPRINTF
++#ifndef HAVE_WORKING_SNPRINTF
+ #include <sys/types.h>
+ int snprintf(char *s, size_t n, const char *format, ...);
+ #endif
diff --git a/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
new file mode 100644
index 000000000..71c5d940b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
@@ -0,0 +1,38 @@
+SUMMARY = "SMTP client library"
+DESCRIPTION = "LibESMTP is a library to manage posting \
+(or submission of) electronic mail using SMTP to a \
+preconfigured Mail Transport Agent (MTA) such as Exim or PostFix."
+HOMEPAGE = "http://www.stafford.uklinux.net/libesmtp/"
+LICENSE = "LGPLv2+"
+SECTION = "libs"
+
+DEPENDS = "openssl"
+
+SRC_URI = "http://www.stafford.uklinux.net/libesmtp/libesmtp-${PV}.tar.bz2 \
+ file://include-topdir.patch \
+ file://snprintf.patch \
+ "
+SRC_URI[md5sum] = "bf3915e627fd8f35524a8fdfeed979c8"
+SRC_URI[sha256sum] = "d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+inherit autotools binconfig
+
+EXTRA_OECONF = " \
+ --with-auth-plugin-dir=${libdir}/esmtp-plugins \
+ --enable-pthreads \
+ --enable-debug \
+ --enable-etrn \
+ --disable-isoc \
+ --disable-more-warnings \
+ --disable-static \
+"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS} \
+ ${libdir}/esmtp-plugins/*${SOLIBSDEV}"
+
+FILES_${PN}-dev += "${libdir}/esmtp-plugins/*.la"
+FILES_${PN}-static += "${libdir}/esmtp-plugins/*.a"
+FILES_${PN}-dbg += "${libdir}/esmtp-plugins/.debug/"
diff --git a/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch
new file mode 100644
index 000000000..8ab094fa7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch
@@ -0,0 +1,13 @@
+--- a/wscript 2015-11-18 12:43:33.000000000 +0100
++++ b/wscript 2015-11-18 12:46:25.000000000 +0100
+@@ -58,9 +58,7 @@
+ if conf.env.standalone_ldb:
+ conf.CHECK_XSLTPROC_MANPAGES()
+
+- # we need this for the ldap backend
+- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+- conf.env.ENABLE_LDAP_BACKEND = True
++ conf.env.ENABLE_LDAP_BACKEND = False
+
+ # we don't want any libraries or modules to rely on runtime
+ # resolution of symbols
diff --git a/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch
new file mode 100755
index 000000000..fdd312c0a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch
@@ -0,0 +1,58 @@
+Some modules such as dynamic library maybe cann't be imported while cross compile,
+we just check whether does the module exist.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+Index: ldb-1.1.26/buildtools/wafsamba/samba_bundled.py
+===================================================================
+--- ldb-1.1.26.orig/buildtools/wafsamba/samba_bundled.py
++++ ldb-1.1.26/buildtools/wafsamba/samba_bundled.py
+@@ -2,6 +2,7 @@
+
+ import sys
+ import Build, Options, Logs
++import imp, os
+ from Configure import conf
+ from samba_utils import TO_LIST
+
+@@ -230,17 +231,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
+ # versions
+ minversion = minimum_library_version(conf, libname, minversion)
+
+- try:
+- m = __import__(modulename)
+- except ImportError:
+- found = False
+- else:
++ # Find module in PYTHONPATH
++ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
++ if stuff:
+ try:
+- version = m.__version__
+- except AttributeError:
++ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
++ except ImportError:
+ found = False
++
++ if conf.env.CROSS_COMPILE:
++ # Some modules such as dynamic library maybe cann't be imported
++ # while cross compile, we just check whether the module exist
++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
++ found = True
+ else:
+- found = tuplize_version(version) >= tuplize_version(minversion)
++ try:
++ version = m.__version__
++ except AttributeError:
++ found = False
++ else:
++ found = tuplize_version(version) >= tuplize_version(minversion)
++ finally:
++ if stuff[0]:
++ stuff[0].close()
++ else:
++ found = False
++
+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
+ Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
+ sys.exit(1)
diff --git a/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch
new file mode 100644
index 000000000..ffe253b63
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch
@@ -0,0 +1,193 @@
+From a4da3ab4d76013aaa731d43d52ccca1ebd37c395 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 21 Sep 2016 10:06:39 +0800
+Subject: [PATCH 1/1] ldb: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ lib/replace/system/wscript_configure | 6 ++-
+ lib/replace/wscript | 94 +++++++++++++++++++++++++++---------
+ wscript | 7 +++
+ 3 files changed, 83 insertions(+), 24 deletions(-)
+
+diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
+index 2035474..10f9ae7 100644
+--- a/lib/replace/system/wscript_configure
++++ b/lib/replace/system/wscript_configure
+@@ -1,6 +1,10 @@
+ #!/usr/bin/env python
+
+-conf.CHECK_HEADERS('sys/capability.h')
++import Options
++
++if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
+
+ # solaris varients of getXXent_r
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 2f94d49..68b2d3a 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+ opt.PRIVATE_EXTENSION_DEFAULT('')
+ opt.RECURSE('buildtools/wafsamba')
+
++ opt.add_option('--with-acl',
++ help=("Enable use of acl"),
++ action="store_true", dest='enable_acl')
++ opt.add_option('--without-acl',
++ help=("Disable use of acl"),
++ action="store_false", dest='enable_acl', default=False)
++
++ opt.add_option('--with-attr',
++ help=("Enable use of attr"),
++ action="store_true", dest='enable_attr')
++ opt.add_option('--without-attr',
++ help=("Disable use of attr"),
++ action="store_false", dest='enable_attr', default=False)
++
++ opt.add_option('--with-libaio',
++ help=("Enable use of libaio"),
++ action="store_true", dest='enable_libaio')
++ opt.add_option('--without-libaio',
++ help=("Disable use of libaio"),
++ action="store_false", dest='enable_libaio', default=False)
++
++ opt.add_option('--with-libbsd',
++ help=("Enable use of libbsd"),
++ action="store_true", dest='enable_libbsd')
++ opt.add_option('--without-libbsd',
++ help=("Disable use of libbsd"),
++ action="store_false", dest='enable_libbsd', default=False)
++
++ opt.add_option('--with-libcap',
++ help=("Enable use of libcap"),
++ action="store_true", dest='enable_libcap')
++ opt.add_option('--without-libcap',
++ help=("Disable use of libcap"),
++ action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+ conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+ conf.DEFINE('HAVE_LIBREPLACE', 1)
+ conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+
+- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+ conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+- conf.CHECK_HEADERS('shadow.h sys/acl.h')
+- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++ conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++ conf.CHECK_HEADERS('shadow.h')
++ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++ if Options.options.enable_acl:
++ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++ if Options.options.enable_attr:
++ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++ if Options.options.enable_libaio:
++ conf.CHECK_HEADERS('libaio.h')
++
++ if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_HEADERS('port.h')
+ conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+ conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -73,7 +121,9 @@ def configure(conf):
+
+ conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++ if Options.options.enable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+ conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+ conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -266,22 +316,20 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ if Options.options.enable_libbsd:
++ # libbsd on some platforms provides strlcpy and strlcat
++ if not conf.CHECK_FUNCS('strlcpy strlcat'):
++ conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++ checklibc=True)
++ if not conf.CHECK_FUNCS('getpeereid'):
++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS('setproctitle_init'):
++ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++ if not conf.CHECK_FUNCS('closefrom'):
++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -632,7 +680,7 @@ removeea setea
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+ bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
++ if Options.options.enable_libbsd:
+ bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+diff --git a/wscript b/wscript
+index 8ae5be3..a178cc4 100644
+--- a/wscript
++++ b/wscript
+@@ -31,6 +31,13 @@ def set_options(opt):
+ opt.RECURSE('lib/replace')
+ opt.tool_options('python') # options for disabling pyc or pyo compilation
+
++ opt.add_option('--with-valgrind',
++ help=("enable use of valgrind"),
++ action="store_true", dest='enable_valgrind')
++ opt.add_option('--without-valgrind',
++ help=("disable use of valgrind"),
++ action="store_false", dest='enable_valgrind', default=False)
++
+ def configure(conf):
+ conf.RECURSE('lib/tdb')
+ conf.RECURSE('lib/tevent')
+--
+2.16.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb b/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb
new file mode 100644
index 000000000..7e14cde35
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://ldb.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
+
+DEPENDS += "libtdb libtalloc libtevent popt"
+RDEPENDS_pyldb += "python"
+
+SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
+ file://do-not-import-target-module-while-cross-compile.patch \
+ file://options-1.3.1.patch \
+ "
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[ldap] = ",,openldap"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
+
+LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \
+ file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
+ file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
+
+SRC_URI[md5sum] = "e5233f202bca27f6ce8474fb8ae65983"
+SRC_URI[sha256sum] = "b19f2c9f55ae0f46aa5ebaea0bf1a47ec1ac135e1d78af0f6318cf50bf62cbd2"
+
+inherit waf-samba
+
+S = "${WORKDIR}/ldb-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+ --disable-rpath-install \
+ --bundled-libraries=cmocka \
+ --builtin-libraries=replace \
+ --with-modulesdir=${libdir}/ldb/modules \
+ --with-privatelibdir=${libdir}/ldb \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ "
+
+PACKAGES =+ "pyldb pyldb-dbg pyldb-dev"
+
+NOAUTOPACKAGEDEBUG = "1"
+
+FILES_${PN} += "${libdir}/ldb/*"
+FILES_${PN}-dbg += "${bindir}/.debug/* \
+ ${libdir}/.debug/* \
+ ${libdir}/ldb/.debug/* \
+ ${libdir}/ldb/modules/ldb/.debug/*"
+
+FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+ ${libdir}/libpyldb-util.so.* \
+ "
+FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+ ${libdir}/.debug/libpyldb-util.so.*"
+FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch
new file mode 100644
index 000000000..26b5e250c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch
@@ -0,0 +1,38 @@
+From ed4422979b221c8613ca02eb5c57cb80009366d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:13:24 -0700
+Subject: [PATCH 1/2] Fix comparison types
+
+Fixes
+error: comparison between pointer and integer ('char *' and 'int')
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ clients/memflush.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/clients/memflush.cc b/clients/memflush.cc
+index 8bd0dbf..71545ea 100644
+--- a/clients/memflush.cc
++++ b/clients/memflush.cc
+@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
+ {
+ options_parse(argc, argv);
+
+- if (opt_servers == false)
++ if (opt_servers == NULL)
+ {
+ char *temp;
+
+@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
+ opt_servers= strdup(temp);
+ }
+
+- if (opt_servers == false)
++ if (opt_servers == NULL)
+ {
+ std::cerr << "No Servers provided" << std::endl;
+ exit(EXIT_FAILURE);
+--
+2.12.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch
new file mode 100644
index 000000000..06febc5b1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch
@@ -0,0 +1,28 @@
+From fa0fe001a5373c1ef9ff2175555b14fc07399e1b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:01:44 -0700
+Subject: [PATCH] configure.ac: Do not configure build-aux
+
+Fixes
+configure: error: cannot find install-sh, install.sh, or shtool
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17b7351..0263112 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,7 +17,6 @@ AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
+ AC_PROG_CC([cc gcc clang])
+ AC_PROG_CXX([c++ g++ clang++])
+
+-AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+
+ AC_CANONICAL_HOST
+--
+2.12.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch
new file mode 100644
index 000000000..e1e1be8c6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch
@@ -0,0 +1,30 @@
+From e95609e4ae40a794ed198924505fd22d7d86a124 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:16:14 -0700
+Subject: [PATCH 2/2] POSIX_SPAWN_USEVFORK is not linux specific but glibc
+ specific
+
+Fixes
+cmdline.cc:206:12: error: use of undeclared identifier 'POSIX_SPAWN_USEVFORK'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libtest/cmdline.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc
+index 29a22de..34f0a89 100644
+--- a/libtest/cmdline.cc
++++ b/libtest/cmdline.cc
+@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[])
+
+ fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0);
+
+-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__)
++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__)
+ // Use USEVFORK on linux
+ flags |= POSIX_SPAWN_USEVFORK;
+ #endif
+--
+2.12.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch
new file mode 100644
index 000000000..63511bff5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch
@@ -0,0 +1,30 @@
+ libmemcached/backtrace.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- libmemcached-1.0.15.orig/libmemcached/backtrace.cc
++++ libmemcached-1.0.15/libmemcached/backtrace.cc
+@@ -75,10 +75,11 @@ void custom_backtrace(void)
+ {
+ for (int x= 0; x < stack_frames; x++)
+ {
+ bool was_demangled= false;
+
++#if USE_DEMANGLE == 1
+ if (USE_DEMANGLE)
+ {
+ #ifdef HAVE_DLFCN_H
+ Dl_info dlinfo;
+ if (dladdr(backtrace_buffer[x], &dlinfo))
+@@ -107,11 +108,11 @@ void custom_backtrace(void)
+ dlinfo.dli_fname);
+ }
+ }
+ #endif
+ }
+-
++#endif
+ if (was_demangled == false)
+ {
+ fprintf(stderr, "?%d %p in %s\n", x, backtrace_buffer[x], symbollist[x]);
+ }
+ }
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
new file mode 100644
index 000000000..e86f832f8
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "open source C/C++ client library and tools for the memcached server"
+DEPENDS = "libevent util-linux"
+SECTION = "libdevel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=865490941c91ba790f0ea78dec93bd60"
+
+SRC_URI = "http://launchpad.net/libmemcached/1.0/${PV}/+download/libmemcached-${PV}.tar.gz"
+
+TARGET_LDFLAGS += "-luuid"
+TARGET_CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sasl] = "--enable-sasl,--disable-sasl,cyrus-sasl"
+
+inherit autotools gettext pkgconfig
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb
new file mode 100644
index 000000000..56778c048
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb
@@ -0,0 +1,10 @@
+require libmemcached.inc
+
+SRC_URI += "\
+ file://crosscompile.patch \
+ file://0001-configure.ac-Do-not-configure-build-aux.patch \
+ file://0001-Fix-comparison-types.patch \
+ file://0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch \
+ "
+SRC_URI[md5sum] = "b3958716b4e53ddc5992e6c49d97e819"
+SRC_URI[sha256sum] = "e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82"
diff --git a/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb
new file mode 100644
index 000000000..cdf8415ff
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb
@@ -0,0 +1,4 @@
+require libmemcached.inc
+
+SRC_URI[md5sum] = "d59a462a92d296f76bff2d9bc72b2516"
+SRC_URI[sha256sum] = "3efa86c9733eaad55d7119cb16769424e2aa6c22b3392e8f973946fce6678d81"
diff --git a/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
new file mode 100644
index 000000000..a3ee9ccd9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
@@ -0,0 +1,20 @@
+--- a/lib/replace/wscript 2015-11-13 16:04:04.000000000 +0100
++++ b/lib/replace/wscript 2015-11-13 16:23:20.000000000 +0100
+@@ -636,8 +636,6 @@
+ if not bld.CONFIG_SET('HAVE_INET_ATON'): REPLACE_SOURCE += ' inet_aton.c'
+ if not bld.CONFIG_SET('HAVE_INET_NTOP'): REPLACE_SOURCE += ' inet_ntop.c'
+ if not bld.CONFIG_SET('HAVE_INET_PTON'): REPLACE_SOURCE += ' inet_pton.c'
+- if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+- REPLACE_SOURCE += ' xattr.c'
+
+ bld.SAMBA_LIBRARY('replace',
+ source=REPLACE_SOURCE,
+@@ -648,7 +646,7 @@
+ # at the moment:
+ # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+ private_library=True,
+- deps='crypt dl nsl socket rt attr' + extra_libs)
++ deps='crypt dl nsl socket rt ' + extra_libs)
+
+ bld.SAMBA_SUBSYSTEM('replace-test',
+ source='''test/testsuite.c test/strptime.c
diff --git a/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch
new file mode 100644
index 000000000..63f21e775
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch
@@ -0,0 +1,184 @@
+From efc1b02144f23fdf84dbc5ff15307815e0f2a425 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 14 Sep 2016 11:11:35 +0800
+Subject: [PATCH] talloc: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 2.1.10.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ lib/replace/system/wscript_configure | 6 ++-
+ lib/replace/wscript | 85 ++++++++++++++++++++++++++++--------
+ wscript | 7 ++-
+ 3 files changed, 79 insertions(+), 19 deletions(-)
+
+Index: talloc-2.1.11/lib/replace/system/wscript_configure
+===================================================================
+--- talloc-2.1.11.orig/lib/replace/system/wscript_configure
++++ talloc-2.1.11/lib/replace/system/wscript_configure
+@@ -1,6 +1,10 @@
+ #!/usr/bin/env python
+
+-conf.CHECK_HEADERS('sys/capability.h')
++import Options
++
++if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
+
+ # solaris varients of getXXent_r
+Index: talloc-2.1.11/lib/replace/wscript
+===================================================================
+--- talloc-2.1.11.orig/lib/replace/wscript
++++ talloc-2.1.11/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+ opt.PRIVATE_EXTENSION_DEFAULT('')
+ opt.RECURSE('buildtools/wafsamba')
+
++ opt.add_option('--with-acl',
++ help=("Enable use of acl"),
++ action="store_true", dest='enable_acl')
++ opt.add_option('--without-acl',
++ help=("Disable use of acl"),
++ action="store_false", dest='enable_acl', default=False)
++
++ opt.add_option('--with-attr',
++ help=("Enable use of attr"),
++ action="store_true", dest='enable_attr')
++ opt.add_option('--without-attr',
++ help=("Disable use of attr"),
++ action="store_false", dest='enable_attr', default=False)
++
++ opt.add_option('--with-libaio',
++ help=("Enable use of libaio"),
++ action="store_true", dest='enable_libaio')
++ opt.add_option('--without-libaio',
++ help=("Disable use of libaio"),
++ action="store_false", dest='enable_libaio', default=False)
++
++ opt.add_option('--with-libbsd',
++ help=("Enable use of libbsd"),
++ action="store_true", dest='enable_libbsd')
++ opt.add_option('--without-libbsd',
++ help=("Disable use of libbsd"),
++ action="store_false", dest='enable_libbsd', default=False)
++
++ opt.add_option('--with-libcap',
++ help=("Enable use of libcap"),
++ action="store_true", dest='enable_libcap')
++ opt.add_option('--without-libcap',
++ help=("Disable use of libcap"),
++ action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+ conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+ conf.DEFINE('HAVE_LIBREPLACE', 1)
+ conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+
+- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+ conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+- conf.CHECK_HEADERS('shadow.h sys/acl.h')
+- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++ conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++ conf.CHECK_HEADERS('shadow.h')
++ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++ if Options.options.enable_acl:
++ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++ if Options.options.enable_attr:
++ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++ if Options.options.enable_libaio:
++ conf.CHECK_HEADERS('libaio.h')
++
++ if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_HEADERS('port.h')
+ conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+ conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -73,7 +121,9 @@ def configure(conf):
+
+ conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++ if Options.options.enable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+ conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+ conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -267,21 +317,21 @@ def configure(conf):
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+ strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++ if Options.options.enable_libbsd:
++ # libbsd on some platforms provides strlcpy and strlcat
++ if not conf.CHECK_FUNCS('strlcpy strlcat'):
++ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+ checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++ strlcpy_in_bsd = True
++ if not conf.CHECK_FUNCS('getpeereid'):
++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS('setproctitle_init'):
++ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ if not conf.CHECK_FUNCS('closefrom'):
++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+Index: talloc-2.1.11/wscript
+===================================================================
+--- talloc-2.1.11.orig/wscript
++++ talloc-2.1.11/wscript
+@@ -32,7 +32,12 @@ def set_options(opt):
+ opt.add_option('--enable-talloc-compat1',
+ help=("Build talloc 1.x.x compat library [False]"),
+ action="store_true", dest='TALLOC_COMPAT1', default=False)
+-
++ opt.add_option('--with-valgrind',
++ help=("enable use of valgrind"),
++ action="store_true", dest='enable_valgrind')
++ opt.add_option('--without-valgrind',
++ help=("disable use of valgrind"),
++ action="store_false", dest='enable_valgrind', default=False)
+
+ def configure(conf):
+ conf.RECURSE('lib/replace')
diff --git a/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb
new file mode 100644
index 000000000..848cf4d99
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://talloc.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+LIC_FILES_CHKSUM = "file://talloc.h;beginline=3;endline=27;md5=a301712782cad6dd6d5228bfa7825249 \
+ file://pytalloc.h;beginline=1;endline=18;md5=2c498cc6f2263672483237b20f46b43d"
+
+
+SRC_URI = "https://samba.org/ftp/talloc/talloc-${PV}.tar.gz \
+ file://options-2.1.10.patch \
+"
+SRC_URI[md5sum] = "452596f904ca2b10322bdaabf147a721"
+SRC_URI[sha256sum] = "639eb35556a0af999123c4d883e79be05ff9f00ab4f9e4ac2e5775f9c5eeeed3"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/talloc-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+ --disable-rpath-install \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --disable-silent-rules \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ "
+
+PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev"
+
+FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+ ${libdir}/libpytalloc-util.so.2 \
+ ${libdir}/libpytalloc-util.so.2.1.1 \
+ "
+FILES_pytalloc-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+ ${libdir}/.debug/libpytalloc-util.so.2.1.1"
+FILES_pytalloc-dev = "${libdir}/libpytalloc-util.so"
+RDEPENDS_pytalloc = "python"
diff --git a/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch
new file mode 100644
index 000000000..bcc45c9fc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch
@@ -0,0 +1,15 @@
+Don't check manpages for xsltproc.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+--- tdb-1.3.0.orig/wscript 2015-04-22 09:52:32.366000222 +0900
++++ tdb-1.3.0/wscript 2015-04-22 09:51:57.720000205 +0900
+@@ -90,7 +90,7 @@ def configure(conf):
+ not conf.env.disable_tdb_mutex_locking):
+ conf.define('USE_TDB_MUTEX_LOCKING', 1)
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ conf.find_program('xsltproc', var='XSLTPROC')
+
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
diff --git a/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
new file mode 100644
index 000000000..272921e56
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
@@ -0,0 +1,184 @@
+From 24911f36bcb00412e5dc4cd11fda139e09d58798 Mon Sep 17 00:00:00 2001
+From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+Date: Tue, 1 Aug 2017 03:12:09 +0900
+Subject: [PATCH] From 10ac5e5fdda44adcc2a159b6f9a2d51a51361057 Mon Sep 17
+ 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Wed, 21
+ Sep 2016 10:46:19 +0800 Subject: [PATCH] tdb: Add configure options for
+ packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Update for libtdb_1.3.14.
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+---
+ lib/replace/system/wscript_configure | 6 ++-
+ lib/replace/wscript | 85 ++++++++++++++++++++++++++++--------
+ wscript | 7 ++-
+ 3 files changed, 79 insertions(+), 19 deletions(-)
+
+diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
+index 2035474..10f9ae7 100644
+--- a/lib/replace/system/wscript_configure
++++ b/lib/replace/system/wscript_configure
+@@ -1,6 +1,10 @@
+ #!/usr/bin/env python
+
+-conf.CHECK_HEADERS('sys/capability.h')
++import Options
++
++if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
+
+ # solaris varients of getXXent_r
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 7c50e1d..15df5c3 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+ opt.PRIVATE_EXTENSION_DEFAULT('')
+ opt.RECURSE('buildtools/wafsamba')
+
++ opt.add_option('--with-acl',
++ help=("Enable use of acl"),
++ action="store_true", dest='enable_acl')
++ opt.add_option('--without-acl',
++ help=("Disable use of acl"),
++ action="store_false", dest='enable_acl', default=False)
++
++ opt.add_option('--with-attr',
++ help=("Enable use of attr"),
++ action="store_true", dest='enable_attr')
++ opt.add_option('--without-attr',
++ help=("Disable use of attr"),
++ action="store_false", dest='enable_attr', default=False)
++
++ opt.add_option('--with-libaio',
++ help=("Enable use of libaio"),
++ action="store_true", dest='enable_libaio')
++ opt.add_option('--without-libaio',
++ help=("Disable use of libaio"),
++ action="store_false", dest='enable_libaio', default=False)
++
++ opt.add_option('--with-libbsd',
++ help=("Enable use of libbsd"),
++ action="store_true", dest='enable_libbsd')
++ opt.add_option('--without-libbsd',
++ help=("Disable use of libbsd"),
++ action="store_false", dest='enable_libbsd', default=False)
++
++ opt.add_option('--with-libcap',
++ help=("Enable use of libcap"),
++ action="store_true", dest='enable_libcap')
++ opt.add_option('--without-libcap',
++ help=("Disable use of libcap"),
++ action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+ conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+ conf.DEFINE('HAVE_LIBREPLACE', 1)
+ conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+
+- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+ conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+- conf.CHECK_HEADERS('shadow.h sys/acl.h')
+- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++ conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++ conf.CHECK_HEADERS('shadow.h')
++ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++ if Options.options.enable_acl:
++ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++ if Options.options.enable_attr:
++ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++ if Options.options.enable_libaio:
++ conf.CHECK_HEADERS('libaio.h')
++
++ if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_HEADERS('port.h')
+ conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+ conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -73,7 +121,9 @@ def configure(conf):
+
+ conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++ if Options.options.enable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+ conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+ conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -251,17 +301,18 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True)
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ if Options.options.enable_libbsd:
++ # libbsd on some platforms provides strlcpy and strlcat
++ if not conf.CHECK_FUNCS('strlcpy strlcat'):
++ conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++ checklibc=True)
++ if not conf.CHECK_FUNCS('getpeereid'):
++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++ if not conf.CHECK_FUNCS('closefrom'):
++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+diff --git a/wscript b/wscript
+index 1c9655a..8c20d3b 100644
+--- a/wscript
++++ b/wscript
+@@ -62,7 +62,12 @@ def set_options(opt):
+ help=("Disable the use of pthread robust mutexes"),
+ action="store_true", dest='disable_tdb_mutex_locking',
+ default=False)
+-
++ opt.add_option('--with-valgrind',
++ help=("enable use of valgrind"),
++ action="store_true", dest='enable_valgrind')
++ opt.add_option('--without-valgrind',
++ help=("disable use of valgrind"),
++ action="store_false", dest='enable_valgrind', default=False)
+
+ def configure(conf):
+ conf.env.disable_tdb_mutex_locking = getattr(Options.options,
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb
new file mode 100644
index 000000000..302a306b3
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb
@@ -0,0 +1,44 @@
+SUMMARY = "The tdb library"
+HOMEPAGE = "http://tdb.samba.org/"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
+ file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
+
+SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
+ file://do-not-check-xsltproc-manpages.patch \
+ file://tdb-Add-configure-options-for-packages.patch \
+"
+
+SRC_URI[md5sum] = "60ece3996acc8d85b6f713199da971a6"
+SRC_URI[sha256sum] = "b4a1bf3833601bd9f10aff363cb750860aef9ce5b4617989239923192f946728"
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+S = "${WORKDIR}/tdb-${PV}"
+
+inherit waf-samba
+
+EXTRA_OECONF += "--disable-rpath \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ "
+
+PACKAGES += "tdb-tools python-tdb python-tdb-dbg"
+
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_tdb-tools = "${bindir}/*"
+FILES_python-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_python-tdb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
+RDEPENDS_python-tdb = "python"
diff --git a/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
new file mode 100644
index 000000000..35890335a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
@@ -0,0 +1,22 @@
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 079761d..07e0104 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -793,8 +793,6 @@ def build(bld):
+ if not bld.CONFIG_SET('HAVE_INET_ATON'): REPLACE_SOURCE += ' inet_aton.c'
+ if not bld.CONFIG_SET('HAVE_INET_NTOP'): REPLACE_SOURCE += ' inet_ntop.c'
+ if not bld.CONFIG_SET('HAVE_INET_PTON'): REPLACE_SOURCE += ' inet_pton.c'
+- if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+- REPLACE_SOURCE += ' xattr.c'
+
+ if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
+ REPLACE_SOURCE += ' closefrom.c'
+@@ -808,7 +806,7 @@ def build(bld):
+ # at the moment:
+ # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+ private_library=True,
+- deps='crypt dl nsl socket rt attr' + extra_libs)
++ deps='crypt dl nsl socket rt ' + extra_libs)
+
+ replace_test_cflags="-Wno-format-zero-length"
+ if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
diff --git a/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch
new file mode 100644
index 000000000..363c5867c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch
@@ -0,0 +1,176 @@
+From c3e2e4f89cf37b27609fd02ad67eb02d0015cc1e Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 21 Sep 2016 09:57:49 +0800
+Subject: [PATCH 1/1] tevent: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 0.9.33.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+---
+ lib/replace/wscript | 89 ++++++++++++++++++++++++++++++++++++++++-------------
+ wscript | 7 ++++-
+ 2 files changed, 73 insertions(+), 23 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 2c638b7..079761d 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+ opt.PRIVATE_EXTENSION_DEFAULT('')
+ opt.RECURSE('buildtools/wafsamba')
+
++ opt.add_option('--with-acl',
++ help=("Enable use of acl"),
++ action="store_true", dest='enable_acl')
++ opt.add_option('--without-acl',
++ help=("Disable use of acl"),
++ action="store_false", dest='enable_acl', default=False)
++
++ opt.add_option('--with-attr',
++ help=("Enable use of attr"),
++ action="store_true", dest='enable_attr')
++ opt.add_option('--without-attr',
++ help=("Disable use of attr"),
++ action="store_false", dest='enable_attr', default=False)
++
++ opt.add_option('--with-libaio',
++ help=("Enable use of libaio"),
++ action="store_true", dest='enable_libaio')
++ opt.add_option('--without-libaio',
++ help=("Disable use of libaio"),
++ action="store_false", dest='enable_libaio', default=False)
++
++ opt.add_option('--with-libbsd',
++ help=("Enable use of libbsd"),
++ action="store_true", dest='enable_libbsd')
++ opt.add_option('--without-libbsd',
++ help=("Disable use of libbsd"),
++ action="store_false", dest='enable_libbsd', default=False)
++
++ opt.add_option('--with-libcap',
++ help=("Enable use of libcap"),
++ action="store_true", dest='enable_libcap')
++ opt.add_option('--without-libcap',
++ help=("Disable use of libcap"),
++ action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+ conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+ conf.DEFINE('HAVE_LIBREPLACE', 1)
+ conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+
+- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+ conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+- conf.CHECK_HEADERS('shadow.h sys/acl.h')
+- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++ conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++ conf.CHECK_HEADERS('shadow.h')
++ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++ if Options.options.enable_acl:
++ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++ if Options.options.enable_attr:
++ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++ if Options.options.enable_libaio:
++ conf.CHECK_HEADERS('libaio.h')
++
++ if Options.options.enable_libcap:
++ conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_HEADERS('port.h')
+ conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+ conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -101,7 +149,8 @@ def configure(conf):
+ conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+ conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++ if Options.options.enable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
+ conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+ conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -294,22 +343,18 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if Options.options.enable_libbsd:
++ # libbsd on some platforms provides strlcpy and strlcat
++ if not conf.CHECK_FUNCS('strlcpy strlcat'):
++ conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++ checklibc=True)
++ if not conf.CHECK_FUNCS('getpeereid'):
++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ if not conf.CHECK_FUNCS('closefrom'):
++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -660,7 +705,7 @@ removeea setea
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+ bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
++ if Options.options.enable_libbsd:
+ bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+diff --git a/wscript b/wscript
+index 94d190f..742f779 100644
+--- a/wscript
++++ b/wscript
+@@ -22,7 +22,12 @@ def set_options(opt):
+ opt.PRIVATE_EXTENSION_DEFAULT('tevent', noextension='tevent')
+ opt.RECURSE('lib/replace')
+ opt.RECURSE('lib/talloc')
+-
++ opt.add_option('--with-valgrind',
++ help=("enable use of valgrind"),
++ action="store_true", dest='enable_valgrind')
++ opt.add_option('--without-valgrind',
++ help=("disable use of valgrind"),
++ action="store_false", dest='enable_valgrind', default=False)
+
+ def configure(conf):
+ conf.RECURSE('lib/replace')
+--
+2.16.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb
new file mode 100644
index 000000000..c91b221b1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://tevent.samba.org"
+SECTION = "libs"
+LICENSE = "LGPLv3+"
+
+DEPENDS += "libtalloc libtirpc"
+RDEPENDS_python-tevent = "python"
+
+SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
+ file://options-0.9.36.patch \
+"
+LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
+
+SRC_URI[md5sum] = "87d67bca75b231814435c47bec0aff8a"
+SRC_URI[sha256sum] = "bd2b6be3fd1601ed7f176e99111e322c57d58e425cc149ee80c7dd4fed263b4c"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/tevent-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ --without-gettext \
+ "
+
+PACKAGES += "python-tevent python-tevent-dbg"
+
+FILES_python-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_python-tevent-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
new file mode 100644
index 000000000..583a6ca60
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
@@ -0,0 +1,74 @@
+From 7cdafc0dee8054f82777ed3bf6d4c8b5582d09ad Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 18 Oct 2016 07:56:02 +0000
+Subject: [PATCH] fix compile error with linux kernel v4.8
+
+In src/maint/zntune.c, the glibc time.h is included before linux
+time.h, so when compile the zntune.c, it break down by errors:
+
+ redefinition of 'struct timespec' 'struct timeval'
+ 'struct timezone' 'struct itimerval'
+
+We should exclude the linux time.h by disable linux/atm_zatm.h and
+move some useful definition in linux/atm_zatm.h to zntune.c to resolve
+it.
+
+Upstream-status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ src/include/atm_zatm.h | 26 ++++++++++++++++++++++++++
+ src/maint/zntune.c | 3 +--
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+ create mode 100644 src/include/atm_zatm.h
+
+diff --git a/src/include/atm_zatm.h b/src/include/atm_zatm.h
+new file mode 100644
+index 0000000..7d64f4d
+--- /dev/null
++++ b/src/include/atm_zatm.h
+@@ -0,0 +1,26 @@
++#include <linux/atmapi.h>
++#include <linux/atmioc.h>
++
++#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
++ /* get pool statistics */
++#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
++ /* get statistics and zero */
++#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
++
++struct zatm_pool_info {
++ int ref_count; /* free buffer pool usage counters */
++ int low_water,high_water; /* refill parameters */
++ int rqa_count,rqu_count; /* queue condition counters */
++ int offset,next_off; /* alignment optimizations: offset */
++ int next_cnt,next_thres; /* repetition counter and threshold */
++}; /* set pool parameters */
++
++struct zatm_pool_req {
++ int pool_num; /* pool number */
++ struct zatm_pool_info info; /* actual information */
++};
++
++#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
++#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
++#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
++#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
+diff --git a/src/maint/zntune.c b/src/maint/zntune.c
+index 62d62ab..bb93eab 100644
+--- a/src/maint/zntune.c
++++ b/src/maint/zntune.c
+@@ -13,9 +13,8 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <atm.h>
++#include <atm_zatm.h>
+ #include <sys/time.h> /* for struct timeval, although it's not used */
+-#include <linux/atm_zatm.h>
+-
+
+ static void usage(const char *name)
+ {
+--
+2.9.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
new file mode 100644
index 000000000..87e7dc3c6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
@@ -0,0 +1,34 @@
+From b83fd54584fabd5d24f6645b4a3cf345c9d2020d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:11:59 -0700
+Subject: [PATCH 1/3] ttcp: Add printf format string
+
+Fixes compiler warnings when format security is enabled
+
+| ../../../linux-atm-2.5.2/src/test/ttcp.c:666:21: error: format not a string literal and no format arguments [-Werror=format-security]
+| fprintf(stderr, Usage);
+| ^~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/test/ttcp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/ttcp.c b/src/test/ttcp.c
+index acb9185..337cee5 100644
+--- a/src/test/ttcp.c
++++ b/src/test/ttcp.c
+@@ -663,7 +663,7 @@ int no_check = 0;
+ exit(0);
+
+ usage:
+- fprintf(stderr, Usage);
++ fprintf(stderr, "%s", Usage);
+ exit(1);
+ }
+
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch
new file mode 100644
index 000000000..ce061231c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch
@@ -0,0 +1,30 @@
+From 27fa80dc8045e71c30dd2abea835206d5c8f6c71 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:18:56 -0700
+Subject: [PATCH 2/3] sigd: Replace on_exit() API with atexit()
+
+on_exit is not universally available
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/sigd/atmsigd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sigd/atmsigd.c b/src/sigd/atmsigd.c
+index 52e41c7..b766606 100644
+--- a/src/sigd/atmsigd.c
++++ b/src/sigd/atmsigd.c
+@@ -517,7 +517,7 @@ int main(int argc,char **argv)
+ exit(0);
+ }
+ }
+- (void) on_exit(trace_on_exit,NULL);
++ atexit(trace_on_exit);
+ poll_loop();
+ close_all();
+ for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
new file mode 100644
index 000000000..0302286dc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
@@ -0,0 +1,37 @@
+From fe954b2fb17d813aaab3e926cee76144314a115a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:22:55 -0700
+Subject: [PATCH 3/3] mpoad: Drop old hack to compile with very old glibc
+
+Use poll.h instead of sys/poll.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mpoad/io.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/mpoad/io.c b/src/mpoad/io.c
+index 69900c2..8d1433f 100644
+--- a/src/mpoad/io.c
++++ b/src/mpoad/io.c
+@@ -10,14 +10,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <sys/param.h> /* for OPEN_MAX */
+-#if __GLIBC__ >= 2
+-#include <sys/poll.h>
+-#else /* ugly hack to make it compile on RH 4.2 - WA */
+-#include <syscall.h>
+-#include <linux/poll.h>
+-#define SYS_poll 168
+-_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
+-#endif
++#include <poll.h>
+ #include <atm.h>
+ #include <linux/types.h>
+ #include <linux/atmioc.h>
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
new file mode 100644
index 000000000..d1380eb2a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
@@ -0,0 +1,19 @@
+install binaries from builddir not srcdir.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+--- linux-atm-2.5.2.orig/src/extra/Makefile.am 2010-12-21 05:07:22.000000000 +0800
++++ linux-atm-2.5.2/src/extra/Makefile.am 2014-12-22 10:56:04.458563269 +0800
+@@ -9,9 +9,9 @@ CLEANFILES = pca200e.bin pca200e_ecd.bin
+
+ install-exec-hook:
+ $(MKDIR_P) $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/pca200e.bin $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
+
+ %.bin %.bin2: %.data
+ objcopy -Iihex $< -Obinary $@.gz
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
new file mode 100644
index 000000000..62fad2a54
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
@@ -0,0 +1,38 @@
+LDFLAGS_FOR_BUILD should be required when doing link for qgen.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp linux-atm-2.5.2.orig/configure.in linux-atm-2.5.2/configure.in
+--- linux-atm-2.5.2.orig/configure.in 2010-12-28 23:36:07.000000000 +0800
++++ linux-atm-2.5.2/configure.in 2014-12-22 10:25:23.830510932 +0800
+@@ -66,6 +66,7 @@ else
+ fi
+ AC_SUBST(CC_FOR_BUILD)
+ AC_SUBST(CFLAGS_FOR_BUILD)
++AC_SUBST(LDFLAGS_FOR_BUILD)
+ dnl Add -d flag to bison/yacc to create intermediate .h files
+ YACC="$YACC -d"
+
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.am linux-atm-2.5.2/src/qgen/Makefile.am
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.am 2010-12-28 22:29:31.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.am 2014-12-22 10:23:51.914508318 +0800
+@@ -5,7 +5,7 @@ qgen_SOURCES = common.c common.h file.c
+ qgen_LDADD = -lfl
+
+ COMPILE = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@
+-LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ -o $@
++LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ @LDFLAGS_FOR_BUILD@ -o $@
+
+ #TESTS = $(check_PROGRAMS)
+
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.in linux-atm-2.5.2/src/qgen/Makefile.in
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.in 2010-12-29 00:06:11.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.in 2014-12-22 10:23:51.914508318 +0800
+@@ -106,6 +106,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
new file mode 100644
index 000000000..9fce4fba6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Drivers and tools to support ATM networking under Linux"
+HOMEPAGE = "http://linux-atm.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "GPL-2.0 & LGPL-2.0"
+
+DEPENDS = "virtual/kernel flex flex-native"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+ file://link-with-ldflags.patch \
+ file://install-from-buildir.patch \
+ file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \
+ file://0001-ttcp-Add-printf-format-string.patch \
+ file://0002-sigd-Replace-on_exit-API-with-atexit.patch \
+ file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
+"
+
+SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8"
+SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
+
+LIC_FILES_CHKSUM = "\
+file://COPYING;md5=d928de9537d846935a98af3bbc6e6ee1 \
+file://COPYING.GPL;md5=ac2db169b9309e240555bc77be4f1a33 \
+file://COPYING.LGPL;md5=6e29c688d912da12b66b73e32b03d812"
+
+inherit autotools pkgconfig
+
+# The firmware is explicitly put under /lib when installed.
+#
+
+FILES_${PN} += "/lib/firmware"
diff --git a/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest
new file mode 100644
index 000000000..e67f18e55
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sh v4test.sh
+sh v6test.sh
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh
new file mode 100644
index 000000000..513085699
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo "v4test starting:"
+for t in $(find -maxdepth 1 -type f \! -name test\*_v6 -name test\*); do
+ echo "$t";
+ if $t; then
+ echo "PASS: $t"; echo "";
+ else
+ echo "FAIL: $t"; echo "";
+ fi
+ sleep 1;
+done
diff --git a/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh
new file mode 100644
index 000000000..3a667df82
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo "v6test starting:"
+for t in $(find -maxdepth 1 -name test\*_v6); do
+ echo "$t";
+ if $t; then
+ echo "PASS: $t"; echo "";
+ else
+ echo "FAIL: $t"; echo "";
+ fi
+ sleep 1;
+done
diff --git a/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
new file mode 100644
index 000000000..121cc9945
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
@@ -0,0 +1,62 @@
+SUMMARY = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project"
+HOMEPAGE = "http://lksctp.org"
+SECTION = "net"
+LICENSE = "LGPLv2.1 & GPLv2"
+
+LIC_FILES_CHKSUM = " \
+ file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \
+ file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \
+"
+
+SRCREV = "736b91d340e3f2519714f2930ed63b164d363511"
+
+PV .= "+git${SRCPV}"
+LK_REL = "1.0.17"
+
+SRC_URI = " \
+ git://github.com/sctp/lksctp-tools.git \
+ file://run-ptest \
+ file://v4test.sh \
+ file://v6test.sh \
+"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig binconfig ptest
+
+do_install_ptest () {
+ install -m 0755 ${WORKDIR}/v4test.sh ${D}${PTEST_PATH}
+ install -m 0755 ${WORKDIR}/v6test.sh ${D}${PTEST_PATH}
+ for testcase in `find ${B}/src/apps/.libs ${B}/src/func_tests/.libs -maxdepth 1 -type f -executable`; do
+ install $testcase ${D}${PTEST_PATH}
+ done
+}
+
+SOLIBVERSION="${LK_REL}"
+SOLIBMAJORVERSION="1"
+
+PACKAGES =+ "${PN}-withsctp ${PN}-utils"
+
+FILES_${PN} = " \
+ ${libdir}/libsctp.so.${SOLIBVERSION} \
+ ${libdir}/libsctp.so.${SOLIBMAJORVERSION} \
+"
+
+FILES_${PN}-withsctp = " \
+ ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBVERSION} \
+ ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBMAJORVERSION} \
+"
+
+FILES_${PN}-dev += " \
+ ${libdir}/libsctp.so \
+ ${libdir}/lksctp-tools/libwithsctp.so \
+ ${datadir}/lksctp-tools/*.c \
+ ${datadir}/lksctp-tools/*.h \
+"
+
+FILES_${PN}-utils = "${bindir}/*"
+
+RRECOMMENDS_${PN}-utils += "kernel-module-sctp"
+RRECOMMENDS_${PN}-ptest += "kernel-module-sctp"
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch
new file mode 100644
index 000000000..8e906f7ce
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch
@@ -0,0 +1,34 @@
+From 5f9e80acb0a1ac399839bf160e43f6120c4b5128 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Oct 2016 23:49:09 +0000
+Subject: [PATCH] Fix build errors with clang
+
+| ../../../../../../../workspace/sources/lowpan-tools/src/coordinator.c:313:50: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
+| fprintf(stderr, "Opt: %c (%hhx)\n", (char)opt, opt);
+| ~~~~ ^~~
+| %x
+| 1 error generated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..f0de6d2 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -310,7 +310,7 @@ int main(int argc, char **argv)
+ #else
+ opt = getopt(argc, argv, "l:f:d:m:n:i:s:p:c:hv");
+ #endif
+- fprintf(stderr, "Opt: %c (%hhx)\n", opt, opt);
++ fprintf(stderr, "Opt: %c (%hhx)\n", opt, (unsigned char)opt);
+ if (opt == -1)
+ break;
+
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
new file mode 100644
index 000000000..1453b75d5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
@@ -0,0 +1,32 @@
+From a36afac485745cf980fba1809526f2025cb4d101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Apr 2017 00:16:45 -0700
+Subject: [PATCH] Remove newline from format line
+
+Fixes
+
+error: '__builtin___snprintf_chk' output truncated before the last format character [-Werror=format-truncation=]
+ "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ addrdb/addrdb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/addrdb/addrdb.c b/addrdb/addrdb.c
+index 4bb7f79..05d53f3 100644
+--- a/addrdb/addrdb.c
++++ b/addrdb/addrdb.c
+@@ -178,7 +178,7 @@ int addrdb_dump_leases(const char *lease_file)
+ continue;
+ }
+ snprintf(hwaddr_buf, sizeof(hwaddr_buf),
+- "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
++ "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
+ lease->hwaddr[0], lease->hwaddr[1],
+ lease->hwaddr[2], lease->hwaddr[3],
+ lease->hwaddr[4], lease->hwaddr[5],
+--
+2.12.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch
new file mode 100644
index 000000000..0a81a2252
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch
@@ -0,0 +1,44 @@
+From ab725a3faaeead90ae3c63cbcd370af087c413a5 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Mon, 27 Mar 2017 17:55:06 -0700
+Subject: [PATCH] addrdb/coord-config-parse.y: add missing <time.h> include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The %union definition uses the time_t structure. In order to use this
+structure, the <time.h> header has to be included. Otherwise, the build
+breaks with some C libraries, such as musl:
+
+In file included from coord-config-lex.l:23:0:
+coord-config-parse.y:107:2: error: unknown type name ‘time_t’
+ time_t timestamp;
+ ^
+
+This patch includes <time.h> using the '%code requires' directive of
+Yacc.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ addrdb/coord-config-parse.y | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y
+index 2e10a88..85ee058 100644
+--- a/addrdb/coord-config-parse.y
++++ b/addrdb/coord-config-parse.y
+@@ -102,6 +102,10 @@
+
+ %}
+
++%code requires {
++#include <time.h>
++}
++
+ %union {
+ unsigned long number;
+ time_t timestamp;
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
new file mode 100644
index 000000000..493832bb8
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
@@ -0,0 +1,30 @@
+From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Apr 2018 14:31:05 -0700
+Subject: [PATCH] coordinator: Fix strncpy range warning
+
+Fixes
+error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..ca49418 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -296,7 +296,8 @@ int main(int argc, char **argv)
+ if(!lease_file)
+ lease_file = LEASE_FILE;
+
+- strncpy(pname, argv[0], PATH_MAX);
++ strncpy(pname, argv[0], PATH_MAX - 1);
++ pname[PATH_MAX - 1] = '\0';
+
+ pid_file = getenv("PID_FILE");
+ if (!pid_file)
+--
+2.16.3
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch
new file mode 100644
index 000000000..68393067d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch
@@ -0,0 +1,27 @@
+From ad088233608ba2205511da4f270f8ba29844b84c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Apr 2017 09:02:02 -0700
+Subject: [PATCH] src/iz.c: Undef dprintf before redefining
+
+Clang is picky and warns about macros redefinition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/iz.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/iz.c b/src/iz.c
+index 32be1a8..886f0a5 100644
+--- a/src/iz.c
++++ b/src/iz.c
+@@ -60,6 +60,7 @@ static int iz_seq = 0;
+ /* Parsed options */
+ static int iz_debug = 0;
+
++#undef dprintf
+ #define dprintf(lvl, fmt...) \
+ do { \
+ if (iz_debug >= lvl) \
+--
+2.12.2
+
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch
new file mode 100644
index 000000000..9ecd707b4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch
@@ -0,0 +1,41 @@
+Disable building manpages so that make install doesn't fail due to lack of help2man
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 46c4017..d6ed312 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,11 +9,6 @@ izcoordinator_DESC = "simple coordinator for IEEE 802.15.4 network"
+ iz_DESC = "configure an IEEE 802.15.4 interface"
+ izchat_DESC = "simple chat program using IEEE 802.15.4"
+
+-if MANPAGES
+-dist_man_MANS = $(manpages)
+-endif
+-EXTRA_DIST = $(manpages)
+-
+ izattach_SOURCES = serial.c
+
+ iz_SOURCES = iz.c iz-common.c iz-mac.c iz-phy.c
+@@ -27,18 +22,6 @@ izcoordinator_LDADD = ../addrdb/libaddrdb.la $(LDADD) $(NL_LIBS) $(LEXLIB)
+ iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE
+ iz_LDADD = $(LDADD) $(NL_LIBS)
+
+-izattach.8: $(izattach_SOURCES) $(top_srcdir)/configure.ac
+- -$(HELP2MAN) -o $@ -s 8 -N -n $(izattach_DESC) $(builddir)/izattach
+-
+-izcoordinator.8: $(izcoordinator_SOURCES) $(top_srcdir)/configure.ac
+- -$(HELP2MAN) -o $@ -s 8 -N -n $(izcoordinator_DESC) $(builddir)/izcoordinator
+-
+-iz.8: $(iz_SOURCES) $(top_srcdir)/configure.ac
+- -$(HELP2MAN) -o $@ -s 8 -N -n $(iz_DESC) $(builddir)/iz
+-
+-izchat.1: $(izchat_SOURCES) $(top_srcdir)/configure.ac
+- -$(HELP2MAN) -o $@ -s 1 -N -n $(izchat_DESC) $(builddir)/izchat
+-
+ install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)`dirname $(leasefile)`
+ $(mkinstalldirs) $(DESTDIR)`dirname $(pidfile)`
diff --git a/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
new file mode 100644
index 000000000..d0fe59c98
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utilities for managing the Linux LoWPAN stack"
+DESCRIPTION = "This is a set of utils to manage the Linux LoWPAN stack. \
+The LoWPAN stack aims for IEEE 802.15.4-2003 (and for lesser extent IEEE 802.15.4-2006) compatibility."
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "flex-native bison-native libnl python"
+
+PV = "0.3.1+git${SRCPV}"
+SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
+ file://no-help2man.patch \
+ file://0001-Fix-build-errors-with-clang.patch \
+ file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
+ file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
+ file://0001-Remove-newline-from-format-line.patch \
+ file://0001-coordinator-Fix-strncpy-range-warning.patch \
+ "
+SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
+
+S = "${WORKDIR}/git"
+
+inherit autotools python-dir pkgconfig
+
+CACHED_CONFIGUREVARS += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}/lowpan-tools"
+
+CFLAGS += "-Wno-initializer-overrides"
+
+do_install_append() {
+ rmdir ${D}${localstatedir}/run
+}
+
+FILES_${PN}-dbg += "${libexecdir}/lowpan-tools/.debug/"
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${libdir}/python*"
diff --git a/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb b/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb
new file mode 100644
index 000000000..a90177f19
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Tool to view/change network interface MAC addresses"
+DESCRIPTION = "A GNU/Linux utility for viewing/manipulating the MAC address of network interfaces."
+HOMEPAGE = "http://www.alobbs.com/macchanger"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+SECTION = "net"
+
+SRC_URI = "${GNU_MIRROR}/macchanger/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "79b7cdaeca3d8ebafa764c4b0dd03ab7"
+SRC_URI[sha256sum] = "d44bfa27cb29c5a718627cb3ef3aa42eb5130426545eb2031120826cd73fa8fe"
+
+FILES_${PN} = " \
+ ${bindir}/${BPN} \
+ ${datadir}/${BPN}/wireless.list \
+ ${datadir}/${BPN}/OUI.list \
+"
+
+FILES_${PN}-doc = " \
+ ${datadir}/info \
+ ${datadir}/man \
+"
+
+inherit autotools
diff --git a/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
new file mode 100644
index 000000000..544b840fe
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
@@ -0,0 +1,32 @@
+memcached: add knob to detect whether hugetlbfs are checked
+
+Add knob to detect whether hugetlbfs are checked or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7f22f21..21691b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -314,7 +314,12 @@ fi
+ dnl ----------------------------------------------------------------------------
+
+ AC_SEARCH_LIBS(umem_cache_create, umem)
+-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
++AC_ARG_ENABLE(hugetlbfs,
++ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
++
++if test "x$enable_hugetlbfs" = "xyes"; then
++ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
++fi
+
+ AC_HEADER_STDBOOL
+ AH_BOTTOM([#if HAVE_STDBOOL_H
+--
+1.8.3.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb b/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb
new file mode 100644
index 000000000..fd3d171f0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.0.bb
@@ -0,0 +1,52 @@
+SUMMARY = "A high-performance memory object caching system"
+DESCRIPTION = "\
+ memcached optimizes specific high-load serving applications that are designed \
+ to take advantage of its versatile no-locking memory access system. Clients \
+ are available in several different programming languages, to suit the needs \
+ of the specific application. Traditionally this has been used in mod_perl \
+ apps to avoid storing large chunks of data in Apache memory, and to share \
+ this burden across several machines."
+SECTION = "web"
+HOMEPAGE = "http://memcached.org/"
+LICENSE = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff"
+
+inherit autotools
+
+DEPENDS += "libevent"
+RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
+ perl-module-tie-hash bash \
+ "
+
+SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
+ file://memcached-add-hugetlbfs-check.patch \
+ "
+SRC_URI[md5sum] = "81326513f60d7ba482f8131975cd55ae"
+SRC_URI[sha256sum] = "c001f812024bb461b5e4d7d0506daab63dff9614eea26f46536c3b7e1e601c32"
+
+# set the same COMPATIBLE_HOST as libhugetlbfs
+COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
+
+python __anonymous () {
+ endianness = d.getVar('SITEINFO_ENDIANNESS')
+ if endianness == 'le':
+ d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little")
+ else:
+ d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big")
+}
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "memcached"
+INITSCRIPT_PARAMS = "defaults"
+
+do_install_append() {
+ install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached
+ mkdir -p ${D}/usr/share/memcached/scripts
+ install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts
+ install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb b/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb
new file mode 100644
index 000000000..9d3275e2d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Combined traceroute and ping utility"
+DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool."
+HOMEPAGE = "http://www.bitwizard.nl/mtr/"
+SECTION = "net"
+DEPENDS = "ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://ui/mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
+
+PV .= "+git${SRCPV}"
+
+SRCREV = "e6d0a7e93129e8023654ebf58dfa8135d1b1af56"
+SRC_URI = "git://github.com/traviscross/mtr"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-gtk"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+PACKAGES += "${PN}-bash-completions"
+
+FILES_${PN}-bash-completions = "${datadir}/bash-completion/"
diff --git a/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb b/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb
new file mode 100644
index 000000000..2ad75bda6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Network Block Device"
+HOMEPAGE = "http://nbd.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "73d11644a28b9f335292cdb3bdc4b74b"
+SRC_URI[sha256sum] = "14420f74cb16dc609a9302ed1efd653064bed7a8357e9d73daabc33608e3f2a0"
+
+inherit autotools pkgconfig
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-dbg ${PN}-trdump ${PN}-doc"
+
+FILES_${PN}-client = "${sbindir}/${BPN}-client"
+FILES_${PN}-server = "${bindir}/${BPN}-server"
+FILES_${PN}-trdump = "${bindir}/${BPN}-trdump"
diff --git a/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.31.bb b/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.31.bb
new file mode 100644
index 000000000..4b072f7e7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.31.bb
@@ -0,0 +1,27 @@
+SUMMARY = "reimplement libdjb"
+DESCRIPTION = "libowfat is a library of general purpose APIs extracted from Dan \
+Bernstein's software (libdjb), reimplemented and covered by the GNU \
+General Public License Version 2 (no later versions)."
+HOMEPAGE = "http://www.fefe.de/libowfat"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "https://www.fefe.de/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "120798fab86cfd72dc6b12284d248dd0"
+SRC_URI[sha256sum] = "d1e4ac1cfccbb7dc51d77d96398e6302d229ba7538158826c84cb4254c7e8a12"
+
+EXTRA_OEMAKE = "\
+ DIET= \
+ CC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}' \
+ CCC='${CC}' CFLAGS='${CFLAGS} -I.' CFLAGS_OPT='${CFLAGS} -I.' \
+"
+
+do_install() {
+ make install \
+ DESTDIR=${D} \
+ INCLUDEDIR=${includedir}/${BPN} \
+ LIBDIR=${libdir} \
+ MAN3DIR=${mandir}/man3
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb b/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 000000000..f42223b1f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb
@@ -0,0 +1,31 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+ DIET= \
+ DEBUG=nostrip \
+ CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"
+
+do_install() {
+ install -d -m0755 ${D}${bindir} ${D}${mandir}/man1
+
+ install -m0755 ncp ${D}${bindir}
+ ln -sf ncp ${D}${bindir}/npoll
+ ln -sf ncp ${D}${bindir}/npush
+
+ install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
+ ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
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 000000000..eeae5326d
--- /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 000000000..dc58b5b79
--- /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 000000000..3cc2ba80c
--- /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 000000000..cebc1d9cd
--- /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"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch b/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
new file mode 100644
index 000000000..0966b6580
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
@@ -0,0 +1,379 @@
+From ccd166b73eaae4dd1e1785c63ceb9b303568ed46 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 21 Mar 2017 11:30:49 -0700
+Subject: [PATCH] bundle own base64 encode/decode functions
+
+Not all libc implementations provide it.
+as an aside libresolv is no longer needed
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 4 +-
+ base64.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ netcat.c | 2 +
+ socks.c | 3 +
+ 4 files changed, 320 insertions(+), 2 deletions(-)
+ create mode 100644 base64.c
+
+Index: netcat-openbsd-1.105/Makefile
+===================================================================
+--- netcat-openbsd-1.105.orig/Makefile
++++ netcat-openbsd-1.105/Makefile
+@@ -1,9 +1,9 @@
+ # $OpenBSD: Makefile,v 1.6 2001/09/02 18:45:41 jakob Exp $
+
+ PROG= nc
+-SRCS= netcat.c atomicio.c socks.c
++SRCS= netcat.c atomicio.c socks.c base64.c
+
+-LIBS= `pkg-config --libs libbsd` -lresolv
++LIBS= `pkg-config --libs libbsd`
+ OBJS= $(SRCS:.c=.o)
+ CFLAGS= -g -O2
+ LDFLAGS= -Wl,--no-add-needed
+Index: netcat-openbsd-1.105/base64.c
+===================================================================
+--- /dev/null
++++ netcat-openbsd-1.105/base64.c
+@@ -0,0 +1,313 @@
++/*
++ * Copyright (c) 1996-1999 by Internet Software Consortium.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ */
++
++/*
++ * Portions Copyright (c) 1995 by International Business Machines, Inc.
++ *
++ * International Business Machines, Inc. (hereinafter called IBM) grants
++ * permission under its copyrights to use, copy, modify, and distribute this
++ * Software with or without fee, provided that the above copyright notice and
++ * all paragraphs of this notice appear in all copies, and that the name of IBM
++ * not be used in connection with the marketing of any product incorporating
++ * the Software or modifications thereof, without specific, written prior
++ * permission.
++ *
++ * To the extent it has a right to do so, IBM grants an immunity from suit
++ * under its patents, if any, for the use, sale or manufacture of products to
++ * the extent that such products are used for performing Domain Name System
++ * dynamic updates in TCP/IP networks by means of the Software. No immunity is
++ * granted for any product per se or for any other function of any product.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
++ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
++ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
++ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
++ */
++
++#if !defined(LINT) && !defined(CODECENTER)
++static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $";
++#endif /* not lint */
++
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/socket.h>
++
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <arpa/nameser.h>
++
++#include <ctype.h>
++#include <resolv.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#define Assert(Cond) if (!(Cond)) abort()
++
++static const char Base64[] =
++ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
++static const char Pad64 = '=';
++
++/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
++ The following encoding technique is taken from RFC 1521 by Borenstein
++ and Freed. It is reproduced here in a slightly edited form for
++ convenience.
++
++ A 65-character subset of US-ASCII is used, enabling 6 bits to be
++ represented per printable character. (The extra 65th character, "=",
++ is used to signify a special processing function.)
++
++ The encoding process represents 24-bit groups of input bits as output
++ strings of 4 encoded characters. Proceeding from left to right, a
++ 24-bit input group is formed by concatenating 3 8-bit input groups.
++ These 24 bits are then treated as 4 concatenated 6-bit groups, each
++ of which is translated into a single digit in the base64 alphabet.
++
++ Each 6-bit group is used as an index into an array of 64 printable
++ characters. The character referenced by the index is placed in the
++ output string.
++
++ Table 1: The Base64 Alphabet
++
++ Value Encoding Value Encoding Value Encoding Value Encoding
++ 0 A 17 R 34 i 51 z
++ 1 B 18 S 35 j 52 0
++ 2 C 19 T 36 k 53 1
++ 3 D 20 U 37 l 54 2
++ 4 E 21 V 38 m 55 3
++ 5 F 22 W 39 n 56 4
++ 6 G 23 X 40 o 57 5
++ 7 H 24 Y 41 p 58 6
++ 8 I 25 Z 42 q 59 7
++ 9 J 26 a 43 r 60 8
++ 10 K 27 b 44 s 61 9
++ 11 L 28 c 45 t 62 +
++ 12 M 29 d 46 u 63 /
++ 13 N 30 e 47 v
++ 14 O 31 f 48 w (pad) =
++ 15 P 32 g 49 x
++ 16 Q 33 h 50 y
++
++ Special processing is performed if fewer than 24 bits are available
++ at the end of the data being encoded. A full encoding quantum is
++ always completed at the end of a quantity. When fewer than 24 input
++ bits are available in an input group, zero bits are added (on the
++ right) to form an integral number of 6-bit groups. Padding at the
++ end of the data is performed using the '=' character.
++
++ Since all base64 input is an integral number of octets, only the
++ -------------------------------------------------
++ following cases can arise:
++
++ (1) the final quantum of encoding input is an integral
++ multiple of 24 bits; here, the final unit of encoded
++ output will be an integral multiple of 4 characters
++ with no "=" padding,
++ (2) the final quantum of encoding input is exactly 8 bits;
++ here, the final unit of encoded output will be two
++ characters followed by two "=" padding characters, or
++ (3) the final quantum of encoding input is exactly 16 bits;
++ here, the final unit of encoded output will be three
++ characters followed by one "=" padding character.
++ */
++
++int
++b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
++ size_t datalength = 0;
++ u_char input[3];
++ u_char output[4];
++ size_t i;
++
++ while (2 < srclength) {
++ input[0] = *src++;
++ input[1] = *src++;
++ input[2] = *src++;
++ srclength -= 3;
++
++ output[0] = input[0] >> 2;
++ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++ output[3] = input[2] & 0x3f;
++ Assert(output[0] < 64);
++ Assert(output[1] < 64);
++ Assert(output[2] < 64);
++ Assert(output[3] < 64);
++
++ if (datalength + 4 > targsize)
++ return (-1);
++ target[datalength++] = Base64[output[0]];
++ target[datalength++] = Base64[output[1]];
++ target[datalength++] = Base64[output[2]];
++ target[datalength++] = Base64[output[3]];
++ }
++
++ /* Now we worry about padding. */
++ if (0 != srclength) {
++ /* Get what's left. */
++ input[0] = input[1] = input[2] = '\0';
++ for (i = 0; i < srclength; i++)
++ input[i] = *src++;
++
++ output[0] = input[0] >> 2;
++ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++ Assert(output[0] < 64);
++ Assert(output[1] < 64);
++ Assert(output[2] < 64);
++
++ if (datalength + 4 > targsize)
++ return (-1);
++ target[datalength++] = Base64[output[0]];
++ target[datalength++] = Base64[output[1]];
++ if (srclength == 1)
++ target[datalength++] = Pad64;
++ else
++ target[datalength++] = Base64[output[2]];
++ target[datalength++] = Pad64;
++ }
++ if (datalength >= targsize)
++ return (-1);
++ target[datalength] = '\0'; /* Returned value doesn't count \0. */
++ return (datalength);
++}
++//libresolv_hidden_def (b64_ntop)
++
++/* skips all whitespace anywhere.
++ converts characters, four at a time, starting at (or after)
++ src from base - 64 numbers into three 8 bit bytes in the target area.
++ it returns the number of data bytes stored at the target, or -1 on error.
++ */
++
++int
++b64_pton(char const *src, u_char *target, size_t targsize) {
++ int tarindex, state, ch;
++ char *pos;
++
++ state = 0;
++ tarindex = 0;
++
++ while ((ch = *src++) != '\0') {
++ if (isspace(ch)) /* Skip whitespace anywhere. */
++ continue;
++
++ if (ch == Pad64)
++ break;
++
++ pos = strchr(Base64, ch);
++ if (pos == 0) /* A non-base64 character. */
++ return (-1);
++
++ switch (state) {
++ case 0:
++ if (target) {
++ if ((size_t)tarindex >= targsize)
++ return (-1);
++ target[tarindex] = (pos - Base64) << 2;
++ }
++ state = 1;
++ break;
++ case 1:
++ if (target) {
++ if ((size_t)tarindex + 1 >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64) >> 4;
++ target[tarindex+1] = ((pos - Base64) & 0x0f)
++ << 4 ;
++ }
++ tarindex++;
++ state = 2;
++ break;
++ case 2:
++ if (target) {
++ if ((size_t)tarindex + 1 >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64) >> 2;
++ target[tarindex+1] = ((pos - Base64) & 0x03)
++ << 6;
++ }
++ tarindex++;
++ state = 3;
++ break;
++ case 3:
++ if (target) {
++ if ((size_t)tarindex >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64);
++ }
++ tarindex++;
++ state = 0;
++ break;
++ default:
++ abort();
++ }
++ }
++
++ /*
++ * We are done decoding Base-64 chars. Let's see if we ended
++ * on a byte boundary, and/or with erroneous trailing characters.
++ */
++
++ if (ch == Pad64) { /* We got a pad char. */
++ ch = *src++; /* Skip it, get next. */
++ switch (state) {
++ case 0: /* Invalid = in first position */
++ case 1: /* Invalid = in second position */
++ return (-1);
++
++ case 2: /* Valid, means one byte of info */
++ /* Skip any number of spaces. */
++ for ((void)NULL; ch != '\0'; ch = *src++)
++ if (!isspace(ch))
++ break;
++ /* Make sure there is another trailing = sign. */
++ if (ch != Pad64)
++ return (-1);
++ ch = *src++; /* Skip the = */
++ /* Fall through to "single trailing =" case. */
++ /* FALLTHROUGH */
++
++ case 3: /* Valid, means two bytes of info */
++ /*
++ * We know this char is an =. Is there anything but
++ * whitespace after it?
++ */
++ for ((void)NULL; ch != '\0'; ch = *src++)
++ if (!isspace(ch))
++ return (-1);
++
++ /*
++ * Now make sure for cases 2 and 3 that the "extra"
++ * bits that slopped past the last full byte were
++ * zeros. If we don't check them, they become a
++ * subliminal channel.
++ */
++ if (target && target[tarindex] != 0)
++ return (-1);
++ }
++ } else {
++ /*
++ * We ended by seeing the end of the string. Make sure we
++ * have no partial bytes lying around.
++ */
++ if (state != 0)
++ return (-1);
++ }
++
++ return (tarindex);
++}
+Index: netcat-openbsd-1.105/netcat.c
+===================================================================
+--- netcat-openbsd-1.105.orig/netcat.c
++++ netcat-openbsd-1.105/netcat.c
+@@ -169,6 +169,9 @@ static int connect_with_timeout(int fd,
+ socklen_t salen, int ctimeout);
+ static void quit();
+
++int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize);
++int b64_pton(char const *src, u_char *target, size_t targsize);
++
+ int
+ main(int argc, char *argv[])
+ {
+Index: netcat-openbsd-1.105/socks.c
+===================================================================
+--- netcat-openbsd-1.105.orig/socks.c
++++ netcat-openbsd-1.105/socks.c
+@@ -53,6 +53,9 @@
+ #define SOCKS_DOMAIN 3
+ #define SOCKS_IPV6 4
+
++int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize);
++int b64_pton(char const *src, u_char *target, size_t targsize);
++
+ int remote_connect(const char *, const char *, struct addrinfo);
+ int socks_connect(const char *, const char *, struct addrinfo,
+ const char *, const char *, struct addrinfo, int,
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
new file mode 100644
index 000000000..9d7420f8c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
@@ -0,0 +1,56 @@
+require netcat.inc
+SUMMARY = "OpenBSD Netcat"
+HOMEPAGE = "http://ftp.debian.org"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=ee6bbaacb5db5f2973818f0902c3ae6f"
+
+DEPENDS += "glib-2.0 libbsd"
+do_patch[depends] = "quilt-native:do_populate_sysroot"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
+ ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch;subdir=${BP} \
+ file://0001-bundle-own-base64-encode-decode-functions.patch \
+ "
+
+SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1"
+SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e"
+SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b"
+SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'"
+
+do_configure[noexec] = "1"
+
+netcat_do_patch() {
+ cd ${S}
+ quilt pop -a || true
+ if [ -d ${S}/.pc-netcat ]; then
+ rm -rf ${S}/.pc
+ mv ${S}/.pc-netcat ${S}/.pc
+ QUILT_PATCHES=${S}/debian/patches quilt pop -a
+ rm -rf ${S}/.pc ${S}/debian
+ fi
+ QUILT_PATCHES=${S}/debian/patches quilt push -a
+ mv ${S}/.pc ${S}/.pc-netcat
+}
+
+do_unpack[cleandirs] += "${S}"
+
+python do_patch() {
+ bb.build.exec_func('netcat_do_patch', d)
+ bb.build.exec_func('patch_do_patch', d)
+}
+
+do_compile() {
+ cd ${S}
+ pkgrel=4
+ oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN}
+}
+ALTERNATIVE_PRIORITY = "60"
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc b/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc
new file mode 100644
index 000000000..15441645b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc
@@ -0,0 +1,15 @@
+SUMMARY = "GNU Netcat"
+HOMEPAGE = "http://netcat.sourceforge.net"
+DESCRIPTION = "A simple Unix utility which reads and writes data across network \
+connections using TCP or UDP protocol. It is designed to be a reliable \
+'back-end' tool that can be used directly or easily driven by other \
+programs and scripts. At the same time it is a feature-rich network \
+debugging and exploration tool, since it can create almost any kind of \
+connection you would need and has several interesting built-in \
+capabilities."
+
+SECTION = "net"
+inherit update-alternatives gettext pkgconfig
+
+ALTERNATIVE_${PN} = "nc"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 000000000..dd1938a99
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
@@ -0,0 +1,34 @@
+Make netcat_flag_count() return positive value
+
+C language has 3 distinct char types:
+ char
+ unsigned char
+ signed char
+A char has the same range of values as signed char on X86,
+but same as unsigned char on PPC which made netcat_flag_count
+return a negative value, now we force variable c as signed char
+to make netcat_flag_count return positive value.
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ src/flagset.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/flagset.c b/src/flagset.c
+index 442b634..54ac898 100644
+--- a/src/flagset.c
++++ b/src/flagset.c
+@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
+
+ int netcat_flag_count(void)
+ {
+- register char c;
++ register signed char c;
+ register int i;
+ int ret = 0;
+
+--
+1.7.5.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 000000000..5cbcb08e8
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
@@ -0,0 +1,25 @@
+Apparently somewhere along the line HAVE_LOCALE_H was changed to
+HAVE_LC_MESSAGES. Adjust netcat to match.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: netcat-0.7.1/src/intl.h
+===================================================================
+--- netcat-0.7.1.orig/src/intl.h
++++ netcat-0.7.1/src/intl.h
+@@ -25,11 +25,11 @@
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+
+-#ifdef HAVE_LOCALE_H
++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #else
+ #error You must have locale.h in your system
+-#endif /* HAVE_LOCALE_H */
++#endif /* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
+
+ /* Our dear (and very common) gettext macros */
+ #define _(String) gettext(String)
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
new file mode 100644
index 000000000..9b0ed58d6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
@@ -0,0 +1,32 @@
+Replace obsoleted AM_CONFIG_HEADER flagged by autoconf 2.69
+locale.h check was picked from old gettext macros but with new aclocal
+it picks the right 0.18 gettext.m4 and does not get the check
+therefore we explicitly add it to configure.ac
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: netcat-0.7.1/configure.ac
+===================================================================
+--- netcat-0.7.1.orig/configure.ac 2013-01-18 01:30:01.928069739 -0800
++++ netcat-0.7.1/configure.ac 2013-01-18 01:32:50.568073009 -0800
+@@ -26,8 +26,7 @@
+ AC_PREREQ(2.53)
+
+ dnl without this order in this file, automake will be confused!
+-AM_CONFIG_HEADER(config.h)
+-
++AC_CONFIG_HEADERS(config.h)
+ dnl check for programs. first the c compiler.
+ AC_PROG_CC
+ AC_PROG_CPP
+@@ -56,7 +55,7 @@
+ AC_LBL_LIBRARY_NET
+
+ dnl Fortunately we have Solaris...
+-AC_CHECK_HEADERS(sys/sockio.h)
++AC_CHECK_HEADERS(sys/sockio.h locale.h)
+
+ AC_CHECK_FUNCS(srandom random)
+ if test $ac_cv_func_srandom = no; then
diff --git a/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
new file mode 100644
index 000000000..d961af542
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -0,0 +1,22 @@
+require netcat.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+PR = "r3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
+ file://obsolete_autoconf_macros.patch \
+ file://netcat-locale_h.patch \
+ file://make-netcat_flag_count_work.patch \
+"
+
+SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
+SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb"
+
+inherit autotools
+
+do_install_append() {
+ install -d ${D}${bindir}
+ mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN}
+}
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb b/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
new file mode 100644
index 000000000..9a6f60ea2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
@@ -0,0 +1,71 @@
+SUMMARY = "netcf"
+DESCRIPTION = "netcf is a cross-platform network configuration library."
+HOMEPAGE = "https://pagure.io/netcf"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
+
+SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4"
+PV .= "+git${SRCPV}"
+
+SRC_URI = "git://pagure.io/netcf.git;protocol=https \
+"
+
+DEPENDS += "augeas libnl libxslt libxml2 gnulib"
+
+S = "${WORKDIR}/git"
+
+inherit gettext autotools pkgconfig systemd
+
+EXTRA_OECONF_append_class-target = " --with-driver=redhat"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend() {
+ currdir=`pwd`
+ cd ${S}
+
+ # avoid bootstrap cloning gnulib on every configure
+ # the dir starts out empty from the pkg, but unconditionally blow it
+ # away so if we reconfigure due to gnulib sysroot sig changes, we will
+ # get the newer gnulib content into the build here.
+ rm -rf ${S}/.gnulib
+ cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
+
+ # --force to avoid errors on reconfigure e.g if recipes changed we depend on
+ # | bootstrap: running: libtoolize --quiet
+ # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
+ # | ...
+ ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
+
+ cd $currdir
+}
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ if [ -d "${D}${libdir}/systemd/system" ]; then
+ if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then
+ mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+ rm -rf ${D}${libdir}/systemd/
+ fi
+ elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then
+ mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+ rm -rf ${D}${nonarch_libdir}/systemd/
+ fi
+ else
+ mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
+ rm -rf ${D}${sysconfdir}/rc.d/
+ fi
+}
+
+FILES_${PN} += " \
+ ${libdir} \
+ ${nonarch_libdir} \
+ "
+
+SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch b/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch
new file mode 100644
index 000000000..434b79049
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch
@@ -0,0 +1,30 @@
+Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ src/netlib.c | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/src/netlib.c b/src/netlib.c
+index 206e002..e33aae6 100644
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -2265,7 +2265,12 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
+ fall-back on what we had before, which is to use just the size of
+ an unsigned long. raj 2006-09-14 */
+
+-#if defined(__CPU_SETSIZE)
++#if defined(CPU_SETSIZE)
++#define NETPERF_CPU_SETSIZE CPU_SETSIZE
++#define NETPERF_CPU_SET(cpu, cpusetp) CPU_SET(cpu, cpusetp)
++#define NETPERF_CPU_ZERO(cpusetp) CPU_ZERO (cpusetp)
++ typedef cpu_set_t netperf_cpu_set_t;
++#elif defined(__CPU_SETSIZE)
+ #define NETPERF_CPU_SETSIZE __CPU_SETSIZE
+ #if defined(__CPU_SET_S)
+ #define NETPERF_CPU_SET(cpu, cpusetp) __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp)
+--
+1.7.1.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/files/init b/meta-openembedded/meta-networking/recipes-support/netperf/files/init
new file mode 100644
index 000000000..8ba2a6373
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netperf/files/init
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>.
+# Modified for Debian by Christoph Lameter <clameter@debian.org>
+# Modified for openembedded by Bruno Randolf <bruno.randolf@4g-systems.biz>
+
+### BEGIN INIT INFO
+# Provides: netperf
+# Required-Start: $remote_fs $local_fs $time
+# Required-Stop: $remote_fs $local_fs $time
+# Should-Start: $network $named
+# Should-Stop: $network $named
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: network benchmark
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/netserver
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting network benchmark server: netserver"
+ start-stop-daemon -S -x $DAEMON > /dev/null 2>&1
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping network benchmark server: netserver"
+ start-stop-daemon -K -x $DAEMON
+ echo "."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
+ # ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ start-stop-daemon -K -x $DAEMON
+ sleep 1
+ start-stop-daemon -S -x $DAEMON
+ ;;
+ *)
+ echo "Usage: /etc/init.d/netperf {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch b/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch
new file mode 100644
index 000000000..eff98bfde
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch
@@ -0,0 +1,58 @@
+Subject: [PATCH] netperf: fix vfork/fork
+
+Upstream-Status: Pending
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ src/netserver.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/netserver.c b/src/netserver.c
+index 379a106..f6a8b09 100644
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -1020,7 +1020,7 @@ process_requests()
+ void
+ spawn_child() {
+
+-#if defined(HAVE_FORK)
++#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+
+ if (debug) {
+ fprintf(where,
+@@ -1038,7 +1038,11 @@ spawn_child() {
+
+ signal(SIGCLD,SIG_IGN);
+
++#if defined(HAVE_FORK)
+ switch (fork()) {
++#else
++ switch (vfork()) {
++#endif
+ case -1:
+ fprintf(where,
+ "%s: fork() error %s (errno %d)\n",
+@@ -1405,7 +1409,7 @@ scan_netserver_args(int argc, char *argv[]) {
+
+ void
+ daemonize() {
+-#if defined(HAVE_FORK)
++#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+
+ if (debug) {
+ fprintf(where,
+@@ -1419,7 +1423,11 @@ daemonize() {
+ fflush(stdout);
+ fflush(stderr);
+
++#if defined(HAVE_FORK)
+ switch (fork()) {
++#else
++ switch (vfork()) {
++#endif
+ case -1:
+ fprintf(stderr,
+ "%s: fork() error %s (errno %d)\n",
+--
+1.7.1.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
new file mode 100644
index 000000000..f0e0f9cf1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
@@ -0,0 +1,66 @@
+SUMMARY = "A networking benchmarking tool"
+DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
+SECTION = "net"
+HOMEPAGE = "http://www.netperf.org/"
+LICENSE = "netperf"
+LICENSE_FLAGS = "non-commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
+
+PV = "2.7.0+git${SRCPV}"
+
+SRC_URI="git://github.com/HewlettPackard/netperf.git \
+ file://cpu_set.patch \
+ file://vfork.patch \
+ file://init"
+
+SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d autotools
+
+# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
+CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
+
+# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
+# larger than 2GB
+CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \
+ ' -D_FILE_OFFSET_BITS=64', '', d)}"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
+
+# autotools.bbclass attends to include m4 files with path depth <= 2 by
+# "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
+do_configure_prepend() {
+ test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files
+}
+
+do_install() {
+ sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init
+
+ install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d
+ install -m 4755 src/netperf ${D}${bindir}
+ install -m 4755 src/netserver ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf
+
+ # man
+ install -d ${D}${mandir}/man1/
+ install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
+ install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
+
+ # move scripts to examples directory
+ install -d ${D}${docdir}/netperf/examples
+ install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
+
+ # docs ..
+ install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
+ install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
+ install -m 0644 ${S}/README ${D}${docdir}/netperf
+ install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
+}
+
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
+
+INITSCRIPT_NAME="netperf"
+INITSCRIPT_PARAMS="defaults"
diff --git a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb b/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
new file mode 100644
index 000000000..3ccd486be
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "HTTP/2 C Library and tools"
+HOMEPAGE = "https://nghttp2.org/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec"
+
+SRC_URI = "https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.bz2"
+SRC_URI[md5sum] = "926f07ad3b50f38f7d8935ced04716cf"
+SRC_URI[sha256sum] = "0df4229f4123b5aa96e834ebcfdffe954e93d986f0252fd10123d50c6f010983"
+
+DEPENDS = "libxml2 openssl zlib jansson cunit c-ares"
+
+inherit cmake pythonnative python-dir
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init b/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
new file mode 100644
index 000000000..669c19ca0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de>
+#
+# /etc/init.d/ypbind
+#
+# and symbolic its link
+#
+# /usr/sbin/rcypbind
+#
+# System startup script for the ypbind daemon
+#
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $remote_fs $portmap
+# Should-Start: ypserv slpd
+# Required-Stop: portmap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Start ypbind (necessary for a NIS client)
+# Description: ypbind finds the server for NIS domains and maintains
+# the NIS binding information.
+### END INIT INFO
+
+# Need to use status function
+. /etc/init.d/functions
+
+YPBIND_BIN=/usr/sbin/ypbind
+pidfile=/var/run/ypbind.pid
+YPDOMAINNAME_bin=/usr/bin/ypdomainname
+
+[ -f /etc/default/ypbind ] && . /etc/default/ypbind
+
+case "$1" in
+ start)
+ echo -n "Starting ypbind"
+ ## If the domainname is not set, skip starting of ypbind
+ ## and return with "program not configured"
+ $YPDOMAINNAME_bin >/dev/null 2>&1
+ if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+ if [ -f /etc/defaultdomain ]; then
+ XDOMAINNAME=`cat /etc/defaultdomain`
+ $YPDOMAINNAME_bin "$XDOMAINNAME"
+ fi
+ $YPDOMAINNAME_bin >/dev/null 2>&1
+ if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+ # Tell the user this has skipped
+ echo -n " . . . . . . . . . . No domainname set"
+ # service is not configured
+ exit 1
+ fi
+ fi
+
+ ## If we don't have a /etc/yp.conf file, skip starting of
+ ## ypbind and return with "program not configured"
+ ## if you add the -broadcast Option later, comment this out.
+ if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
+ # Tell the user this has skipped
+ echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
+ # service is not configured
+ exit 1
+ fi
+
+ # evaluate the OPTIONS for ypbind-mt
+ OPTIONS=""
+ test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS"
+ test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS"
+ test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS"
+
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS
+ if [ $? -eq 0 ]; then
+ notfound=1
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+ ypwhich >/dev/null 2>&1 && { notfound=0 ; break; };
+ echo -n " ."
+ sleep 1;
+ done
+ if [ $notfound -eq 1 ]; then
+ echo -n " ${warn}No NIS server found${norm}";
+ fi
+ else
+ exit 1
+ fi
+ ;;
+ stop)
+ echo -n "Shutting down ypbind"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ # Remove static data, else glibc will continue to use NIS
+ rm -f /var/yp/binding/* /var/run/ypbind.pid
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ reload | force-reload)
+ echo -n "Reload service ypbind"
+ start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
+ ;;
+ status)
+ echo -n "Checking for ypbind: "
+ status $YPBIND_BIN
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ exit 1
+ ;;
+esac
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/nis.inc b/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
new file mode 100644
index 000000000..200eaf74d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
@@ -0,0 +1,31 @@
+# This include file contains global definitions for the
+# various NIS packages.
+#
+# These packages will only function correctly with glibc -
+# the rpcsvc functionality is not present in uclibc
+DESCRIPTION = "NIS Server and Tools"
+HOMEPAGE = "http://www.linux-nis.org/nis/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools gettext pkgconfig
+
+# install is broken because src/Makefile heroically adds '-s'
+# to the install flags - passing -s to the build /usr/bin/install!
+# install-strip gets it right but installs ypbind -m <default>,
+# not -m 555. In an OE build this is not, so far as I can see,
+# a security problem (and this fix to the build problem is *much*
+# easier and more maintainable.)
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install-strip
+}
+
+# An attempt to build on uclibc will fail, causing annoyance,
+# so force the package to be skipped here (this will cause a
+# 'nothing provides' error)
+python () {
+ os = d.getVar("TARGET_OS", True)
+ if os == "linux-uclibc":
+ raise bb.parse.SkipRecipe("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
new file mode 100644
index 000000000..21aa92cb3
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NIS Domainname
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/nisdomainname
+ExecStart=/usr/bin/domainname $NISDOMAINNAME
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
new file mode 100644
index 000000000..8c6837bac
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
@@ -0,0 +1,34 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools. \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+\
+This is the final IPv4-only version of yp-tools. \
+"
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+ file://domainname.service \
+"
+SRC_URI[md5sum] = "ba1f121c17e3ad65368be173b977cd13"
+SRC_URI[sha256sum] = "d01f70fadc643a55107a0edc47c6be99d0306bcc4f66df56f65e74238b0124c9"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
new file mode 100644
index 000000000..4e27e32d4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
@@ -0,0 +1,47 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools. \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+"
+
+# v4.2.3
+SRCREV = "1bfda29c342a81b97cb1995ffd9e8da5de63e7ab"
+
+SRC_URI = "git://github.com/thkukuk/yp-tools \
+ file://domainname.service \
+ "
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libtirpc libnsl2"
+
+inherit autotools systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = " \
+ --disable-rpath --disable-domainname \
+ "
+CFLAGS_append_libc-musl = " -Wno-error=cpp"
+
+FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
+FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
+FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
+FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
new file mode 100644
index 000000000..643b0a940
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
@@ -0,0 +1,67 @@
+From 5452961750275b1e3f7c95e9528338f0ee0357ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 09:17:35 -0700
+Subject: [PATCH] dns_hosts: Fix build with musl
+
+Add NETDB_* defines which are not available in musl
+remove need for sys/cdefs.h by remove __P
+Add _GNU_SOURCE for missing u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/Makefile.am | 2 +-
+ lib/dns_hosts.c | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 977a8db..35cb5b3 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,7 +8,7 @@
+ noinst_LIBRARIES = libcompat.a
+ noinst_HEADERS = ypbind3_binding.h
+
+-AM_CFLAGS = -D_REENTRANT=1 @WARNFLAGS@
++AM_CFLAGS = -D_GNU_SOURCE -D_REENTRANT=1 @WARNFLAGS@
+ AM_CPPFLAGS = -I$(srcdir) @TIRPC_CFLAGS@ @NSL_CFLAGS@ -DLOCALEDIR=\"$(localedir)\"
+
+ libcompat_a_SOURCES = dns_hosts.c res_options.h ypbind3_binding_dup.c \
+diff --git a/lib/dns_hosts.c b/lib/dns_hosts.c
+index fd421fd..6067879 100644
+--- a/lib/dns_hosts.c
++++ b/lib/dns_hosts.c
+@@ -64,6 +64,7 @@
+
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+@@ -84,6 +85,12 @@ extern struct hostent *_gethtbyaddr(const char *, int, int);
+ #ifndef LOG_AUTH
+ # define LOG_AUTH 0
+ #endif
++#ifndef NETDB_SUCCESS
++# define NETDB_SUCCESS 0
++#endif
++#ifndef NETDB_INTERNAL
++# define NETDB_INTERNAL -1
++#endif
+
+ #define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */
+
+@@ -101,7 +108,7 @@ static char hostbuf[8*1024];
+ static struct in_addr host_addr;
+
+ #ifdef RESOLVSORT
+-static void addrsort __P((char **, int));
++static void addrsort (char **, int);
+ #endif
+
+ #if PACKETSZ > 1024
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
new file mode 100644
index 000000000..1f8df42af
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=YP Bind
+Requires=domainname.service
+After=domainname.service network.target
+Before=systemd-user-sessions.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/ypbind.pid
+ExecStart=/usr/sbin/ypbind
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
new file mode 100644
index 000000000..9822f455e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
@@ -0,0 +1,62 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+require nis.inc
+
+DESCRIPTION = " \
+Multithreaded NIS bind service (ypbind-mt). \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features. Supports ypbind protocol V1 and V2. \
+Uses threads for better response. Supports multiple \
+domain bindings. Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x. Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first. \
+\
+This is the final IPv4-only version of ypbind-mt. \
+"
+HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
+DEPENDS = " \
+ yp-tools \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ "
+DEPENDS_append_libc-musl = " bsd-headers nss"
+RDEPENDS_${PN} += "yp-tools"
+
+# ypbind-mt now provides all the functionality of ypbind
+# and is used in place of it.
+PROVIDES += "ypbind"
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
+ file://ypbind.init \
+ file://ypbind.service \
+ file://0001-dns_hosts-Fix-build-with-musl.patch \
+ "
+SRC_URI[md5sum] = "1aeccd0d11c064d5d59c56941bca682b"
+SRC_URI[sha256sum] = "a2e1fa8fc992a12b289c229e00e38c20d59070c3bcf08babf40c692515c340e0"
+
+inherit systemd update-rc.d
+
+SYSTEMD_SERVICE_${PN} = "ypbind.service"
+INITSCRIPT_NAME = "ypbind"
+INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/nss3"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/rcS.d
+
+ install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
+}
+
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch
new file mode 100644
index 000000000..87a7778d9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch
@@ -0,0 +1,16 @@
+Obey LDFLAGS.
+
+Signed-off-by: Christopher Larson <kergoth@gmail.com>
+Upstream-Status: Pending
+
+--- Ntimed.orig/configure 2015-05-30 11:57:59.927796993 -0700
++++ Ntimed/configure 2015-05-30 11:58:26.143948894 -0700
+@@ -142,7 +142,7 @@
+
+ echo
+ echo "ntimed-client: ${l}"
+- echo " \${CC} \${CFLAGS} -o ntimed-client ${l} -lm"
++ echo " \${CC} \${CFLAGS} -o ntimed-client ${l} \${LDFLAGS} -lm"
+ echo
+ echo "clean:"
+ echo " rm -f ${l} ntimed-client"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb b/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
new file mode 100644
index 000000000..a749b1659
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Network time synchronization software, NTPD replacement"
+DESCRIPTION = "This is a preview/early-access/alpha/buzzword-of-the-times \
+release of a new FOSS project written to gradually take over the world of \
+networked timekeeping."
+HOMEPAGE = "https://github.com/bsdphk/Ntimed"
+SECTION = "net"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://main.c;beginline=2;endline=24;md5=89db8e76f2951f3fad167e7aa9718a44"
+
+SRC_URI = "git://github.com/bsdphk/Ntimed \
+ file://use-ldflags.patch"
+
+PV = "0.0+git${SRCPV}"
+SRCREV = "db0abbb4c80f2ecef6bc5d9639bca5bea28532a2"
+
+S = "${WORKDIR}/git"
+
+# use adjtimex on musl
+CFLAGS_append_libc-musl = " -Dntp_adjtime=adjtimex"
+
+EXTRA_OEMAKE = "\
+ 'CC=${CC}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+"
+
+do_configure () {
+ sh ${S}/configure
+}
+
+do_install () {
+ install -D -m 0755 ntimed-client ${D}${sbindir}/ntimed-client
+}
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "ntimed-client"
+
+PACKAGE_BEFORE_PN += "ntimed-client"
+FILES_ntimed-client = "${sbindir}/ntimed-client"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
new file mode 100644
index 000000000..81ffeec21
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
@@ -0,0 +1,26 @@
+From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 13:56:24 -0700
+Subject: [PATCH] nDPI: Include sys/types.h
+
+Needed for uint_t types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ nDPI/src/include/ipq_api.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
+===================================================================
+--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
+@@ -24,6 +24,7 @@
+ #ifndef __IPOQUE_API_INCLUDE_FILE__
+ #define __IPOQUE_API_INCLUDE_FILE__
+
++#include <sys/types.h>
+
+ #if defined(HAVE_NTOP) && defined(WIN32)
+ #include <winsock2.h>
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
new file mode 100644
index 000000000..1ead2a0c5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=A network traffic probe similar to the UNIX top command
+Requires=network.target
+
+ConditionPathExists=@SYSCONFDIR@/ntop.conf
+After=syslog.target network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/ntop-helper start
+ExecStop=@LIBEXECDIR@/ntop-helper stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
new file mode 100644
index 000000000..392cb082b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
@@ -0,0 +1,164 @@
+1)add --with-pcap-config option to use libpcap's pcap-config
+2)add AC_CHECK_LIB if user didn't specify PCAP_ROOT and pcap-config
+ put it before host check to make cross-compiling easier.
+ pcap doesn't need extra include and libs so it is fine.
+3)remove old rrd configure code but use pkg-config to config rrd
+ rrdtool should have the pkg-config file installed.
+4)fix python-config
+5)change AC_TRY_RUN to AC_COMPILE_IFELSE for pthread_rwlock_t checking
+6)fix a net-snmp-config bug
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 0c7c0a5..cad40be 100644
+--- a/configure.in
++++ b/configure.in
+@@ -230,14 +230,14 @@ dnl>
+ AC_ARG_WITH(void,
+ [ +-External-source-locations:-------------------------------------------------+])
+
+-AC_ARG_WITH( rrd-home,
+- [ --with-rrd-home=DIR Usually /usr/local/rrdtool-1.2.x],
+- RRD_HOME="$withval",
+- RRD_HOME=/usr/local/rrdtool-1.2.19)
+ AC_ARG_WITH( pcap-root,
+ [ --with-pcap-root=DIR LBNL pcap located in DIR],
+ PCAP_ROOT="$withval",
+ PCAP_ROOT=)
++AC_ARG_WITH( pcap-config,
++ [ --with-pcap-config=path/pcap-config where to find pcap-config],
++ PCAP_CONFIG="$withval",
++ PCAP_CONFIG=)
+ AC_ARG_WITH( gdbm-root,
+ [ --with-gdbm-root=DIR gdbm located in DIR],
+ GDBM_DIRECTORY="$withval",
+@@ -556,6 +556,7 @@ if test ".${PCAPRING_DIR}" != .; then
+ else
+
+ TMP_ROOT=${HOME}/PF_RING/userland/libpcap/
++FOUND_PCAP=1
+ if test ".${PCAP_ROOT}" == . &&
+ test -d ${TMP_ROOT} &&
+ test -r ${TMP_ROOT}/libpcap.a; then
+@@ -563,6 +564,18 @@ if test ".${PCAP_ROOT}" == . &&
+ CORELIBS="${CORELIBS} -L${TMP_ROOT} -L${HOME}/PF_RING/userland/lib -lpfring -lpcap "
+ INCS="${INCS} -I ${PCAP_ROOT}"
+ AC_MSG_RESULT([found in $PCAP_ROOT])
++elif test -n "${PCAP_CONFIG}" && test -x "${PCAP_CONFIG}"; then
++ CORELIBS="${CORELIBS} $(${PCAP_CONFIG} --libs)"
++ INCS="${INCS} $(${PCAP_CONFIG} --cflags)"
++ AC_DEFINE_UNQUOTED(HAVE_LIBPCAP, 1, [have libpcap ])
++ AC_MSG_RESULT([found pcap-config: $PCAP_CONFIG, libs:$(${PCAP_CONFIG} --libs) cflags:$(${PCAP_CONFIG} --cflags)])
++else
++ AC_CHECK_LIB(pcap, pcap_lookupdev, ,
++ [FOUND_PCAP=])
++fi
++
++if test -n "$FOUND_PCAP"; then
++ :
+ elif test ".${PCAP_ROOT}" != .; then
+ if test -d $PCAP_ROOT &&
+ test -r $PCAP_ROOT/lib/libpcap.a &&
+@@ -880,44 +893,11 @@ AC_CHECK_LIB([z], [zlibVersion], [], [
+ exit -1
+ ])
+
+-# RRD
+-if test -d "$RRD_HOME"; then
+- AC_MSG_RESULT(checking for RRD home... yes)
+-else
+- RRD_HOME=/usr/local/rrdtool
+- if test -d "$RRD_HOME"; then
+- AC_MSG_RESULT(Checking rrdtool in $RRD_HOME)
+- else
+- RRD_HOME=/usr/local
+- fi
+-fi
+-
+-RRD_LIB="-L${RRD_HOME}/lib -lrrd_th"
+-
+-if test -f "$RRD_HOME/lib/librrd_th.so"; then
+- AC_MSG_RESULT(checking for rrdtool... yes)
+-else
+- if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX
+- AC_MSG_RESULT(checking for rrdtool... yes)
+- else
+- if test -f "$RRD_HOME/lib/librrd_th.a"; then
+- AC_MSG_RESULT(checking for rrdtool... yes)
+- else
+- AC_CHECK_LIB([rrd_th], [main])
+- if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then
+- AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR);
+- AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/);
+- else
+- RRD_LIB=
+- fi
+- fi
+- fi
+-fi
+-
+-RRD_INC=
+-if test -d "${RRD_HOME}/include"; then
+- RRD_INC="-I${RRD_HOME}/include"
+-fi
++PKG_CHECK_MODULES( [RRD], [librrd] )
++AC_SUBST(RRD_CFLAGS)
++AC_SUBST(RRD_LIBS)
++RRD_INC=$RRD_FLAGS
++RRD_LIB=$RRD_LIBS
+
+ dnl> The failed recheck stuff below is courtesy of Chris Turbeville [turbo@verio.net]
+ dnl> Chris developed this for Solaris 9, confirming work I had done earlier for FreeBSD
+@@ -1041,7 +1021,7 @@ AC_CHECK_HEADERS([sched.h sys/sched.h])
+ AC_CHECK_HEADERS([pthread.h])
+
+ AC_MSG_CHECKING([if r/w locks are supported])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <pthread.h>
+
+ int main()
+@@ -1443,15 +1423,15 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+ AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+- if test "x$ac_cv_prog_ac_ct_NETSNMP" = "xnet-snmp-config"; then
++ if test -n "$NETSNMP"; then
+ AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+- SNMPLIBS="`net-snmp-config --libs`"
++ SNMPLIBS="`$NETSNMP --libs`"
+ SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
+ echo "net-snmp libs: ${SNMPLIBS}"
+ LIBS="${LIBS} ${SNMPLIBS}"
+ dnl remove unecessary path
+ LIBS=`echo ${LIBS}|sed -e s,'-R../lib',,g`
+- INCS="${INCS} `net-snmp-config --cflags`"
++ INCS="${INCS} `$NETSNMP --cflags`"
+ else
+ AC_MSG_RESULT(NETSNMP is not present: SNMP support is disabled)
+ fi
+@@ -1464,10 +1444,9 @@ SAVED_LIBS=$LIBS
+ dnl>
+ dnl> PYTHON
+ dnl>
+- AC_CHECK_TOOL(PYTHON, python-config)
+- PYTHON_CONFIG=""
++ AC_CHECK_TOOL(PYTHON_CONFIG, python-config)
+
+- if test "x$ac_cv_prog_ac_ct_PYTHON" != "xpython-config"; then
++ if test -z "$PYTHON_CONFIG"; then
+ if test -f "/etc/debian_version"; then
+ AC_MSG_RESULT(Please install python-dev and rerun configure)
+ exit 1
+@@ -1481,8 +1460,6 @@ dnl>
+ PYTHON_CONFIG="python-config"
+ fi
+ fi
+- else
+- PYTHON_CONFIG="python-config"
+ fi
+
+ if test "x$PYTHON_CONFIG" != "x"; then
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
new file mode 100644
index 000000000..269138df9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
@@ -0,0 +1,21 @@
+Check net-snmp-config's existence in case user specified the
+ac_cv_prog_NETSNMP to avoid HAVE_SNMP defined if the specified
+net-snmp-config doesn't exist.
+
+Upstream-Status: Inappropriate [Embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 6f3e88f..8ddf017 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1423,7 +1423,7 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+ AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+- if test -n "$NETSNMP"; then
++ if test -n "$NETSNMP" -a -e "$NETSNMP"; then
+ AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+ SNMPLIBS="`$NETSNMP --libs`"
+ SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
new file mode 100644
index 000000000..e7684c1b4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
@@ -0,0 +1,228 @@
+Modify ntop.init to WRLinux 5.0 style.
+
+Fix a small problem that when ntop not running,
+/etc/init.d/ntop stop will return 1
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ packages/RedHat/ntop.init | 102 +++++++++-----------------------------------
+ 1 files changed, 21 insertions(+), 81 deletions(-)
+
+diff --git a/packages/RedHat/ntop.init b/packages/RedHat/ntop.init
+index 40d49f1..a189c59 100755
+--- a/packages/RedHat/ntop.init
++++ b/packages/RedHat/ntop.init
+@@ -10,19 +10,9 @@
+ # You have set the admin password - read docs/1STRUN.txt
+ # You have created /etc/ntop.conf with appropriate parameters.
+
+-# To identify an interface to ntop, use the following flags
+-# in /etc/sysconfig/network-scripts/ifcfg-ethx
+-
+-# NTOP="yes" <--- means for ntop to use this interface
+-# NTOPCONFIG="yes" <--- means for ntop to configure this interface
+-
+ # Note that if you give a -i parameter in either /etc/ntop.conf or
+ # the command line, the scan is NOT performed.
+
+-# However, when it comes to the configuration step, with NTOPCONFIG="yes"
+-# the interface is configured regardless of how the interface list was
+-# specified.
+-
+ #
+ # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ #
+@@ -107,11 +97,7 @@ ntopusesyslog="local3"
+ invoked=$0
+
+ # Source function library.
+-. /etc/rc.d/init.d/functions
+-
+-# Source networking configuration.
+-. /etc/sysconfig/network
+-
++. /etc/init.d/functions
+
+ # Basic sanity checks...
+ if ! [ -x $prog ]; then
+@@ -124,16 +110,6 @@ if ! [ -x $prog ]; then
+ exit 1
+ fi
+
+-if [ ${NETWORKING} = "no" ]; then
+- echo ""
+- echo "ERROR -"
+- echo " Networking is not up!"
+- echo ""
+- echo "Aborting..."
+- echo ""
+- exit 1
+-fi
+-
+ if ! [ -f ${conf} ]; then
+ echo ""
+ echo "ERROR -"
+@@ -180,8 +156,8 @@ fi
+ if [ "${debug}" = "y" ]; then echo "DEBUG: parm file temp is ${parmfile}"; fi
+
+ cmd=`echo \
+- @${conf} \
+ -i tbd \
++ @${conf} \
+ $extra $@`
+
+ echo ${cmd} | awk ' \
+@@ -305,42 +281,6 @@ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuration
+
+ # Build list of interfaces, e.g eth0 eth1 eth1:1
+ # (Yeah, we'll have to convert that to eth0,eth1,eth1:1 later
+-if [ ".${ntopinterface}" = ".tbd" ]; then
+-
+- ntopinterface=""
+- iflist=`ip link show | \
+- awk '/^[0-9]*:\ eth/ { printf("%s ", substr($2, 1, length($2)-1)) }'`
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Scanning all interfaces $iflist"
+- if [ "${debug}" = "y" ]; then echo "DEBUG: Interface candidates are ${iflist}"; fi
+-
+- for eth in $iflist; do
+-
+- if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp]=['\"]?[Yy][Ee][Ss]['\"]?" \
+- /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntop=yes, skipping"
+- if [ "${debug}" = "y" ]; then echo "DEBUG: $eth not ntop=yes"; fi
+- continue
+- fi
+-
+- ntopinterface="${ntopinterface} $eth"
+-
+- ip=`ip addr show $eth | \
+- awk '/inet/ { printf("%s", substr($2, 1, index($2, "/")-1)) }'`
+-
+- if [ ".$ip" = "." ]; then
+- is="is unnumbered interface"
+- else
+- is="has IP address $ip"
+- fi
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is ntop=yes, ${is}"
+- if [ "${debug}" = "y" ]; then echo "DEBUG: $eth ntop=yes, ${is}"; fi
+-
+- done
+-
+-else
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Skipping interface scan - list in parms"
+-fi
+-
+ if [ "x${ntopinterface}" = "x" ]; then
+ ntopinterface="none"
+ fi
+@@ -462,12 +402,6 @@ config_interfaces () {
+ if="${if},${eth}"
+ fi
+
+- if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+- /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+- continue
+- fi
+-
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuring $eth"
+ if [ "${debug}" = "y" ]; then echo "DEBUG: Configuring $eth"; fi
+
+@@ -527,7 +461,7 @@ start () {
+ show_extra
+ config_interfaces
+
+- cmd=`echo $prog \
++ cmd=`echo \
+ @${conf} \
+ -i $if \
+ $extra $@`
+@@ -541,7 +475,7 @@ start () {
+ if [ ".${ldlibpath}" != "." ]; then
+ export LD_LIBRARY_PATH="${ldlibpath}"
+ fi
+- daemon ${cmd}
++ start-stop-daemon --start --quiet --exec $prog -- ${cmd}
+ RETVAL=$?
+
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/${name}${instance}
+@@ -551,6 +485,7 @@ start () {
+ stop () {
+ # stop daemon
+
++ NOT_RUNNING=1
+ RETVAL=1
+ echo -n $"Stopping ${name}${instance}: "
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Stopping: ${name}${instance}"
+@@ -563,13 +498,14 @@ stop () {
+ if [ $rc = 0 ]; then
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${pid}"
+ if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${pid}"; fi
+- kill -s SIGTERM ${pid}
++ kill -TERM ${pid} 2>&1 > /dev/null
+ RETVAL=$?
+ rm -f ${ntopdbfilepath}/ntop.pid
+ else
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find process ${pid} ... will kill by name"
+ if [ "${debug}" = "y" ]; then echo "Unable to find process ${pid} ... will kill by name"; fi
+ fi
++ NOT_RUNNING=0
+ else
+
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find ${ntopdbfilepath}/ntop.pid file ... will kill by name"
+@@ -577,15 +513,16 @@ stop () {
+
+ fi
+
+- echo
+-
+ if [ $RETVAL != 0 ]; then
+ pids=`ps axf | grep '\/usr\/bin\/ntop' | awk '{ printf(" %s", $1) }; END { print "" }'`
+- if [ "${pids}" != " " ]; then
++ if [ "${pids}" != "" ]; then
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${prog}...${pids}"
+ if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${prog}...${pids}"; fi
+- kill -INT ${pids}
++ kill -TERM ${pids} > /dev/null 2>&1
+ RETVAL=$?
++ NOT_RUNNING=0
++ else
++ NOT_RUNNING=1
+ fi
+ fi
+
+@@ -597,13 +534,9 @@ stop () {
+ if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring interfaces"; fi
+
+ for eth in ${ntopinterface}; do
+- if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+- /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+- logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+- if [ "${debug}" = "y" ]; then echo "DEBUG: $eth is not ntopconfigure=yes"; fi
+- continue
++ if [ "$eth" = "none" ]; then
++ continue
+ fi
+-
+ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unconfiguring $eth"
+ if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring $eth"; fi
+
+@@ -623,6 +556,13 @@ stop () {
+ if [ "${debug}" = "y" ]; then echo "DEBUG: Interfaces are unconfigured"; fi
+ fi
+
++ if [ $NOT_RUNNING -eq 1 -o $RETVAL -eq 0 ]; then
++ echo " [ OK ]"
++ RETVAL=0
++ else
++ echo " [ FAILED ]"
++ fi
++
+ return $RETVAL
+ }
+
+--
+1.7.5.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
new file mode 100644
index 000000000..9f57ca425
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
@@ -0,0 +1,19 @@
+change osName to version as it prints out "ntop Version".
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/webInterface.c b/webInterface.c
+index 5622e69..8cb7a67 100644
+--- a/webInterface.c
++++ b/webInterface.c
+@@ -5816,7 +5816,7 @@ static void printNtopConfigInfoData(int textPrintFlag, UserPref *pref) {
+ printInfoSectionTitle(textPrintFlag, "Basic Information");
+
+ safe_snprintf(__FILE__, __LINE__, formatBuf, sizeof(formatBuf), "%s (%d bit)",
+- osName, sizeof(long) == 8 ? 64 : 32);
++ version, sizeof(long) == 8 ? 64 : 32);
+ printFeatureConfigInfo(textPrintFlag, "ntop Version", formatBuf);
+
+ #ifndef WIN32
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
new file mode 100644
index 000000000..2b001c13e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
@@ -0,0 +1,32 @@
+[PATCH] replace 'inline' with 'static inline' for gcc 5.x
+
+gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which change
+the semantics for inline functions and the standalone 'inline'
+causes error with "gcc5 -g -o0"
+
+Replace inline with static inline to be compatible with both gcc 4
+and 5.
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ nDPI/src/lib/protocols/ssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nDPI/src/lib/protocols/ssl.c b/nDPI/src/lib/protocols/ssl.c
+index 245b8c3..72beda9 100644
+--- a/nDPI/src/lib/protocols/ssl.c
++++ b/nDPI/src/lib/protocols/ssl.c
+@@ -39,7 +39,7 @@ static void ipoque_int_ssl_add_connection(struct ipoque_detection_module_struct
+
+ #ifdef HAVE_NTOP
+ #ifndef WIN32
+-inline int min(int a, int b) { return(a < b ? a : b); }
++static inline int min(int a, int b) { return(a < b ? a : b); }
+ #endif
+
+ static void stripCertificateTrailer(char *buffer, int buffer_len) {
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
new file mode 100644
index 000000000..298fbec61
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
@@ -0,0 +1,137 @@
+SUMMARY = "ntop is network top"
+DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
+similar to what the popular top Unix command does."
+
+SECTION = "console/network"
+
+LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
+ file://ntop_configure_in.patch \
+ file://ntop_init.patch \
+ file://ntop_webInterface.patch \
+ file://ntop_configure_in_net_snmp_config_exist.patch \
+ file://ntop.service \
+ file://use-static-inline.patch \
+ file://0001-nDPI-Include-sys-types.h.patch \
+ "
+SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
+SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
+
+inherit autotools-brokensep useradd pythonnative pkgconfig systemd
+
+DEPENDS = "geoip rrdtool python zlib libpcap gdbm"
+
+PACKAGECONFIG ??= "openssl snmp plugins"
+PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
+PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
+--disable-snmp,net-snmp,"
+PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
+
+EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no"
+
+do_configure() {
+ cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI
+ cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
+ cp 3rd_party/* ./
+
+ # config nDPI
+ cd nDPI
+ ./configure ${CONFIGUREOPTS} --with-pic
+ cd ..
+
+ sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
+
+ # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
+ sed -i \
+ -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+ -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+ -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
+ ${S}/configure.in
+
+ # replace the DISTRO RELEASE in configure.in which are host's
+ # with our release, although those doesn't affect functionality
+ sed -i -e \
+ '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
+ ${S}/configure.in
+
+ # osName in original configure.in should be ${TARGET_SYS}
+ # which will show in ntop's "show configuration"
+ sed -i -e \
+ 's:^osName=.*:osName=${TARGET_SYS}:' \
+ ${S}/configure.in
+
+ # rename configureextra to configureextra_rename to avoid
+ # configure.in to guess host OS and pull in more configure, non needed
+ # which will cause some cross-compiling failure on specific host
+ # e.g. SUSE(SLED...)
+ test ! -f configureextra || mv -f configureextra configureextra_rename
+
+ # make sure configure finds python includdirs/libs with these envs
+ export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR}
+
+ autotools_do_configure
+}
+
+do_compile_prepend() {
+ cd nDPI
+ oe_runmake
+ cd ..
+}
+
+do_install_append() {
+ # remove the empty dirs
+ rm -rf ${D}${libdir}/plugins
+
+ install -D -m 0755 ${S}/packages/RedHat/ntop.init \
+ ${D}${sysconfdir}/init.d/ntop
+ install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
+ ${D}${sysconfdir}/ntop.conf
+
+ # change ntop dir in ntop.conf
+ # don't use the -P as the ntop.init didn't support it
+ sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
+ -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
+ ${D}${sysconfdir}/ntop.conf
+
+ # For systemd
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
+ install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
+ sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_system_unitdir}/ntop.service
+ fi
+
+ # Fix host-user-contaminated issue
+ chown -R root:root ${D}
+
+ chown -R ntop.ntop ${D}${datadir}/ntop
+ chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
+-s /usr/sbin/nologin -c 'ntop' ntop"
+GROUPADD_PARAM_${PN} = "-r ntop"
+
+SYSTEMD_SERVICE_${PN} = "ntop.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
+ ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
+FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
+ ${libdir}/libntopreport.so \
+ ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
+ ${libdir}/librrdPlugin.so \
+ ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
new file mode 100644
index 000000000..d45b7e38b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
@@ -0,0 +1,27 @@
+From 2310898533f059d875dcffd26ab6cf1b280292fd Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 12 Jan 2011 21:38:46 +0100
+
+---
+ include/ntp_syscall.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/include/ntp_syscall.h b/include/ntp_syscall.h
+index d1ce03e..9e18432 100644
+--- a/include/ntp_syscall.h
++++ b/include/ntp_syscall.h
+@@ -10,6 +10,14 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ # ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf
new file mode 100644
index 000000000..676e18645
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf
@@ -0,0 +1,17 @@
+# This is the most basic ntp configuration file
+# The driftfile must remain in a place specific to this
+# machine - it records the machine specific clock error
+driftfile /var/lib/ntp/drift
+# This should be a server that is close (in IP terms)
+# to the machine. Add other servers as required.
+# Unless you un-comment the line below ntpd will sync
+# only against the local system clock.
+#
+# server time.server.example.com
+#
+# Using local hardware clock as fallback
+# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
+server 127.127.1.0
+fudge 127.127.1.0 stratum 14
+# Defining a default security setting
+restrict default
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd
new file mode 100755
index 000000000..d1b9c4907
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd
@@ -0,0 +1,84 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: ntp
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Start NTP daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/ntpd
+PIDFILE=/var/run/ntpd.pid
+
+# ntpd init.d script for ntpdc from ntp.isc.org
+test -x $DAEMON -a -r /etc/ntp.conf || exit 0
+
+# rcS contains TICKADJ
+test -r /etc/default/rcS && . /etc/default/rcS
+
+# Source function library.
+. /etc/init.d/functions
+
+# Functions to do individual actions
+settick(){
+ # If TICKADJ is set we *must* adjust it before we start, because the
+ # driftfile relies on the correct setting
+ test -n "$TICKADJ" -a -x /usr/sbin/tickadj && {
+ echo -n "Setting tick to $TICKADJ: "
+ /usr/sbin/tickadj "$TICKADJ"
+ echo "done"
+ }
+}
+startdaemon(){
+ # The -g option allows ntpd to step the time to correct it just
+ # once. The daemon will exit if the clock drifts too much after
+ # this. If ntpd seems to disappear after a while assume TICKADJ
+ # above is set to a totally incorrect value.
+ echo -n "Starting ntpd: "
+ start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -u ntp:ntp -p $PIDFILE "$@"
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping ntpd: "
+ start-stop-daemon --stop --quiet --oknodo -p $PIDFILE
+ echo "done"
+}
+
+case "$1" in
+ start)
+ settick
+ startdaemon -g
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ settick
+ startdaemon -g
+ ;;
+ restart)
+ # Don't reset the tick here
+ stopdaemon
+ startdaemon -g
+ ;;
+ reload)
+ # Must do this by hand, but don't do -g
+ stopdaemon
+ startdaemon
+ ;;
+ status)
+ status /usr/sbin/ntpd;
+ exit $?
+ ;;
+ *)
+ echo "Usage: ntpd { start | stop | status | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
new file mode 100644
index 000000000..d1fe6b7e2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
@@ -0,0 +1 @@
+ntpd.service
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service
new file mode 100644
index 000000000..0e3d7cd37
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/ntpd.pid
+ExecStart=/usr/sbin/ntpd -u ntp:ntp -p /run/ntpd.pid -g
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate
new file mode 100755
index 000000000..17b64d133
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+test -x /usr/sbin/ntpdate || exit 0
+
+if test -f /etc/default/ntpdate ; then
+. /etc/default/ntpdate
+fi
+
+if [ "$NTPSERVERS" = "" ] ; then
+ if [ "$METHOD" = "" -a "$1" != "silent" ] ; then
+ echo "Please set NTPSERVERS in /etc/default/ntpdate"
+ exit 1
+ else
+ exit 0
+ fi
+fi
+
+# This is a heuristic: The idea is that if a static interface is brought
+# up, that is a major event, and we can put in some extra effort to fix
+# the system time. Feel free to change this, especially if you regularly
+# bring up new network interfaces.
+if [ "$METHOD" = static ]; then
+ OPTS="-b"
+fi
+
+if [ "$METHOD" = loopback ]; then
+ exit 0
+fi
+
+(
+
+LOCKFILE=/var/lock/ntpdate
+
+# Avoid running more than one at a time
+if [ -x /usr/bin/lockfile-create ]; then
+ lockfile-create $LOCKFILE
+ lockfile-touch $LOCKFILE &
+ LOCKTOUCHPID="$!"
+fi
+
+if /usr/sbin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
+ if [ "$UPDATE_HWCLOCK" = "yes" ]; then
+ hwclock --systohc || :
+ fi
+fi
+
+if [ -x /usr/bin/lockfile-create ] ; then
+ kill $LOCKTOUCHPID
+ lockfile-remove $LOCKFILE
+fi
+
+) &
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default
new file mode 100644
index 000000000..486b6e07d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default
@@ -0,0 +1,7 @@
+# Configuration script used by ntpdate-sync script
+
+NTPSERVERS=""
+
+# Set to "yes" to write time to hardware clock on success
+UPDATE_HWCLOCK="no"
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service
new file mode 100644
index 000000000..10cbd70f9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service (one-shot ntpdate mode)
+Before=ntpd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ntpdate-sync silent
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
new file mode 100644
index 000000000..f8c5895b7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
@@ -0,0 +1 @@
+NTPSERVER="ntpserver.example.org"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service
new file mode 100644
index 000000000..4898b8a70
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Simple Network Time Service Client
+After=network.target
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/sntp
+ExecStart=/usr/sbin/sntp -s $NTPSERVER
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb b/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb
new file mode 100644
index 000000000..c698fa049
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb
@@ -0,0 +1,172 @@
+SUMMARY = "Network Time Protocol daemon and utilities"
+DESCRIPTION = "The Network Time Protocol (NTP) is used to \
+synchronize the time of a computer client or server to \
+another server or reference time source, such as a radio \
+or satellite receiver or modem."
+HOMEPAGE = "http://support.ntp.org"
+SECTION = "net"
+LICENSE = "NTP"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=e877a1d567a6a58996d2b66e3e387003"
+
+DEPENDS = "libevent"
+
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
+ file://ntp-4.2.4_p6-nano.patch \
+ file://ntpd \
+ file://ntp.conf \
+ file://ntpdate \
+ file://ntpdate.default \
+ file://ntpdate.service \
+ file://ntpd.service \
+ file://sntp.service \
+ file://sntp \
+ file://ntpd.list \
+"
+
+SRC_URI[md5sum] = "00950ca2855579541896513e78295361"
+SRC_URI[sha256sum] = "f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e"
+
+inherit autotools update-rc.d useradd systemd pkgconfig
+
+# The ac_cv_header_readline_history is to stop ntpdc depending on either
+# readline or curses
+EXTRA_OECONF += "--with-net-snmp-config=no \
+ --without-ntpsnmpd \
+ ac_cv_header_readline_history_h=no \
+ --with-yielding_select=yes \
+ --with-locfile=redhat \
+ --without-rpath \
+ "
+CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
+
+USERADD_PACKAGES = "${PN}"
+NTP_USER_HOME ?= "/var/lib/ntp"
+USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
+ --no-create-home \
+ --shell /bin/false --user-group ntp"
+
+# NB: debug is default-enabled by NTP; keep it default-enabled here.
+PACKAGECONFIG ??= "cap debug refclocks openssl \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
+ --with-openssl-incdir=${STAGING_INCDIR} \
+ --with-crypto, \
+ --without-openssl --without-crypto, \
+ openssl"
+PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
+PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
+PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
+PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
+PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
+ install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
+ install -d ${D}${bindir}
+ install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
+
+ install -m 755 -d ${D}${NTP_USER_HOME}
+ chown ntp:ntp ${D}${NTP_USER_HOME}
+
+ # Fix hardcoded paths in scripts
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
+ sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
+ sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
+ sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
+ sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
+ sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
+ sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
+
+ install -d ${D}/${sysconfdir}/default
+ install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
+ install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
+
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
+
+ install -d ${D}${systemd_unitdir}/ntp-units.d
+ install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
+
+ # Remove an empty libexecdir.
+ rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
+}
+
+PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
+# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
+
+# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
+# with wonky clocks (e.g. OpenSlug)
+RDEPENDS_${PN} = "${PN}-tickadj"
+# ntpd require libgcc for execution
+RDEPENDS_${PN} += "libgcc"
+# Handle move from bin to utils package
+RPROVIDES_${PN}-utils = "${PN}-bin"
+RREPLACES_${PN}-utils = "${PN}-bin"
+RCONFLICTS_${PN}-utils = "${PN}-bin"
+
+SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
+SYSTEMD_SERVICE_${PN} = "ntpd.service"
+SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
+SYSTEMD_SERVICE_sntp = "sntp.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+RPROVIDES_ntpdate += "ntpdate-systemd"
+RREPLACES_ntpdate += "ntpdate-systemd"
+RCONFLICTS_ntpdate += "ntpdate-systemd"
+
+RSUGGESTS_${PN} = "iana-etc"
+
+FILES_${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
+ ${NTP_USER_HOME} \
+ ${systemd_unitdir}/ntp-units.d/60-ntpd.list ${libexecdir}\
+"
+FILES_${PN}-tickadj = "${sbindir}/tickadj"
+FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
+RDEPENDS_${PN}-utils += "perl"
+FILES_ntpdate = "${sbindir}/ntpdate \
+ ${sysconfdir}/network/if-up.d/ntpdate-sync \
+ ${bindir}/ntpdate-sync \
+ ${sysconfdir}/default/ntpdate \
+ ${systemd_unitdir}/system/ntpdate.service \
+"
+FILES_sntp = "${sbindir}/sntp \
+ ${sysconfdir}/default/sntp \
+ ${systemd_unitdir}/system/sntp.service \
+ "
+
+CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
+CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
+
+INITSCRIPT_NAME = "ntpd"
+# No dependencies, so just go in at the standard level (20)
+INITSCRIPT_PARAMS = "defaults"
+
+pkg_postinst_ntpdate() {
+ if ! grep -q -s ntpdate $D/var/spool/cron/root; then
+ echo "adding crontab"
+ test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
+ echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
+ fi
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "ntpd"
+ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"
diff --git a/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb b/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb
new file mode 100644
index 000000000..9430add48
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb
@@ -0,0 +1,29 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "network performance measurement tool"
+DESCRIPTION = "nuttcp is a network performance measurement tool intended for use by network \
+and system managers. Its most basic usage is to determine the raw TCP (or UDP) \
+network layer throughput by transferring memory buffers from a source system \
+across an interconnecting network to a destination system, either transferring \
+data for a specified time interval, or alternatively transferring a specified \
+number of bytes."
+HOMEPAGE = "http://www.nuttcp.net/Welcome%20Page.html"
+LICENSE = "GPL-2.0"
+SECTION = "net"
+LIC_FILES_CHKSUM = "file://${BP}.c;beginline=4;endline=30;md5=ae7045c3c3616092e07d87f04ba0d960"
+
+SRC_URI = "http://nuttcp.net/${BPN}/beta/${BP}.c"
+SRC_URI[md5sum] = "1ebf4a08bad2a295a8155f02995e8754"
+SRC_URI[sha256sum] = "c6e33810ccce67260f8d5d627f60e429d44f532365c58ed5673d035e2a59c4db"
+
+S = "${WORKDIR}"
+
+do_compile () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o nuttcp nuttcp-${PV}.c
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 nuttcp ${D}${bindir}
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch b/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch
new file mode 100644
index 000000000..825e2bf6a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch
@@ -0,0 +1,38 @@
+From e0d86318227a23f00cf0f6639a6685bb9f5771a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Dec 2017 09:42:19 -0800
+Subject: [PATCH] util.h: endian.h is available on musl on linux
+
+just checking for glibc alone is not enough since
+it excludes musl, therefore check for platform
+being linux as well
+
+Fixes build issues
+
+include/libisns/util.h:114:12: fatal error: sys/endian.h: No such file or directory
+ # include <sys/endian.h>
+ ^~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/libisns/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/libisns/util.h b/include/libisns/util.h
+index 9a2bd13..6cc1a1b 100644
+--- a/include/libisns/util.h
++++ b/include/libisns/util.h
+@@ -100,7 +100,7 @@ enum {
+ * There's no htonll yet
+ */
+ #ifndef htonll
+-# ifdef __GLIBC__
++# if defined(__GLIBC__) || defined(__linux__)
+ # include <endian.h>
+ # include <byteswap.h>
+ # if __BYTE_ORDER == __BIG_ENDIAN
+--
+2.15.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb b/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
new file mode 100644
index 000000000..abfa7510e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
@@ -0,0 +1,40 @@
+# Copyright (C) 2016 Joe MacDonald <joe_macdonald@mentor.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "iSNS daemon and utility programs"
+DESCRIPTION = "This is a partial implementation of RFC4171, the Internet \
+Storage Name Service (iSNS). The distribution includes the iSNS server, \
+supporting persisten storage of registrations, isnsadm, a command line \
+utility for managing nodes, and isnsdd, a corresponding discovery daemon."
+HOMEPAGE = "http://github.com/gonzoleeman/open-isns/"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
+SECTION = "net"
+
+DEPENDS = "openssl"
+
+SRC_URI = "git://github.com/open-iscsi/open-isns \
+ file://0001-util.h-endian.h-is-available-on-musl-on-linux.patch \
+ "
+
+SRCREV ?= "09954404e948e41eb0fce8e28836018b4ce3d20d"
+
+S = "${WORKDIR}/git"
+
+inherit systemd autotools-brokensep update-rc.d
+
+EXTRA_OECONF = " --prefix=${prefix} --enable-shared"
+EXTRA_OEMAKE += "SYSTEMDDIR=${D}${systemd_unitdir}/system"
+
+do_install_append () {
+ oe_runmake INCDIR=${D}${includedir}/libisns/ install_hdrs
+ oe_runmake LIBDIR=${D}${libdir} install_lib
+
+ install -D -m 755 ${S}/etc/openisns.init ${D}${sysconfdir}/init.d/openisns
+ sed -i 's|daemon isnsd|start-stop-daemon --start --quiet --oknodo --exec ${sbindir}/isnsd --|' \
+ ${D}${sysconfdir}/init.d/openisns
+}
+
+FILES_${PN} += "${libdir} ${systemd_unitdir}"
+
+INITSCRIPT_NAME = "openisns"
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch
new file mode 100644
index 000000000..25057fbce
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch
@@ -0,0 +1,618 @@
+From 8b51a6bf5a4829d8add535a098c0c06a049a9958 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 22:50:57 -0700
+Subject: [PATCH] lanserv: Rename struct parameter printf for namespace
+ collision
+
+This comes to fore when we use hardening flags where printf
+is treated as macro and gets replaced with printf_chk
+
+Fixes errors like
+
+error: no member named '__printf_chk' in 'struct emu_out_s'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lanserv/OpenIPMI/serv.h | 2 +-
+ lanserv/emu_cmd.c | 132 ++++++++++++++++++++++++------------------------
+ lanserv/ipmi_sim.c | 10 ++--
+ 3 files changed, 72 insertions(+), 72 deletions(-)
+
+diff --git a/lanserv/OpenIPMI/serv.h b/lanserv/OpenIPMI/serv.h
+index d12d63a..8555c85 100644
+--- a/lanserv/OpenIPMI/serv.h
++++ b/lanserv/OpenIPMI/serv.h
+@@ -522,7 +522,7 @@ uint8_t ipmb_checksum(uint8_t *data, int size, uint8_t start);
+ typedef struct emu_data_s emu_data_t;
+ typedef struct emu_out_s
+ {
+- void (*printf)(struct emu_out_s *out, char *format, ...);
++ void (*eprintf)(struct emu_out_s *out, char *format, ...);
+ void *data;
+ } emu_out_t;
+
+diff --git a/lanserv/emu_cmd.c b/lanserv/emu_cmd.c
+index ca44032..54b6f7b 100644
+--- a/lanserv/emu_cmd.c
++++ b/lanserv/emu_cmd.c
+@@ -76,7 +76,7 @@ emu_get_uchar(emu_out_t *out, char **toks, unsigned char *val, char *errstr,
+ if (empty_ok)
+ return ENOSPC;
+ if (errstr)
+- out->printf(out, "**No %s given\n", errstr);
++ out->eprintf(out, "**No %s given\n", errstr);
+ return EINVAL;
+ }
+ if (str[0] == '\'') {
+@@ -86,7 +86,7 @@ emu_get_uchar(emu_out_t *out, char **toks, unsigned char *val, char *errstr,
+ *val = strtoul(str, &tmpstr, 0);
+ if (*tmpstr != '\0') {
+ if (errstr)
+- out->printf(out, "**Invalid %s given\n", errstr);
++ out->eprintf(out, "**Invalid %s given\n", errstr);
+ return EINVAL;
+ }
+
+@@ -108,7 +108,7 @@ emu_get_uchar_with_vals(emu_out_t *out, char **toks,
+ if (empty_ok)
+ return ENOSPC;
+ if (errstr)
+- out->printf(out, "**No %s given\n", errstr);
++ out->eprintf(out, "**No %s given\n", errstr);
+ return EINVAL;
+ }
+ if (str[0] == '\'') {
+@@ -131,7 +131,7 @@ emu_get_uchar_with_vals(emu_out_t *out, char **toks,
+ *val = strtoul(str, &tmpstr, 0);
+ if (*tmpstr != '\0') {
+ if (errstr)
+- out->printf(out, "**Invalid %s given\n", errstr);
++ out->eprintf(out, "**Invalid %s given\n", errstr);
+ return EINVAL;
+ }
+ out:
+@@ -150,12 +150,12 @@ emu_get_bitmask(emu_out_t *out, char **toks, uint16_t *val, char *errstr,
+ if (empty_ok)
+ return ENOSPC;
+ if (errstr)
+- out->printf(out, "**No %s given\n", errstr);
++ out->eprintf(out, "**No %s given\n", errstr);
+ return EINVAL;
+ }
+ if (strlen(str) != size) {
+ if (errstr)
+- out->printf(out, "**invalid number of bits in %s\n", errstr);
++ out->eprintf(out, "**invalid number of bits in %s\n", errstr);
+ return EINVAL;
+ }
+ *val = 0;
+@@ -166,7 +166,7 @@ emu_get_bitmask(emu_out_t *out, char **toks, uint16_t *val, char *errstr,
+ *val |= 1 << i;
+ } else {
+ if (errstr)
+- out->printf(out, "**Invalid bit value '%c' in %s\n", str[j],
++ out->eprintf(out, "**Invalid bit value '%c' in %s\n", str[j],
+ errstr);
+ return EINVAL;
+ }
+@@ -184,13 +184,13 @@ emu_get_uint(emu_out_t *out, char **toks, unsigned int *val, char *errstr)
+ str = mystrtok(NULL, " \t\n", toks);
+ if (!str) {
+ if (errstr)
+- out->printf(out, "**No %s given\n", errstr);
++ out->eprintf(out, "**No %s given\n", errstr);
+ return EINVAL;
+ }
+ *val = strtoul(str, &tmpstr, 0);
+ if (*tmpstr != '\0') {
+ if (errstr)
+- out->printf(out, "**Invalid %s given\n", errstr);
++ out->eprintf(out, "**Invalid %s given\n", errstr);
+ return EINVAL;
+ }
+
+@@ -206,7 +206,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+
+ if (!tok) {
+ if (errstr)
+- out->printf(out, "**No %s given\n", errstr);
++ out->eprintf(out, "**No %s given\n", errstr);
+ return EINVAL;
+ }
+ if (*tok == '"') {
+@@ -215,7 +215,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ tok++;
+ end = strlen(tok) - 1;
+ if (tok[end] != '"') {
+- out->printf(out, "**ASCII %s doesn't end in '\"'", errstr);
++ out->eprintf(out, "**ASCII %s doesn't end in '\"'", errstr);
+ return EINVAL;
+ }
+ if (end > (len - 1))
+@@ -228,7 +228,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ char c[3];
+ /* HEX pw */
+ if (strlen(tok) != 32) {
+- out->printf(out, "**HEX %s not 32 HEX characters long", errstr);
++ out->eprintf(out, "**HEX %s not 32 HEX characters long", errstr);
+ return EINVAL;
+ }
+ c[2] = '\0';
+@@ -239,7 +239,7 @@ emu_get_bytes(emu_out_t *out, char **tokptr, unsigned char *data, char *errstr,
+ tok++;
+ data[i] = strtoul(c, &end, 16);
+ if (*end != '\0') {
+- out->printf(out, "**Invalid HEX character in %s", errstr);
++ out->eprintf(out, "**Invalid HEX character in %s", errstr);
+ return -1;
+ }
+ }
+@@ -263,12 +263,12 @@ read_command_file(emu_out_t *out, emu_data_t *emu, const char *command_file)
+
+ buffer = malloc(INPUT_BUFFER_SIZE);
+ if (!buffer) {
+- out->printf(out, "Could not allocate buffer memory\n");
++ out->eprintf(out, "Could not allocate buffer memory\n");
+ rv = ENOMEM;
+ goto out;
+ }
+ while (fgets(buffer+pos, INPUT_BUFFER_SIZE-pos, f)) {
+- out->printf(out, "%s", buffer+pos);
++ out->eprintf(out, "%s", buffer+pos);
+ if (buffer[pos] == '#')
+ continue;
+ pos = strlen(buffer);
+@@ -318,7 +318,7 @@ sel_enable(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_enable_sel(mc, max_records, flags);
+ if (rv)
+- out->printf(out, "**Unable to enable sel, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to enable sel, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -343,9 +343,9 @@ sel_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_add_to_sel(mc, record_type, data, &r);
+ if (rv)
+- out->printf(out, "**Unable to add to sel, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add to sel, error 0x%x\n", rv);
+ else
+- out->printf(out, "Added record %d\n", r);
++ out->eprintf(out, "Added record %d\n", r);
+ return rv;
+ }
+
+@@ -361,14 +361,14 @@ main_sdr_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ if (rv == ENOSPC)
+ break;
+ if (rv) {
+- out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++ out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ return rv;
+ }
+ }
+
+ rv = ipmi_mc_add_main_sdr(mc, data, i);
+ if (rv)
+- out->printf(out, "**Unable to add to sdr, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add to sdr, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -389,14 +389,14 @@ device_sdr_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ if (rv == ENOSPC)
+ break;
+ if (rv) {
+- out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++ out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ return rv;
+ }
+ }
+
+ rv = ipmi_mc_add_device_sdr(mc, lun, data, i);
+ if (rv)
+- out->printf(out, "**Unable to add to sdr, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add to sdr, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -439,7 +439,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ while (tok) {
+ if (strcmp(tok, "poll") == 0) {
+ if (handler) {
+- out->printf(out, "**poll given twice in sensor\n", tok);
++ out->eprintf(out, "**poll given twice in sensor\n", tok);
+ return -1;
+ }
+
+@@ -449,27 +449,27 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ tok = mystrtok(NULL, " \t\n", toks);
+ if (!tok) {
+- out->printf(out, "**No polled sensor handler given\n", tok);
++ out->eprintf(out, "**No polled sensor handler given\n", tok);
+ return -1;
+ }
+
+ handler = ipmi_sensor_find_handler(tok);
+ if (!handler) {
+- out->printf(out, "**Invalid sensor handler: %s\n", tok);
++ out->eprintf(out, "**Invalid sensor handler: %s\n", tok);
+ return -1;
+ }
+
+ rv = handler->init(mc, lun, num, toks, handler->cb_data, &rcb_data,
+ &errstr);
+ if (rv) {
+- out->printf(out, "**Error initializing sensor handler: %s\n",
++ out->eprintf(out, "**Error initializing sensor handler: %s\n",
+ errstr);
+ return rv;
+ }
+ } else if (strcmp(tok, "event-only") == 0) {
+ event_only = 1;
+ } else {
+- out->printf(out, "**Unknown sensor option: %s\n", tok);
++ out->eprintf(out, "**Unknown sensor option: %s\n", tok);
+ return -1;
+ }
+
+@@ -477,7 +477,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ }
+
+ if (handler && event_only) {
+- out->printf(out, "**An event-only sensor cannot be polled\n");
++ out->eprintf(out, "**An event-only sensor cannot be polled\n");
+ return -1;
+ }
+
+@@ -488,7 +488,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ if (!rv && handler->postinit) {
+ rv = handler->postinit(rcb_data, &errstr);
+ if (rv) {
+- out->printf(out, "**Error in sensor handler postinit: %s\n",
++ out->eprintf(out, "**Error in sensor handler postinit: %s\n",
+ errstr);
+ }
+ }
+@@ -496,7 +496,7 @@ sensor_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ rv = ipmi_mc_add_sensor(mc, lun, num, type, code, event_only);
+ }
+ if (rv)
+- out->printf(out, "**Unable to add to sensor, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add to sensor, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -532,7 +532,7 @@ sensor_set_bit(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_sensor_set_bit(mc, lun, num, bit, value, gen_event);
+ if (rv)
+- out->printf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -563,7 +563,7 @@ sensor_set_bit_clr_rest(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **
+
+ rv = ipmi_mc_sensor_set_bit_clr_rest(mc, lun, num, bit, gen_event);
+ if (rv)
+- out->printf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor bit, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -594,7 +594,7 @@ sensor_set_value(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_sensor_set_value(mc, lun, num, value, gen_event);
+ if (rv)
+- out->printf(out, "**Unable to set sensor value, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor value, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -637,7 +637,7 @@ sensor_set_hysteresis(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **to
+ rv = ipmi_mc_sensor_set_hysteresis(mc, lun, num, support, positive,
+ negative);
+ if (rv)
+- out->printf(out, "**Unable to set sensor hysteresis, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor hysteresis, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -682,7 +682,7 @@ sensor_set_threshold(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **tok
+ rv = ipmi_mc_sensor_set_threshold(mc, lun, num, support,
+ enabled, 1, thresholds);
+ if (rv)
+- out->printf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -759,7 +759,7 @@ sensor_set_event_support(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char *
+ assert_support, deassert_support,
+ assert_enabled, deassert_enabled);
+ if (rv)
+- out->printf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set sensor thresholds, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -819,7 +819,7 @@ mc_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ else if (strcmp("persist_sdr", tok) == 0)
+ flags |= IPMI_MC_PERSIST_SDR;
+ else {
+- out->printf(out, "**Invalid MC flag: %s\n", tok);
++ out->eprintf(out, "**Invalid MC flag: %s\n", tok);
+ return -1;
+ }
+ }
+@@ -833,7 +833,7 @@ mc_add(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ device_revision, major_fw_rev, minor_fw_rev,
+ device_support, mfg_id, product_id, flags);
+ if (rv)
+- out->printf(out, "**Unable to add the MC, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add the MC, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -890,7 +890,7 @@ mc_set_power(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_set_power(mc, power, gen_int);
+ if (rv)
+- out->printf(out, "**Unable to set power, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set power, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -916,7 +916,7 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ tok = mystrtok(NULL, " \t\n", toks);
+ if (!tok) {
+- out->printf(out, "**No FRU data type given");
++ out->eprintf(out, "**No FRU data type given");
+ return -1;
+ }
+ if (strcmp(tok, "file") == 0) {
+@@ -929,13 +929,13 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = get_delim_str(toks, &frufn, &errstr);
+ if (rv) {
+- out->printf(out, "**Error with FRU filename: %d", strerror(rv));
++ out->eprintf(out, "**Error with FRU filename: %d", strerror(rv));
+ return rv;
+ }
+ rv = ipmi_mc_add_fru_file(mc, devid, length, file_offset,
+ (void *) frufn);
+ if (rv)
+- out->printf(out, "**Unable to add FRU file, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add FRU file, error 0x%x\n", rv);
+
+ } else if (strcmp(tok, "data") == 0) {
+ for (i=0; i<length; i++) {
+@@ -943,14 +943,14 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ if (rv == ENOSPC)
+ break;
+ if (rv) {
+- out->printf(out, "**Error 0x%x in data byte %d\n", rv, i);
++ out->eprintf(out, "**Error 0x%x in data byte %d\n", rv, i);
+ return rv;
+ }
+ }
+
+ rv = emu_get_uchar(out, toks, &data[i], "data byte", 1);
+ if (rv != ENOSPC) {
+- out->printf(out, "**Error: input data too long for FRU\n", rv, i);
++ out->eprintf(out, "**Error: input data too long for FRU\n", rv, i);
+ return EINVAL;
+ }
+
+@@ -958,9 +958,9 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_add_fru_data(mc, devid, length, NULL, data);
+ if (rv)
+- out->printf(out, "**Unable to add FRU data, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to add FRU data, error 0x%x\n", rv);
+ } else {
+- out->printf(out, "**FRU type not given, need file or data\n");
++ out->eprintf(out, "**FRU type not given, need file or data\n");
+ rv = EINVAL;
+ }
+ return rv;
+@@ -981,28 +981,28 @@ mc_dump_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_get_fru_data_len(mc, devid, &length);
+ if (rv) {
+- out->printf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
+ goto out;
+ }
+
+ data = malloc(length);
+ if (!data) {
+- out->printf(out, "**Unable to dump FRU data, out of memory\n", rv);
++ out->eprintf(out, "**Unable to dump FRU data, out of memory\n", rv);
+ goto out;
+ }
+
+ rv = ipmi_mc_get_fru_data(mc, devid, length, data);
+ if (rv) {
+- out->printf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to dump FRU data, error 0x%x\n", rv);
+ goto out;
+ }
+
+ for (i=0; i<length; i++) {
+ if ((i > 0) && ((i % 8) == 0))
+- out->printf(out, "\n");
+- out->printf(out, " 0x%2.2x", data[i]);
++ out->eprintf(out, "\n");
++ out->eprintf(out, " 0x%2.2x", data[i]);
+ }
+- out->printf(out, "\n");
++ out->eprintf(out, "\n");
+
+ out:
+ if (data)
+@@ -1021,7 +1021,7 @@ mc_setbmc(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ return rv;
+ rv = ipmi_emu_set_bmc_mc(emu, ipmb);
+ if (rv)
+- out->printf(out, "**Invalid IPMB address\n");
++ out->eprintf(out, "**Invalid IPMB address\n");
+ return rv;
+ }
+
+@@ -1032,7 +1032,7 @@ atca_enable(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_emu_atca_enable(emu);
+ if (rv)
+- out->printf(out, "**Unable to enable ATCA mode, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to enable ATCA mode, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -1056,7 +1056,7 @@ atca_set_site(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_emu_atca_set_site(emu, hw_address, site_type, site_number);
+ if (rv)
+- out->printf(out, "**Unable to set site type, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set site type, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -1072,7 +1072,7 @@ mc_set_num_leds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ rv = ipmi_mc_set_num_leds(mc, count);
+ if (rv)
+- out->printf(out, "**Unable to set number of LEDs, error 0x%x\n", rv);
++ out->eprintf(out, "**Unable to set number of LEDs, error 0x%x\n", rv);
+ return rv;
+ }
+
+@@ -1085,7 +1085,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ err = get_delim_str(toks, &filename, &errstr);
+ if (err) {
+- out->printf(out, "Could not get include filename: %s\n", errstr);
++ out->eprintf(out, "Could not get include filename: %s\n", errstr);
+ return err;
+ }
+
+@@ -1097,7 +1097,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ {
+ char *nf = malloc(strlen(BASE_CONF_STR) + strlen(filename) + 2);
+ if (!nf) {
+- out->printf(out, "Out of memory in include\n", errstr);
++ out->eprintf(out, "Out of memory in include\n", errstr);
+ goto out_err;
+ }
+ strcpy(nf, BASE_CONF_STR);
+@@ -1107,7 +1107,7 @@ read_cmds(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ filename = nf;
+ err = read_command_file(out, emu, filename);
+ if (err) {
+- out->printf(out, "Could not read include file %s\n", filename);
++ out->eprintf(out, "Could not read include file %s\n", filename);
+ }
+ }
+
+@@ -1147,7 +1147,7 @@ debug_cmd(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ } else if (strcmp(tok, "sol") == 0) {
+ level |= DEBUG_SOL;
+ } else {
+- out->printf(out, "Invalid debug level '%s', options are 'raw' and 'msg'\n",
++ out->eprintf(out, "Invalid debug level '%s', options are 'raw' and 'msg'\n",
+ tok);
+ return EINVAL;
+ }
+@@ -1168,7 +1168,7 @@ persist_cmd(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+ } else if (strcmp(tok, "off") == 0) {
+ persist_enable = 0;
+ } else {
+- out->printf(out, "Invalid persist vale '%s', options are 'on' and 'off'\n",
++ out->eprintf(out, "Invalid persist vale '%s', options are 'on' and 'off'\n",
+ tok);
+ return EINVAL;
+ }
+@@ -1194,18 +1194,18 @@ do_define(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
+
+ name = mystrtok(NULL, " \t\n", toks);
+ if (!name) {
+- out->printf(out, "No variable name given for define\n");
++ out->eprintf(out, "No variable name given for define\n");
+ return EINVAL;
+ }
+ err = get_delim_str(toks, &value, &errstr);
+ if (err) {
+- out->printf(out, "Could not get variable %s value: %s\n", name, errstr);
++ out->eprintf(out, "Could not get variable %s value: %s\n", name, errstr);
+ return err;
+ }
+ err = add_variable(name, value);
+ if (err) {
+ free(value);
+- out->printf(out, "Out of memory setting variable %s\n", name);
++ out->eprintf(out, "Out of memory setting variable %s\n", name);
+ return err;
+ }
+ return 0;
+@@ -1301,7 +1301,7 @@ ipmi_emu_cmd(emu_out_t *out, emu_data_t *emu, char *cmd_str)
+ return rv;
+ rv = ipmi_emu_get_mc_by_addr(emu, ipmb, &mc);
+ if (rv) {
+- out->printf(out, "**Invalid MC address\n");
++ out->eprintf(out, "**Invalid MC address\n");
+ return rv;
+ }
+ }
+@@ -1312,7 +1312,7 @@ ipmi_emu_cmd(emu_out_t *out, emu_data_t *emu, char *cmd_str)
+ }
+ }
+
+- out->printf(out, "**Unknown command: %s\n", cmd);
++ out->eprintf(out, "**Unknown command: %s\n", cmd);
+
+ out:
+ return rv;
+diff --git a/lanserv/ipmi_sim.c b/lanserv/ipmi_sim.c
+index 9472cce..30c4f27 100644
+--- a/lanserv/ipmi_sim.c
++++ b/lanserv/ipmi_sim.c
+@@ -607,8 +607,8 @@ isim_log(sys_data_t *sys, int logtype, msg_t *msg, const char *format,
+
+ con = data->consoles;
+ while (con) {
+- con->out.printf(&con->out, "%s", str);
+- con->out.printf(&con->out, "\n");
++ con->out.eprintf(&con->out, "%s", str);
++ con->out.eprintf(&con->out, "\n");
+ con = con->next;
+ }
+ #if HAVE_SYSLOG
+@@ -956,7 +956,7 @@ console_bind_ready(int fd, void *cb_data, os_hnd_fd_id_t *id)
+ newcon->shutdown_on_close = 0;
+ newcon->telnet = 1;
+ newcon->tn_pos = 0;
+- newcon->out.printf = emu_printf;
++ newcon->out.eprintf = emu_printf;
+ newcon->out.data = newcon;
+
+ setsockopt(rv, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val));
+@@ -1463,10 +1463,10 @@ main(int argc, const char *argv[])
+ stdio_console.telnet = 0;
+ stdio_console.tn_pos = 0;
+ if (nostdio) {
+- stdio_console.out.printf = dummy_printf;
++ stdio_console.out.eprintf = dummy_printf;
+ stdio_console.out.data = &stdio_console;
+ } else {
+- stdio_console.out.printf = emu_printf;
++ stdio_console.out.eprintf = emu_printf;
+ stdio_console.out.data = &stdio_console;
+ }
+ stdio_console.next = NULL;
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
new file mode 100644
index 000000000..d4e02be45
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
@@ -0,0 +1,25 @@
+Do not install pyc and pyo for python module
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ swig/python/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am
+index da95a81..97a62bf 100644
+--- a/swig/python/Makefile.am
++++ b/swig/python/Makefile.am
+@@ -33,8 +33,6 @@ CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc
+ install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo
+ $(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR)
+ $(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+- $(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+- $(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+ if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \
+ $(INSTALL) -d $(DESTDIR)$(bindir); \
+ $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
new file mode 100644
index 000000000..449142fcf
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
@@ -0,0 +1,22 @@
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu Jun 7 16:00:13 2012 -0400
+
+ This patch fixes the error during the install stage when
+ creating a symbolic link for opeipmish in openipmi/cmdlang
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+Index: OpenIPMI-2.0.24/cmdlang/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am
++++ OpenIPMI-2.0.24/cmdlang/Makefile.am
+@@ -35,6 +35,7 @@ openipmish_LDADD = libOpenIPMIcmdlang.l
+ # compatability.
+ install-data-local:
+ rm -f $(DESTDIR)$(bindir)/ipmish
++ mkdir -p $(DESTDIR)$(bindir)/
+ $(LN_S) openipmish $(DESTDIR)$(bindir)/ipmish
+
+ uninstall-local:
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
new file mode 100644
index 000000000..082511a67
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
@@ -0,0 +1,17 @@
+include sys/types.h for u_int32_t
+
+ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'?
+ u_int32_t addr;
+ ^~~~~~~~~
+Index: OpenIPMI-2.0.24/ui/ui.c
+===================================================================
+--- OpenIPMI-2.0.24.orig/ui/ui.c
++++ OpenIPMI-2.0.24/ui/ui.c
+@@ -42,6 +42,7 @@
+ #include <fcntl.h>
+ #include <time.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <ctype.h>
+
+ #include <OpenIPMI/ipmi_err.h>
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
new file mode 100644
index 000000000..51a398ba5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
@@ -0,0 +1,41 @@
+Subject: [PATCH] ipmi-init: fix the arguments
+
+The functions success/failure/warning defined in /etc/init.d/functions
+(provided by initscripts) only accepts numeric argument as return code,
+not a string.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ ipmi.init | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ipmi.init b/ipmi.init
+index 2ebcd94..d8161c5 100644
+--- a/ipmi.init
++++ b/ipmi.init
+@@ -45,17 +45,17 @@ elif [ -r /etc/init.d/functions ]; then
+ case "$ACTION" in
+ success)
+ echo -n $*
+- success "$*"
++ success 0
+ echo
+ ;;
+ failure)
+ echo -n $*
+- failure "$*"
++ failure 1
+ echo
+ ;;
+ warning)
+ echo -n $*
+- warning "$*"
++ warning 0
+ echo
+ ;;
+ *)
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service b/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
new file mode 100644
index 000000000..6fe137819
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=IPMI Driver
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/openipmi-helper start
+ExecStop=@LIBEXECDIR@/openipmi-helper stop-all
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
new file mode 100755
index 000000000..4cebfb9c6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
@@ -0,0 +1,512 @@
+#!/bin/sh
+#############################################################################
+#
+# ipmi: OpenIPMI Driver helper script
+#
+# Authors: Jan Safranek <jsafrane@redhat.com>
+#
+# Based on IPMI init script by:
+# Matt Domsch <Matt_Domsch@dell.com>
+# Chris Poblete <Chris_Poblete@dell.com>
+#
+# Status return code bits
+# no bits set = no errors
+# bit 0 set = minimum modules aren't loaded
+# bit 1 set = requested feature module isn't loaded
+# bit 2 set = /dev/ipmi0 (or /dev/imb if using that instead) doesn't exist
+# bit 3 set = /dev/watchdog doesn't exist
+# bit 4 set = lockfile doesn't exist
+# bit 5 set = modules are loaded even when asked to be unloaded
+
+CONFIGFILE=/etc/sysconfig/ipmi
+# source config info
+[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
+
+#############################################################################
+# GLOBALS
+#############################################################################
+MODULE_NAME="ipmi"
+INTF_NUM=0
+
+IPMI_SMB_MODULE_NAME="ipmi_smb"
+IPMI_SI_MODULE_NAME="ipmi_si"
+kernel=`uname -r | cut -d. -f1-2`
+if [ "${kernel}" == "2.4" ]; then
+ IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
+ IPMI_SI_MODULE_NAME="ipmi_si_drv"
+fi
+
+MODULES_INTERFACES=""
+[ "${DEV_IPMI}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_devintf"
+[ "${IPMI_IMB}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_imb"
+
+MODULES_FEATURES=""
+[ "${IPMI_WATCHDOG}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_watchdog"
+[ "${IPMI_POWEROFF}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_poweroff"
+
+MODULES_HW=""
+[ "${IPMI_SI}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SI_MODULE_NAME}"
+[ "${IPMI_SMB}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SMB_MODULE_NAME}"
+
+MODULES_BASE="ipmi_msghandler"
+MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
+
+RETVAL=0
+LOCKFILE=/var/lock/subsys/ipmi
+DEV_IPMI_TIMEOUT=150
+
+UDEV_EXISTS=0
+if [ -e /sbin/udev -o -e /sbin/udevd ]; then
+ UDEV_EXISTS=1
+fi
+
+#############################################################################
+# NOTES:
+# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
+# because SLES9 and RHEL4 kernels don't send a message for udev to delete
+# it for us.
+#
+#############################################################################
+
+modules_loaded_verbose()
+{
+ OnePlusLoaded=0
+ OnePlusUnloaded=0
+ for m in $@; do
+ if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+ echo "$m module loaded."
+ OnePlusLoaded=1
+ else
+ echo "$m module not loaded."
+ OnePlusUnloaded=1
+ fi
+ done
+}
+
+modules_loaded()
+{
+ OnePlusLoaded=0
+ OnePlusUnloaded=0
+ for m in $@; do
+ if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+ OnePlusLoaded=1
+ else
+ OnePlusUnloaded=1
+ fi
+ done
+}
+
+device_node_exists ()
+{
+ if [ -e "$1" ]; then
+ echo "$1 exists."
+ return 1
+ fi
+ echo "$1 does not exist."
+ return 0
+}
+
+minimum_modules_loaded()
+{
+ rc_base=1
+ rc_hw=1
+ modules_loaded_verbose "${MODULES_BASE}"
+ [ ${OnePlusLoaded} -eq 0 ] && rc_base=0
+
+ modules_loaded_verbose "${MODULES_HW}"
+ [ ${OnePlusLoaded} -eq 0 ] && rc_hw=0
+
+ return $((rc_base && rc_hw))
+}
+
+#############################################################################
+
+load_si()
+{
+ if [ "${IPMI_SI}" = "yes" ]; then
+ modprobe ${IPMI_SI_MODULE_NAME} > /dev/null 2>&1
+ modules_loaded ${IPMI_SI_MODULE_NAME}
+ [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+ fi
+}
+
+load_smb()
+{
+ if [ "${IPMI_SMB}" = "yes" ]; then
+ modprobe ${IPMI_SMB_MODULE_NAME} > /dev/null 2>&1
+ modules_loaded ${IPMI_SMB_MODULE_NAME}
+ [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+ fi
+}
+
+load_hw_modules()
+{
+ load_si
+ load_smb
+}
+
+start_watchdog_common()
+{
+ load_hw_modules
+ modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ [ ${OnePlusUnloaded} -ne 0 ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Watchdog startup failed: cannot load ipmi_watchdog module" &&
+ return
+ if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
+ mknod -m 0600 /dev/watchdog c 10 130
+ [ $? -ne 0 ] &&
+ RETVAL=$((RETVAL | 8)) &&
+ echo "Watchdog startup failed: cannot create /dev/watchdog" &&
+ return
+ fi
+}
+
+start_watchdog_quiet()
+{
+ [ "${IPMI_WATCHDOG}" != "yes" ] &&
+ return
+ start_watchdog_common
+}
+
+start_watchdog()
+{
+ [ "${IPMI_WATCHDOG}" != "yes" ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Watchdog not configured" &&
+ return
+ start_watchdog_common
+}
+
+stop_watchdog()
+{
+ modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Watchog shutdown failed: cannot unload ipmi_watchdog module"
+ else
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+ fi
+ fi
+}
+
+stop_watchdog_quiet()
+{
+ modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ else
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+ fi
+ fi
+}
+
+start_powercontrol_common()
+{
+ local poweroff_opts=""
+ load_hw_modules
+ if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
+ modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
+ poweroff_opts="poweroff_control=2"
+ modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
+ poweroff_opts="poweroff_powercycle=1"
+ fi
+ modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ [ ${OnePlusUnloaded} -ne 0 ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Powercontroll startup failed: cannot load ipmi_poweroff module" &&
+ return
+}
+
+start_powercontrol_quiet()
+{
+ [ "${IPMI_POWEROFF}" != "yes" ] &&
+ return
+ start_powercontrol_common
+}
+
+start_powercontrol()
+{
+ [ "${IPMI_POWEROFF}" != "yes" ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Powercontroll not configured" &&
+ return
+ start_powercontrol_common
+}
+
+stop_powercontrol()
+{
+ modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Powercontroll shutdown failed: cannot unload ipmi_poweroff module"
+ fi
+}
+
+stop_powercontrol_quiet()
+{
+ modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ [ ${OnePlusLoaded} -ne 0 ] && RETVAL=$((RETVAL | 32))
+}
+
+#############################################################################
+unload_all_ipmi_modules()
+{
+ stop_watchdog_quiet
+ stop_powercontrol_quiet
+ for m in ${MODULES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ # delete interface node ONLY if ipmi_devintf is unloaded
+ [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+ rm -f "/dev/ipmi${INTF_NUM}"
+}
+
+unload_ipmi_modules_leave_features()
+{
+ for m in ${MODULES_INTERFACES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ # delete interface node ONLY if ipmi_devintf is unloaded
+ [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+ rm -f "/dev/ipmi${INTF_NUM}"
+ lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
+ if [ "$?" -ne "0" ]; then
+ stop_watchdog_quiet
+ stop_powercontrol_quiet
+ for m in ${MODULES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ fi
+}
+
+#############################################################################
+load_ipmi_modules ()
+{
+ local locdelay
+ modprobe ipmi_msghandler > /dev/null 2>&1
+ modules_loaded ipmi_msghandler
+ [ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+ load_hw_modules
+ [ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ modprobe ipmi_devintf > /dev/null 2>&1
+ modules_loaded ipmi_devintf
+ RETVAL=$((RETVAL & ~2))
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+ if [ ${OnePlusLoaded} -eq 1 ]; then
+ if [ ${UDEV_EXISTS} -eq 0 ]; then
+ DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
+ rm -f /dev/ipmi${INTF_NUM}
+ mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+ fi
+
+ # udev can take several seconds to create /dev/ipmi0,
+ # but it happens asynchronously, so delay here
+ locdelay=${DEV_IPMI_TIMEOUT}
+ while [ ! -e /dev/ipmi${INTF_NUM} -a ${locdelay} -gt 0 ]; do
+ locdelay=$((locdelay - 1))
+ sleep 0.1
+ done
+ fi
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ modprobe ipmi_imb > /dev/null 2>&1
+ modules_loaded ipmi_imb
+ RETVAL=$((RETVAL & ~2))
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+ if [ ${OnePlusLoaded} -eq 1 ]; then
+ DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
+ rm -f /dev/imb
+ mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+ fi
+ fi
+
+ # Per Corey Minyard, essentially no one uses ipmi_radisys
+ # and we don't want to encourage its further use
+ # so it won't be handled here.
+ return
+}
+
+#############################################################################
+start()
+{
+ load_ipmi_modules
+ if [ ${RETVAL} -eq 0 ]; then
+ touch ${LOCKFILE}
+ else
+ if [ $((RETVAL & 1)) -eq 1 ]; then
+ echo "Startup failed."
+ else
+ touch ${LOCKFILE} && echo "Warning!?"
+ fi
+ fi
+ start_watchdog_quiet
+ start_powercontrol_quiet
+}
+
+#############################################################################
+stop()
+{
+ unload_ipmi_modules_leave_features
+ modules_loaded ${MODULES_INTERFACES}
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Shutdown failed, something may be in use"
+ else
+ rm -f ${LOCKFILE}
+ fi
+}
+
+stop_all()
+{
+ unload_all_ipmi_modules
+ modules_loaded ${MODULES}
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Shutdown failed, something may be in use"
+ else
+ rm -f ${LOCKFILE}
+ fi
+}
+
+#############################################################################
+restart()
+{
+ stop_all
+ RETVAL=0
+ start
+}
+
+#############################################################################
+
+reload()
+{
+ stop_all
+ RETVAL=0
+ start
+}
+
+#############################################################################
+
+status_all()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ${MODULES_FEATURES} ${MODULES_INTERFACES}
+ [ ${OnePlusUnloaded} -ne 0 ] && RETVAL=$((RETVAL | 2))
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ device_node_exists /dev/ipmi${INTF_NUM}
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ device_node_exists /dev/imb
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ device_node_exists /dev/watchdog
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+ fi
+
+ [ ! -e ${LOCKFILE} ] && RETVAL=$((RETVAL | 16))
+}
+
+status()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ modules_loaded_verbose ipmi_devintf
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+ device_node_exists /dev/ipmi${INTF_NUM}
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ device_node_exists /dev/imb
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+}
+
+status_watchdog()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ipmi_watchdog
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+ device_node_exists /dev/watchdog
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+}
+
+status_powercontrol()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ipmi_powercontrol
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+}
+
+#############################################################################
+usage ()
+{
+ echo $"Usage: $0 {start|stop|status" 1>&2
+ echo $" restart|condrestart|try-restart|reload|force-reload" 1>&2
+ echo $" start-watchdog|stop-watchdog|status-watchdog" 1>&2
+ echo $" start-powercontrol|stop-powercontrol|status-powercontrol" 1>&2
+ echo $" stop-all|status-all}" 1>&2
+ RETVAL=2
+}
+
+condrestart ()
+{
+ [ -e ${LOCKFILE} ] && restart
+}
+
+#############################################################################
+# MAIN
+#############################################################################
+case "$1" in
+ start) start ;;
+ stop) stop ;;
+ restart) restart ;;
+ force-reload) reload ;;
+ reload) reload ;;
+ status) status ;;
+ status-all) status_all ;;
+ condrestart) condrestart ;;
+ try-restart) condrestart ;;
+ start-watchdog) start_watchdog ;;
+ stop-watchdog) stop_watchdog ;;
+ status-watchdog) status_watchdog ;;
+ start-powercontrol) start_powercontrol ;;
+ stop-powercontrol) stop_powercontrol ;;
+ status-powercontrol) status_powercontrol ;;
+ stop-all) stop_all ;;
+ *) usage ;;
+esac
+
+exit ${RETVAL}
+
+#############################################################################
+# end of file
+#############################################################################
+
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
new file mode 100644
index 000000000..1fa68f9ba
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
@@ -0,0 +1,26 @@
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu Jun 7 12:28:34 2012 -0400
+
+ This patch was carried over from WRL4.3 (openipmi v2.0.16)
+
+ It was updated for openipmi v2.0.19
+
+ Disable making openipmigui man page since we don't need it
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 632f55b..5ce79f5 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,6 +1,6 @@
+
+ man_MANS = ipmi_ui.1 openipmicmd.1 openipmish.1 ipmi_cmdlang.7 \
+- openipmigui.1 openipmi_conparms.7 solterm.1 rmcp_ping.1 \
++ openipmi_conparms.7 solterm.1 rmcp_ping.1 \
+ openipmi_eventd.1
+
+ EXTRA_DIST = $(man_MANS)
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
new file mode 100644
index 000000000..83485a9e6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
@@ -0,0 +1,50 @@
+From aa0dc0783a6ff5fb56c914b640836223e3c192bb Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 29 Dec 2014 18:16:04 +0800
+Subject: [PATCH] remove host path from la_LDFLAGS
+
+Upstream-Status: Inappropriate [ cross compile specific ]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ cmdlang/Makefile.am | 2 +-
+ glib/Makefile.am | 4 ++--
+ tcl/Makefile.am | 2 +-
+ unix/Makefile.am | 4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+Index: OpenIPMI-2.0.24/cmdlang/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am
++++ OpenIPMI-2.0.24/cmdlang/Makefile.am
+@@ -15,8 +15,7 @@ libOpenIPMIcmdlang_la_SOURCES = cmdlang.
+ libOpenIPMIcmdlang_la_LIBADD = -lm \
+ $(top_builddir)/utils/libOpenIPMIutils.la \
+ $(top_builddir)/lib/libOpenIPMI.la
+-libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -L$(libdir)
++libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+
+ bin_PROGRAMS = openipmish
+
+Index: OpenIPMI-2.0.24/unix/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/unix/Makefile.am
++++ OpenIPMI-2.0.24/unix/Makefile.am
+@@ -10,14 +10,12 @@ lib_LTLIBRARIES = libOpenIPMIposix.la li
+ libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c
+ libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \
+ $(top_builddir)/utils/libOpenIPMIutils.la $(RT_LIB)
+-libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -L$(libdir)
++libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+
+ libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c
+ libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \
+ $(GDBM_LIB) $(RT_LIB)
+-libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -L$(libdir)
++libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+
+ noinst_HEADERS = heap.h
+
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb
new file mode 100644
index 000000000..a4f63c5f4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.24.bb
@@ -0,0 +1,110 @@
+SUMMARY = "IPMI (Intelligent Platform Management Interface) library and tools"
+DESCRIPTION = "OpenIPMI is an effort to create a full-function IPMI system, \
+to allow full access to all IPMI information on a server \
+and to abstract it to a level that will make it easy to use"
+
+HOMEPAGE = "http://openipmi.sourceforge.net"
+
+DEPENDS = " \
+ glib-2.0 \
+ ncurses \
+ net-snmp \
+ openssl \
+ popt \
+ python \
+ swig-native \
+ "
+
+LICENSE = "GPLv2 & LGPLv2.1 & BSD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+ file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
+ file://fix-symlink-install-error-in-cmdlang.patch \
+ file://openipmi-no-openipmigui-man.patch \
+ file://openipmi-remove-host-path-from-la_LDFLAGS.patch \
+ file://ipmi-init-fix-the-arguments.patch \
+ file://do-not-install-pyc-and-pyo.patch \
+ file://include_sys_types.patch \
+ file://openipmi-helper \
+ file://ipmi.service \
+ file://0001-lanserv-Rename-struct-parameter-printf-for-namespace.patch \
+ "
+
+S = "${WORKDIR}/OpenIPMI-${PV}"
+SRC_URI[md5sum] = "58f9542cbfcb5fe250b77cf88345e1ec"
+SRC_URI[sha256sum] = "bca39a27071278a8b74610181ede8df51e155e5e9031bc8eaa3699d1720292b4"
+
+inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd
+
+EXTRA_OECONF = "--disable-static \
+ --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
+ --with-python='${STAGING_BINDIR_NATIVE}/python-native/python' \
+ --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \
+ --with-glibver=2.0"
+
+PACKAGECONFIG ??= "gdbm"
+PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
+
+PACKAGES += "${PN}-perl ${PN}-python"
+
+FILES_${PN}-perl = " \
+ ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \
+ ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \
+ "
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_${PN}-dbg += " \
+ ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \
+ ${PYTHON_SITEPACKAGES_DIR}/.debug \
+ "
+
+do_configure () {
+
+ # Let's perform regular configuration first then handle perl issues.
+ autotools_do_configure
+
+ perl_ver=`perl -V:version | cut -d\' -f 2`
+
+ # Force openipmi perl bindings to be compiled using perl-native instead of
+ # the host's perl. Set the proper install directory for the resulting
+ # openipmi.pm and openipmi.so
+ for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do
+ echo "SAL: i = $i"
+ echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE"
+ echo "SAL: libdir = $libdir"
+ sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i
+ sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i
+ done
+}
+
+do_install_append () {
+ echo "SAL: D = $D"
+ echo "SAL: libdir = $libdir"
+ install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d
+ install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi
+ install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi
+ # SAL: mv: cannot stat `/localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/openipmi-2.0.19-r4/image/usr/lib64/perl5': No such file or directory
+ # SAL: real path to perl is /localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/perl-5.14.2-r8.3/package/usr/lib64/perl5 and it is a symlink to perl so no need to mv.
+ if [ -d ${D}${libdir}/perl5 ]
+ then
+ mv ${D}${libdir}/perl5 ${D}${libdir}/perl
+ fi
+
+ # for systemd
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system
+ sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service
+ install -d ${D}${libexecdir}
+ install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir}
+}
+
+INITSCRIPT_NAME = "ipmi"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ipmi.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn
new file mode 100755
index 000000000..a3cd6a2f4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn
@@ -0,0 +1,104 @@
+#!/bin/sh -e
+#
+# Original version by Robert Leslie
+# <rob@mars.org>, edited by iwj and cs
+# Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
+# Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+DAEMON=/usr/sbin/openvpn
+CONFIG_DIR=/etc/openvpn
+test -x $DAEMON || exit 0
+test -d $CONFIG_DIR || exit 0
+
+start_vpn () {
+ modprobe tun >/dev/null 2>&1 || true
+ $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \
+ --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->"
+ echo -n " $NAME"
+}
+stop_vpn () {
+ kill `cat $PIDFILE` || true
+ rm $PIDFILE
+}
+
+case "$1" in
+start)
+ echo -n "Starting openvpn:"
+
+ if test -z $2 ; then
+ for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
+ NAME=${CONFIG%%.conf}
+ start_vpn
+ done
+ else
+ if test -e $CONFIG_DIR/$2.conf ; then
+ NAME=$2
+ start_vpn
+ else
+ echo -n " No such VPN: $2"
+ fi
+ fi
+ echo "."
+
+ ;;
+stop)
+ echo -n "Stopping openvpn:"
+
+ if test -z $2 ; then
+ for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
+ NAME=`echo $PIDFILE | cut -c18-`
+ NAME=${NAME%%.pid}
+ stop_vpn
+ echo -n " $NAME"
+ done
+ else
+ if test -e /var/run/openvpn.$2.pid ; then
+ PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
+ NAME=`echo $PIDFILE | cut -c18-`
+ NAME=${NAME%%.pid}
+ stop_vpn
+ echo -n " $NAME"
+ else
+ echo -n " No such VPN: $2"
+ fi
+ fi
+ echo "."
+ ;;
+# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
+reload|force-reload)
+ echo -n "Reloading openvpn:"
+ for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
+ NAME=`echo $PIDFILE | cut -c18-`
+ NAME=${NAME%%.pid}
+# If openvpn if running under a different user than root we'll need to restart
+ if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
+ stop_vpn
+ sleep 1
+ start_vpn
+ echo -n "(restarted)"
+ else
+ kill -HUP `cat $PIDFILE` || true
+# start-stop-daemon --stop --signal HUP --quiet --oknodo \
+# --exec $DAEMON --pidfile $PIDFILE
+ echo -n " $NAME"
+ fi
+ done
+ echo "."
+ ;;
+
+restart)
+ $0 stop $2
+ sleep 1
+ $0 start $2
+ ;;
+*)
+ echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
new file mode 100644
index 000000000..1205806d5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
@@ -0,0 +1 @@
+d @LOCALSTATEDIR@/run/openvpn 0755 root root -
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
new file mode 100644
index 000000000..358dcb791
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
+After=syslog.target network.target
+
+[Service]
+PrivateTmp=true
+Type=forking
+PIDFile=/var/run/openvpn/%i.pid
+ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb
new file mode 100644
index 000000000..4cad99869
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb
@@ -0,0 +1,67 @@
+SUMMARY = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "http://openvpn.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9b64491ec98eb6c6493ac5e4118f107"
+DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
+ file://openvpn \
+ file://openvpn@.service \
+ file://openvpn-volatile.conf"
+
+SRC_URI[md5sum] = "705a79d005558d94fa1e2b74e4413e97"
+SRC_URI[sha256sum] = "1ae883d9522c9fa6d189e5e4aaa058a93edd3d0b897e3c2664107c4785099fc3"
+
+SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CFLAGS += "-fno-inline"
+
+# I want openvpn to be able to read password from file (hrw)
+EXTRA_OECONF += "--enable-iproute2"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
+
+# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
+EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+
+ install -d ${D}/${sysconfdir}/openvpn
+ install -d ${D}/${sysconfdir}/openvpn/sample
+ install -m 755 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
+ install -m 755 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
+ install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
+ install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
+ install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
+
+ install -d ${D}/${localstatedir}
+ install -d ${D}/${localstatedir}/lib
+ install -d -m 710 ${D}/${localstatedir}/lib/openvpn
+
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+ sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+ fi
+}
+
+PACKAGES =+ " ${PN}-sample "
+
+RRECOMMENDS_${PN} = "kernel-module-tun"
+
+FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
+FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
+ ${sysconfdir}/tmpfiles.d \
+ "
+FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+ ${systemd_unitdir}/system/openvpn@loopback-client.service \
+ ${sysconfdir}/openvpn/sample/"
diff --git a/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb b/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb
new file mode 100644
index 000000000..4ed3ed1e4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb
@@ -0,0 +1,15 @@
+SUMMARY = "PHY interface tool for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
+
+PV = "1.0.1+git${SRCPV}"
+SRCREV = "3149bfdb4f513e2f0da0a7d0bc5d0873578696f2"
+SRC_URI = "git://github.com/wkz/phytool.git"
+
+S = "${WORKDIR}/git"
+
+# The Makefile has "$PREFIX/bin" hardcoded into it, hence not using $bindir here
+do_install() {
+ install -d ${D}${prefix}/bin
+ oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch b/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
new file mode 100644
index 000000000..eb549ded9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
@@ -0,0 +1,28 @@
+From f3e04281bad361249a8dad0cde150a801d720f67 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 18:46:52 -0700
+Subject: [PATCH] configure: Dont use uname to determine target OS
+
+Helps with cross-compiling
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 6c35a72..f9714e2 100755
+--- a/configure
++++ b/configure
+@@ -31,7 +31,7 @@
+ #DEFS += -DSCOPED_ACL
+ #
+
+-OS=`uname`
++OS="Linux"
+ CFG=config.mk
+ TMP=`mktemp /tmp/XXXXXX`
+ BUGREPORT_URL="https://github.com/troglobit/pimd/issues"
+--
+2.13.3
+
diff --git a/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb b/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
new file mode 100644
index 000000000..2faa7cb1c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon."
+HOMEPAGE = "http://troglobit.com/pimd.html"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790"
+
+SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.gz \
+ file://0001-configure-Dont-use-uname-to-determine-target-OS.patch \
+ "
+SRC_URI[md5sum] = "a3c03e40540980b2c06e265a17988e60"
+SRC_URI[sha256sum] = "c77a9812751f114490a28a6839b16aac8b020c8d9fd6aa22bf3880c054e19f1d"
+
+EXTRA_OECONF_append_libc-musl = " --embedded-libc"
+
+inherit autotools-brokensep
+
+do_configure() {
+ oe_runconf
+}
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch
new file mode 100644
index 000000000..f8eb3ae67
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch
@@ -0,0 +1,33 @@
+From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 10:14:20 -0700
+Subject: [PATCH] Fix build with format string checks
+
+Fixes
+| ruli_addr.c:418:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| return fprintf(out, inet_ntoa(addr->ipv4));
+| ^~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/ruli_addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ruli_addr.c b/src/ruli_addr.c
+index 00d5d0d..f1eabae 100644
+--- a/src/ruli_addr.c
++++ b/src/ruli_addr.c
+@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli_addr *addr, int family)
+ {
+ switch (family) {
+ case PF_INET:
+- return fprintf(out, inet_ntoa(addr->ipv4));
++ return fprintf(out, "%s", inet_ntoa(addr->ipv4));
+
+ case PF_INET6:
+ return ruli_inet6_print(out, &addr->ipv6);
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
new file mode 100644
index 000000000..9044415ff
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
@@ -0,0 +1,35 @@
+From d3fb471f53712e710fb5777b1b0851c46b7be64c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Jun 2017 01:23:03 -0700
+Subject: [PATCH] src/ruli_addr.c: Add missing format string
+
+fixes
+
+| ruli_addr.c: In function 'ruli_in_snprint':
+| ruli_addr.c:491:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| return snprintf(buf, size, inet_ntoa(addr->ipv4));
+| ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ruli_addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ruli_addr.c b/src/ruli_addr.c
+index f1eabae..5f1fd4f 100644
+--- a/src/ruli_addr.c
++++ b/src/ruli_addr.c
+@@ -488,7 +488,7 @@ int ruli_in_snprint(char *buf, size_t size, const _ruli_addr *addr, int family)
+ {
+ switch (family) {
+ case PF_INET:
+- return snprintf(buf, size, inet_ntoa(addr->ipv4));
++ return snprintf(buf, size, "%s", inet_ntoa(addr->ipv4));
+
+ case PF_INET6:
+ return ruli_inet6_snprint(buf, size, &addr->ipv6);
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch
new file mode 100644
index 000000000..60789a3d5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch
@@ -0,0 +1,122 @@
+diff -Naur patch.org/ruli-0.36/Makefile patch.new/ruli-0.36/Makefile
+--- ruli-0.36/Makefile 2015-09-10 15:14:13.952262350 -0400
++++ ruli-0.36/Makefile 2015-09-10 15:14:38.628261620 -0400
+@@ -7,17 +7,17 @@
+ .PHONY: default
+ default:
+ $(MAKE) -C src
+- $(MAKE) -C sample
++# $(MAKE) -C sample
+
+ .PHONY: clean
+ clean:
+ $(MAKE) -C src clean
+- $(MAKE) -C sample clean
++# $(MAKE) -C sample clean
+
+ .PHONY: install
+ install:
+ $(MAKE) -C src install
+- $(MAKE) -C sample install
++# $(MAKE) -C sample install
+
+ .PHONY: dpkg
+ dpkg:
+
+=====================================================================
+
+diff -Naur patch.org/git/src/Makefile patch.new/git/src/Makefile
+--- ruli-0.36/src/Makefile 2005-06-13 12:34:53.000000000 -0400
++++ ruli-0.36/src/Makefile 2015-09-11 09:46:06.290287347 -0400
+@@ -18,9 +18,9 @@
+ #
+ # Debian packaging likes this: OOP_BASE_DIR = /usr
+ #
+-OOP_BASE_DIR = /usr/local/oop
+-OOP_INCLUDE_DIR = $(OOP_BASE_DIR)/include
+-OOP_LIB_DIR = $(OOP_BASE_DIR)/lib
++#OOP_BASE_DIR = /usr/local/oop
++OOP_INCLUDE_DIR = ${PKG_CONFIG_SYSROOT_DIR}/$(includedir)/
++#OOP_LIB_DIR = $(OOP_BASE_DIR)/lib
+
+ #
+ # INSTALL_BASE_DIR indicates where RULI
+@@ -30,11 +30,11 @@
+ #
+ # Debian packaging likes this: INSTALL_BASE_DIR = $(DESTDIR)/usr
+ #
+-INSTALL_BASE_DIR = ../install/ruli
+-INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include
+-INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib
+-INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man
+-INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3
++#INSTALL_BASE_DIR = ../install/ruli
++#INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include
++#INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib
++#INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man
++#INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3
+
+ # SunOS, Linux
+ PLATFORM=$(shell uname)
+@@ -45,7 +45,7 @@
+
+ WARN = -pedantic -ansi -Wshadow -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings -Wredundant-decls
+-CC = gcc
++#CC = gcc
+
+ # gcc-specific options (not valid for g++)
+ ifeq ($(CC),gcc)
+@@ -58,7 +58,7 @@
+ FLAGS = $(DEBUG) -O2 -pipe -Wall -g -shared -D_REENTRANT \
+ $(DEFINE_SOLARIS) -I. -I$(OOP_INCLUDE_DIR)
+ SOFT_CFLAGS = $(WARN) $(FLAGS)
+-CFLAGS = $(WARN) -Werror $(FLAGS)
++CFLAGS = $(WARN) $(FLAGS)
+ LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \
+ ruli_addr.o ruli_sock.o ruli_txt.o ruli_msg.o ruli_fsm.o \
+ ruli_res.o ruli_parse.o ruli_host.o ruli_srv.o ruli_conf.o \
+@@ -66,7 +66,7 @@
+ ruli_getaddrinfo.o
+ SHAREDOBJ = $(LIBOBJ:%.o=%.os)
+ SONAME = libruli.so.4
+-LDFLAGS = -L$(OOP_LIB_DIR)
++#LDFLAGS = -L$(OOP_LIB_DIR)
+
+ COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c
+ SHARED_COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(SHARED) $(CFLAGS) -o $@ -c
+@@ -89,19 +89,19 @@
+ strip: ruli
+ strip $(SONAME) libruli.a
+
+-.PHONY: install
+-install: ruli
+- mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR)
+- cp $(SONAME) libruli.a $(INSTALL_LIB_DIR)
+- cp *.h $(INSTALL_INCLUDE_DIR)
+- cp ../doc/man/*.3 $(INSTALL_MAN3_DIR)
+- cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so
+- @echo
+- @echo "REMINDER:"
+- @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:"
+- @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf"
+- @echo "# ldconfig"
+- @echo
++#.PHONY: install
++#install: ruli
++# mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR)
++# cp $(SONAME) libruli.a $(INSTALL_LIB_DIR)
++# cp *.h $(INSTALL_INCLUDE_DIR)
++# cp ../doc/man/*.3 $(INSTALL_MAN3_DIR)
++# cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so
++# @echo
++# @echo "REMINDER:"
++# @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:"
++# @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf"
++# @echo "# ldconfig"
++# @echo
+
+ .PHONY: ruli
+ ruli: $(SONAME) libruli.a
+
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb b/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb
new file mode 100644
index 000000000..885796d2a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb
@@ -0,0 +1,25 @@
+SUMMARY = "RULI stands for Resolver User Layer Interface It's a library built on top of an asynchronous DNS stub resolver"
+
+HOMEPAGE = "http://www.nongnu.org/ruli/"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "liboop"
+
+SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \
+ file://Makefile.patch \
+ file://0001-Fix-build-with-format-string-checks.patch \
+ file://0001-src-ruli_addr.c-Add-missing-format-string.patch \
+ "
+
+SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468"
+SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa"
+
+do_install1() {
+ install -d ${D}${includedir}/ruli
+ install -d ${D}${libdir}
+ install -m 0644 ${S}/src/ruli*.h ${D}${includedir}/ruli
+ install -m 0644 ${S}/src/libruli.so ${D}${libdir}
+ install -m 0644 ${S}/src/libruli.so.4 ${D}${libdir}
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb b/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb
new file mode 100644
index 000000000..9b6fc2f38
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Static Multicast Routing Daemon"
+DESCRIPTION = "SMCRoute is a daemon and command line tool to manipulate the multicast routing table in the UNIX kernel."
+HOMEPAGE = "http://troglobit.github.io/smcroute.html"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+
+SRCREV = "d6280e64b27d5a4bd7f37dac36b455f4ae5f9ab3"
+SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch b/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch
new file mode 100644
index 000000000..0cb981cf7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch
@@ -0,0 +1,35 @@
+From 693cfce5431e191a3955fd56fa822927d92c9e43 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 7 Nov 2014 14:27:00 +0800
+Subject: [PATCH] Makefile: tweak install dir
+
+For oe-core, the man doc should be installed to /usr/share/man
+rather than /usr/locale/man.
+
+Upstream-Status: inappropriate (oe specific)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b5d12f8..9b2663c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,9 +14,9 @@ install: ssmping asmping ssmpingd mcfirst
+ install -D asmping $(DESTDIR)$(PREFIX)/bin/asmping
+ install -D ssmpingd $(DESTDIR)$(PREFIX)/bin/ssmpingd
+ install -D mcfirst $(DESTDIR)$(PREFIX)/bin/mcfirst
+- install -D ssmping.1 $(DESTDIR)$(PREFIX)/man/man1/ssmping.1
+- install -D asmping.1 $(DESTDIR)$(PREFIX)/man/man1/asmping.1
+- install -D mcfirst.1 $(DESTDIR)$(PREFIX)/man/man1/mcfirst.1
++ install -D ssmping.1 $(DESTDIR)$(PREFIX)/share/man/man1/ssmping.1
++ install -D asmping.1 $(DESTDIR)$(PREFIX)/share/man/man1/asmping.1
++ install -D mcfirst.1 $(DESTDIR)$(PREFIX)/share/man/man1/mcfirst.1
+
+ clean:
+ rm -f $(OBJ) joinch.o joingrp.o ssmping asmping ssmpingd mcfirst
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb b/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb
new file mode 100644
index 000000000..0531ffe64
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "ssmping is a tool for checking whether one can receive SSM from a given host"
+HOMEPAGE = "http://www.venaas.no/multicast/ssmping/"
+SECTION = "net"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://asmping.c;beginline=2;endline=11;md5=1ca8d1a1ca931e5cfe604ebf20a78b71"
+
+SRC_URI = "http://www.venaas.no/multicast/ssmping/${BP}.tar.gz \
+ file://0001-Makefile-tweak-install-dir.patch \
+"
+SRC_URI[md5sum] = "ad8e3d13f6d72918f73be7e7975d7fad"
+SRC_URI[sha256sum] = "22103a37eaa28489169a0927bc01e0596c3485fc4d29fc8456c07fd2c70fca6d"
+
+CFLAGS += "-D_GNU_SOURCE "
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch
new file mode 100644
index 000000000..d53cff249
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch
@@ -0,0 +1,17 @@
+help compile when S != B
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: ssmtp-2.64/Makefile.in
+===================================================================
+--- ssmtp-2.64.orig/Makefile.in
++++ ssmtp-2.64/Makefile.in
+@@ -24,7 +24,7 @@ INSTALLED_REVALIASES_FILE=$(REVALIASES_F
+ # Programs
+ GEN_CONFIG=$(srcdir)/generate_config
+
+-SRCS=ssmtp.c arpadate.c base64.c xgethostname.c @SRCS@
++SRCS=$(srcdir)/ssmtp.c $(srcdir)/arpadate.c $(srcdir)/base64.c $(srcdir)/xgethostname.c @SRCS@
+
+ OBJS=$(SRCS:.c=.o)
+
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
new file mode 100644
index 000000000..e087bc752
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
@@ -0,0 +1,126 @@
+Bug-Debian: http://bugs.debian.org/584162
+Reported-By: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Forwarded: not-needed
+Reviewed-By: Anibal Monsalve Salazar <anibal@debian.org>
+Last-Update: 2014-08-15
+
+From: "Daniel Richard G." <skunk@iSKUNK.ORG>
+Subject: Re: ssmtp: Partial loss of message body, sending message to wrong recipicients
+Date: Thu, 19 Jun 2014 14:44:30 -0400
+
+Attached is a patch against the original 2.64 source that should address
+this bug, and hopefully not break anything. An overview of my changes:
+
+* Added code to standarise() to drop the trailing '\r' if the line
+ originally ended with "\r\n".
+
+* Added a check to header_parse() that effectively converts an "\r\n" in
+ the input into '\n'.
+
+* Added a conditional so that header_parse() doesn't pass the empty
+ string to header_save()---a behavior I observed in testing, at the end
+ of a header block with "\r\n" line endings.
+
+* Simplified the last if(in_header) conditional in header_parse(),
+ because it erroneously assumes that if in_header == True, then c could
+ have some value other than EOF. (See the condition on the previous
+ "while" loop, and the lack of any other way to exit said loop.)
+
+ header_parse() will now properly grab a header if fed a message
+ without a body (i.e. no "\n\n" ending the header block), although this
+ code will still drop a header if there is no newline at the end.
+
+Christoph, thank you for your excellent analysis, and the test cases. I
+made use of them, and with my changes sSMTP appears to do the right
+thing.
+
+Debian patch from: https://sources.debian.net/patches/ssmtp/2.64-8/
+
+Upstream-Status: Backport [debian]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: ssmtp-2.64/ssmtp.c
+===================================================================
+--- ssmtp-2.64.orig/ssmtp.c
++++ ssmtp-2.64/ssmtp.c
+@@ -375,6 +375,12 @@ bool_t standardise(char *str, bool_t *li
+ if((p = strchr(str, '\n'))) {
+ *p = (char)NULL;
+ *linestart = True;
++
++ /* If the line ended in "\r\n", then drop the '\r' too */
++ sl = strlen(str);
++ if(sl >= 1 && str[sl - 1] == '\r') {
++ str[sl - 1] = (char)NULL;
++ }
+ }
+ return(leadingdot);
+ }
+@@ -768,6 +774,14 @@ void header_parse(FILE *stream)
+ }
+ len++;
+
++ if(l == '\r' && c == '\n') {
++ /* Properly handle input that already has "\r\n"
++ line endings; see https://bugs.debian.org/584162 */
++ l = (len >= 2 ? *(q - 2) : '\n');
++ q--;
++ len--;
++ }
++
+ if(l == '\n') {
+ switch(c) {
+ case ' ':
+@@ -790,7 +804,9 @@ void header_parse(FILE *stream)
+ if((q = strrchr(p, '\n'))) {
+ *q = (char)NULL;
+ }
+- header_save(p);
++ if(len > 0) {
++ header_save(p);
++ }
+
+ q = p;
+ len = 0;
+@@ -800,35 +816,12 @@ void header_parse(FILE *stream)
+
+ l = c;
+ }
+- if(in_header) {
+- if(l == '\n') {
+- switch(c) {
+- case ' ':
+- case '\t':
+- /* Must insert '\r' before '\n's embedded in header
+- fields otherwise qmail won't accept our mail
+- because a bare '\n' violates some RFC */
+-
+- *(q - 1) = '\r'; /* Replace previous \n with \r */
+- *q++ = '\n'; /* Insert \n */
+- len++;
+-
+- break;
+-
+- case '\n':
+- in_header = False;
+-
+- default:
+- *q = (char)NULL;
+- if((q = strrchr(p, '\n'))) {
+- *q = (char)NULL;
+- }
+- header_save(p);
+-
+- q = p;
+- len = 0;
+- }
++ if(in_header && l == '\n') {
++ /* Got EOF while reading the header */
++ if((q = strrchr(p, '\n'))) {
++ *q = (char)NULL;
+ }
++ header_save(p);
+ }
+ (void)free(p);
+ }
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch
new file mode 100644
index 000000000..26d852761
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch
@@ -0,0 +1,74 @@
+Use DESTDIR during install/uninstall, this helps
+with cross or staged builds. Additionally pass LDFLAGS
+during linking.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+
+Index: ssmtp-2.64/Makefile.in
+===================================================================
+--- ssmtp-2.64.orig/Makefile.in
++++ ssmtp-2.64/Makefile.in
+@@ -46,40 +46,40 @@ all: ssmtp
+
+ .PHONY: install
+ install: ssmtp $(GEN_CONFIG)
+- $(INSTALL) -d -m 755 $(bindir)
+- $(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp
+- $(INSTALL) -d -m 755 $(mandir)
+- $(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8
+- $(INSTALL) -d -m 755 $(SSMTPCONFDIR)
+- $(INSTALL) -m 644 $(srcdir)/revaliases $(INSTALLED_REVALIASES_FILE)
+- $(GEN_CONFIG) $(INSTALLED_CONFIGURATION_FILE)
++ $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 ssmtp $(DESTDIR)$(bindir)/ssmtp
++ $(INSTALL) -d -m 755 $(DESTDIR)$(mandir)
++ $(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(DESTDIR)$(mandir)/ssmtp.8
++ $(INSTALL) -d -m 755 $(DESTDIR)$(SSMTPCONFDIR)
++ $(INSTALL) -m 644 $(srcdir)/revaliases $(DESTDIR)$(INSTALLED_REVALIASES_FILE)
++ $(GEN_CONFIG) $(DESTDIR)$(INSTALLED_CONFIGURATION_FILE)
+
+
+ .PHONY: install-sendmail
+ install-sendmail: install
+- $(RM) $(bindir)/sendmail
+- $(LN_S) ssmtp $(bindir)/sendmail
+- $(INSTALL) -d -m 755 $(libexecdir)
+- $(RM) $(libexecdir)/sendmail
+- $(LN_S) sendmail /lib/sendmail
+- $(RM) $(mandir)/sendmail.8
+- $(LN_S) ssmtp.8 $(mandir)/sendmail.8
++ $(RM) $(DESTDIR)$(bindir)/sendmail
++ $(LN_S) ssmtp $(DESTDIR)$(bindir)/sendmail
++ $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
++ $(RM) $(DESTDIR)$(libexecdir)/sendmail
++ $(LN_S) sendmail $(DESTDIR)/lib/sendmail
++ $(RM) $(DESTDIR)$(mandir)/sendmail.8
++ $(LN_S) ssmtp.8 $(DESTDIR)$(mandir)/sendmail.8
+
+ .PHONY: uninstall
+ uninstall:
+- $(RM) $(bindir)/ssmtp
+- $(RM) $(mandir)/ssmtp.8
+- $(RM) $(CONFIGURATION_FILE) $(REVALIASES_FILE)
+- $(RM) -r $(SSMTPCONFDIR)
++ $(RM) $(DESTDIR)$(bindir)/ssmtp
++ $(RM) $(DESTDIR)$(mandir)/ssmtp.8
++ $(RM) $(DESTDIR)$(CONFIGURATION_FILE) $(DESTDIR)$(REVALIASES_FILE)
++ $(RM) -r $(DESTDIR)$(SSMTPCONFDIR)
+
+ .PHONY: uninstall-sendmail
+ uninstall-sendmail: uninstall
+- $(RM) $(bindir)/sendmail /lib/sendmail
+- $(RM) $(mandir)/sendmail.8
++ $(RM) $(DESTDIR)$(bindir)/sendmail $(DESTDIR)/lib/sendmail
++ $(RM) $(DESTDIR)$(mandir)/sendmail.8
+
+ # Binaries:
+ ssmtp: $(OBJS)
+- $(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS)
++ $(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS) $(LDFLAGS)
+
+ .PHONY: clean
+ clean:
diff --git a/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
new file mode 100644
index 000000000..07e3ffed4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
@@ -0,0 +1,35 @@
+SUMMARY = "extremely simple MTA to get mail off the system to a mail hub"
+HOMEPAGE = "http://packages.qa.debian.org/s/ssmtp.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
+ file://ssmtp-bug584162-fix.patch \
+ file://build-ouside_srcdir.patch \
+ file://use-DESTDIR.patch \
+"
+
+SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"
+SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36"
+
+inherit autotools
+
+PACKAGECONFIG ?= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ssl] = "--enable-ssl,--disable-ssl,openssl"
+PACKAGECONFIG[ipv6] = "--enable-inet6,--disable-inet6"
+
+EXTRA_OECONF += "--mandir=${mandir}"
+
+EXTRA_OEMAKE = "GEN_CONFIG='/bin/true'"
+
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'ssl', '-lssl -lcrypto', '', d)}"
+
+do_install_append () {
+ install -d ${D}${mandir}/
+ mv ${D}${exec_prefix}/man/* ${D}${mandir}/
+ rmdir ${D}${exec_prefix}/man
+ ln -s ssmtp ${D}${sbindir}/sendmail
+ ln -s ssmtp ${D}${sbindir}/newaliases
+ ln -s ssmtp ${D}${sbindir}/mailq
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch b/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
new file mode 100644
index 000000000..00178c84a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
@@ -0,0 +1,24 @@
+From 33a53dc13fd924949a582109b45fedd8d0bed59b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:42:11 -0700
+Subject: [PATCH] memory.h: Include stdint.h for uintptr_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/libstrongswan/utils/utils/memory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libstrongswan/utils/utils/memory.h b/src/libstrongswan/utils/utils/memory.h
+index e840330..8a356a8 100644
+--- a/src/libstrongswan/utils/utils/memory.h
++++ b/src/libstrongswan/utils/utils/memory.h
+@@ -22,6 +22,8 @@
+ #ifndef MEMORY_H_
+ #define MEMORY_H_
+
++#include <stdint.h>
++
+ /**
+ * Helper function that compares two binary blobs for equality
+ */
diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
new file mode 100644
index 000000000..be660d1fd
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
@@ -0,0 +1,99 @@
+From 9f97479373f3fceedc471074b81486d77a49618d Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Tue, 4 Mar 2014 14:38:42 +0800
+Subject: [PATCH] fix the function parameter
+
+Upstream-Status: pending
+
+Original openssl_diffie_hellman_create has three parameters, but
+it is reassigned a function pointer which has one parameter, and
+is called with one parameter, which will lead to segment fault
+on PPC, Now we simply correct the number of parameters.
+
+ #0 0x484d4aa0 in __GI_raise (sig=6)
+ at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
+ #1 0x484d9930 in __GI_abort () at abort.c:91
+ #2 0x10002064 in segv_handler (signal=11) at charon.c:224
+ #3 <signal handler called>
+ #4 0x48d89630 in openssl_diffie_hellman_create (group=MODP_1024_BIT, g=...,
+ p=<error reading variable: Cannot access memory at address 0x0>)
+ at openssl_diffie_hellman.c:143
+ #5 0x482c54f8 in create_dh (this=0x11ac6e68, group=MODP_1024_BIT)
+ at crypto/crypto_factory.c:358
+ #6 0x48375884 in create_dh (this=<optimized out>, group=<optimized out>)
+ at sa/keymat.c:132
+ #7 0x483843b8 in process_payloads (this=0x51400a78, message=<optimized
+ out>)
+ at sa/tasks/ike_init.c:200
+ #8 0x483844d0 in process_r (this=0x51400a78, message=0x51500778)
+ at sa/tasks/ike_init.c:319
+ #9 0x48374c9c in process_request (message=0x51500778, this=0x51400d20)
+ at sa/task_manager.c:870
+ #10 process_message (this=0x51400d20, msg=0x51500778) at
+ sa/task_manager.c:925
+ #11 0x4836c378 in process_message (this=0x514005f0, message=0x51500778)
+ at sa/ike_sa.c:1317
+ #12 0x48362270 in execute (this=0x515008d0)
+ at processing/jobs/process_message_job.c:74
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 8 +++++++-
+ src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | 4 +++-
+ src/libstrongswan/plugins/openssl/openssl_plugin.c | 1 +
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
+index 8e9c118..a73b038 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
+@@ -192,7 +192,7 @@ METHOD(diffie_hellman_t, destroy, void,
+ /*
+ * Described in header.
+ */
+-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
+ diffie_hellman_group_t group, ...)
+ {
+ private_openssl_diffie_hellman_t *this;
+@@ -255,5 +255,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
+ DBG2(DBG_LIB, "size of DH secret exponent: %d bits", BN_num_bits(privkey));
+ return &this->public;
+ }
++openssl_diffie_hellman_t *openssl_diffie_hellman_create( diffie_hellman_group_t group)
++{
++ chunk_t g;
++ chunk_t p;
++ openssl_diffie_hellman_create_custom(group, g, p);
++}
+
+ #endif /* OPENSSL_NO_DH */
+diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
+index 5de5520..22586e0 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
+@@ -43,8 +43,10 @@ struct openssl_diffie_hellman_t {
+ * @param ... expects generator and prime as chunk_t if MODP_CUSTOM
+ * @return openssl_diffie_hellman_t object, NULL if not supported
+ */
+-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
+ diffie_hellman_group_t group, ...);
++openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++ diffie_hellman_group_t group);
+
+ #endif /** OPENSSL_DIFFIE_HELLMAN_H_ @}*/
+
+diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
+index 8b0a7c5..114d575 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
++++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
+@@ -609,6 +609,7 @@ METHOD(plugin_t, get_features, int,
+ PLUGIN_PROVIDE(DH, MODP_1024_BIT),
+ PLUGIN_PROVIDE(DH, MODP_1024_160),
+ PLUGIN_PROVIDE(DH, MODP_768_BIT),
++ PLUGIN_REGISTER(DH, openssl_diffie_hellman_create_custom),
+ PLUGIN_PROVIDE(DH, MODP_CUSTOM),
+ #endif
+ #ifndef OPENSSL_NO_RSA
diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb
new file mode 100644
index 000000000..f2fe1f1cb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb
@@ -0,0 +1,132 @@
+DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
+Linux operating system."
+SUMMARY = "strongSwan is an OpenSource IPsec implementation"
+HOMEPAGE = "http://www.strongswan.org"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gmp openssl flex-native flex bison-native"
+
+SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
+ file://fix-funtion-parameter.patch \
+ file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+ "
+
+SRC_URI[md5sum] = "46aa3aa18fbc4bd528f9a0345ce79913"
+SRC_URI[sha256sum] = "e0a60a30ebf3c534c223559e1686497a21ded709a5d605c5123c2f52bcc22e92"
+
+EXTRA_OECONF = " \
+ --without-lib-prefix \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+
+PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
+PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
+
+# requires swanctl
+PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
+
+inherit autotools systemd pkgconfig
+
+RRECOMMENDS_${PN} = "kernel-module-ipsec"
+
+FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
+FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
+
+CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
+
+PACKAGES += "${PN}-plugins"
+ALLOW_EMPTY_${PN}-plugins = "1"
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+python split_strongswan_plugins () {
+ sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
+ libdir = d.expand('${libdir}/ipsec/plugins')
+ dbglibdir = os.path.join(libdir, '.debug')
+
+ def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
+ dvar = d.getVar('PKGD', True)
+ oldfiles = d.getVar('CONFFILES_' + pkg, True)
+ newfile = '/' + os.path.relpath(f, dvar)
+
+ if not oldfiles:
+ d.setVar('CONFFILES_' + pkg, newfile)
+ else:
+ d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
+
+ split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
+ do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
+
+ split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
+ split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
+ split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
+
+ if split_packages:
+ pn = d.getVar('PN', True)
+ d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
+ d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
+ d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
+ d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
+
+# Install some default plugins based on default strongSwan ./configure options
+# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
+RDEPENDS_${PN} += "\
+ ${PN}-plugin-aes \
+ ${PN}-plugin-attr \
+ ${PN}-plugin-cmac \
+ ${PN}-plugin-constraints \
+ ${PN}-plugin-des \
+ ${PN}-plugin-dnskey \
+ ${PN}-plugin-hmac \
+ ${PN}-plugin-kernel-netlink \
+ ${PN}-plugin-md5 \
+ ${PN}-plugin-nonce \
+ ${PN}-plugin-pem \
+ ${PN}-plugin-pgp \
+ ${PN}-plugin-pkcs1 \
+ ${PN}-plugin-pkcs7 \
+ ${PN}-plugin-pkcs8 \
+ ${PN}-plugin-pkcs12 \
+ ${PN}-plugin-pubkey \
+ ${PN}-plugin-random \
+ ${PN}-plugin-rc2 \
+ ${PN}-plugin-resolve \
+ ${PN}-plugin-revocation \
+ ${PN}-plugin-sha1 \
+ ${PN}-plugin-sha2 \
+ ${PN}-plugin-socket-default \
+ ${PN}-plugin-sshkey \
+ ${PN}-plugin-updown \
+ ${PN}-plugin-vici \
+ ${PN}-plugin-x509 \
+ ${PN}-plugin-xauth-generic \
+ ${PN}-plugin-xcbc \
+ ${PN}-plugin-curve25519 \
+ "
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"
diff --git a/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch b/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
new file mode 100644
index 000000000..209b0dd40
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Pending
+
+When openssl disable des support with configure option 'no-des', it doesn't
+provide des related header file and functions. That causes stunnel compile
+failed. Fix it by checking macro OPENSSL_NO_DES to use openssl des related
+library conditionaly.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/src/common.h b/src/common.h
+index f7d38b0..bf485af 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -471,7 +471,9 @@ extern char *sys_errlist[];
+ #ifndef OPENSSL_NO_MD4
+ #include <openssl/md4.h>
+ #endif /* !defined(OPENSSL_NO_MD4) */
++#ifndef OPENSSL_NO_DES
+ #include <openssl/des.h>
++#endif
+ #ifndef OPENSSL_NO_DH
+ #include <openssl/dh.h>
+ #if OPENSSL_VERSION_NUMBER<0x10100000L
+diff --git a/src/protocol.c b/src/protocol.c
+index 587df09..8198eb6 100644
+--- a/src/protocol.c
++++ b/src/protocol.c
+@@ -66,7 +66,7 @@ NOEXPORT char *imap_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *nntp_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ NOEXPORT void ntlm(CLI *, SERVICE_OPTIONS *);
+ NOEXPORT char *ntlm1();
+ NOEXPORT char *ntlm3(char *, char *, char *, char *);
+@@ -1175,7 +1175,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+ fd_printf(c, c->remote_fd.fd, "Host: %s", opt->protocol_host);
+ if(opt->protocol_username && opt->protocol_password) {
+ if(!strcasecmp(opt->protocol_authentication, "ntlm")) {
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ ntlm(c, opt);
+ #else
+ s_log(LOG_ERR, "NTLM authentication is not available");
+@@ -1216,7 +1216,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+ return NULL;
+ }
+
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+
+ /*
+ * NTLM code is based on the following documentation:
diff --git a/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb b/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
new file mode 100644
index 000000000..ec8478d6b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Program for providing universal TLS/SSL tunneling service"
+HOMEPAGE = "http://www.stunnel.org/"
+DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server."
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=866cdc7459d91e092b174388fab8d283"
+DEPENDS = "openssl zlib tcp-wrappers"
+
+RDEPENDS_${PN} += "perl"
+
+SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz \
+ file://fix-openssl-no-des.patch \
+"
+
+SRC_URI[md5sum] = "9079f5fafbccaf88b7d92b227d78249a"
+SRC_URI[sha256sum] = "ffa386ae4c825f35f35157c285e7402a6d58779ad8c3822f74a9d355b54aba1d"
+
+inherit autotools
+
+EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)}"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
new file mode 100644
index 000000000..b71435a04
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
@@ -0,0 +1,36 @@
+From 8ee1ab1ac89557d48ac1ab7ddcc3c51be9b734ad Mon Sep 17 00:00:00 2001
+From: "Hongjun.Yang" <hongjun.yang@windriver.com>
+Date: Wed, 22 Oct 2014 10:02:48 +0800
+Subject: [PATCH] Add ptest for tcpdump
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
+
+---
+ Makefile.in | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 0941f0e..3ce40c6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -437,9 +437,17 @@ distclean:
+ tests/failure-outputs.txt
+ rm -rf autom4te.cache tests/DIFF tests/NEW
+
+-check: tcpdump
++buildtest-TESTS: tcpdump
++
++runtest-PTEST:
+ (cd tests && ./TESTrun.sh)
+
++install-ptest:
++ cp -r tests $(DESTDIR)
++ cp -r config.h $(DESTDIR)
++ install -m 0755 Makefile $(DESTDIR)
++ ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump
++
+ extags: $(TAGFILES)
+ ctags $(TAGFILES)
+
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest
new file mode 100755
index 000000000..c03a8b8ef
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
+ -e '/: failed/ s/^/FAIL: /g' \
+ -e 's/: passed//g' \
+ -e 's/: failed//g'
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
new file mode 100644
index 000000000..8cefadf28
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
@@ -0,0 +1,34 @@
+From 741d77e42fc4af49804f7ee43b7237e01633cbcd Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 8 Jul 2014 13:20:47 +0800
+Subject: [PATCH] unnecessary to check libpcap
+
+Upstream-Status: Pending
+
+since the check of libpcap did not consider the cross-compile, lead to the
+below error:
+ This autoconf log indicates errors, it looked at host include and/or
+ library paths while determining system capabilities.
+
+In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to
+check if libpcap existed.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index b2305a5..b3b5dbf 100644
+--- a/configure.in
++++ b/configure.in
+@@ -418,7 +418,7 @@ dnl Some platforms may need -lnsl for getrpcbynumber.
+ AC_SEARCH_LIBS(getrpcbynumber, nsl,
+ AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
+
+-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
++#AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
+
+ #
+ # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
new file mode 100644
index 000000000..d38540e34
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
@@ -0,0 +1,51 @@
+SUMMARY = "A sophisticated network protocol analyzer"
+HOMEPAGE = "http://www.tcpdump.org/"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
+SECTION = "net"
+DEPENDS = "libpcap"
+
+SRC_URI = " \
+ http://www.tcpdump.org/release/${BP}.tar.gz \
+ file://unnecessary-to-check-libpcap.patch \
+ file://add-ptest.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576"
+SRC_URI[sha256sum] = "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79"
+
+export LIBS=" -lpcap"
+
+inherit autotools-brokensep ptest
+CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
+
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl"
+PACKAGECONFIG[smi] = "--with-smi, --without-smi,libsmi"
+PACKAGECONFIG[libcap-ng] = "--with-cap-ng=yes,--with-cap-ng=no,libcap-ng"
+
+EXTRA_AUTORECONF += " -I m4"
+
+do_configure_prepend() {
+ mkdir -p ${S}/m4
+ if [ -f aclocal.m4 ]; then
+ mv aclocal.m4 ${S}/m4
+ fi
+ # AC_CHECK_LIB(dlpi.. was looking to host /lib
+ sed -i 's:-L/lib::g' ./configure.in
+}
+do_configure_append() {
+ sed -i 's:-L/usr/lib::' ./Makefile
+ sed -i 's:-Wl,-rpath,${STAGING_LIBDIR}::' ./Makefile
+ sed -i 's:-I/usr/include::' ./Makefile
+}
+
+do_install_append() {
+ # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
+ rm -f ${D}${sbindir}/tcpdump.${PV}
+}
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch
new file mode 100644
index 000000000..386b7f83a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+--- tcpslice-1.2a3.orig/search.c 2000-09-10 10:52:40.000000000 +0200
++++ tcpslice-1.2a3/search.c 2006-07-28 14:56:55.000000000 +0200
+@@ -53,7 +53,7 @@
+ /* Size of a packet header in bytes; easier than typing the sizeof() all
+ * the time ...
+ */
+-#define PACKET_HDR_LEN (sizeof( struct pcap_pkthdr ))
++#define PACKET_HDR_LEN (sizeof( struct pcap_sf_pkthdr ))
+
+ extern int snaplen;
+
+@@ -111,16 +111,24 @@
+ static void
+ extract_header( pcap_t *p, u_char *buf, struct pcap_pkthdr *hdr )
+ {
+- memcpy((char *) hdr, (char *) buf, sizeof(struct pcap_pkthdr));
++ struct pcap_sf_pkthdr hdri;
++
++ memcpy((char *) &hdri, (char *) buf, sizeof(struct pcap_sf_pkthdr));
+
+ if ( pcap_is_swapped( p ) )
+ {
+- hdr->ts.tv_sec = SWAPLONG(hdr->ts.tv_sec);
+- hdr->ts.tv_usec = SWAPLONG(hdr->ts.tv_usec);
+- hdr->len = SWAPLONG(hdr->len);
+- hdr->caplen = SWAPLONG(hdr->caplen);
++ hdr->ts.tv_sec = SWAPLONG(hdri.ts.tv_sec);
++ hdr->ts.tv_usec = SWAPLONG(hdri.ts.tv_usec);
++ hdr->len = SWAPLONG(hdri.len);
++ hdr->caplen = SWAPLONG(hdri.caplen);
++ }
++ else
++ {
++ hdr->ts.tv_sec = hdri.ts.tv_sec;
++ hdr->ts.tv_usec = hdri.ts.tv_usec;
++ hdr->len = hdri.len;
++ hdr->caplen = hdri.caplen;
+ }
+-
+ /*
+ * From bpf/libpcap/savefile.c:
+ *
+--- tcpslice-1.2a3.orig/tcpslice.h 1995-11-02 00:40:53.000000000 +0100
++++ tcpslice-1.2a3/tcpslice.h 2006-07-28 14:56:55.000000000 +0200
+@@ -20,6 +20,26 @@
+ */
+
+
++#include <time.h>
++/* #include <net/bpf.h> */
++
++/*
++ * This is a timeval as stored in disk in a dumpfile.
++ * It has to use the same types everywhere, independent of the actual
++ * `struct timeval'
++ */
++
++struct pcap_timeval {
++ bpf_int32 tv_sec; /* seconds */
++ bpf_int32 tv_usec; /* microseconds */
++};
++
++struct pcap_sf_pkthdr {
++ struct pcap_timeval ts; /* time stamp */
++ bpf_u_int32 caplen; /* length of portion present */
++ bpf_u_int32 len; /* length this packet (off wire) */
++};
++
+ time_t gwtm2secs( struct tm *tm );
+
+ int sf_find_end( struct pcap *p, struct timeval *first_timestamp,
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch
new file mode 100644
index 000000000..0a7359311
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+diff -ur tcpdump-3.8.1/tcpslice/tcpslice.c tcpdump-3.8.1.new/tcpslice/tcpslice.c
+--- tcpslice/tcpslice.c 2004-01-15 17:35:53.000000000 +0100
++++ tcpslice/tcpslice.c 2004-01-15 16:12:57.000000000 +0100
+@@ -35,7 +35,7 @@
+ #include <sys/file.h>
+ #include <sys/stat.h>
+
+-#include <net/bpf.h>
++/* #include <net/bpf.h> */
+
+ #include <ctype.h>
+ #ifdef HAVE_FCNTL_H
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb
new file mode 100644
index 000000000..e65739a5c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb
@@ -0,0 +1,36 @@
+SUMMARY = "tcpslice"
+DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace."
+HOMEPAGE = "http://www.tcpdump.org/related.html"
+SECTION = "net"
+
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e"
+
+SRC_URI = "ftp://ftp.ee.lbl.gov/${BP}.tar.gz \
+ file://tcpslice-1.2a3-time.patch \
+ file://tcpslice-CVS.20010207-bpf.patch \
+ "
+SRC_URI[md5sum] = "e329cbeb7e589f132d92c3447c477190"
+SRC_URI[sha256sum] = "4096e8debc898cfaa16b5306f1c42f8d18b19e30e60da8d4deb781c8f684c840"
+
+inherit autotools-brokensep
+
+DEPENDS += "libpcap"
+
+# We do not want to autoreconf. We must specify srcdir as ".".
+# We have to set the ac_cv_* cache variables as well as pass the normal
+# cross-compilation options to configure!
+#
+do_configure () {
+ oe_runconf \
+ --srcdir="." \
+ ac_cv_build=${BUILD_SYS} \
+ ac_cv_host=${HOST_SYS} \
+ ac_cv_target=${HOST_SYS}
+}
+
+do_install () {
+ mkdir -p ${D}/usr/sbin
+ install -c -m 555 tcpslice ${D}/usr/sbin
+}
+
diff --git a/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb b/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb
new file mode 100644
index 000000000..681ef02bb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.2.6.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Use previously captured traffic to test network devices"
+
+HOMEPAGE = "http://tcpreplay.synfin.net/"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
+
+SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "3e65d5b872e441c6a0038191a3dc7ce9"
+SRC_URI[sha256sum] = "043756c532dab93e2be33a517ef46b1341f7239278a1045ae670041dd8a4531d"
+
+DEPENDS = "libpcap"
+
+EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
+
+inherit siteinfo autotools-brokensep
+
diff --git a/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch
new file mode 100644
index 000000000..01d0236be
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch
@@ -0,0 +1,37 @@
+--- a/configure.ac 2016-01-01 17:42:27.000000000 +0100
++++ b/configure.ac 2017-04-20 14:03:37.238254471 +0200
+@@ -284,24 +284,12 @@
+ AC_SUBST(LIBS)
+ AC_SUBST(ADDITIONAL_OBJECTS)
+
+-# Check for asciidoc
+-AC_PATH_PROG(A2X, a2x, no)
+-AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
+-if test x"$A2X" = x"no"; then
+- AC_MSG_ERROR([Test for asciidoc failed. See the file 'INSTALL' for help.])
+-fi
+-
+ AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ data/Makefile
+ data/templates/Makefile
+ etc/Makefile
+-docs/Makefile
+-docs/man5/Makefile
+-docs/man5/tinyproxy.conf.txt
+-docs/man8/Makefile
+-docs/man8/tinyproxy.txt
+ m4macros/Makefile
+ tests/Makefile
+ tests/scripts/Makefile
+--- a/Makefile.am 2016-01-01 17:42:27.000000000 +0100
++++ b/Makefile.am 2017-04-20 14:03:53.842822997 +0200
+@@ -2,7 +2,6 @@
+ src \
+ data \
+ etc \
+- docs \
+ m4macros \
+ tests
+
diff --git a/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service
new file mode 100644
index 000000000..ea079f955
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Tinyproxy, Lightweight http(s) proxy daemon
+RequiresMountsFor=/var
+
+[Service]
+Group=tinyproxy
+ExecStartPre=/bin/mkdir -p /var/log/tinyproxy
+ExecStartPre=/bin/chown -R nobody.tinyproxy /var/log/tinyproxy
+ExecStartPre=/bin/mkdir -p /var/run/tinyproxy
+ExecStartPre=/bin/chown -R nobody.tinyproxy /var/run/tinyproxy
+ExecStart=/usr/sbin/tinyproxy -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb
new file mode 100644
index 000000000..98192dc99
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Lightweight http(s) proxy daemon"
+HOMEPAGE = "https://tinyproxy.github.io/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz \
+ file://disable-documentation.patch \
+ file://tinyproxy.service"
+
+SRC_URI[md5sum] = "3b60f7d08e0821ed1a3e2cf1e5778cac"
+SRC_URI[sha256sum] = "8234c879a129feee61efa98bac14a1a3e46e5cf08f01696a216940872aa70faf"
+
+EXTRA_OECONF += " \
+ --enable-filter \
+ --enable-transparent \
+ --disable-regexcheck \
+ --enable-reverse \
+ --enable-upstream \
+ --enable-xtinyproxy \
+ "
+
+inherit autotools systemd useradd
+
+#User specific
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home /dev/null \
+ --no-user-group --gid nogroup tinypoxy"
+
+SYSTEMD_PACKAGES += "${BPN}"
+SYSTEMD_SERVICE_${PN} = "tinyproxy.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/tinyproxy.service ${D}${systemd_system_unitdir}
+ fi
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch b/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch
new file mode 100644
index 000000000..1bda576bc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch
@@ -0,0 +1,42 @@
+[PATCH] Update configure.ac and Makefile.am to resolve warnings/errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ configure.ac | 2 ++
+ libnetbsd/Makefile.am | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a96d2ab..b3b3069 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,9 +71,11 @@ AH_TEMPLATE([WITH_SSL],
+ #
+ # Checks for programs.
+ #
++AM_PROG_AR()
+ AC_PROG_CC()
+ AC_PROG_AWK()
+ AC_PROG_LIBTOOL()
++AM_PROG_CC_C_O()
+
+ #
+ # Checks for tool features.
+diff --git a/libnetbsd/Makefile.am b/libnetbsd/Makefile.am
+index 3e5c3ce..39bb12d 100644
+--- a/libnetbsd/Makefile.am
++++ b/libnetbsd/Makefile.am
+@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libnetbsd.la
+ libnetbsd_la_SOURCES =
+
+
+-CPPFLAGS = \
++AM_CPPFLAGS = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -I$(top_builddir)
+--
+1.7.10.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb b/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb
new file mode 100644
index 000000000..83ad11b0e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Enhanced NetBSD ftp client"
+DESCRIPTION = "tnftp (formerly known as lukemftp) is a port of the NetBSD FTP client \
+to other systems. It offers many enhancements over the traditional \
+BSD FTP client, including command-line editing, command-line fetches \
+of FTP and HTTP URLs (including via proxies), command-line uploads of \
+FTP URLs, context-sensitive word completion, dynamic progress bar, \
+IPv6 support, modification time preservation, paging of local and \
+remote files, passive mode support (with fallback to active mode), \
+SOCKS support, TIS FWTK gate-ftp server support, and transfer rate \
+throttling."
+
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+
+DEPENDS = "ncurses"
+
+SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \
+ file://tnftp-autotools.patch \
+"
+
+inherit autotools update-alternatives pkgconfig
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "ftp"
+ALTERNATIVE_LINK_NAME_${PN} = "${bindir}/ftp"
+ALTERNATIVE_TARGET_${PN} = "${bindir}/tnftp"
+
+FILES_${PN} = "${bindir}/tnftp"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6d6796cb166a9bb050958241dad9479e"
+SRC_URI[md5sum] = "a49fbe752318d5a7893f900046ea00d5"
+SRC_URI[sha256sum] = "c94a8a49d3f4aec1965feea831d4d5bf6f90c65fd8381ee0863d11a5029a43a0"
+
+PACKAGECONFIG ?= "openssl \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[openssl] = "--enable-ssl, --disable-ssl --with-ssl=no, openssl"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch b/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch
new file mode 100644
index 000000000..2c030b55d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch
@@ -0,0 +1,47 @@
+From e273e0ebc753645555909bcc4874c72458b17891 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 17 Jan 2014 03:17:44 -0500
+Subject: [PATCH] Make.rules: filter-out the patches from subdirs
+
+The $(subdirs) contains all the dirs under the ${B}, and this one:
+
+do_unpack[cleandirs] = "${S}/patches"
+
+will create a "patches" dir, then there will be compile errors, filter
+out the patches will fix the problem.
+
+Note: poky doesn't have this problem since it separates the ${S} and
+${B}
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Make.rules | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Make.rules b/Make.rules
+index b077cd5..0bfce2d 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -97,7 +97,7 @@ endif
+ subdirs := $(filter-out $(SKIPDIRS), $(subdirs))
+ endif
+
+-install install-%: subdirs := $(filter-out $(SKIPINSTALL), $(subdirs))
++install install-%: subdirs := $(filter-out $(SKIPINSTALL) patches, $(subdirs))
+
+
+ override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared)
+@@ -106,7 +106,7 @@ override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared)
+ INCLUDEDIRS := $(filter $(INCLUDEDIRS), $(subdirs))
+ LIBDIRS := $(filter $(LIBDIRS), $(subdirs))
+ MODDIRS := $(filter $(MODDIRS), $(subdirs))
+-EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS), $(subdirs))
++EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS) patches, $(subdirs))
+ MODUSERS := $(filter $(MODUSERS), $(subdirs))
+ SBINUSERS := $(filter $(SBINUSERS), $(subdirs))
+
+--
+1.7.10.4
+
diff --git a/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb b/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb
new file mode 100644
index 000000000..8f17d3fdb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb
@@ -0,0 +1,45 @@
+SUMMARY = "A new modern implementation of traceroute(8) utility for Linux systems"
+DESCRIPTION = "The traceroute utility displays the route used by IP packets on \
+their way to a specified network (or Internet) host. Traceroute displays \
+the IP number and host name (if possible) of the machines along the \
+route taken by the packets. Traceroute is used as a network debugging \
+tool. If you're having network connectivity problems, traceroute will \
+show you where the trouble is coming from along the route."
+SECTION = "net"
+HOMEPAGE = "http://traceroute.sourceforge.net/"
+LICENSE = "GPL-2.0+ & LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+inherit update-alternatives
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \
+ file://filter-out-the-patches-from-subdirs.patch \
+"
+
+SRC_URI[md5sum] = "84d329d67abc3fb83fc8cb12aeaddaba"
+SRC_URI[sha256sum] = "3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6"
+
+EXTRA_OEMAKE = "VPATH=${STAGING_LIBDIR}"
+
+do_compile() {
+ export LDFLAGS="${TARGET_LDFLAGS} -L${S}/libsupp"
+ oe_runmake "env=yes"
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m755 ${BPN}/${BPN} ${D}${bindir}
+
+ install -m755 wrappers/tcptraceroute ${D}${bindir}
+
+ install -d ${D}${mandir}/man8
+ install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir}/man8
+ ln -s ${BPN}.8 ${D}${mandir}/man8/${BPN}6.8
+ ln -s ${BPN}.8 ${D}${mandir}/man8/tcptraceroute.8
+
+}
+
+ALTERNATIVE_PRIORITY = "60"
+ALTERNATIVE_${PN} = "traceroute"
+ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute"
diff --git a/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
new file mode 100644
index 000000000..1c11823dd
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
@@ -0,0 +1,17 @@
+SUMMARY = "Tool for controlling the Linux TUN/TAP driver"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://tunctl.c;beginline=1;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/tunctl/tunctl-${PV}.tar.gz \
+ file://makefile-add-ldflags.patch \
+ "
+
+do_compile() {
+ oe_runmake tunctl
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install -m 755 tunctl ${D}/${sbindir}
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch
new file mode 100644
index 000000000..c96f538d2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index a0aa7f6..d6ce2c7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,7 @@ MAN_DIR ?= /usr/share/man/man$(MANS)
+ all : $(BIN) $(MAN)
+
+ $(BIN) : $(BIN).c
+- $(CC) $(CFLAGS) -o $(BIN) $(BIN).c
++ $(CC) $(CFLAGS) ${LDFLAGS} -o $(BIN) $(BIN).c
+
+ $(MAN) : $(PACKAGE).sgml
+ docbook2man $(PACKAGE).sgml
diff --git a/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb
new file mode 100644
index 000000000..dd265612f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb
@@ -0,0 +1,4 @@
+require tunctl.inc
+
+SRC_URI[md5sum] = "fdbedc263b3e85bb0e087cd567414607"
+SRC_URI[sha256sum] = "aa2a6c4cc6bfacb11e0d9f62334a6638a0d435475c61230116f00b6af8b14fff"
diff --git a/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.9.3.bb b/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.9.3.bb
new file mode 100644
index 000000000..1166f9a8d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.9.3.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Encrypted UDP based FTP with multicast"
+HOMEPAGE = "https://sourceforge.net/projects/uftp-multicast"
+SECTION = "libs/network"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/uftp-multicast/source-tar/uftp-${PV}.tar.gz"
+SRC_URI[md5sum] = "231d6ba7820d89a712fe7d727ab0f8e6"
+SRC_URI[sha256sum] = "9e9215af0315257c6cc4f40fbc6161057e861be1fff10a38a5564f699e99c78f"
+
+DEPENDS = "openssl"
+
+do_install () {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/wireshark/README b/meta-openembedded/meta-networking/recipes-support/wireshark/README
new file mode 100644
index 000000000..63b5b7263
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/wireshark/README
@@ -0,0 +1,45 @@
+#
+Wireshark - Notes
+
+URL: http://www.wireshark.org/
+User Guide: http://www.wireshark.org/docs/wsug_html_chunked/
+Secruity advisories: http://www.wireshark.org/security/
+
+Wireshark is slowly moving away from gtk and towards QT as their graphical stack.
+Currently gtk is supported with this release and I plan on integrating QT.
+
+
+
+Adding the wireshark to your build
+========================================
+
+via local.conf
+IMAGE_INSTALL_append = " wireshark"
+
+Adding the wireshark to your graphical build
+========================================
+via local.conf
+IMAGE_INSTALL_append = " wireshark"
+
+and one of:
+
+EXTRA_IMAGE_FEATURES += "x11-base"
+
+or use the "core-image-x11"
+
+
+Maintenance
+-----------
+
+Send patches, comments or questions to openembedded-devel@lists.openembedded.org
+
+When sending single patches, please use something like:
+
+ git send-email -1 -M \
+ --to openembedded-devel@lists.openembedded.org \
+ --cc akuster@mvista.com \
+ --subject-prefix=meta-networking][PATCH
+
+Maintainer: Armin Kuster <akuster@mvista.com>
+
+
diff --git a/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch b/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch
new file mode 100644
index 000000000..2aa58f73c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch
@@ -0,0 +1,53 @@
+use OR PKG_CONFIG scheme for libgcrypt
+
+Upstream-Status: Inappropriate OE specific
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: wireshark-2.4.4/m4/libgcrypt.m4
+===================================================================
+--- wireshark-2.4.4.orig/m4/libgcrypt.m4
++++ wireshark-2.4.4/m4/libgcrypt.m4
+@@ -27,11 +27,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+ if test x$libgcrypt_config_prefix != x ; then
+ if test x${LIBGCRYPT_CONFIG+set} != xset ; then
+- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
++ LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/libgcrypt.pc
+ fi
+ fi
+
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
++ AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt.pc, no)
+ tmp=ifelse([$1], ,1:1.2.0,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -50,7 +50,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+ req_micro=`echo $min_libgcrypt_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
++ libgcrypt_config_version=`$PKG_CONFIG --modversion libgcrypt`
+ major=`echo $libgcrypt_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ minor=`echo $libgcrypt_config_version | \
+@@ -82,7 +82,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ # If we have a recent libgcrypt, we should also check that the
+ # API is compatible
+ if test "$req_libgcrypt_api" -gt 0 ; then
+- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --api-version libgcrypt 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBGCRYPT API version])
+ if test "$req_libgcrypt_api" -eq "$tmp" ; then
+@@ -95,8 +95,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ fi
+ fi
+ if test $ok = yes; then
+- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
++ LIBGCRYPT_CFLAGS=`$PKG_CONFIG --cflags libgcrypt`
++ LIBGCRYPT_LIBS=`$PKG_CONFIG --libs libgcrypt`
+ ifelse([$2], , :, [$2])
+ else
+ LIBGCRYPT_CFLAGS=""
diff --git a/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb b/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
new file mode 100644
index 000000000..3da0a7baf
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
@@ -0,0 +1,73 @@
+DESCRIPTION = "wireshark - a popular network protocol analyzer"
+HOMEPAGE = "http://www.wireshark.org"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
+
+DEPENDS = "pcre expat glib-2.0 glib-2.0-native libgcrypt libgpg-error"
+
+SRC_URI = "https://1.as.dl.wireshark.org/src/${BP}.tar.xz"
+SRC_URI += "file://libgcrypt.patch"
+
+UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
+
+SRC_URI[md5sum] = "8cfb73e286dd6427ca4405e6e802d13e"
+SRC_URI[sha256sum] = "8e965fd282bc0c09e7c4eba5f08a555d0ccf40a7d1544b939e01b90bc893d5fe"
+
+PE = "1"
+
+inherit autotools pkgconfig perlnative upstream-version-is-even
+
+ARM_INSTRUCTION_SET = "arm"
+
+PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
+
+PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_DIR_HOST}/usr, --with-libcap=no --enable-pcap-ng-default , libcap"
+PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_DIR_HOST}/usr --with-pcap-remote, --with-pcap=no --enable-pcap-ng-default , libpcap"
+PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi"
+PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl"
+PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19"
+PACKAGECONFIG[gtk2] = "--with-gtk=2, , gtk+"
+PACKAGECONFIG[gtk3] = "--with-gtk=3, , gtk+3"
+PACKAGECONFIG[graphics] = "--enable-wireshark, --with-gtk=no --disable-wireshark,"
+PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
+PACKAGECONFIG[ssl] = "--with-ssl=yes, --with-ssl=no, openssl"
+PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5"
+PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua"
+PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib"
+PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip"
+PACKAGECONFIG[plugins] = "--with-plugins=yes, --with-plugins=no"
+PACKAGECONFIG[sbc] = "--with-sbc=yes, --with-sbc=no, sbc"
+PACKAGECONFIG[libssh] = "--with-libssh=${STAGING_DIR_HOST}/usr, --with-libssh=no, libssh2"
+PACKAGECONFIG[lz4] = "--with-lz4=${STAGING_DIR_HOST}/usr, --with-lz4=no, lz4"
+
+# these next two options require addional layers
+PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
+
+EXTRA_OECONF += "--with-libgcrypt-prefix=${PKG_CONFIG_DIR} --with-qt=no --enable-tshark --enable-rawshark"
+
+LDFLAGS_append = " -lgpg-error"
+
+# Currently wireshark does not install header files
+do_install_append () {
+
+ install -d ${D}/${includedir}/${BPN}
+ install -d ${D}/${includedir}/${BPN}/epan
+ install -d ${D}/${includedir}/${BPN}/epan/crypt
+ install -d ${D}/${includedir}/${BPN}/epan/dfilter
+ install -d ${D}/${includedir}/${BPN}/epan/dissectors
+ install -d ${D}/${includedir}/${BPN}/epan/ftypes
+ install -d ${D}/${includedir}/${BPN}/epan/wmem
+
+ install config.h ${D}/${includedir}/${BPN}
+ install ${S}/register.h ${D}/${includedir}/${BPN}
+ install -D ${S}/epan/*.h ${D}/${includedir}/${BPN}/epan
+ install -D ${S}/epan/crypt/*.h ${D}/${includedir}/${BPN}/epan/crypt
+ install -D ${S}/epan/dfilter/*.h ${D}/${includedir}/${BPN}/epan/dfilter
+ install -D ${S}/epan/dissectors/*.h ${D}/${includedir}/${BPN}/epan/dissectors
+ install -D ${S}/epan/ftypes/*.h ${D}/${includedir}/${BPN}/epan/ftypes
+ install -D ${S}/epan/wmem/*.h ${D}/${includedir}/${BPN}/epan/wmem
+}
+
+FILES_${PN} += "${datadir}*"
diff --git a/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb b/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb
new file mode 100644
index 000000000..b6d2f6923
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Userspace tools for Linux IEEE 802.15.4 stack"
+HOMEPAGE = "http://wpan.cakelab.org/releases/"
+DESCRIPTION = "This is a set of utils to manage the Linux WPAN stack via \
+netlink interface. This requires recent kernel with nl802154 interface."
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4cfd939b1d7e6aba9fcefb7f6e2fd45d"
+
+DEPENDS = "libnl"
+
+PV = "0.8+git${SRCPV}"
+SRC_URI = "git://github.com/linux-wpan/wpan-tools \
+ "
+SRCREV = "3f473f5136f89773997cb4fff2d8ed647734e2f5"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
OpenPOWER on IntegriCloud