summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-networking
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/meta-openembedded/meta-networking')
-rw-r--r--import-layers/meta-openembedded/meta-networking/COPYING.MIT17
-rw-r--r--import-layers/meta-openembedded/meta-networking/MAINTAINERS38
-rw-r--r--import-layers/meta-openembedded/meta-networking/README40
-rw-r--r--import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass95
-rw-r--r--import-layers/meta-openembedded/meta-networking/conf/layer.conf23
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/README3
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt38
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt38
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt39
-rw-r--r--import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt38
-rw-r--r--import-layers/meta-openembedded/meta-networking/licenses/DMTF34
-rw-r--r--import-layers/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0219
-rw-r--r--import-layers/meta-openembedded/meta-networking/licenses/netperf43
-rw-r--r--import-layers/meta-openembedded/meta-networking/licenses/radvd37
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.10.1.bb24
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch60
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch40
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb179
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.6.3a.bb26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb37
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/00-fix-typos-in-man-pages.patch108
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/0006-avoid-using-colon-in-the-checking-msg.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/16-do-not-check-xsltproc-manpages.patch43
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/20-do-not-import-target-module-while-cross-compile.patch58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/21-add-config-option-without-valgrind.patch63
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/volatiles.03_samba3
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb320
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch52
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch51
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch75
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init109
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb89
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch118
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch40
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch107
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch77
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb56
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch22
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help168
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/makeman.patch11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/vpnc-install.patch35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb45
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service10
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb63
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch94
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch163
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch152
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init37
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch47
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/Makefile.rules-cross.patch23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch24
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch75
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-additional-distros.patch12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch44
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch62
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch120
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb72
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch46
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb95
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init94
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils2
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian119
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch240
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb113
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default2
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d128
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.2.bb65
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch43
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_4.7.0.bb66
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb20
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch93
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0102
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch116
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix94
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc251
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.0.3.bb4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2016-3125.patch247
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch112
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default9
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init220
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service7
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb115
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf7
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service10
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb22
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default1
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init135
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd2
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc67
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.11.bb5
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2016-3947.patch48
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch43
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch64
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest3
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid2
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.7.bb79
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch81
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default3
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init105
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch60
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch165
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch24
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb76
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch55
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf139
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service9
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch44
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch77
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb109
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_bio_struct_of_linux_v4.3_and_above.patch75
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/fix-errors-observed-with-linux-3.19-and-greater.patch198
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch67
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb57
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch85
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover77
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init87
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common163
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch43
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb90
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libmnl/libmnl_1.0.3.bb13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch89
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.4.bb17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.2.bb15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.0.5.bb13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/files/fix-to-generate-ntf.8.patch26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.5.bb17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-irc/znc/znc_git.bb31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch97
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb89
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb46
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam10
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch77
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam10
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit21
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb100
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb70
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod71
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default2
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb83
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch1217
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch48
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb59
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb54
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb42
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init66
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf422
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch37
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_libs2-Error-Fix.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/dont-return-incompletely-parsed-varbinds.patch131
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch37
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch1652
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb180
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch106
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb36
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch48
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babeld.service14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch54
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init200
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch50
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga3
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init64
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc251
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb10
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch84
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.61
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb36
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch59
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch156
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.default22
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.init59
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.12.bb74
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc44
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch134
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.6.bb7
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb8
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf51
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch61
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch77
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch37
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch87
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch22
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.11.0.bb13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc9
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch24
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb54
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch47
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc83
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch29
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.75.bb9
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper62
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service17
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf293
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf84
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init117
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch66
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.21.bb67
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-don-t-compile-documentation.patch38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.3.bb41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb40
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.45.bb40
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.6.bb93
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/GeoIP.conf11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/geoipupdate.cron5
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.1.bb30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb18
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch87
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch36
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch220
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch26
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch61
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf8
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample40
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb92
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch97
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch63
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch39
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch48
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb36
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch13
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.26.bb49
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb6
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.6.bb42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.8.bb31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch38
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb27
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest5
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb65
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb28
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb24
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/configure.patch13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.17.bb53
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch25
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch32
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb22
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb66
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch30
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/init62
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb66
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init107
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch110
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb34
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb48
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service14
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb58
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb53
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch16
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb41
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf17
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd84
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service11
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate54
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default7
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service11
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p7.bb160
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb29
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn104
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf1
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service12
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb67
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb19
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb13
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch35
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch98
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/install-strongswan-swanctl-service.patch22
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/support-newer-systemd.patch69
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.3.2.bb57
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.28.bb20
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch38
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest5
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch31
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb51
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch75
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb36
-rwxr-xr-ximport-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch92
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch17
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch33
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb23
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch42
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20130505.bb36
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch47
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.0.21.bb45
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc15
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb4
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/README45
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch46
-rw-r--r--import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.0.2.bb60
505 files changed, 25571 insertions, 0 deletions
diff --git a/import-layers/meta-openembedded/meta-networking/COPYING.MIT b/import-layers/meta-openembedded/meta-networking/COPYING.MIT
new file mode 100644
index 000000000..fb950dc69
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/import-layers/meta-openembedded/meta-networking/MAINTAINERS b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
new file mode 100644
index 000000000..f3896725c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
@@ -0,0 +1,38 @@
+This file contains a list of maintainers for the meta-networking layer.
+
+Please submit any patches against meta-networking to the OpenEmbedded
+development mailing list (openembedded-devel@lists.openembedded.org) with
+'[meta-networking][krogoth]' in the subject.
+
+When sending single patches, please use something like:
+
+ git send-email -1 -M \
+ --to openembedded-devel@lists.openembedded.org \
+ --subject-prefix=meta-networking][krogoth][PATCH
+
+krogoth Branch Maintainer:
+Armin Kuster <akuster808@gmail.com>
+
+You may also contact the maintainers directly.
+
+Descriptions of section entries:
+
+ M: Mail patches to: FullName <address@domain>
+ F: Files and directories with wildcard patterns.
+ A trailing slash includes all files and subdirectory files.
+ F: recipes-devtools/ all files in and below recipes-devtools
+ F: recipes-selinux/* all files in recipes-selinux, but not below
+ One pattern per line. Multiple F: lines acceptable.
+
+Please keep this list in alphabetical order.
+
+Maintainers List (try to look for most precise areas first)
+
+COMMON
+M: Joe MacDonald <joe_macdonald@mentor.com>
+F: conf
+F: recipes-*
+
+NETKIT
+M: Armin Kuster <akuster808@gmail.com>
+F: recipes-netkit
diff --git a/import-layers/meta-openembedded/meta-networking/README b/import-layers/meta-openembedded/meta-networking/README
new file mode 100644
index 000000000..e1ba27d83
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/README
@@ -0,0 +1,40 @@
+meta-networking
+===============
+
+This layer is intended to be a central point for networking-related
+packages and configuration. It should be useful directly on top of
+oe-core and compliments meta-openembedded. It should be primarily useful
+to the following groups:
+
+ - Anyone building a small networking device (eg. a home router /
+ bridge / switch).
+
+ - Anyone wanting to add network services to their device (eg.
+ anything that might benefit from a small ftp/tftp server)
+
+Dependencies
+------------
+
+This layer depends on:
+
+URI: git://github.com/openembedded/openembedded-core.git
+branch: master
+revision: HEAD
+
+For some recipes, the meta-oe layer is required:
+
+URI: git://github.com/openembedded/meta-openembedded.git
+subdirectory: meta-oe
+branch: master
+revision: HEAD
+
+URI: git://github.com/openembedded/meta-openembedded.git
+subdirectory: meta-python
+branch: master
+revision: HEAD
+
+Maintenance
+-----------
+
+Please see the MAINTAINERS file for information on contacting the
+maintainers of this layer, as well as instructions for submitting patches.
diff --git a/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass b/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass
new file mode 100644
index 000000000..45fbcc342
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass
@@ -0,0 +1,95 @@
+# waf is a build system which is used by samba related project.
+# Obtain details from https://wiki.samba.org/index.php/Waf
+#
+inherit qemu pythonnative
+
+DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
+
+CONFIGUREOPTS = " --prefix=${prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --oldincludedir=${oldincludedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ "
+
+# Three methods for waf cross compile:
+# 1. answers:
+# Only --cross-answers - try the cross-answers file, and if
+# there's no corresponding answer, add to the file and mark
+# the configure process as unfinished.
+# 2. exec:
+# Only --cross-execute - get the answer from cross-execute,
+# an emulator (qemu) is used to run cross-compiled binaries.
+# 3. both:
+# (notes: not supported in lower version of some packages,
+# please check buildtools/wafsamba/samba_cross.py in the
+# package source)
+# Try the cross-answers file first, and if there is no
+# corresponding answer, use cross-execute to get an answer,
+# and add that answer to the file.
+#
+# The first one is preferred since it may fail with 2 or 3 if
+# the target board is not suported by qemu, but we can use 2 or 3
+# to help generate the cross answer when adding new board support.
+CROSS_METHOD ?= "answer"
+
+do_configure() {
+
+ # Prepare the cross-answers file
+ CROSS_ANSWERS="${B}/cross-answers-${TARGET_ARCH}.txt"
+ if [ -e ${CROSS_ANSWERS} ]; then
+ rm -f ${CROSS_ANSWERS}
+ fi
+ echo 'Checking uname machine type: "${TARGET_ARCH}"' >> ${CROSS_ANSWERS}
+ echo 'Checking uname release type: "${OLDEST_KERNEL}"' >> ${CROSS_ANSWERS}
+ cat ${WAF_CROSS_ANSWERS_PATH}/cross-answers-${TARGET_ARCH}.txt >> ${CROSS_ANSWERS}
+
+ qemu_binary="${@qemu_target_binary(d)}"
+ if [ "${qemu_binary}" = "qemu-allarch" ]; then
+ qemu_binary="qemuwrapper"
+ fi
+
+ libdir_qemu="${STAGING_DIR_HOST}/${libdir}"
+ base_libdir_qemu="${STAGING_DIR_HOST}/${base_libdir}"
+
+ CROSS_EXEC="${qemu_binary} \
+ ${QEMU_OPTIONS} \
+ -L ${STAGING_DIR_HOST} \
+ -E LD_LIBRARY_PATH=${libdir_qemu}:${base_libdir_qemu}"
+
+ export BUILD_SYS=${BUILD_SYS}
+ export HOST_SYS=${HOST_SYS}
+ export BUILD_ARCH=${BUILD_ARCH}
+ export HOST_ARCH=${HOST_ARCH}
+ export STAGING_LIBDIR=${STAGING_LIBDIR}
+ export STAGING_INCDIR=${STAGING_INCDIR}
+ export PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+
+ CONFIG_CMD="./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} --cross-compile"
+ if [ "${CROSS_METHOD}" = "answer" ]; then
+ ${CONFIG_CMD} --cross-answers="${CROSS_ANSWERS}"
+ elif [ "${CROSS_METHOD}" = "exec" ]; then
+ ${CONFIG_CMD} --cross-exec="${CROSS_EXEC}"
+ elif [ "${CROSS_METHOD}" = "both" ]; then
+ ${CONFIG_CMD} --cross-answers="${CROSS_ANSWERS}" --cross-exec="${CROSS_EXEC}"
+ else
+ echo "ERROR: ${CROSS_METHOD} is not valid for cross-compile!"
+ exit 1
+ fi
+}
+
+do_compile () {
+ python ./buildtools/bin/waf ${PARALLEL_MAKE}
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/import-layers/meta-openembedded/meta-networking/conf/layer.conf b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
new file mode 100644
index 000000000..5fd636a87
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
@@ -0,0 +1,23 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a packages directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "networking-layer"
+BBFILE_PATTERN_networking-layer := "^${LAYERDIR}/"
+BBFILE_PRIORITY_networking-layer = "5"
+
+# This should only be incremented on significant changes that will
+# cause compatibility issues with other layers
+LAYERVERSION_networking-layer = "1"
+
+LAYERDEPENDS_networking-layer = "core"
+LAYERDEPENDS_networking-layer += "openembedded-layer"
+LAYERDEPENDS_networking-layer += "meta-python"
+
+LICENSE_PATH += "${LAYERDIR}/licenses"
+
+# used by waf-samba.bbclass
+WAF_CROSS_ANSWERS_PATH = "${LAYERDIR}/files/waf-cross-answers"
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/README b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/README
new file mode 100644
index 000000000..dda45c508
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/README
@@ -0,0 +1,3 @@
+The files in this directory are cross answers files
+used by waf-samba.bbclass, please see waf-samba.bbclass
+for details about how they are used.
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt
new file mode 100644
index 000000000..bbf7f1620
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt
@@ -0,0 +1,38 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt
new file mode 100644
index 000000000..e926fcd3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt
new file mode 100644
index 000000000..e926fcd3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt
new file mode 100644
index 000000000..e926fcd3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt
new file mode 100644
index 000000000..18bfa0203
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt
new file mode 100644
index 000000000..8fa015ab9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt
@@ -0,0 +1,38 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt
new file mode 100644
index 000000000..18bfa0203
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt
new file mode 100644
index 000000000..fb93b56fc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt
new file mode 100644
index 000000000..fd585f0d5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: (255, "")
+Checking if can we convert from IBM850 to UCS-2LE: (255, "")
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt
new file mode 100644
index 000000000..bbf7f1620
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt
@@ -0,0 +1,38 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
diff --git a/import-layers/meta-openembedded/meta-networking/licenses/DMTF b/import-layers/meta-openembedded/meta-networking/licenses/DMTF
new file mode 100644
index 000000000..54a28120e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/licenses/DMTF
@@ -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/import-layers/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0 b/import-layers/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0
new file mode 100644
index 000000000..a66d5bf5e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0
@@ -0,0 +1,219 @@
+ copyleft-next 0.3.0 ("this License")
+ Release date: 2013-05-16
+
+1. License Grants; No Trademark License
+
+ Subject to the terms of this License, I grant You:
+
+ a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+ copyright license, to reproduce, Distribute, prepare derivative works
+ of, publicly perform and publicly display My Work.
+
+ b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+ patent license under Licensed Patents to make, have made, use, sell,
+ offer for sale, and import Covered Works.
+
+ This License does not grant any rights in My name, trademarks, service
+ marks, or logos.
+
+2. Distribution: General Conditions
+
+ You may Distribute Covered Works, provided that You (i) inform
+ recipients how they can obtain a copy of this License; (ii) satisfy the
+ applicable conditions of sections 3 through 6; and (iii) preserve all
+ Legal Notices contained in My Work (to the extent they remain
+ pertinent). "Legal Notices" means copyright notices, license notices,
+ license texts, and author attributions, but does not include logos,
+ other graphical images, trademarks or trademark legends.
+
+3. Conditions for Distributing Derived Works; Outbound GPL Compatibility
+
+ If You Distribute a Derived Work, You must license the entire Derived
+ Work as a whole under this License, with prominent notice of such
+ licensing. This condition may not be avoided through such means as
+ separate Distribution of portions of the Derived Work. You may
+ additionally license the Derived Work under the GPL, so that the
+ recipient may further Distribute the Derived Work under either this
+ License or the GPL.
+
+4. Condition Against Further Restrictions; Inbound License Compatibility
+
+ When Distributing a Covered Work, You may not impose further
+ restrictions on the exercise of rights in the Covered Work granted under
+ this License. This condition is not excused merely because such
+ restrictions result from Your compliance with conditions or obligations
+ extrinsic to this License (such as a court order or an agreement with a
+ third party).
+
+ However, You may Distribute a Covered Work incorporating material
+ governed by a license that is both OSI-Approved and FSF-Free as of the
+ release date of this License, provided that Your Distribution complies
+ with such other license.
+
+5. Conditions for Distributing Object Code
+
+ You may Distribute an Object Code form of a Covered Work, provided that
+ you accompany the Object Code with a URL through which the Corresponding
+ Source is made available, at no charge, by some standard or customary
+ means of providing network access to source code.
+
+ If you Distribute the Object Code in a physical product or tangible
+ storage medium ("Product"), the Corresponding Source must be available
+ through such URL for two years from the date of Your most recent
+ Distribution of the Object Code in the Product. However, if the Product
+ itself contains or is accompanied by the Corresponding Source (made
+ available in a customarily accessible manner), You need not also comply
+ with the first paragraph of this section.
+
+ Each recipient of the Covered Work from You is an intended third-party
+ beneficiary of this License solely as to this section 5, with the right
+ to enforce its terms.
+
+6. Symmetrical Licensing Condition for Upstream Contributions
+
+ If You Distribute a work to Me specifically for inclusion in or
+ modification of a Covered Work (a "Patch"), and no explicit licensing
+ terms apply to the Patch, You license the Patch under this License, to
+ the extent of Your copyright in the Patch. This condition does not
+ negate the other conditions of this License, if applicable to the Patch.
+
+7. Nullification of Copyleft/Proprietary Dual Licensing
+
+ If I offer to license, for a fee, a Covered Work under terms other than
+ a license that is OSI-Approved or FSF-Free as of the release date of this
+ License or a numbered version of copyleft-next released by the
+ Copyleft-Next Project, then the license I grant You under section 1 is no
+ longer subject to the conditions in sections 2 through 5.
+
+8. Copyleft Sunset
+
+ The conditions in sections 2 through 5 no longer apply once fifteen
+ years have elapsed from the date of My first Distribution of My Work
+ under this License.
+
+9. Pass-Through
+
+ When You Distribute a Covered Work, the recipient automatically receives
+ a license to My Work from Me, subject to the terms of this License.
+
+10. Termination
+
+ Your license grants under section 1 are automatically terminated if You
+
+ a) fail to comply with the conditions of this License, unless You cure
+ such noncompliance within thirty days after becoming aware of it, or
+
+ b) initiate a patent infringement litigation claim (excluding
+ declaratory judgment actions, counterclaims, and cross-claims)
+ alleging that any part of My Work directly or indirectly infringes
+ any patent.
+
+ Termination of Your license grants extends to all copies of Covered
+ Works You subsequently obtain. Termination does not terminate the
+ rights of those who have received copies or rights from You subject to
+ this License.
+
+ To the extent permission to make copies of a Covered Work is necessary
+ merely for running it, such permission is not terminable.
+
+11. Later License Versions
+
+ The Copyleft-Next Project may release new versions of copyleft-next,
+ designated by a distinguishing version number ("Later Versions").
+ Unless I explicitly remove the option of Distributing Covered Works
+ under Later Versions, You may Distribute Covered Works under any Later
+ Version.
+
+** 12. No Warranty **
+** **
+** My Work is provided "as-is", without warranty. You bear the risk **
+** of using it. To the extent permitted by applicable law, each **
+** Distributor of My Work excludes the implied warranties of title, **
+** merchantability, fitness for a particular purpose and **
+** non-infringement. **
+
+** 13. Limitation of Liability **
+** **
+** To the extent permitted by applicable law, in no event will any **
+** Distributor of My Work be liable to You for any damages **
+** whatsoever, whether direct, indirect, special, incidental, or **
+** consequential damages, whether arising under contract, tort **
+** (including negligence), or otherwise, even where the Distributor **
+** knew or should have known about the possibility of such damages. **
+
+14. Severability
+
+ The invalidity or unenforceability of any provision of this License
+ does not affect the validity or enforceability of the remainder of
+ this License. Such provision is to be reformed to the minimum extent
+ necessary to make it valid and enforceable.
+
+15. Definitions
+
+ "Copyleft-Next Project" means the project that maintains the source
+ code repository at <https://gitorious.org/copyleft-next/> as of the
+ release date of this License.
+
+ "Corresponding Source" of a Covered Work in Object Code form means (i)
+ the Source Code form of the Covered Work; (ii) all scripts,
+ instructions and similar information that are reasonably necessary for
+ a skilled developer to generate such Object Code from the Source Code
+ provided under (i); and (iii) a list clearly identifying all Separate
+ Works (other than those provided in compliance with (ii)) that were
+ specifically used in building and (if applicable) installing the
+ Covered Work (for example, a specified proprietary compiler including
+ its version number). Corresponding Source must be machine-readable.
+
+ "Covered Work" means My Work or a Derived Work.
+
+ "Derived Work" means a work of authorship that copies from, modifies,
+ adapts, is based on, is a derivative work of, transforms, translates or
+ contains all or part of My Work, such that copyright permission is
+ required. The following are not Derived Works: (i) Mere Aggregation;
+ (ii) a mere reproduction of My Work; and (iii) if My Work fails to
+ explicitly state an expectation otherwise, a work that merely makes
+ reference to My Work.
+
+ "Distribute" means to distribute, transfer or make a copy available to
+ someone else, such that copyright permission is required.
+
+ "Distributor" means Me and anyone else who Distributes a Covered Work.
+
+ "FSF-Free" means classified as 'free' by the Free Software Foundation.
+
+ "GPL" means a version of the GNU General Public License or the GNU
+ Affero General Public License.
+
+ "I"/"Me"/"My" refers to the individual or legal entity that places My
+ Work under this License. "You"/"Your" refers to the individual or legal
+ entity exercising rights in My Work under this License. A legal entity
+ includes each entity that controls, is controlled by, or is under
+ common control with such legal entity. "Control" means (a) the power to
+ direct the actions of such legal entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent of the
+ outstanding shares or beneficial ownership of such legal entity.
+
+ "Licensed Patents" means all patent claims licensable royalty-free by
+ Me, now or in the future, that are necessarily infringed by making,
+ using, or selling My Work, and excludes claims that would be infringed
+ only as a consequence of further modification of My Work.
+
+ "Mere Aggregation" means an aggregation of a Covered Work with a
+ Separate Work.
+
+ "My Work" means the particular work of authorship I license to You
+ under this License.
+
+ "Object Code" means any form of a work that is not Source Code.
+
+ "OSI-Approved" means approved as 'Open Source' by the Open Source
+ Initiative.
+
+ "Separate Work" means a work that is separate from and independent of a
+ particular Covered Work and is not by its nature an extension or
+ enhancement of the Covered Work, and/or a runtime library, standard
+ library or similar component that is used to generate an Object Code
+ form of a Covered Work.
+
+ "Source Code" means the preferred form of a work for making
+ modifications to it.
diff --git a/import-layers/meta-openembedded/meta-networking/licenses/netperf b/import-layers/meta-openembedded/meta-networking/licenses/netperf
new file mode 100644
index 000000000..3f3ceb2fc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/licenses/netperf
@@ -0,0 +1,43 @@
+
+
+ Copyright (C) 1993 Hewlett-Packard Company
+ ALL RIGHTS RESERVED.
+
+ The enclosed software and documentation includes copyrighted works
+ of Hewlett-Packard Co. For as long as you comply with the following
+ limitations, you are hereby authorized to (i) use, reproduce, and
+ modify the software and documentation, and to (ii) distribute the
+ software and documentation, including modifications, for
+ non-commercial purposes only.
+
+ 1. The enclosed software and documentation is made available at no
+ charge in order to advance the general development of
+ high-performance networking products.
+
+ 2. You may not delete any copyright notices contained in the
+ software or documentation. All hard copies, and copies in
+ source code or object code form, of the software or
+ documentation (including modifications) must contain at least
+ one of the copyright notices.
+
+ 3. The enclosed software and documentation has not been subjected
+ to testing and quality control and is not a Hewlett-Packard Co.
+ product. At a future time, Hewlett-Packard Co. may or may not
+ offer a version of the software and documentation as a product.
+
+ 4. THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
+ HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
+ REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
+ PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
+ DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
+ EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
+ DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ 5. HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
+ DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+ (INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
+ MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/licenses/radvd b/import-layers/meta-openembedded/meta-networking/licenses/radvd
new file mode 100644
index 000000000..03db0b6ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/licenses/radvd
@@ -0,0 +1,37 @@
+The author(s) grant permission for redistribution and use in source and
+binary forms, with or without modification, of the software and documentation
+provided that the following conditions are met:
+
+0. If you receive a version of the software that is specifically labelled
+ as not being for redistribution (check the version message and/or README),
+ you are not permitted to redistribute that version of the software in any
+ way or form.
+1. All terms of all other applicable copyrights and licenses must be
+ followed.
+2. Redistributions of source code must retain the authors' copyright
+ notice(s), this list of conditions, and the following disclaimer.
+3. Redistributions in binary form must reproduce the authors' copyright
+ notice(s), this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+4. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement with the name(s) of the
+ authors as specified in the copyright notice(s) substituted where
+ indicated:
+
+ This product includes software developed by the authors which are
+ mentioned at the start of the source files and other contributors.
+
+5. Neither the name(s) of the author(s) nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
new file mode 100644
index 000000000..3ef35ee54
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
@@ -0,0 +1,21 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 12:27:34 -0700
+Subject: crda: Do not run ldconfig if DESTDIR is set
+
+Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html]
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+--- a/Makefile
++++ b/Makefile
+@@ -132,7 +132,9 @@ install-libreg:
+ $(NQ) ' INSTALL libreg'
+ $(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
+ $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
++ifndef DESTDIR
+ $(Q)ldconfig
++endif
+
+ %.o: %.c regdb.h $(LIBREG)
+ $(NQ) ' CC ' $@
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
new file mode 100644
index 000000000..aceb56df7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
@@ -0,0 +1,50 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 12:26:37 -0700
+Subject: Fix linking of libraries used by libreg
+
+The math and crypto libraries are called by and need to be linked to
+libreg.so, not to the executables.
+
+Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html]
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda
+ CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+-LDLIBS += -lm
++LIBREGLDLIBS += -lm
+ LIBREG += libreg.so
+ LDFLAGS += -L ./
+
+@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r
+
+ ifeq ($(USE_OPENSSL),1)
+ CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+-LDLIBS += `pkg-config --libs openssl`
++LIBREGLDLIBS += `pkg-config --libs openssl`
+
+ ifeq ($(RUNTIME_PUBKEY_ONLY),1)
+ CFLAGS += -DRUNTIME_PUBKEY_ONLY
+@@ -51,7 +51,7 @@ endif
+
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LIBREGLDLIBS += -lgcrypt
+
+ $(LIBREG): keys-gcrypt.c
+
+@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+
+ $(LIBREG): regdb.h reglib.h reglib.c
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
new file mode 100644
index 000000000..931a05352
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Wireless Central Regulatory Domain Agent"
+HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+SECTION = "net"
+LICENSE = "copyleft-next-0.3.0 & ISC"
+LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe \
+ file://${WORKDIR}/wireless-regdb-2014.11.18/LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
+
+DEPENDS = "python-m2crypto-native python-native libgcrypt libnl"
+
+SRC_URI = "https://www.kernel.org/pub/software/network/crda/${BP}.tar.xz;name=crda \
+ https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2014.11.18.tar.xz;name=bin \
+ file://do-not-run-ldconfig-if-destdir-is-set.patch \
+ file://fix-linking-of-libraries-used-by-reglib.patch \
+"
+SRC_URI[crda.md5sum] = "0431fef3067bf503dfb464069f06163a"
+SRC_URI[crda.sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
+
+SRC_URI[bin.md5sum] = "d750c402c5510add7380edcb1d9b75b2"
+SRC_URI[bin.sha256sum] = "eab6b50f30748a8b0065ba38cf3df05aac161a5861ae0a6c3cfd01d38a71c9dd"
+
+inherit python-dir pythonnative
+# Recursive make problem
+EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'"
+
+do_compile() {
+ oe_runmake all_noverify
+}
+
+do_install() {
+ oe_runmake SBINDIR=${sbindir}/ install
+
+ install -d ${D}${libdir}/crda/
+
+ install -m 0644 ${WORKDIR}/wireless-regdb-2014.11.18/regulatory.bin ${D}${libdir}/crda/regulatory.bin
+}
+
+
+RDEPENDS_${PN} = "udev"
+FILES_${PN} += "${libdir}crda/regulatory.bin \
+ ${base_libdir}/udev/rules.d/85-regulatory.rules \
+"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
new file mode 100644
index 000000000..48039f07a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
@@ -0,0 +1,26 @@
+SUMMARY = "The dump DAQ test the various inline mode features "
+HOMEPAGE = "http://www.snort.org"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9ce51a65dd738dc1ae631d8b21c40e0"
+
+PARALLEL_MAKE = ""
+
+DEPENDS = "libpcap libpcre libdnet"
+
+SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
+ file://disable-run-test-program-while-cross-compiling.patch "
+
+# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
+# this error from test-dependencies script:
+# daq/daq/latest lost dependency on libdnet libmnl libnetfilter-queue libnfnetlink
+#
+# never look to /usr/local lib while cross compiling
+
+EXTRA_OECONF = "--disable-nfq-module --disable-ipq-module --includedir=${includedir} \
+ --with-libpcap-includes=${STAGING_INCDIR} --with-dnet-includes=${STAGING_LIBDIR}"
+
+SRC_URI[md5sum] = "2cd6da422a72c129c685fc4bb848c24c"
+SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb"
+
+inherit autotools
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch
new file mode 100644
index 000000000..a100b7cb8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch
@@ -0,0 +1,31 @@
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+configure: error: cannot run test program while cross compiling
+
+Signed-off-by: Chunrong Guo <B40290@freescale.com>
+
+--- a/m4/sf.m4old 2015-10-28 10:21:20.270557986 +0800
++++ a/m4/sf.m4 2015-10-28 10:23:22.726551974 +0800
+@@ -135,20 +135,7 @@
+ echo
+ exit 1
+ fi
+- AC_CACHE_CHECK([for libpcap version >= $1], [daq_cv_libpcap_version_1x], [
+- AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[
+- #include <pcap.h>
+- #include <string.h>
+- extern char pcap_version[];
+- ]],
+- [[
+- if (strcmp(pcap_version, $1) < 0)
+- return 1;
+- ]])],
+- [daq_cv_libpcap_version_1x="yes"],
+- [daq_cv_libpcap_version_1x="no"])])
++ AC_CACHE_CHECK([for libpcap version >= $1], [daq_cv_libpcap_version_1x])
+ if test "x$daq_cv_libpcap_version_1x" = "xno"; then
+ echo
+ echo " ERROR! Libpcap library version >= $1 not found."
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.10.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.10.1.bb
new file mode 100644
index 000000000..cd8042866
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.10.1.bb
@@ -0,0 +1,24 @@
+SECTION = "console/network"
+SUMMARY = "dhcpcd - a DHCP client"
+DESCRIPTION = "dhcpcd runs on your machine and silently configures your computer to work on the attached networks without trouble and mostly without configuration."
+
+HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://dhcpcd.c;endline=26;md5=77c40d671aff804ca91ea99556da8e9b"
+
+SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "a7b83c57f47b62f48373905d3b4f7978"
+SRC_URI[sha256sum] = "284abf8c3be0580bbac5eaca95359346ab0d78d4072317b6ce87cc68f2e8ae7b"
+
+inherit autotools-brokensep
+
+PACKAGECONFIG ?= "udev ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
+
+PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
+
+EXTRA_OECONF = "--enable-ipv4"
+
+FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch
new file mode 100644
index 000000000..d4764f586
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Subject: rcp: fix to work with large files
+
+When we copy file by rcp command, if the file > 2GB, it will fail.
+The cause is that it used incorrect data type on file size in sink() of rcp.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/rcp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/rcp.c b/src/rcp.c
+index 21f55b6..bafa35f 100644
+--- a/src/rcp.c
++++ b/src/rcp.c
+@@ -876,9 +876,9 @@ sink (int argc, char *argv[])
+ enum
+ { YES, NO, DISPLAYED } wrerr;
+ BUF *bp;
+- off_t i, j;
++ off_t i, j, size;
+ int amt, count, exists, first, mask, mode, ofd, omode;
+- int setimes, size, targisdir, wrerrno;
++ int setimes, targisdir, wrerrno;
+ char ch, *cp, *np, *targ, *vect[1], buf[BUFSIZ];
+ const char *why;
+
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
new file mode 100644
index 000000000..bd3ae476b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
@@ -0,0 +1,60 @@
+Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
+
+Upstream-Status: Pending
+
+diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h
+--- inetutils-1.8.orig/ping/ping_common.h 2010-05-15 20:55:47.000000000 +0930
++++ inetutils-1.8/ping/ping_common.h 2010-12-01 12:19:08.000000000 +1030
+@@ -17,10 +17,14 @@
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
+
++#include <config.h>
++
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
++#ifdef HAVE_IPV6
+ #include <netinet/icmp6.h>
++#endif
+ #include <icmp.h>
+ #include <error.h>
+ #include <progname.h>
+@@ -66,13 +70,19 @@
+ (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
+ } while (0)
+
++#ifdef HAVE_IPV6
+ /* Not sure about this step*/
+ #define _PING_BUFLEN(p, USE_IPV6) ((USE_IPV6)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
+ ((p)->ping_datalen + sizeof (icmphdr_t)))
++#else
++#define _PING_BUFLEN(p, USE_IPV6) ((p)->ping_datalen + sizeof (icmphdr_t))
++#endif
+
++#ifdef HAVE_IPV6
+ typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
+ struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
+ int datalen);
++#endif
+
+ typedef int (*ping_efp) (int code,
+ void *closure,
+@@ -81,13 +91,17 @@
+ struct ip * ip, icmphdr_t * icmp, int datalen);
+
+ union event {
++#ifdef HAVE_IPV6
+ ping_efp6 handler6;
++#endif
+ ping_efp handler;
+ };
+
+ union ping_address {
+ struct sockaddr_in ping_sockaddr;
++#ifdef HAVE_IPV6
+ struct sockaddr_in6 ping_sockaddr6;
++#endif
+ };
+
+ typedef struct ping_data PING;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch
new file mode 100644
index 000000000..3da4e9f55
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch
@@ -0,0 +1,29 @@
+From 552a7d64ad4a7188a9b7cd89933ae7caf7ebfe90 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Thu, 18 Nov 2010 16:59:14 -0500
+Subject: [PATCH gnulib] printf-parse: pull in features.h for __GLIBC__
+
+Upstream-Status: Pending
+
+Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+---
+ lib/printf-parse.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/lib/printf-parse.h b/lib/printf-parse.h
+index 67a4a2a..3bd6152 100644
+--- a/lib/printf-parse.h
++++ b/lib/printf-parse.h
+@@ -25,6 +25,9 @@
+
+ #include "printf-args.h"
+
++#ifdef HAVE_FEATURES_H
++# include <features.h> /* for __GLIBC__ */
++#endif
+
+ /* Flags */
+ #define FLAG_GROUP 1 /* ' flag */
+--
+1.7.3.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
new file mode 100644
index 000000000..b13bb9229
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+--- inetutils-1.8/lib/wchar.in.h
++++ inetutils-1.8/lib/wchar.in.h
+@@ -70,6 +70,9 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #if @HAVE_WCHAR_H@
+ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
++#else
++# include <stddef.h>
++# define MB_CUR_MAX 1
+ #endif
+
+ #undef _GL_ALREADY_INCLUDING_WCHAR_H
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch
new file mode 100644
index 000000000..2592989a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch
@@ -0,0 +1,26 @@
+inetutils: define PATH_PROCNET_DEV if not already defined
+
+this prevents the following compilation error :
+system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function)
+
+this patch comes from :
+ http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-of-by: Eric BĂ©nard <eric@eukrea.com>
+---
+diff -Naur inetutils-1.9.orig/ifconfig/system/linux.c inetutils-1.9/ifconfig/system/linux.c
+--- inetutils-1.9.orig/ifconfig/system/linux.c 2012-01-04 16:31:36.000000000 -0500
++++ inetutils-1.9/ifconfig/system/linux.c 2012-01-04 16:40:53.000000000 -0500
+@@ -49,6 +49,10 @@
+ #include "../ifconfig.h"
+
+
++#ifndef PATH_PROCNET_DEV
++ #define PATH_PROCNET_DEV "/proc/net/dev"
++#endif
++
+ /* ARPHRD stuff. */
+
+ static void
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
new file mode 100644
index 000000000..ff3abd86a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
@@ -0,0 +1,40 @@
+Only check security/pam_appl.h which is provided by package libpam when pam is
+enabled.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/configure.ac b/configure.ac
+index b35e672..e78a751 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -195,6 +195,19 @@ fi
+
+ # See if we have libpam.a. Investigate PAM versus Linux-PAM.
+ if test "$with_pam" = yes ; then
++ AC_CHECK_HEADERS([security/pam_appl.h], [], [], [
++#include <sys/types.h>
++#ifdef HAVE_NETINET_IN_SYSTM_H
++# include <netinet/in_systm.h>
++#endif
++#include <netinet/in.h>
++#ifdef HAVE_NETINET_IP_H
++# include <netinet/ip.h>
++#endif
++#ifdef HAVE_SYS_PARAM_H
++# include <sys/param.h>
++#endif
++])
+ AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl)
+ AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)
+ if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then
+@@ -587,7 +600,7 @@ AC_HEADER_DIRENT
+ AC_CHECK_HEADERS([arpa/nameser.h errno.h fcntl.h features.h \
+ glob.h memory.h netinet/ether.h netinet/in_systm.h \
+ netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \
+- security/pam_appl.h shadow.h \
++ shadow.h \
+ stdarg.h stdlib.h string.h stropts.h sys/tty.h \
+ sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \
+ sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
new file mode 100644
index 000000000..30e81ef45
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
@@ -0,0 +1,20 @@
+# default: off
+# description:
+# Rexecd is the server for the rexec program. The server provides remote
+# execution facilities with authentication based on user names and
+# passwords.
+#
+service exec
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rexecd
+ disable = yes
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
new file mode 100644
index 000000000..21b55da9a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
@@ -0,0 +1,23 @@
+# default: off
+# description:
+# Rlogind is a server for the rlogin program. The server provides remote
+# execution with authentication based on privileged port numbers from trusted
+# host
+#
+service login
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rlogind -a
+ disable = yes
+}
+
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
new file mode 100644
index 000000000..2b894a74b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
@@ -0,0 +1,21 @@
+# default: off
+# description:
+# The rshd server is a server for the rcmd(3) routine and,
+# consequently, for the rsh(1) program. The server provides
+# remote execution facilities with authentication based on
+# privileged port numbers from trusted hosts.
+#
+service shell
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = @SBINDIR@/tcpd
+ server_args = @SBINDIR@/in.rshd -aL
+ disable = yes
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
new file mode 100644
index 000000000..2d9a0408c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
@@ -0,0 +1,13 @@
+# default: on
+# description: The telnet server serves telnet sessions; it uses \
+# unencrypted username/password pairs for authentication.
+service telnet
+{
+ disable = no
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = @SBINDIR@/in.telnetd
+ log_on_failure += USERID
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
new file mode 100644
index 000000000..67b44c43e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
@@ -0,0 +1,19 @@
+# default: off
+# description:
+# Tftpd is a server which supports the Internet Trivial File Transfer
+# Pro-tocol (RFC 783). The TFTP server operates at the port indicated
+# in the tftp service description; see services(5).
+#
+service tftp
+{
+ disable = yes
+ socket_type = dgram
+ protocol = udp
+ flags = IPv6
+ wait = yes
+ user = root
+ group = root
+ server = @SBINDIR@/in.tftpd
+ server_args = /tftpboot
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch
new file mode 100644
index 000000000..532a0e5c0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+remove m4_esyscmd function
+
+Signed-off-by: Chunrong Guo <b40290@freescale.com>
+--- inetutils-1.9.1/configure.ac 2012-01-06 22:05:05.000000000 +0800
++++ inetutils-1.9.1/configure.ac 2012-11-12 14:01:11.732957019 +0800
+@@ -20,8 +20,7 @@
+
+ AC_PREREQ(2.59)
+
+-AC_INIT([GNU inetutils],
+- m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']),
++AC_INIT([GNU inetutils],[1.9.4],
+ [bug-inetutils@gnu.org])
+
+ AC_CONFIG_SRCDIR([src/inetd.c])
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
new file mode 100644
index 000000000..68487eab7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
@@ -0,0 +1,179 @@
+DESCRIPTION = "The GNU inetutils are a collection of common \
+networking utilities and servers including ftp, ftpd, rcp, \
+rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
+talkd, telnet, telnetd, tftp, tftpd, and uucpd."
+HOMEPAGE = "http://www.gnu.org/software/inetutils"
+SECTION = "net"
+DEPENDS = "ncurses netbase readline"
+LICENSE = "GPLv3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
+
+SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
+ file://version.patch \
+ file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
+ file://inetutils-1.8-0003-wchar.patch \
+ file://rexec.xinetd.inetutils \
+ file://rlogin.xinetd.inetutils \
+ file://rsh.xinetd.inetutils \
+ file://telnet.xinetd.inetutils \
+ file://tftpd.xinetd.inetutils \
+ file://inetutils-1.9-PATH_PROCNET_DEV.patch \
+ file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
+ file://0001-rcp-fix-to-work-with-large-files.patch \
+"
+
+SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52"
+SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616"
+
+inherit autotools gettext update-alternatives texinfo
+
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
+noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}"
+
+PACKAGECONFIG ??= "ftp uucpd \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ "
+PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline"
+PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+
+EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
+ ${noipv6} \
+ inetutils_cv_path_login=${base_bindir}/login \
+ --with-libreadline-prefix=${STAGING_LIBDIR} \
+ --enable-rpath=no \
+"
+
+do_configure_prepend () {
+ export HELP2MAN='true'
+ cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath
+ rm -f ${S}/glob/configure*
+}
+
+do_install_append () {
+ install -m 0755 -d ${D}${base_bindir}
+ install -m 0755 -d ${D}${base_sbindir}
+ install -m 0755 -d ${D}${sbindir}
+ install -m 0755 -d ${D}${sysconfdir}/xinetd.d
+ mv ${D}${bindir}/ping ${D}${base_bindir}/
+ mv ${D}${bindir}/ping6 ${D}${base_bindir}/
+ mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
+ mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
+ mv ${D}${bindir}/hostname ${D}${base_bindir}/
+ mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
+ mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
+ mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
+ mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
+ mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
+ mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
+ mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd
+ mv ${D}${libexecdir}/* ${D}${bindir}/
+ cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
+ cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
+ cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
+ cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet
+ cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd
+
+ sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/*
+
+ rm -rf ${D}${libexecdir}/
+ # remove usr/lib if empty
+ rmdir ${D}${libdir} || true
+}
+
+PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \
+${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \
+${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \
+${PN}-rsh ${PN}-rshd"
+
+# The packages tftpd, telnetd and rshd conflict with the ones
+# provided by netkit, so add the corresponding -dbg packages
+# for them to avoid the confliction between the dbg package
+# of inetutils and netkit.
+PACKAGES += "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg"
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN} = "talk whois"
+ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd"
+ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
+
+ALTERNATIVE_${PN}-logger = "logger"
+ALTERNATIVE_${PN}-syslogd = "syslogd"
+ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
+
+ALTERNATIVE_${PN}-ftp = "ftp"
+ALTERNATIVE_${PN}-ftpd = "ftpd"
+ALTERNATIVE_${PN}-tftp = "tftp"
+ALTERNATIVE_${PN}-tftpd = "tftpd"
+ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd"
+ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd"
+
+ALTERNATIVE_${PN}-telnet = "telnet"
+ALTERNATIVE_${PN}-telnetd = "telnetd"
+ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd"
+ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd"
+
+ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh"
+ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind"
+ALTERNATIVE_LINK_NAME[rshd] = "${sbindir}/rshd"
+ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd"
+ALTERNATIVE_LINK_NAME[rexecd] = "${sbindir}/rexecd"
+ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
+ALTERNATIVE_LINK_NAME[rlogind] = "${sbindir}/rlogind"
+ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
+
+ALTERNATIVE_${PN}-inetd= "inetd"
+ALTERNATIVE_${PN}-traceroute = "traceroute"
+
+ALTERNATIVE_${PN}-hostname = "hostname"
+ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
+
+ALTERNATIVE_${PN}-ifconfig = "ifconfig"
+ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+ALTERNATIVE_${PN}-ping6 = "ping6"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
+FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}"
+FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
+FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
+FILES_${PN}-logger = "${bindir}/logger.${BPN}"
+FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
+FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
+
+FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
+FILES_${PN}-telnet = "${bindir}/telnet.${BPN}"
+FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}"
+
+FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
+ ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
+FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd"
+RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
+RCONFLICTS_${PN}-rshd += "netkit-rshd"
+RPROVIDES_${PN}-rshd = "rshd"
+
+FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
+FILES_${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}"
+RDEPENDS_${PN}-ftpd += "xinetd"
+
+FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
+FILES_${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd"
+RCONFLICTS_${PN}-tftpd += "netkit-tftpd"
+RDEPENDS_${PN}-tftpd += "xinetd"
+
+FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
+FILES_${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd"
+RCONFLICTS_${PN}-telnetd += "netkit-telnetd"
+RPROVIDES_${PN}-telnetd = "telnetd"
+RDEPENDS_${PN}-telnetd += "xinetd"
+
+FILES_${PN}-inetd = "${bindir}/inetd.${BPN}"
+
+RDEPENDS_${PN} = "xinetd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.6.3a.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.6.3a.bb
new file mode 100644
index 000000000..e6796a699
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.6.3a.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "LFTP is a sophisticated file transfer program with \
+ command line interface. It supports FTP, HTTP, \
+ FISH, SFTP, HTTPS and FTPS protocols"
+HOMEPAGE = "http://lftp.yar.ru/"
+SECTION = "console/network"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "readline"
+
+SRC_URI = "http://fossies.org/linux/misc/lftp-${PV}.tar.gz \
+ "
+SRC_URI[md5sum] = "2777dd514d21fe1da764bedd1d0ab36c"
+SRC_URI[sha256sum] = "a8b53e5ca2c1acbecd181c87f21a8673ca9038dc9f2be6ab8c23790bd91fd446"
+
+inherit autotools gettext pkgconfig
+
+EXTRA_OECONF += "--with-modules"
+
+PACKAGECONFIG ??= "libidn openssl zlib gnutls"
+PACKAGECONFIG[libidn] = "--with-libidn, --without-libidn, libidn"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+PACKAGECONFIG[zlib] = "--with-zlib, --without-zlib, zlib"
+PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
+
+FILES_${PN}-dbg += "${libdir}/lftp/${PV}/.debug"
+RDEPENDS_${PN} = "perl bash readline"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
new file mode 100644
index 000000000..28b6c8254
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -0,0 +1,15 @@
+SUMMARY = "dumb networking library"
+HOMEPAGE = "http://code.google.com/p/libdnet/"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9"
+
+SRC_URI = "http://libdnet.googlecode.com/files/libdnet-${PV}.tgz"
+
+SRC_URI[md5sum] = "9253ef6de1b5e28e9c9a62b882e44cc9"
+SRC_URI[sha256sum] = "83b33039787cf99990e977cef7f18a5d5e7aaffc4505548a83d31bd3515eb026"
+
+inherit autotools
+
+acpaths = "-I ./config/"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb
new file mode 100644
index 000000000..d5c7afe04
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library \
+for providing SSL and TLS support in your programs. It offers \
+an intuitive API and documented header files, so you can actually \
+understand what the code does. It features: \
+ \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \
+ Camellia and XTEA \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+ ECDSA and ECDH \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2 \
+ - Abstraction layers for ciphers, hashes, public key operations, \
+ platform abstraction and threading \
+"
+
+HOMEPAGE = "https://polarssl.org"
+BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+
+SRC_URI[md5sum] = "19ebbc96feceb430ad958dfe89cb633f"
+SRC_URI[sha256sum] = "746fd88e0c6623691fc56c4eed52e40a57b2da0ac80f6dd8995094aa6adb407e"
+
+DEPENDS = "openssl"
+RDEPENDS_${PN} += "libcrypto"
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
+
+inherit cmake
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
new file mode 100644
index 000000000..6d3c25217
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Open client for Cisco AnyConnect VPN"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad"
+
+DEPENDS = "vpnc libxml2 gnutls lz4 krb5 libproxy pcsc-lite"
+RDEPENDS_${PN} = "vpnc"
+
+PV = "7.06"
+
+SRCREV = "35542d52202672b8c12ecc63867432128244013a"
+SRC_URI = "git://git.infradead.org/users/dwmw2/openconnect.git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--with-vpnc-script=${SYSROOT_DESTDIR}${sysconfdir}/vpnc/vpnc-script \
+ --disable-static"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
new file mode 100644
index 000000000..aab2ab5f0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Layer 3 relay daemon"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://main.c;endline=17;md5=86aad799085683e0a2e1c2684a20bab2"
+
+DEPENDS = "libubox"
+
+SRC_URI = "git://nbd.name/relayd.git"
+
+SRCREV = "2970ff60bac6b70ecb682779d5c776dc559dc0b9"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/00-fix-typos-in-man-pages.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/00-fix-typos-in-man-pages.patch
new file mode 100644
index 000000000..c94bc3185
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/00-fix-typos-in-man-pages.patch
@@ -0,0 +1,108 @@
+From 1573638212a9733a44939a4d38a226f38dca36f1 Mon Sep 17 00:00:00 2001
+From: Michele Baldessari <michele@acksyn.org>
+Date: Tue, 9 Jul 2013 23:23:33 +0200
+Subject: [PATCH] Fix typos in man-pages
+
+Fix some typos in the man-pages.
+
+Signed-off-by: Michele Baldessari <michele@acksyn.org>
+Reviewed-by: Simo Sorce <idra@samba.org>
+
+Autobuild-User(master): Simo Sorce <idra@samba.org>
+Autobuild-Date(master): Wed Jul 10 16:45:07 CEST 2013 on sn-devel-104
+---
+ docs-xml/manpages/dbwrap_tool.1.xml | 2 +-
+ docs-xml/manpages/idmap_autorid.8.xml | 2 +-
+ docs-xml/manpages/net.8.xml | 2 +-
+ docs-xml/manpages/pdbedit.8.xml | 2 +-
+ docs-xml/manpages/samba.7.xml | 2 +-
+ docs-xml/manpages/smbclient.1.xml | 2 +-
+ docs-xml/manpages/smbpasswd.5.xml | 2 +-
+ docs-xml/manpages/vfs_smb_traffic_analyzer.8.xml | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+Index: samba-4.1.11/docs-xml/manpages/smbstatus.1.xml
+===================================================================
+--- samba-4.1.11.orig/docs-xml/manpages/smbstatus.1.xml
++++ samba-4.1.11/docs-xml/manpages/smbstatus.1.xml
+@@ -137,6 +137,13 @@
+ </listitem>
+ </varlistentry>
+
++ <varlistentry>
++ <term>-n|--numeric</term>
++ <listitem><para>causes smbstatus to display numeric UIDs and GIDs instead of
++ resolving them to names.</para>
++ </listitem>
++ </varlistentry>
++
+ </variablelist>
+ </refsect1>
+
+Index: samba-4.1.11/docs-xml/manpages/sharesec.1.xml
+===================================================================
+--- samba-4.1.11.orig/docs-xml/manpages/sharesec.1.xml
++++ samba-4.1.11/docs-xml/manpages/sharesec.1.xml
+@@ -129,6 +129,13 @@
+ </para></listitem>
+ </varlistentry>
+
++ <varlistentry>
++ <term>-S|--setsddl=STRING</term>
++ <listitem><para>
++ Set security descriptor by providing ACL in SDDL format.
++ </para></listitem>
++ </varlistentry>
++
+ &stdarg.help;
+ &stdarg.server.debug;
+ &popt.common.samba;
+Index: samba-4.1.11/docs-xml/build/DTD/samba.entities
+===================================================================
+--- samba-4.1.11.orig/docs-xml/build/DTD/samba.entities
++++ samba-4.1.11/docs-xml/build/DTD/samba.entities
+@@ -270,6 +270,44 @@ file.
+ &popt.common.samba;
+ '>
+
++<!ENTITY stdarg.signing '
++<varlistentry>
++<term>-S|--signing on|off|required</term>
++<listitem><para>Set the client signing state.
++</para></listitem>
++</varlistentry>
++'>
++
++<!ENTITY stdarg.machinepass '
++<varlistentry>
++<term>-P|--machine-pass</term>
++<listitem><para>Use stored machine account password.
++</para></listitem>
++</varlistentry>
++'>
++
++<!ENTITY stdarg.encrypt '
++<varlistentry>
++<term>-e|--encrypt</term>
++<listitem><para>
++This command line parameter requires the remote
++server support the UNIX extensions or that the SMB3 protocol has been selected.
++Requests that the connection be encrypted. Negotiates SMB encryption using either
++SMB3 or POSIX extensions via GSSAPI. Uses the given credentials for
++the encryption negotiation (either kerberos or NTLMv1/v2 if given
++domain/username/password triple. Fails the connection if encryption
++cannot be negotiated.
++</para></listitem>
++</varlistentry>
++'>
++
++<!ENTITY stdarg.pwnthash '
++<varlistentry>
++<term>--pw-nt-hash</term>
++<listitem><para>The supplied password is the NT hash.
++</para></listitem>
++</varlistentry>
++'>
+
+ <!ENTITY stdarg.resolve.order '
+ <varlistentry>
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/0006-avoid-using-colon-in-the-checking-msg.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/0006-avoid-using-colon-in-the-checking-msg.patch
new file mode 100644
index 000000000..cdf7a38c1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/0006-avoid-using-colon-in-the-checking-msg.patch
@@ -0,0 +1,32 @@
+From 5413f97290d3126262eb309ecbcf7769509f2a11 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 10 Nov 2015 00:48:35 -0500
+Subject: [PATCH 6/7] avoid using colon in the checking msg
+
+Upstream-Status: Pending
+
+colon is used as the separator when parse from
+a answers file, the colon here makes it never
+get the right answer.
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ wscript_configure_system_mitkrb5 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
+index a62d00b..a2d89f0 100644
+--- a/wscript_configure_system_mitkrb5
++++ b/wscript_configure_system_mitkrb5
+@@ -240,7 +240,7 @@ conf.CHECK_CODE('''
+ ''',
+ 'HAVE_WRFILE_KEYTAB',
+ headers='krb5.h', lib='krb5', execute=True,
+- msg="Checking whether the WRFILE:-keytab is supported");
++ msg="Checking whether the WRFILE -keytab is supported");
+ # Check for KRB5_DEPRECATED handling
+ conf.CHECK_CODE('''#define KRB5_DEPRECATED 1
+ #include <krb5.h>''',
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/16-do-not-check-xsltproc-manpages.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/16-do-not-check-xsltproc-manpages.patch
new file mode 100644
index 000000000..c37cfcde4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/16-do-not-check-xsltproc-manpages.patch
@@ -0,0 +1,43 @@
+Don't check xsltproc manpages
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+Index: samba-4.4.2/lib/ldb/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/ldb/wscript
++++ samba-4.4.2/lib/ldb/wscript
+@@ -65,7 +65,7 @@ def configure(conf):
+ conf.define('USING_SYSTEM_LDB', 1)
+
+ if conf.env.standalone_ldb:
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #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'):
+Index: samba-4.4.2/lib/talloc/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/talloc/wscript
++++ samba-4.4.2/lib/talloc/wscript
+@@ -56,7 +56,7 @@ def configure(conf):
+ if conf.env.standalone_talloc:
+ conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
+Index: samba-4.4.2/lib/tdb/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/tdb/wscript
++++ samba-4.4.2/lib/tdb/wscript
+@@ -92,7 +92,7 @@ def configure(conf):
+ not conf.env.disable_tdb_mutex_locking):
+ conf.define('USE_TDB_MUTEX_LOCKING', 1)
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/20-do-not-import-target-module-while-cross-compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/20-do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 000000000..e112b3b40
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/20-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: samba-4.4.2/buildtools/wafsamba/samba_bundled.py
+===================================================================
+--- samba-4.4.2.orig/buildtools/wafsamba/samba_bundled.py
++++ samba-4.4.2/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/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/21-add-config-option-without-valgrind.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/21-add-config-option-without-valgrind.patch
new file mode 100644
index 000000000..025ac2775
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/21-add-config-option-without-valgrind.patch
@@ -0,0 +1,63 @@
+From 9a2d6315ff206b2a47100dfd85afe3af56576995 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 10 Dec 2015 04:20:51 -0500
+Subject: [PATCH] Add config option without-valgrind
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ lib/replace/wscript | 4 +++-
+ source3/wscript | 5 ++++-
+ wscript | 4 ++++
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index f0040b1..aca73af 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -101,7 +101,9 @@ struct foo bar = { .y = 'X', .x = 1 };
+
+ 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 not Options.options.disable_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 malloc.h')
+diff --git a/source3/wscript b/source3/wscript
+index bac3dd5..a5c51ea 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -1016,7 +1016,10 @@ syscall(SYS_setgroups32, 0, NULL);
+ Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient")
+ else:
+ conf.DEFINE('WITH_DNS_UPDATES', 1)
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
++ if not Options.options.disable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+ if Options.options.developer:
+ if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'):
+ conf.DEFINE('VALGRIND', '1')
+diff --git a/wscript b/wscript
+index 7679c0f..681ac17 100644
+--- a/wscript
++++ b/wscript
+@@ -72,6 +72,10 @@ def set_options(opt):
+ help=("Disable systemd integration"),
+ action='store_false', dest='enable_systemd')
+
++ opt.add_option('--without-valgrind',
++ help=("Disable use of the valgrind headers"),
++ action="store_true", dest='disable_valgrind', default=False)
++
+ gr = opt.option_group('developer options')
+
+ opt.tool_options('python') # options for disabling pyc or pyo compilation
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/volatiles.03_samba b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/volatiles.03_samba
new file mode 100644
index 000000000..4bdfa7d2c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba-4.4.2/volatiles.03_samba
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d root root 0755 /var/log/samba none
+d root root 0755 /var/run/samba none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
new file mode 100644
index 000000000..6a2220ac1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
@@ -0,0 +1,320 @@
+SECTION = "console/network"
+
+LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.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 "
+
+SAMBA_MIRROR = "http://samba.org/samba/ftp"
+MIRRORS += "\
+${SAMBA_MIRROR} http://mirror.internode.on.net/pub/samba \n \
+${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \
+"
+
+SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
+ file://00-fix-typos-in-man-pages.patch \
+ file://16-do-not-check-xsltproc-manpages.patch \
+ file://20-do-not-import-target-module-while-cross-compile.patch \
+ file://21-add-config-option-without-valgrind.patch \
+ file://0006-avoid-using-colon-in-the-checking-msg.patch \
+ file://volatiles.03_samba \
+ "
+
+SRC_URI[md5sum] = "03a65a3adf08ceb1636ad59d234d7f9d"
+SRC_URI[sha256sum] = "eaecd41a85ebb9507b8db9856ada2a949376e9d53cf75664b5493658f6e5926a"
+
+inherit systemd waf-samba cpan-base perlnative
+# remove default added RDEPENDS on perl
+RDEPENDS_${PN}_remove = "perl"
+
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio"
+
+SYSVINITTYPE_linuxstdbase = "lsb"
+SYSVINITTYPE = "sysv"
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVINITTYPE}', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'zeroconf', 'zeroconf', '', d)} \
+ acl cups ldap \
+"
+
+RDEPENDS_${PN}-base += "${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'lsb', '', d)}"
+RDEPENDS_${PN}-ctdb-tests += "bash"
+
+PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[pam] = "--with-pam --with-pammodulesdir=${base_libdir}/security,--without-pam,libpam"
+PACKAGECONFIG[lsb] = ",,lsb"
+PACKAGECONFIG[sysv] = ",,sysvinit"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[sasl] = ",,cyrus-sasl"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
+PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
+PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
+PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
+
+
+SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
+SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
+SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
+SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
+
+SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb"
+
+EXTRA_OECONF += "--enable-fhs \
+ --with-piddir=/run \
+ --with-sockets-dir=/run/samba \
+ --with-modulesdir=${libdir}/samba \
+ --with-lockdir=${localstatedir}/lib/samba \
+ --with-cachedir=${localstatedir}/lib/samba \
+ --disable-gnutls \
+ --disable-rpath-install \
+ --with-shared-modules=${SAMBA4_MODULES} \
+ --bundled-libraries=${SAMBA4_LIBS} \
+ --with-system-mitkrb5 \
+ --without-ad-dc \
+ ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+ --with-cluster-support \
+ --with-profiling-data \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+ "
+DISABLE_STATIC = ""
+
+LDFLAGS += "-Wl,-z,relro,-z,now"
+
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ for i in nmb smb winbind; do
+ install -m 0644 packaging/systemd/$i.service ${D}${systemd_unitdir}/system
+ done
+ sed -i 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' ${D}${systemd_unitdir}/system/*.service
+
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
+ echo "d ${localstatedir}/log/samba 0755 root root -" \
+ >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
+ elif ${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d
+ update-rc.d -r ${D} samba.sh start 20 3 5 .
+ update-rc.d -r ${D} samba.sh start 20 0 1 6 .
+ elif ${@bb.utils.contains('PACKAGECONFIG', 'sysv', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba.sh
+ sed -e 's,/opt/samba/bin,${sbindir},g' \
+ -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+ -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+ -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \
+ -i ${D}${sysconfdir}/init.d/samba.sh
+ update-rc.d -r ${D} samba.sh start 20 3 5 .
+ update-rc.d -r ${D} samba.sh start 20 0 1 6 .
+ fi
+
+ install -d ${D}${sysconfdir}/samba
+ echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+ install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf
+ install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
+
+ install -d ${D}${sysconfdir}/sysconfig/
+ install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/sysconfig/samba
+
+ rm -rf ${D}/run ${D}${localstatedir}/run
+}
+
+PACKAGES += "${PN}-python ${PN}-python-dbg ${PN}-pidl libwinbind libwinbind-dbg libwinbind-krb5-locator"
+PACKAGES =+ "libwbclient libnss-winbind winbind winbind-dbg libnetapi libsmbsharemodes \
+ libsmbclient libsmbclient-dev lib${PN}-base ${PN}-base ${PN}-ctdb-tests"
+
+RDEPENDS_${PN} += "${PN}-base"
+
+FILES_${PN}-base = "${sbindir}/nmbd \
+ ${sbindir}/smbd \
+ ${sysconfdir}/init.d \
+ ${localstatedir}/lib/samba \
+ ${localstatedir}/log/samba \
+ ${localstatedir}/nmbd \
+ ${localstatedir}/spool/samba \
+"
+
+FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+ ${libdir}/ctdb-tests \
+ ${datadir}/ctdb-tests \
+ /run/ctdb \
+ "
+
+# figured out by
+# FILES="tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/samba/4.1.12-r0/image/usr/sbin/smbd tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/samba/4.1.12-r0/image/usr/sbin/nmbd"
+#
+# while [ "${FILES}" != "${OLDFILES}" ]
+# do
+# OLDFILES="${FILES}"
+# NEEDED=`tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi.gcc-cross-initial-arm/gcc/arm-poky-linux-gnueabi/5.2.0/objdump -x ${FILES} | grep NEEDED | egrep -E 'so(.[0-9]|$)' | sort -u | perl -MData::Dumper -le 'while (<>) {chomp; push @lib, (split)[1]}; print "(", join("|", @lib), ")"'`
+# NF=`find tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/samba/4.1.12-r0/image/usr/lib -type f | egrep "${NEEDED}" | sort -u`
+#
+# FILES=`perl -le 'foreach (@ARGV) { $f{$_}++ }; print join(" ", sort keys %f)' ${FILES} ${NF}`
+# done
+#
+# LIBS=`echo ${FILES} | sed -e 's,tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/samba/4.1.12-r0/image/usr/lib,${libdir},g' -e 's,.so.[0-9]+.*$,.so.*,g'`
+# for l in ${LIBS}
+# do
+# echo $l
+# done
+
+FILES_lib${PN}-base = "\
+ ${sysconfdir}/default \
+ ${sysconfdir}/samba \
+ ${libdir}/libdcerpc-binding.so.* \
+ ${libdir}/libgensec.so.* \
+ ${libdir}/libndr-krb5pac.so.* \
+ ${libdir}/libndr-nbt.so.* \
+ ${libdir}/libndr-standard.so.* \
+ ${libdir}/libndr.so.* \
+ ${libdir}/libnetapi.so.* \
+ ${libdir}/libpdb.so.* \
+ ${libdir}/libsamba-credentials.so.* \
+ ${libdir}/libsamba-hostconfig.so.* \
+ ${libdir}/libsamba-util.so.* \
+ ${libdir}/libsamdb.so.* \
+ ${libdir}/libsmbconf.so.* \
+ ${libdir}/libtevent-util.so.* \
+ ${libdir}/samba/libCHARSET3.so \
+ ${libdir}/samba/libaddns.so \
+ ${libdir}/samba/libads.so \
+ ${libdir}/samba/libasn1util.so \
+ ${libdir}/samba/libauth.so \
+ ${libdir}/samba/libauth_sam_reply.so \
+ ${libdir}/samba/libauthkrb5.so \
+ ${libdir}/samba/libccan.so \
+ ${libdir}/samba/libcli-ldap-common.so \
+ ${libdir}/samba/libcli-nbt.so \
+ ${libdir}/samba/libcli_cldap.so \
+ ${libdir}/samba/libcli_smb_common.so \
+ ${libdir}/samba/libcli_spoolss.so \
+ ${libdir}/samba/libcliauth.so \
+ ${libdir}/samba/libdbwrap.so \
+ ${libdir}/samba/libdcerpc-samba.so \
+ ${libdir}/samba/liberrors.so \
+ ${libdir}/samba/libflag_mapping.so \
+ ${libdir}/samba/libgse.so \
+ ${libdir}/samba/libinterfaces.so \
+ ${libdir}/samba/libkrb5samba.so \
+ ${libdir}/samba/libldbsamba.so \
+ ${libdir}/samba/liblibcli_lsa3.so \
+ ${libdir}/samba/liblibcli_netlogon3.so \
+ ${libdir}/samba/liblibsmb.so \
+ ${libdir}/samba/libmsrpc3.so \
+ ${libdir}/samba/libndr-samba.so \
+ ${libdir}/samba/libndr-samba4.so \
+ ${libdir}/samba/libnpa_tstream.so \
+ ${libdir}/samba/libntdb.so.* \
+ ${libdir}/samba/libpopt_samba3.so \
+ ${libdir}/samba/libprinting_migrate.so \
+ ${libdir}/samba/libsamba-modules.so \
+ ${libdir}/samba/libsamba-security.so \
+ ${libdir}/samba/libsamba-sockets.so \
+ ${libdir}/samba/libsamba3-util.so \
+ ${libdir}/samba/libsamdb-common.so \
+ ${libdir}/samba/libsecrets3.so \
+ ${libdir}/samba/libserver-role.so \
+ ${libdir}/samba/libsmb_transport.so \
+ ${libdir}/samba/libsmbd_base.so \
+ ${libdir}/samba/libsmbd_conn.so \
+ ${libdir}/samba/libsmbd_shim.so \
+ ${libdir}/samba/libsmbregistry.so \
+ ${libdir}/samba/libtdb-wrap.so \
+ ${libdir}/samba/libutil_cmdline.so \
+ ${libdir}/samba/libutil_ntdb.so \
+ ${libdir}/samba/libutil_reg.so \
+ ${libdir}/samba/libutil_setid.so \
+ ${libdir}/samba/libutil_tdb.so \
+ ${libdir}/samba/pdb/smbpasswd.so \
+ ${libdir}/samba/pdb/tdbsam.so \
+ ${libdir}/samba/pdb/wbc_sam.so \
+"
+
+FILES_winbind-dbg = "${libdir}/idmap/.debug/*.so \
+ ${libdir}/security/.debug/pam_winbind.so \
+"
+
+FILES_${PN} += "${libdir}/vfs/*.so \
+ ${libdir}/charset/*.so \
+ ${libdir}/*.dat \
+ ${libdir}/auth/*.so \
+ ${libdir}/security/pam_smbpass.so \
+"
+
+FILES_${PN}-dbg += "${libdir}/vfs/.debug/*.so \
+ ${libdir}/charset/.debug/*.so \
+ ${libdir}/auth/.debug/*.so \
+ ${libdir}/security/.debug/pam_smbpass.so \
+"
+
+FILES_libwbclient = "${libdir}/libwbclient.so.* ${libdir}/samba/libwinbind-client.so"
+FILES_libnetapi = "${libdir}/libnetapi.so.*"
+FILES_libsmbsharemodes = "${libdir}/libsmbsharemodes.so.*"
+FILES_libsmbclient = "${libdir}/libsmbclient.so.*"
+FILES_libsmbclient-dev = "${libdir}/libsmbclient.so ${includedir}"
+FILES_winbind = "${sbindir}/winbindd \
+ ${bindir}/wbinfo \
+ ${bindir}/ntlm_auth \
+ ${sysconfdir}/init.d/winbind \
+ ${systemd_unitdir}/system/winbind.service \
+"
+
+FILES_libnss-winbind = "${libdir}/libnss_*${SOLIBS} \
+ ${libdir}/nss_info \
+"
+
+FILES_${PN} += "${base_libdir}/security/pam_smbpass.so \
+"
+
+SMB_SERVICE="${systemd_unitdir}/system/nmb.service ${systemd_unitdir}/system/smb.service"
+SMB_SYSV="${sysconfdir}/init.d ${sysconfdir}/rc?.d"
+FILES_${PN}-base +="${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${SMB_SERVICE}', '', d)}"
+FILES_${PN}-base +="${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SMB_SYSV}', '', d)}"
+
+FILES_${PN}-dbg += "${libdir}/samba/idmap/.debug/* \
+ ${libdir}/samba/pdb/.debug/* \
+ ${libdir}/samba/auth/.debug/* \
+ ${libdir}/samba/nss_info/.debug/* \
+ ${libdir}/samba/ldb/.debug/* \
+ ${libdir}/samba/vfs/.debug/* \
+ ${base_libdir}/security/.debug/pam_smbpass.so \
+"
+
+FILES_libwinbind = "${base_libdir}/security/pam_winbind.so"
+FILES_libwinbind += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/winbind.service', '', d)}"
+FILES_libwinbind-dbg = "${base_libdir}/security/.debug/pam_winbind.so"
+FILES_libwinbind-krb5-locator = "${libdir}/winbind_krb5_locator.so"
+
+FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.so \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/_ldb_text.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/*.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/*.so \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/*.so \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/*.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/external/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/kcc/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/netcmd/*.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/provision/*.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/*.py \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/*.so \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/subunit/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/tests/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/third_party/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/web_server/* \
+"
+
+FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/.debug/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/.debug/* \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/.debug/* \
+"
+
+RDEPENDS_${PN}-pidl_append = " perl"
+FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch
new file mode 100644
index 000000000..f25a02cd8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch
@@ -0,0 +1,42 @@
+From 9a9137c3df5309ac359737d6ebd67fb4ff5f3cf2 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Mon, 24 Nov 2014 22:05:18 -0500
+Subject: [PATCH] sethdlc: fix host contamination
+
+Clean INCLUDES to fix the host contamination errors:
+
+ In file included from /usr/src/linux/include/linux/posix_types.h:47:0,
+ from /usr/src/linux/include/linux/types.h:17,
+ from /usr/src/linux/include/linux/if.h:22,
+ from sethdlc.c:23:
+ /usr/src/linux/include/asm-generic/posix_types.h:91:3: \
+ error: conflicting types for '__kernel_fsid_t'
+ } __kernel_fsid_t;
+ ^
+ .../tmp/sysroots/qemumips/usr/include/asm/posix_types.h:26:3: \
+ note: previous declaration of '__kernel_fsid_t' was here
+ } __kernel_fsid_t;
+ ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 0492f2b..97dec22 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ CC = gcc
+ CFLAGS = -O2 -Wall -W -Wno-long-long -pipe
+-INCLUDES = -I/usr/src/linux/include -I/usr/src/linux-2.6/include
++INCLUDES =
+
+ all: sethdlc
+
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb
new file mode 100644
index 000000000..fc304fae7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "set Linux HDLC packet radio modem driver port information"
+HOMEPAGE = "https://www.kernel.org/pub/linux/utils/net/hdlc"
+SECTION = "comm"
+LICENSE = "GPLv2 & GPLv2+ "
+LIC_FILES_CHKSUM = "file://sethdlc.c;endline=10;md5=90f936879e9f8b755a138aeb348782eb"
+
+
+SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BPN}-1.18.tar.gz \
+ file://sethdlc-fix-host-contamination.patch \
+"
+SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab"
+SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e"
+
+
+S = "${WORKDIR}/${BPN}-1.18"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+DEPENDS = "virtual/kernel"
+
+EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}' \
+ KERNEL_DIR=${STAGING_KERNEL_DIR} "
+
+do_compile_prepend () {
+ oe_runmake clean
+}
+
+
+do_install() {
+ install -d ${D}/${bindir}
+ install sethdlc ${D}/${bindir}/
+}
+
+FILES_${PN} += "${bindir}/sethdlc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
new file mode 100644
index 000000000..1520553a4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
@@ -0,0 +1,35 @@
+From 815e861721a9c43efddb78521147145ebc7569ca Mon Sep 17 00:00:00 2001
+From: Zhiquan Li <zhiquan.li@windriver.com>
+Date: Fri, 13 Nov 2015 17:40:24 +0800
+Subject: [PATCH] fix do_package failed since snort 2.9.7.0
+
+Remove redundant '/' as a workround for below error:
+/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
+
+It's a rpm debugedit bug:
+* http://sourceforge.net/p/snort/mailman/message/34130268/
+* https://bugzilla.redhat.com/show_bug.cgi?id=304121
+
+Upstream-Status:Inappropriate [embedded specific]
+
+Signed-off-by: Zhiquan Li <zhiquan.li@windriver.com>
+---
+ src/snort.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/snort.h b/src/snort.h
+index 8308e57..499d157 100644
+--- a/src/snort.h
++++ b/src/snort.h
+@@ -39,7 +39,7 @@
+ #include "sfdaq.h"
+ #include "sf_types.h"
+ #include "sfutil/sflsq.h"
+-#include "sfutil//sfActionQueue.h"
++#include "sfutil/sfActionQueue.h"
+ #include "profiler.h"
+ #include "rules.h"
+ #include "treenodes.h"
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
new file mode 100644
index 000000000..54c2a9521
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
@@ -0,0 +1,31 @@
+From 4d7ebe3ed6cee72bc7db98bd408d22c10ef5dd82 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe@deserted.net>
+Date: Wed, 20 Nov 2013 16:06:07 -0500
+Subject: [PATCH] libpcap: search sysroot for headers
+
+Configure hard-coded host header paths when building with libpcap. Point
+the search path at the sysroot instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe MacDonald <joe@deserted.net>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index e52bb6c..8ded35d 100644
+--- a/configure.in
++++ b/configure.in
+@@ -78,7 +78,7 @@ case "$host" in
+ linux="yes"
+ AC_DEFINE([LINUX],[1],[Define if Linux])
+ AC_SUBST(extra_incl)
+- extra_incl="-I/usr/include/pcap"
++ extra_incl="-I=/usr/include/pcap"
+ ;;
+ *-hpux10*|*-hpux11*)
+ AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11])
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
new file mode 100644
index 000000000..39e5c9c03
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
@@ -0,0 +1,52 @@
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+checking for dap address space id... configure:
+configure: error: cannot run test program while cross compiling
+
+
+Signed-off-by: Chunrong Guo <B40290@freescale.com>
+
+--- a/configure.in 2013-08-23 00:06:37.239361932 -0500
++++ b/configure.in 2013-08-23 00:07:32.860266534 -0500
+@@ -679,23 +679,23 @@
+
+ AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta])
+
+-AC_MSG_CHECKING([for daq address space ID])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_PktHdr_t hdr;
+- hdr.address_space_id = 0;
+-]])],
+-[have_daq_address_space_id="yes"],
+-[have_daq_address_space_id="no"])
+-AC_MSG_RESULT($have_daq_address_space_id)
+-if test "x$have_daq_address_space_id" = "xyes"; then
+- AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1],
+- [DAQ version supports address space ID in header.])
+-fi
++#AC_MSG_CHECKING([for daq address space ID])
++#AC_RUN_IFELSE(
++#[AC_LANG_PROGRAM(
++#[[
++##include <daq.h>
++#]],
++#[[
++# DAQ_PktHdr_t hdr;
++# hdr.address_space_id = 0;
++#]])],
++have_daq_address_space_id="yes"
++#[have_daq_address_space_id="no"])
++#AC_MSG_RESULT($have_daq_address_space_id)
++#if test "x$have_daq_address_space_id" = "xyes"; then
++# AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1],
++# [DAQ version supports address space ID in header.])
++#fi
+
+ # any sparc platform has to have this one defined.
+ AC_MSG_CHECKING(for sparc)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
new file mode 100644
index 000000000..e6afcabaa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
@@ -0,0 +1,50 @@
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+checking for daq flow ID... configure:
+configure: error: cannot run test program while cross compiling
+
+
+--- a/configure.in 2015-10-28 10:36:42.918512690 +0800
++++ b/configure.in 2015-10-28 10:37:36.738510048 +0800
+@@ -716,23 +716,23 @@
+ # [DAQ version supports address space ID in header.])
+ #fi
+
+-AC_MSG_CHECKING([for daq flow ID])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_PktHdr_t hdr;
+- hdr.flow_id = 0;
+-]])],
+-[have_daq_flow_id="yes"],
+-[have_daq_flow_id="no"])
+-AC_MSG_RESULT($have_daq_flow_id)
+-if test "x$have_daq_flow_id" = "xyes"; then
+- AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
+- [DAQ version supports flow ID in header.])
+-fi
++#AC_MSG_CHECKING([for daq flow ID])
++#AC_RUN_IFELSE(
++#[AC_LANG_PROGRAM(
++#[[
++##include <daq.h>
++#]],
++#[[
++# DAQ_PktHdr_t hdr;
++# hdr.flow_id = 0;
++#]])],
++have_daq_flow_id="yes"
++#[have_daq_flow_id="no"])
++#AC_MSG_RESULT($have_daq_flow_id)
++#if test "x$have_daq_flow_id" = "xyes"; then
++# AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
++# [DAQ version supports flow ID in header.])
++#fi
+
+ AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
+ AC_RUN_IFELSE(
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
new file mode 100644
index 000000000..1a13298ca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
@@ -0,0 +1,51 @@
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+checking for DAQ_VERDICT_RETRY... configure:
+configure: error: cannot run test program while cross compiling
+
+
+--- a/configure.in 2015-10-28 10:45:18.174487395 +0800
++++ b/configure.in 2015-10-28 10:45:47.586485951 +0800
+@@ -734,23 +734,23 @@
+ # [DAQ version supports flow ID in header.])
+ #fi
+
+-AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_Verdict verdict;
+- verdict = DAQ_VERDICT_RETRY;
+-]])],
+-[have_daq_verdict_retry="yes"],
+-[have_daq_verdict_retry="no"])
+-AC_MSG_RESULT($have_daq_verdict_retry)
+-if test "x$have_daq_verdict_retry" = "xyes"; then
+- AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1],
+- [DAQ version supports DAQ_VERDICT_RETRY in DAQ_Verdict.])
+-fi
++#AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
++#AC_RUN_IFELSE(
++#[AC_LANG_PROGRAM(
++#[[
++##include <daq.h>
++#]],
++#[[
++# DAQ_Verdict verdict;
++# verdict = DAQ_VERDICT_RETRY;
++#]])],
++have_daq_verdict_retry="yes"
++#[have_daq_verdict_retry="no"])
++#AC_MSG_RESULT($have_daq_verdict_retry)
++#if test "x$have_daq_verdict_retry" = "xyes"; then
++# AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1],
++# [DAQ version supports DAQ_VERDICT_RETRY in DAQ_Verdict.])
++#fi
+
+ # any sparc platform has to have this one defined.
+ AC_MSG_CHECKING(for sparc)
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
new file mode 100644
index 000000000..9dafe6345
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+fix the below error:
+checking for INADDR_NONE... configure:
+configure: error: cannot run test program while cross compiling
+
+Signed-off-by: Chunrong Guo <B40290@freescale.com>
+
+
+--- a/configure.in 2013-08-21 03:56:17.197414789 -0500
++++ b/configure.in 2013-08-21 23:19:05.298553560 -0500
+@@ -281,25 +281,7 @@
+ AC_CHECK_TYPES([boolean])
+
+ # In case INADDR_NONE is not defined (like on Solaris)
+-have_inaddr_none="no"
+-AC_MSG_CHECKING([for INADDR_NONE])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <netinet/in.h>
+-#include <arpa/inet.h>
+-]],
+-[[
+- if (inet_addr("10,5,2") == INADDR_NONE);
+- return 0;
+-]])],
+-[have_inaddr_none="yes"],
+-[have_inaddr_none="no"])
+-AC_MSG_RESULT($have_inaddr_none)
+-if test "x$have_inaddr_none" = "xno"; then
+- AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
+-fi
++have_inaddr_none="yes"
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+@@ -397,21 +379,21 @@
+ fi
+ fi
+
+-AC_MSG_CHECKING([for pcap_lex_destroy])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <pcap.h>
+-]],
+-[[
+- pcap_lex_destroy();
+-]])],
+-[have_pcap_lex_destroy="yes"],
+-[have_pcap_lex_destroy="no"])
+-AC_MSG_RESULT($have_pcap_lex_destroy)
+-if test "x$have_pcap_lex_destroy" = "xyes"; then
+- AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter])
+-fi
++#AC_MSG_CHECKING([for pcap_lex_destroy])
++#AC_RUN_IFELSE(
++#[AC_LANG_PROGRAM(
++#[[
++##include <pcap.h>
++#]],
++#[[
++# pcap_lex_destroy();
++#]])],
++have_pcap_lex_destroy="yes"
++#[have_pcap_lex_destroy="no"])
++#AC_MSG_RESULT($have_pcap_lex_destroy)
++#if test "x$have_pcap_lex_destroy" = "xyes"; then
++# AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter])
++#fi
+
+ AC_MSG_CHECKING([for pcap_lib_version])
+ AC_LINK_IFELSE(
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
new file mode 100644
index 000000000..d8a00c43f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# Snort Startup Script modified for OpenEmbedded
+#
+
+# Script variables
+
+LAN_INTERFACE="$2"
+RETURN_VAL=0
+BINARY=/usr/bin/snort
+PATH=/bin:/usr/bin
+PID=/var/run/snort_${LAN_INTERFACE}_ids.pid
+DEL_PID=$PID
+LOGDIR="/var/log/snort"
+DATE=`/bin/date +%Y%m%d`
+CONFIG_FILE=/etc/snort/snort.conf
+PROG=snort
+USER=root
+GROUP=root
+
+if [ ! -x "$BINARY" ]; then
+ echo "ERROR: $BINARY not found."
+ exit 1
+fi
+
+if [ ! -r "$CONFIG_FILE" ]; then
+ echo "ERROR: $CONFIG_FILE not found."
+ exit 1
+fi
+
+start()
+{
+
+ [ -n "$LAN_INTERFACE" ] || return 0
+ # Check if log diratory is present. Otherwise, create it.
+ if [ ! -d $LOGDIR/$DATE ]; then
+ mkdir -d $LOGDIR/$DATE
+ /bin/chown -R $USER:$USER $LOGDIR/$DATE
+ /bin/chmod -R 700 $LOGDIR/$DATE
+ fi
+
+ /bin/echo "Starting $PROG: "
+ # Snort parameters
+ # -D Run Snort in background (daemon) mode
+ # -i <if> Listen on interface <if>
+ # -u <uname> Run snort uid as <uname> user (or uid)
+ # -g <gname> Run snort uid as <gname> group (or gid)
+ # -c Load configuration file
+ # -N Turn off logging (alerts still work) (removed to enable logging) :)
+ # -l Log to directory
+ # -t Chroots process to directory after initialization
+ # -R <id> Include 'id' in snort_intf<id>.pid file name
+
+ $BINARY -D -i $LAN_INTERFACE -u $USER -g $GROUP -c $CONFIG_FILE -l $LOGDIR/$DATE -t $LOGDIR/$DATE -R _ids
+ /bin/echo "$PROG startup complete."
+ return $RETURN_VAL
+}
+
+stop()
+{
+ if [ -s $PID ]; then
+ /bin/echo "Stopping $PROG with PID `cat $PID`: "
+ kill -TERM `cat $PID` 2>/dev/null
+ RETURN_VAL=$?
+ /bin/echo "$PROG shutdown complete."
+ [ -e $DEL_PID ] && rm -f $DEL_PID
+ [ -e $DEL_PID.lck ] && rm -f $DEL_PID.lck
+ else
+ /bin/echo "ERROR: PID in $PID file not found."
+ RETURN_VAL=1
+ fi
+ return $RETURN_VAL
+}
+
+status() {
+ if [ -s $PID ]; then
+ echo "$PROG is running as pid `cat $PID`:"
+ else
+ echo "$PROG is not running."
+ fi
+}
+
+restart()
+{
+ stop
+ start
+ RETURN_VAL=$?
+ return $RETURN_VAL
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ /bin/echo "Usage: $0 {start|stop|status|restart|reload}"
+ RETURN_VAL=1
+esac
+
+exit $RETURN_VAL
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
new file mode 100644
index 000000000..7d946af25
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
@@ -0,0 +1,89 @@
+DESCRIPTION = "snort - a free lightweight network intrusion detection system for UNIX and Windows."
+HOMEPAGE = "http://www.snort.org/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5"
+
+DEPENDS = "libpcap libpcre daq libdnet util-linux"
+
+SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \
+ file://snort.init \
+ file://disable-inaddr-none.patch \
+ file://disable-dap-address-space-id.patch \
+ file://disable-daq-flow-id.patch \
+ file://disable-daq-verdict-retry.patch \
+ file://0001-libpcap-search-sysroot-for-headers.patch \
+ file://0001-fix-do_package-failed-since-snort-2.9.7.0.patch \
+"
+
+SRC_URI[tarball.md5sum] = "fd271788c0f8876be87a858a9142f202"
+SRC_URI[tarball.sha256sum] = "ad03f11b5301b16642199a86aa90388eaa53f5003f83b0c5595745a490047be1"
+
+inherit autotools gettext update-rc.d pkgconfig
+
+INITSCRIPT_NAME = "snort"
+INITSCRIPT_PARAMS = "defaults"
+
+EXTRA_OECONF = " \
+ --enable-gre \
+ --enable-linux-smp-stats \
+ --enable-reload \
+ --enable-reload-error-restart \
+ --enable-targetbased \
+ --disable-static-daq \
+ --with-dnet-includes=${STAGING_INCDIR} \
+ --with-dnet-libraries=${STAGING_LIBDIR} \
+ --with-libpcre-includes=${STAGING_INCDIR} \
+ --with-libpcre-libraries=${STAGING_LIBDIR} \
+ --with-daq-includes=${STAGING_INCDIR} \
+ --with-daq-libraries=${STAGING_LIBDIR} \
+"
+
+# if you want to disable it, you need to patch configure.in first
+# AC_CHECK_HEADERS([openssl/sha.h],, SHA_H="no")
+# is called even with --without-openssl-includes
+PACKAGECONFIG ?= "openssl"
+PACKAGECONFIG[openssl] = "--with-openssl-includes=${STAGING_INCDIR} --with-openssl-libraries=${STAGING_LIBDIR}, --without-openssl-includes --without-openssl-libraries, openssl,"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/snort/rules
+ install -d ${D}${sysconfdir}/snort/preproc_rules
+ install -d ${D}${sysconfdir}/init.d
+ for i in map config conf dtd; do
+ cp ${S}/etc/*.$i ${D}${sysconfdir}/snort/
+ done
+ cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/
+ install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort
+ mkdir -p ${D}${localstatedir}/log/snort
+ install -d ${D}/var/log/snort
+}
+
+FILES_${PN} += " \
+ ${libdir}/snort_dynamicengine/*.so.* \
+ ${libdir}/snort_dynamicpreprocessor/*.so.* \
+ ${libdir}/snort_dynamicrules/*.so.* \
+"
+FILES_${PN}-dbg += " \
+ ${libdir}/snort_dynamicengine/.debug \
+ ${libdir}/snort_dynamicpreprocessor/.debug \
+ ${libdir}/snort_dynamicrules/.debug \
+"
+FILES_${PN}-staticdev += " \
+ ${libdir}/snort_dynamicengine/*.a \
+ ${libdir}/snort_dynamicpreprocessor/*.a \
+ ${libdir}/snort_dynamicrules/*.a \
+ ${libdir}/snort/dynamic_preproc/*.a \
+ ${libdir}/snort/dynamic_output/*.a \
+"
+FILES_${PN}-dev += " \
+ ${libdir}/snort_dynamicengine/*.la \
+ ${libdir}/snort_dynamicpreprocessor/*.la \
+ ${libdir}/snort_dynamicrules/*.la \
+ ${libdir}/snort_dynamicengine/*.so \
+ ${libdir}/snort_dynamicpreprocessor/*.so \
+ ${libdir}/snort_dynamicrules/*.so \
+ ${prefix}/src/snort_dynamicsrc \
+"
+
+# http://errors.yoctoproject.org/Errors/Details/35137/
+PNBLACKLIST[snort] ?= "BROKEN: QA Issue: snort_preproc.pc, snort_output.pc, snort.pc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
new file mode 100644
index 000000000..a1e56b7ca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
@@ -0,0 +1,25 @@
+Author: Jamie Strandboge <jamie@canonical.com>
+Description: to improve boot speed when disabled, don't source all of
+ ufw-init-functions (which also sources in other files).
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.31/src/ufw-init
+===================================================================
+--- ufw-0.31.orig/src/ufw-init 2012-03-09 17:07:11.000000000 -0600
++++ ufw-0.31/src/ufw-init 2012-03-17 09:37:51.000000000 -0500
+@@ -18,6 +18,12 @@
+ #
+ set -e
+
++# Debian/Ubuntu: small boot speed improvement
++. "#CONFIG_PREFIX#/ufw/ufw.conf"
++if [ "$1" = "start" ] && [ "$2" = "quiet" ] && [ "$ENABLED" = "no" ]; then
++ exit 0
++fi
++
+ if [ -s "#STATE_PREFIX#/ufw-init-functions" ]; then
+ . "#STATE_PREFIX#/ufw-init-functions"
+ else
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch
new file mode 100644
index 000000000..804c18bc9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch
@@ -0,0 +1,118 @@
+Origin: r795, r796
+Description: move netfilter capabilities checking into initcaps(), and call
+ initcaps() only when we need it.
+Bug-Ubuntu: https://launchpad.net/bugs/1044361
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.33/src/backend_iptables.py
+===================================================================
+--- ufw-0.33.orig/src/backend_iptables.py 2012-09-23 09:58:34.000000000 -0500
++++ ufw-0.33/src/backend_iptables.py 2012-09-23 09:58:36.000000000 -0500
+@@ -160,6 +160,9 @@
+ out += "> " + _("Checking raw ip6tables\n")
+ return out
+
++ # Initialize the capabilities database
++ self.initcaps()
++
+ args = ['-n', '-v', '-x', '-L']
+ items = []
+ items6 = []
+@@ -470,6 +473,9 @@
+ if self.dryrun:
+ return False
+
++ # Initialize the capabilities database
++ self.initcaps()
++
+ prefix = "ufw"
+ exe = self.iptables
+ if v6:
+@@ -684,6 +690,9 @@
+ except Exception:
+ raise
+
++ # Initialize the capabilities database
++ self.initcaps()
++
+ chain_prefix = "ufw"
+ rules = self.rules
+ if v6:
+@@ -830,6 +839,10 @@
+ * updating user rules file
+ * reloading the user rules file if rule is modified
+ '''
++
++ # Initialize the capabilities database
++ self.initcaps()
++
+ rstr = ""
+
+ if rule.v6:
+@@ -1073,6 +1086,9 @@
+ if self.dryrun:
+ return
+
++ # Initialize the capabilities database
++ self.initcaps()
++
+ rules_t = []
+ try:
+ rules_t = self._get_logging_rules(level)
+Index: ufw-0.33/src/backend.py
+===================================================================
+--- ufw-0.33.orig/src/backend.py 2012-09-23 09:58:34.000000000 -0500
++++ ufw-0.33/src/backend.py 2012-09-23 09:59:03.000000000 -0500
+@@ -21,7 +21,7 @@
+ import stat
+ import sys
+ import ufw.util
+-from ufw.util import warn, debug
++from ufw.util import error, warn, debug
+ from ufw.common import UFWError, config_dir, iptables_dir, UFWRule
+ import ufw.applications
+
+@@ -68,6 +68,17 @@
+ err_msg = _("Couldn't determine iptables version")
+ raise UFWError(err_msg)
+
++ # Initialize via initcaps only when we need it (LP: #1044361)
++ self.caps = None
++
++ def initcaps(self):
++ '''Initialize the capabilities database. This needs to be called
++ before accessing the database.'''
++
++ # Only initialize if not initialized already
++ if self.caps != None:
++ return
++
+ self.caps = {}
+ self.caps['limit'] = {}
+
+@@ -78,14 +89,20 @@
+ # Try to get capabilities from the running system if root
+ if self.do_checks and os.getuid() == 0 and not self.dryrun:
+ # v4
+- nf_caps = ufw.util.get_netfilter_capabilities(self.iptables)
++ try:
++ nf_caps = ufw.util.get_netfilter_capabilities(self.iptables)
++ except OSError as e:
++ error("initcaps\n%s" % e)
+ if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
+ self.caps['limit']['4'] = True
+ else:
+ self.caps['limit']['4'] = False
+
+ # v6
+- nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
++ try:
++ nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
++ except OSError as e:
++ error("initcaps\n%s" % e)
+ if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
+ self.caps['limit']['6'] = True
+ else:
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch
new file mode 100644
index 000000000..b259fdf78
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch
@@ -0,0 +1,20 @@
+Origin: r797
+Description: src/backend_iptables.py: fix misplaced parenthesis
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.33/src/backend_iptables.py
+===================================================================
+--- ufw-0.33.orig/src/backend_iptables.py 2012-09-24 08:51:13.000000000 -0500
++++ ufw-0.33/src/backend_iptables.py 2012-09-24 08:52:00.000000000 -0500
+@@ -1075,7 +1075,7 @@
+ exe = self.ip6tables
+ (rc, out) = cmd([exe] + args)
+ if rc != 0:
+- err_msg = _("Could not perform '%s'") % (args)
++ err_msg = _("Could not perform '%s'" % (args))
+ if fail_ok:
+ debug("FAILOK: " + err_msg)
+ else:
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
new file mode 100644
index 000000000..695b26567
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
@@ -0,0 +1,40 @@
+Origin: r803, r804
+Description: Don't call get_netfilter_capabilities() with ipv6 if ipv6 is
+ disabled.
+Bug-Ubuntu: https://launchpad.net/ufw/bugs/1039729
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.33/src/backend.py
+===================================================================
+--- ufw-0.33.orig/src/backend.py 2012-12-04 09:21:57.000000000 -0600
++++ ufw-0.33/src/backend.py 2012-12-04 09:22:40.000000000 -0600
+@@ -98,15 +98,17 @@
+ else:
+ self.caps['limit']['4'] = False
+
+- # v6
+- try:
+- nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
+- except OSError as e:
+- error("initcaps\n%s" % e)
+- if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
+- self.caps['limit']['6'] = True
+- else:
+- self.caps['limit']['6'] = False
++ # v6 (skip capabilities check for ipv6 if ipv6 is disabled in ufw
++ # because the system may not have ipv6 support (LP: #1039729)
++ if self.use_ipv6():
++ try:
++ nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
++ except OSError as e:
++ error("initcaps\n%s" % e)
++ if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
++ self.caps['limit']['6'] = True
++ else:
++ self.caps['limit']['6'] = False
+
+ def is_enabled(self):
+ '''Is firewall configured as enabled'''
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch
new file mode 100644
index 000000000..b760d3fd3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch
@@ -0,0 +1,32 @@
+Origin: r816
+Description: add check for -m rt --rt-type 0
+Bug-Ubuntu: https://launchpad.net/bugs/1191197
+Forwarded: yes
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.33/tests/check-requirements
+===================================================================
+--- ufw-0.33.orig/tests/check-requirements 2012-08-17 16:12:49.000000000 -0500
++++ ufw-0.33/tests/check-requirements 2013-06-15 07:47:00.000000000 -0500
+@@ -3,7 +3,7 @@
+ # check-requirements: verify all the required iptables functionality is
+ # available
+ #
+-# Copyright 2008-2012 Canonical Ltd.
++# Copyright 2008-2013 Canonical Ltd.
+ #
+ # This program is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License version 3,
+@@ -218,6 +218,9 @@
+ echo -n "icmpv6 with hl ($j): "
+ runcmd $exe -A $c -p icmpv6 --icmpv6-type $j -m hl --hl-eq 255 -j ACCEPT
+ done
++
++ echo -n "ipv6 rt: "
++ runcmd $exe -A $c -m rt --rt-type 0 -j ACCEPT
+ fi
+
+ echo ""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch
new file mode 100644
index 000000000..511742338
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch
@@ -0,0 +1,107 @@
+From c54d36d0582a60fd281cd9287077cea205fd849d Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Thu, 27 Nov 2014 15:20:34 -0500
+Subject: [PATCH] setup: add an option to specify iptables location
+
+When cross-compiling it isn't certain that the location of iptables on the
+target will be the same as on the host. It also doesn't make sense the
+test the version of the host during setup. We provide an option to
+specify an alternate iptables directory. This is assumed to be a
+cross-compile environment and therefore no attempt is made to verify the
+version of iptables to be used.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ setup.py | 69 ++++++++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 39 insertions(+), 30 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 6fb3751..b13d11c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -225,41 +225,50 @@ shutil.copytree('src', 'staging')
+ os.unlink(os.path.join('staging', 'ufw-init'))
+ os.unlink(os.path.join('staging', 'ufw-init-functions'))
+
++iptables_set = 0
+ iptables_exe = ''
+ iptables_dir = ''
+
+-for e in ['iptables']:
+- for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \
+- '/usr/local/bin']:
+- if e == "iptables":
+- if os.path.exists(os.path.join(dir, e)):
+- iptables_dir = dir
+- iptables_exe = os.path.join(iptables_dir, "iptables")
+- print("Found '%s'" % iptables_exe)
+- else:
+- continue
+-
+- if iptables_exe != "":
+- break
+-
+-
+-if iptables_exe == '':
+- print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
+- sys.exit(1)
+-
+-for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
+- if not os.path.exists(os.path.join(iptables_dir, e)):
+- print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
++if "--iptables-dir" in sys.argv:
++ iptables_dir = sys.argv[sys.argv.index("--iptables-dir") + 1]
++ iptables_exe = os.path.join(iptables_dir, "iptables")
++ iptables_set = 1
++ print("INFO: iptables manually set: '%s'" % (iptables_exe))
++ sys.argv.remove(iptables_dir)
++ sys.argv.remove("--iptables-dir")
++
++if not iptables_set:
++ for e in ['iptables']:
++ for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \
++ '/usr/local/bin']:
++ if e == "iptables":
++ if os.path.exists(os.path.join(dir, e)):
++ iptables_dir = dir
++ iptables_exe = os.path.join(iptables_dir, "iptables")
++ print("Found '%s'" % iptables_exe)
++ else:
++ continue
++
++ if iptables_exe != "":
++ break
++
++ if iptables_exe == '':
++ print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
+ sys.exit(1)
+
+-(rc, out) = cmd([iptables_exe, '-V'])
+-if rc != 0:
+- raise OSError(errno.ENOENT, "Could not find version for '%s'" % \
+- (iptables_exe))
+-version = re.sub('^v', '', re.split('\s', str(out))[1])
+-print("Found '%s' version '%s'" % (iptables_exe, version))
+-if version < "1.4":
+- print("WARN: version '%s' has limited IPv6 support. See README for details." % (version), file=sys.stderr)
++ for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
++ if not os.path.exists(os.path.join(iptables_dir, e)):
++ print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
++ sys.exit(1)
++
++ (rc, out) = cmd([iptables_exe, '-V'])
++ if rc != 0:
++ raise OSError(errno.ENOENT, "Could not find version for '%s'" % \
++ (iptables_exe))
++ version = re.sub('^v', '', re.split('\s', str(out))[1])
++ print("Found '%s' version '%s'" % (iptables_exe, version))
++ if version < "1.4":
++ print("WARN: version '%s' has limited IPv6 support. See README for details." % (version), file=sys.stderr)
+
+ setup (name='ufw',
+ version=ufw_version,
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
new file mode 100644
index 000000000..ff704b5a4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
@@ -0,0 +1,77 @@
+From be53eea06a5655fdc98f47a73be8277b65bb42ed Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 11 Nov 2014 21:41:14 -0500
+Subject: [PATCH] setup: only make one reference to env
+
+If sys.executable happens to be '/usr/bin/env python' or something
+similar, the setup script will result in 'ufw' getting /usr/bin/env
+repeated on the top line. This causes an error at runtime. Perform a
+quick sanity check on sys.executable before doing the substitution.
+
+While we're at it, change the default value of 'exe' to the one we either
+detected or specified on the build line.
+
+Upstream-Status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ setup.py | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index b13d11c..73acdef 100644
+--- a/setup.py
++++ b/setup.py
+@@ -64,7 +64,7 @@ class Install(_install, object):
+ real_sharedir = os.path.join(real_prefix, 'share', 'ufw')
+
+ # Update the modules' paths
+- for file in [ 'common.py' ]:
++ for file in [ 'common.py', 'util.py' ]:
+ print("Updating " + file)
+ subprocess.call(["sed",
+ "-i",
+@@ -91,6 +91,11 @@ class Install(_install, object):
+ "s%#SHARE_DIR#%" + real_sharedir + "%g",
+ os.path.join('staging', file)])
+
++ subprocess.call(["sed",
++ "-i.jjm",
++ "s%/sbin/iptables%" + iptables_exe + "%g",
++ os.path.join('staging', file)])
++
+ # Now byte-compile everything
+ super(Install, self).run()
+
+@@ -107,12 +112,23 @@ class Install(_install, object):
+ for f in [ script, manpage, manpage_f ]:
+ self.mkpath(os.path.dirname(f))
+
++ # if sys.executable == /usr/bin/env python* the result will be the top
++ # of ufw getting:
++ #
++ # #! /usr/bin/env /usr/bin/env python
++ #
++ # which is not ideal
++ #
+ # update the interpreter to that of the one the user specified for setup
+- print("Updating staging/ufw to use %s" % (sys.executable))
+- subprocess.call(["sed",
+- "-i",
+- "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g",
+- 'staging/ufw'])
++ print("Updating staging/ufw to use (%s)" % (sys.executable))
++
++ if re.search("(/usr/bin/env)", sys.executable):
++ print("found 'env' in sys.executable (%s)" % (sys.executable))
++ subprocess.call(["sed",
++ "-i.jjm",
++ "1s%^#.*python.*%#! " + sys.executable + "%g",
++ 'staging/ufw'])
++
+ self.copy_file('staging/ufw', script)
+ self.copy_file('doc/ufw.8', manpage)
+ self.copy_file('doc/ufw-framework.8', manpage_f)
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
new file mode 100644
index 000000000..19cfe46b7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Uncomplicated Firewall"
+DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \
+managing a netfilter firewall. It provides a command line interface and aims \
+to be uncomplicated and easy to use."
+HOMEPAGE = "https://launchpad.net/ufw"
+SECTION = "net"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+SRC_URI = " \
+ https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz \
+ file://setup-add-an-option-to-specify-iptables-location.patch \
+ file://setup-only-make-one-reference-to-env.patch \
+ file://0001-optimize-boot.patch \
+ file://0002-lp1044361.patch \
+ file://0003-fix-typeerror-on-error.patch \
+ file://0004-lp1039729.patch \
+ file://0005-lp1191197.patch \
+"
+SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5"
+SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8"
+
+inherit setuptools distro_features_check
+
+RDEPENDS_${PN} = " \
+ iptables \
+ python \
+ python-modules \
+ "
+
+RRECOMMENDS_${PN} = " \
+ kernel-module-ipv6 \
+ kernel-module-nf-conntrack-ipv6 \
+ kernel-module-nf-log-common \
+ kernel-module-nf-log-ipv4 \
+ kernel-module-nf-log-ipv6 \
+ kernel-module-nf-addrtype \
+ kernel-module-nf-limit \
+ kernel-module-nf-log \
+ kernel-module-nf-recent \
+"
+
+# Certain items are explicitly put under /lib, not base_libdir when installed.
+#
+FILES_${PN} += " \
+ ${sbindir}/* \
+ ${datadir}/ufw/* \
+ /lib/ufw/* \
+ ${sysconfdir}/ufw/* \
+ ${sysconfdir}/default/ufw \
+"
+
+REQUIRED_DISTRO_FEATURES = "ipv6"
+
+DISTUTILS_BUILD_ARGS_append = " --iptables-dir /usr/sbin"
+DISTUTILS_INSTALL_ARGS_append = " --iptables-dir /usr/sbin"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch
new file mode 100644
index 000000000..b7ab7d97c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch
@@ -0,0 +1,22 @@
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Subject: vlan: do not include ${HOME}/linux/include dir
+
+~/linux/include dir may exist and so will be added to include path
+in front of sanitized kernel headers in OE chroot. Drop this include
+option.
+
+Upstream-Status: not-applicable
+
+Index: vlan/MakeInclude
+===================================================================
+--- vlan.orig/MakeInclude
++++ vlan/MakeInclude
+@@ -16,7 +16,7 @@ ifeq "${PLATFORM}" ""
+ endif
+
+ ## You may need to change this linux/include part.
+-CCFLAGS = -g -D_GNU_SOURCE -Wall -I${HOME}/linux/include
++CCFLAGS = -g -D_GNU_SOURCE -Wall
+ LDLIBS = # -lm #-lnsl # -lsocket
+
+ ARM_TC_BIN = ${HOME}/Intrinsyc/bin
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
new file mode 100644
index 000000000..09c4007ef
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -0,0 +1,29 @@
+SUMMARY = "VLAN provides vconfig utility"
+SECTION = "misc"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://vconfig.c;md5=293ef69c4e88434d37a5ee577a5288cb"
+
+SRC_URI = "http://${BPN}.sourcearchive.com/downloads/${PV}-3ubuntu9/${BPN}_${PV}.orig.tar.gz \
+ file://no-HOME-includes.patch"
+
+SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394"
+SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca"
+
+S = "${WORKDIR}/${BPN}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+# comment out MakeInclude in Makefile which sets build environment
+do_configure_append () {
+ sed -i 's/^ include/#^include/' ${S}/Makefile
+}
+
+# ignore strip to avoid yocto errors in stripping
+do_compile () {
+ oe_runmake PLATFORM=ARM 'STRIP=echo' all
+}
+
+do_install () {
+ install -d ${D}/${base_sbindir}
+ install -m 0755 ${S}/vconfig ${D}/${base_sbindir}/
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf
new file mode 100644
index 000000000..48b15eca6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf
@@ -0,0 +1,19 @@
+# Comment out the options you need.
+# Verify your config with "vpnc --print-config".
+# You might also try "vpnc --long-help" or look into the documentation.
+
+# Needed (you will be prompted if this is missing):
+#IPSec gateway 10.1.2.3
+#IPSec ID YOURPEERSID
+#IPSec secret YOURPEERSSECRET
+#Xauth username YOURUSERNAME
+#Xauth password YOURPASSWORD
+
+# Optional:
+#UDP Encapsulate
+#UDP Encapsulation Port 10000
+#Noninteractive
+#No Detach
+#Debug 99
+#Interface name tun0
+#Script /etc/vpnc/vpnc-script
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help
new file mode 100644
index 000000000..fbec25414
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help
@@ -0,0 +1,168 @@
+Usage: vpnc [--version] [--print-config] [--help] [--long-help] [options] [config files]
+
+Options:
+ --gateway <ip/hostname>
+ IP/name of your IPSec gateway
+ conf-variable: IPSec gateway <ip/hostname>
+
+ --id <ASCII string>
+ your group name
+ conf-variable: IPSec ID <ASCII string>
+
+ (configfile only option)
+ your group password (cleartext)
+ conf-variable: IPSec secret <ASCII string>
+
+ (configfile only option)
+ your group password (obfuscated)
+ conf-variable: IPSec obfuscated secret <hex string>
+
+ --username <ASCII string>
+ your username
+ conf-variable: Xauth username <ASCII string>
+
+ (configfile only option)
+ your password (cleartext)
+ conf-variable: Xauth password <ASCII string>
+
+ (configfile only option)
+ your password (obfuscated)
+ conf-variable: Xauth obfuscated password <hex string>
+
+ --domain <ASCII string>
+ (NT-) Domain name for authentication
+ conf-variable: Domain <ASCII string>
+
+ --xauth-inter
+ enable interactive extended authentication (for challenge response auth)
+ conf-variable: Xauth interactive
+
+ --vendor <cisco/netscreen>
+ vendor of your IPSec gateway
+ Default: cisco
+ conf-variable: Vendor <cisco/netscreen>
+
+ --natt-mode <natt/none/force-natt/cisco-udp>
+ Which NAT-Traversal Method to use:
+ * natt -- NAT-T as defined in RFC3947
+ * none -- disable use of any NAT-T method
+ * force-natt -- always use NAT-T encapsulation even
+ without presence of a NAT device
+ (useful if the OS captures all ESP traffic)
+ * cisco-udp -- Cisco proprietary UDP encapsulation, commonly over Port 10000
+ Note: cisco-tcp encapsulation is not yet supported
+ Default: natt
+ conf-variable: NAT Traversal Mode <natt/none/force-natt/cisco-udp>
+
+ --script <command>
+ command is executed using system() to configure the interface,
+ routing and so on. Device name, IP, etc. are passed using enviroment
+ variables, see README. This script is executed right after ISAKMP is
+ done, but before tunneling is enabled. It is called when vpnc
+ terminates, too
+ Default: /etc/vpnc/vpnc-script
+ conf-variable: Script <command>
+
+ --dh <dh1/dh2/dh5>
+ name of the IKE DH Group
+ Default: dh2
+ conf-variable: IKE DH Group <dh1/dh2/dh5>
+
+ --pfs <nopfs/dh1/dh2/dh5/server>
+ Diffie-Hellman group to use for PFS
+ Default: server
+ conf-variable: Perfect Forward Secrecy <nopfs/dh1/dh2/dh5/server>
+
+ --enable-1des
+ enables weak single DES encryption
+ conf-variable: Enable Single DES
+
+ --enable-no-encryption
+ enables using no encryption for data traffic (key exchanged must be encrypted)
+ conf-variable: Enable no encryption
+
+ --application-version <ASCII string>
+ Application Version to report. Note: Default string is generated at runtime.
+ Default: Cisco Systems VPN Client 0.5.3-394:Linux
+ conf-variable: Application version <ASCII string>
+
+ --ifname <ASCII string>
+ visible name of the TUN/TAP interface
+ conf-variable: Interface name <ASCII string>
+
+ --ifmode <tun/tap>
+ mode of TUN/TAP interface:
+ * tun: virtual point to point interface (default)
+ * tap: virtual ethernet interface
+ Default: tun
+ conf-variable: Interface mode <tun/tap>
+
+ --debug <0/1/2/3/99>
+ Show verbose debug messages
+ * 0: Do not print debug information.
+ * 1: Print minimal debug information.
+ * 2: Show statemachine and packet/payload type information.
+ * 3: Dump everything exluding authentication data.
+ * 99: Dump everything INCLUDING AUTHENTICATION data (e.g. PASSWORDS).
+ conf-variable: Debug <0/1/2/3/99>
+
+ --no-detach
+ Don't detach from the console after login
+ conf-variable: No Detach
+
+ --pid-file <filename>
+ store the pid of background process in <filename>
+ Default: /var/run/vpnc/pid
+ conf-variable: Pidfile <filename>
+
+ --local-addr <ip/hostname>
+ local IP to use for ISAKMP / ESP / ... (0.0.0.0 == automatically assign)
+ Default: 0.0.0.0
+ conf-variable: Local Addr <ip/hostname>
+
+ --local-port <0-65535>
+ local ISAKMP port number to use (0 == use random port)
+ Default: 500
+ conf-variable: Local Port <0-65535>
+
+ --udp-port <0-65535>
+ Local UDP port number to use (0 == use random port).
+ This is only relevant if cisco-udp nat-traversal is used.
+ This is the _local_ port, the remote udp port is discovered automatically.
+ It is especially not the cisco-tcp port.
+ Default: 10000
+ conf-variable: Cisco UDP Encapsulation Port <0-65535>
+
+ --dpd-idle <0,10-86400>
+ Send DPD packet after not receiving anything for <idle> seconds.
+ Use 0 to disable DPD completely (both ways).
+ Default: 300
+ conf-variable: DPD idle timeout (our side) <0,10-86400>
+
+ --non-inter
+ Don't ask anything, exit on missing options
+ conf-variable: Noninteractive
+
+ --auth-mode <psk/cert/hybrid>
+ Authentication mode:
+ * psk: pre-shared key (default)
+ * cert: server + client certificate (not implemented yet)
+ * hybrid: server certificate + xauth (if built with openssl support)
+ Default: psk
+ conf-variable: IKE Authmode <psk/cert/hybrid>
+
+ --ca-file <filename>
+ filename and path to the CA-PEM-File
+ conf-variable: CA-File <filename>
+
+ --ca-dir <directory>
+ path of the trusted CA-Directory
+ Default: /etc/ssl/certs
+ conf-variable: CA-Dir <directory>
+
+ --target-network <target network/netmask>
+ Target network in dotted decimal or CIDR notation
+ Default: 0.0.0.0/0.0.0.0
+ conf-variable: IPSEC target network <target network/netmask>
+
+Report bugs to vpnc@unix-ag.uni-kl.de
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/makeman.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/makeman.patch
new file mode 100644
index 000000000..f394e6abd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/makeman.patch
@@ -0,0 +1,11 @@
+--- vpnc-0.5.1/makeman.pl.old 2008-03-16 02:17:59.000000000 -0500
++++ vpnc-0.5.1/makeman.pl 2008-03-16 02:29:34.000000000 -0500
+@@ -29,7 +29,7 @@ my $vpnc = './vpnc';
+ # indenting lists (those originally starting with an asterisk). I hope
+ # this pays off when converting the manpage to HTML or such.
+
+-open my $LONGHELP, '-|', "$vpnc --long-help";
++open my $LONGHELP, '-|', "cat ../long-help";
+ my $vpnc_options = '';
+ my $relative_indent = 0;
+ my $indent_needed = 0;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/vpnc-install.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/vpnc-install.patch
new file mode 100644
index 000000000..3de65ec35
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/vpnc-install.patch
@@ -0,0 +1,35 @@
+--- a/Makefile~ 2009-01-20 18:44:30.000000000 +0100
++++ b/Makefile 2009-01-20 18:44:30.000000000 +0100
+@@ -119,21 +119,21 @@
+ else \
+ install vpnc-script $(DESTDIR)$(ETCDIR); \
+ fi
+- install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf
+- install -m755 vpnc-disconnect $(DESTDIR)$(SBINDIR)
+- install -m755 pcf2vpnc $(DESTDIR)$(BINDIR)
+- install -m644 vpnc.8 $(DESTDIR)$(MANDIR)/man8
+- install -m644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1
+- install -m644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1
+- install -m644 COPYING $(DESTDIR)$(DOCDIR)
++ install -m 600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf
++ install -m 755 vpnc-disconnect $(DESTDIR)$(SBINDIR)
++ install -m 755 pcf2vpnc $(DESTDIR)$(BINDIR)
++ install -m 644 vpnc.8 $(DESTDIR)$(MANDIR)/man8
++ install -m 644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1
++ install -m 644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1
++ install -m 644 COPYING $(DESTDIR)$(DOCDIR)
+
+ install : install-common
+- install -m755 vpnc $(DESTDIR)$(SBINDIR)
+- install -m755 cisco-decrypt $(DESTDIR)$(BINDIR)
++ install -m 755 vpnc $(DESTDIR)$(SBINDIR)
++ install -m 755 cisco-decrypt $(DESTDIR)$(BINDIR)
+
+ install-strip : install-common
+- install -s -m755 vpnc $(DESTDIR)$(SBINDIR)
+- install -s -m755 cisco-decrypt $(DESTDIR)$(BINDIR)
++ install -s -m 755 vpnc $(DESTDIR)$(SBINDIR)
++ install -s -m 755 cisco-decrypt $(DESTDIR)$(BINDIR)
+
+ uninstall :
+ rm -f $(DESTDIR)$(SBINDIR)/vpnc \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
new file mode 100644
index 000000000..ccb449476
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
@@ -0,0 +1,45 @@
+SUMMARY = "A client for the Cisco3000 VPN Concentrator"
+HOMEPAGE = "http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+AUTHOR = "Maurice Massar vpnc@unix-ag.uni-kl.de"
+SECTION = "net"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=173b74cb8ac640a9992c03f3bce22a33"
+DEPENDS = "libgcrypt"
+
+inherit perlnative
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+CFLAGS_append = ' -DVERSION=\\"${PV}\\"'
+LDFLAGS_append = " -lgcrypt -lgpg-error"
+
+do_configure_append () {
+ # Make sure we use our nativeperl wrapper
+ sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl
+}
+
+do_install () {
+ sed -i s:m600:m\ 600:g Makefile
+ oe_runmake 'DESTDIR=${D}' 'PREFIX=/usr' install
+ rm -f ${D}${sysconfdir}/vpnc/vpnc.conf #This file is useless
+ install ${WORKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf
+}
+
+SYSROOT_PREPROCESS_FUNCS += "vpnc_sysroot_preprocess"
+
+vpnc_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${sysconfdir}/vpnc
+ install -m 755 ${D}${sysconfdir}/vpnc/vpnc-script ${SYSROOT_DESTDIR}${sysconfdir}/vpnc
+}
+
+CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
+RDEPENDS_${PN} = "perl-module-io-file"
+RRECOMMENDS_${PN} = "kernel-module-tun"
+
+SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz \
+ file://makeman.patch \
+ file://vpnc-install.patch \
+ file://long-help \
+ file://default.conf"
+
+SRC_URI[md5sum] = "4378f9551d5b077e1770bbe09995afb3"
+SRC_URI[sha256sum] = "46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb
new file mode 100644
index 000000000..d086cefc5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.9.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "wolfSSL Lightweight, Embedded SSL Library"
+DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written in C and \
+ optimized for embedded and RTOS environments. It can be \
+ Up to 20 times smaller than OpenSSL while still supporting \
+ a full TLS 1.2 client and server."
+HOMEPAGE = "http://www.wolfssl.com/yaSSL/Products-wolfssl.html"
+BUGTRACKER = "http://github.com/wolfssl/wolfssl/issues"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PROVIDES += "cyassl"
+RPROVIDES_${PN} = "cyassl"
+
+SRC_URI = "http://www.wolfssl.com/${BP}.zip"
+
+SRC_URI[md5sum] = "f3396726a9befd61443c2cce216e39ba"
+SRC_URI[sha256sum] = "98f50244f7b43f8683bd0cf5c599849d330e75e6cf077e96f14e83bda8b03ca3"
+
+inherit autotools
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service
new file mode 100644
index 000000000..480bc702e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Advanced TFTP Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/atftpd --daemon --port 69
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb
new file mode 100644
index 000000000..0ece58f7d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Advanced TFTP server and client"
+SECTION = "net"
+HOMEPAGE = "http://packages.debian.org/atftp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
+PV = "0.7.1+git${SRCPV}"
+PR = "r3"
+
+SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7"
+
+SRC_URI = "git://git.code.sf.net/p/atftp/code \
+ file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \
+ file://atftpd-0.7_unprotected_assignments_crash.patch \
+ file://atftpd.init \
+ file://atftpd.service \
+ file://atftp-0.7-sorcerers_apprentice.patch \
+"
+S = "${WORKDIR}/git"
+
+inherit autotools update-rc.d useradd systemd
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
+
+INITSCRIPT_PACKAGES = "${PN}d"
+INITSCRIPT_NAME_${PN}d = "atftpd"
+INITSCRIPT_PARAMS_${PN}d = "defaults 80"
+
+USERADD_PACKAGES = "${PN}d"
+USERADD_PARAM_${PN}d = "--system --no-create-home --shell /bin/false \
+ --user-group nobody"
+
+EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
+
+ install -d ${D}/srv/tftp
+
+ rm ${D}${sbindir}/in.tftpd
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
+}
+
+PACKAGES =+ "${PN}d"
+
+FILES_${PN} = "${bindir}/*"
+
+FILES_${PN}d = "${sbindir}/* \
+ ${sysconfdir} \
+ /srv/tftp \
+ ${systemd_unitdir}/system/atftpd.service \
+"
+
+SYSTEMD_PACKAGES = "${PN}d"
+SYSTEMD_SERVICE_${PN}d = "atftpd.service"
+RPROVIDES_${PN}d += "${PN}d-systemd"
+RREPLACES_${PN}d += "${PN}d-systemd"
+RCONFLICTS_${PN}d += "${PN}d-systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch
new file mode 100644
index 000000000..fc64291cd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch
@@ -0,0 +1,94 @@
+atftp exhibits the well known "Sorcerer's Apprentice Syndrome"(SAS) problem.
+According to RFC 1350, the fix to SAS is quite simple: further copies of the
+acknowledgment for a particular data block would be ignored.
+
+Patch originally from OpenSUSE:
+https://build.opensuse.org/package/view_file?file=atftp-0.7-sorcerers_apprentice.patch&package=atftp.539&project=openSUSE%3A12.1%3AUpdate&rev=84569792975e00573d7df597d2a6e895
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Index: atftp-0.7/tftp_file.c
+===================================================================
+--- atftp-0.7.orig/tftp_file.c 2011-11-22 15:12:53.792744083 +0100
++++ atftp-0.7/tftp_file.c 2011-11-22 15:13:51.706421893 +0100
+@@ -605,6 +605,7 @@
+ int timeout_state = state; /* what state should we go on when timeout */
+ int result;
+ long block_number = 0;
++ long last_requested_block = -1;
+ long last_block = -1;
+ int data_size; /* size of data received */
+ int sockfd = data->sockfd; /* just to simplify calls */
+@@ -765,6 +766,17 @@
+ connected = 1;
+ }
+ block_number = ntohs(tftphdr->th_block);
++
++ if (last_requested_block >= block_number)
++ {
++ if (data->trace)
++ fprintf(stderr, "received duplicated ACK <block: %ld >= %ld>\n",
++ last_requested_block, block_number);
++ break;
++ }
++ else
++ last_requested_block = block_number;
++
+ if (data->trace)
+ fprintf(stderr, "received ACK <block: %ld>\n",
+ block_number);
+Index: atftp-0.7/tftpd_file.c
+===================================================================
+--- atftp-0.7.orig/tftpd_file.c 2011-11-22 15:12:53.793744112 +0100
++++ atftp-0.7/tftpd_file.c 2011-11-22 15:15:04.617534260 +0100
+@@ -403,6 +403,7 @@
+ int timeout_state = state;
+ int result;
+ long block_number = 0;
++ long last_requested_block = -1;
+ long last_block = -1;
+ int block_loops = 0;
+ int data_size;
+@@ -859,6 +860,32 @@
+ {
+ logger(LOG_DEBUG, "received ACK <block: %d>", block_number);
+ }
++
++ /* check whether the block request isn't already fulfilled */
++
++ /* multicast, block numbers could contain gaps */
++ if (multicast) {
++ if (last_requested_block >= block_number)
++ {
++ if (data->trace)
++ logger(LOG_DEBUG, "received duplicated ACK <block: %d >= %d>", last_requested_block, block_number);
++ break;
++ }
++ else
++ last_requested_block = block_number;
++ /* unicast, blocks should be requested one after another */
++ } else {
++ if (last_requested_block + 1 != block_number && last_requested_block != -1)
++ {
++ if (data->trace)
++ logger(LOG_DEBUG, "received out of order ACK <block: %d != %d>", last_requested_block + 1, block_number);
++ break;
++ }
++ else
++ last_requested_block = block_number;
++ }
++
++
+ if (ntohs(tftphdr->th_block) == 65535)
+ {
+ block_loops++;
+@@ -958,6 +985,8 @@
+ /* nedd to send an oack to that client */
+ state = S_SEND_OACK;
+ fseek(fp, 0, SEEK_SET);
++ /* reset the last block received counter */
++ last_requested_block = -1;
+ }
+ else
+ {
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch
new file mode 100644
index 000000000..280b570b2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch
@@ -0,0 +1,163 @@
+Fate #303031: Circumvent TFTP size restrictions in atftpd
+The size of a single image file that can be transferred with TFTP is limited to
+2^(2*8) *BLOCKSIZE (as per RFC 1350 there are only two bytes for the block
+counter). This is problematic for one of our customers who needs to transfer
+100+ MB Windows images using a TFTP client (NT bootloader) which has a
+hardwared BLOCKSIZE setting of 1432).
+
+block rollover
+http://www.compuphase.com/tftp.htm
+
+Patch originally from OpenSUSE:
+https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2
+
+Upstream-Status: Pending
+
+Index: git/tftp_def.h
+===================================================================
+--- git.orig/tftp_def.h 2012-11-19 16:28:50.221027144 -0800
++++ git/tftp_def.h 2012-11-20 17:40:54.391206979 -0800
+@@ -32,6 +32,7 @@
+ #define TIMEOUT 5 /* Client timeout */
+ #define S_TIMEOUT 5 /* Server timout. */
+ #define NB_OF_RETRY 5
++#define MAXBLOCKS 1000000 /* maximum number of blocks in a download */
+
+ /* definition to use tftp_options structure */
+ #define OPT_FILENAME 0
+Index: git/tftp_file.c
+===================================================================
+--- git.orig/tftp_file.c 2012-11-19 16:28:50.221027144 -0800
++++ git/tftp_file.c 2012-11-19 16:28:51.201027167 -0800
+@@ -622,8 +622,8 @@
+ int state = S_SEND_REQ; /* current state in the state machine */
+ int timeout_state = state; /* what state should we go on when timeout */
+ int result;
+- int block_number = 0;
+- int last_block = -1;
++ long block_number = 0;
++ long last_block = -1;
+ int data_size; /* size of data received */
+ int sockfd = data->sockfd; /* just to simplify calls */
+ struct sockaddr_storage sa; /* a copy of data.sa_peer */
+@@ -637,8 +637,8 @@
+ int convert = 0; /* if true, do netascii convertion */
+ char string[MAXLEN];
+
+- int prev_block_number = 0; /* needed to support netascii convertion */
+- int prev_file_pos = 0;
++ long prev_block_number = 0; /* needed to support netascii convertion */
++ long prev_file_pos = 0;
+ int temp = 0;
+
+ data->file_size = 0;
+@@ -745,7 +745,7 @@
+ data_size, data->data_buffer);
+ data->file_size += data_size;
+ if (data->trace)
+- fprintf(stderr, "sent DATA <block: %d, size: %d>\n",
++ fprintf(stderr, "sent DATA <block: %ld, size: %d>\n",
+ block_number + 1, data_size - 4);
+ state = S_WAIT_PACKET;
+ break;
+@@ -785,7 +785,7 @@
+ }
+ block_number = ntohs(tftphdr->th_block);
+ if (data->trace)
+- fprintf(stderr, "received ACK <block: %d>\n",
++ fprintf(stderr, "received ACK <block: %ld>\n",
+ block_number);
+ if ((last_block != -1) && (block_number > last_block))
+ {
+Index: git/tftp_io.c
+===================================================================
+--- git.orig/tftp_io.c 2012-11-19 16:28:50.221027144 -0800
++++ git/tftp_io.c 2012-11-19 16:28:51.201027167 -0800
+@@ -350,8 +350,8 @@
+ /*
+ * Read from file and do netascii conversion if needed
+ */
+-int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, int block_number,
+- int convert, int *prev_block_number, int *prev_file_pos, int *temp)
++int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, long block_number,
++ int convert, long *prev_block_number, long *prev_file_pos, int *temp)
+ {
+ int i;
+ int c;
+Index: git/tftp_io.h
+===================================================================
+--- git.orig/tftp_io.h 2012-11-19 16:28:50.221027144 -0800
++++ git/tftp_io.h 2012-11-19 16:28:51.201027167 -0800
+@@ -52,8 +52,8 @@
+ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa,
+ struct sockaddr_storage *from, struct sockaddr_storage *to,
+ int timeout, int *size, char *data);
+-int tftp_file_read(FILE *fp, char *buffer, int buffer_size, int block_number, int convert,
+- int *prev_block_number, int *prev_file_pos, int *temp);
++int tftp_file_read(FILE *fp, char *buffer, int buffer_size, long block_number, int convert,
++ long *prev_block_number, long *prev_file_pos, int *temp);
+ int tftp_file_write(FILE *fp, char *data_buffer, int data_buffer_size, int block_number,
+ int data_size, int convert, int *prev_block_number, int *temp);
+ #endif
+Index: git/tftpd_file.c
+===================================================================
+--- git.orig/tftpd_file.c 2012-11-19 16:28:50.225027144 -0800
++++ git/tftpd_file.c 2012-11-19 16:28:51.201027167 -0800
+@@ -407,8 +407,9 @@
+ int state = S_BEGIN;
+ int timeout_state = state;
+ int result;
+- int block_number = 0;
+- int last_block = -1;
++ long block_number = 0;
++ long last_block = -1;
++ int block_loops = 0;
+ int data_size;
+ struct sockaddr_storage *sa = &data->client_info->client;
+ struct sockaddr_storage from;
+@@ -431,8 +432,8 @@
+ struct client_info *client_old = NULL;
+ struct tftp_opt options[OPT_NUMBER];
+
+- int prev_block_number = 0; /* needed to support netascii convertion */
+- int prev_file_pos = 0;
++ long prev_block_number = 0; /* needed to support netascii convertion */
++ long prev_file_pos = 0;
+ int temp = 0;
+
+ /* look for mode option */
+@@ -565,11 +566,12 @@
+ logger(LOG_INFO, "blksize option -> %d", result);
+ }
+
+- /* Verify that the file can be sent in 2^16 block of BLKSIZE octets */
+- if ((file_stat.st_size / (data->data_buffer_size - 4)) > 65535)
++ /* Verify that the file can be sent in MAXBLOCKS blocks of BLKSIZE octets */
++ if ((file_stat.st_size / (data->data_buffer_size - 4)) > MAXBLOCKS)
+ {
+ tftp_send_error(sockfd, sa, EUNDEF, data->data_buffer, data->data_buffer_size);
+- logger(LOG_NOTICE, "Requested file to big, increase BLKSIZE");
++ logger(LOG_NOTICE, "Requested file too big, increase BLKSIZE");
++ logger(LOG_NOTICE, "Only %d blocks of %d bytes can be served.", MAXBLOCKS, data->data_buffer_size);
+ if (data->trace)
+ logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EUNDEF,
+ tftp_errmsg[EUNDEF]);
+@@ -880,10 +882,15 @@
+ }
+ /* The ACK is from the current client */
+ number_of_timeout = 0;
+- block_number = ntohs(tftphdr->th_block);
++ block_number = (block_loops * 65536) + ntohs(tftphdr->th_block);
+ if (data->trace)
+- logger(LOG_DEBUG, "received ACK <block: %d>",
+- block_number);
++ {
++ logger(LOG_DEBUG, "received ACK <block: %d>", block_number);
++ }
++ if (ntohs(tftphdr->th_block) == 65535)
++ {
++ block_loops++;
++ };
+ if ((last_block != -1) && (block_number > last_block))
+ {
+ state = S_END;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch
new file mode 100644
index 000000000..28fba6cf5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch
@@ -0,0 +1,152 @@
+Avoid assigning thread data outside of mutex lock
+
+Patch originally from OpenSUSE:
+https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2
+
+Upstream-Status: Pending
+
+Index: git/tftpd_list.c
+===================================================================
+--- git.orig/tftpd_list.c 2012-10-24 21:48:47.000000000 -0700
++++ git/tftpd_list.c 2012-10-24 21:52:04.266205076 -0700
+@@ -49,11 +49,11 @@
+ */
+ int tftpd_list_add(struct thread_data *new)
+ {
+- struct thread_data *current = thread_data;
++ struct thread_data *current;
+ int ret;
+
+ pthread_mutex_lock(&thread_list_mutex);
+-
++ current = thread_data;
+ number_of_thread++;
+
+ ret = number_of_thread;
+@@ -81,11 +81,13 @@
+ */
+ int tftpd_list_remove(struct thread_data *old)
+ {
+- struct thread_data *current = thread_data;
++ struct thread_data *current;
+ int ret;
+
+ pthread_mutex_lock(&thread_list_mutex);
+
++ current = thread_data;
++
+ number_of_thread--;
+ ret = number_of_thread;
+
+@@ -137,23 +139,26 @@
+ struct thread_data *data,
+ struct client_info *client)
+ {
+- struct thread_data *current = thread_data; /* head of the list */
+- struct tftp_opt *tftp_options = data->tftp_options;
++ struct thread_data *current; /* head of the list */
++ struct tftp_opt *tftp_options;
+ struct client_info *tmp;
+ char options[MAXLEN];
+ char string[MAXLEN];
+ char *index;
+ int len;
+
++ /* lock the whole list before walking it */
++ pthread_mutex_lock(&thread_list_mutex);
++
+ *thread = NULL;
+
++ current = thread_data;
++ tftp_options = data->tftp_options;
++
+ opt_request_to_string(tftp_options, options, MAXLEN);
+ index = strstr(options, "multicast");
+ len = (int)index - (int)options;
+
+- /* lock the whole list before walking it */
+- pthread_mutex_lock(&thread_list_mutex);
+-
+ while (current)
+ {
+ if (current != data)
+@@ -214,9 +219,10 @@
+ void tftpd_clientlist_remove(struct thread_data *thread,
+ struct client_info *client)
+ {
+- struct client_info *tmp = thread->client_info;
++ struct client_info *tmp;
+
+ pthread_mutex_lock(&thread->client_mutex);
++ tmp = thread->client_info;
+ while ((tmp->next != client) && (tmp->next != NULL))
+ tmp = tmp->next;
+ if (tmp->next == NULL)
+@@ -231,9 +237,11 @@
+ void tftpd_clientlist_free(struct thread_data *thread)
+ {
+ struct client_info *tmp;
+- struct client_info *head = thread->client_info;
++ struct client_info *head;
+
+ pthread_mutex_lock(&thread->client_mutex);
++ head = thread->client_info;
++
+ while (head)
+ {
+ tmp = head;
+@@ -250,9 +258,10 @@
+ struct client_info *client,
+ struct sockaddr_storage *sock)
+ {
+- struct client_info *head = thread->client_info;
++ struct client_info *head;
+
+ pthread_mutex_lock(&thread->client_mutex);
++ head = thread->client_info;
+
+ if (client)
+ {
+@@ -334,10 +343,10 @@
+
+ void tftpd_list_kill_threads(void)
+ {
+- struct thread_data *current = thread_data; /* head of list */
++ struct thread_data *current; /* head of list */
+
+ pthread_mutex_lock(&thread_list_mutex);
+-
++ current = thread_data;
+
+ while (current != NULL)
+ {
+Index: git/tftpd_mcast.c
+===================================================================
+--- git.orig/tftpd_mcast.c 2012-10-24 21:48:47.000000000 -0700
++++ git/tftpd_mcast.c 2012-10-24 21:49:11.570201582 -0700
+@@ -51,9 +51,11 @@
+ */
+ int tftpd_mcast_get_tid(char **addr, short *port)
+ {
+- struct tid *current = tid_list;
++ struct tid *current;
+
+ pthread_mutex_lock(&mcast_tid_list);
++ current = tid_list;
++
+ /* walk the list for a free tid */
+ while (current != NULL)
+ {
+@@ -74,9 +76,11 @@
+
+ int tftpd_mcast_free_tid(char *addr, short port)
+ {
+- struct tid *current = tid_list;
++ struct tid *current;
+
+ pthread_mutex_lock(&mcast_tid_list);
++ current = tid_list;
++
+ while (current != NULL)
+ {
+ if ((current->used == 1) && (current->port == port) &&
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init
new file mode 100644
index 000000000..161d97aca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init
@@ -0,0 +1,37 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/atftpd and type
+# > update-rc.d atftpd defaults 60
+#
+
+
+test -f /usr/sbin/atftpd || exit 0
+
+test -d /srv/tftp || mkdir -p /srv/tftp
+
+case "$1" in
+ start)
+ echo -n "Starting tftp daemon: atftpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/atftpd -- --daemon --port 69
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping tftp daemon: atftpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/atftpd
+ echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/atftpd
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/atftpd {start|stop|reload|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch
new file mode 100644
index 000000000..742f25de1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch
@@ -0,0 +1,47 @@
+From 40971911d653bf53de295d7462c643e4073916b9 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe@deserted.net>
+Date: Fri, 1 Nov 2013 12:47:18 -0400
+Subject: [PATCH] systemd: allow --with-systemd to take a path arg
+
+If building for a cross-compile environment with systemd it is convenient
+to be able to specify a systemd path for the target that may not be the
+same as that on the host.
+
+Upstream-status: Submitted [http://www.spinics.net/lists/autofs/msg00740.html]
+
+Signed-off-by: Joe MacDonald <joe@deserted.net>
+---
+ aclocal.m4 | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 3e6f223..105e3e9 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -229,8 +229,10 @@ dnl Check the location of the systemd unit files directory
+ dnl --------------------------------------------------------------------------
+ AC_DEFUN([AF_WITH_SYSTEMD],
+ [AC_ARG_WITH(systemd,
+-[ --with-systemd install systemd unit file if systemd unit directory
+- is found on system],
++[ --with-systemd@<:@=systemddir@:>@ install systemd unit file. If 'yes'
++ probe the system for unit directory.
++ If a path is specified, assume that
++ is a valid install path.],
+ [if test "$withval" = yes; then
+ if test -z "$systemddir"; then
+ AC_MSG_CHECKING([location of the systemd unit files directory])
+@@ -247,6 +249,10 @@ AC_DEFUN([AF_WITH_SYSTEMD],
+ else
+ AC_MSG_RESULT(not found)
+ fi
++else
++ if test "$withval" != no; then
++ systemddir=$withval
++ fi
+ fi])
+ ])
+
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/Makefile.rules-cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/Makefile.rules-cross.patch
new file mode 100644
index 000000000..7dc7096c2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/Makefile.rules-cross.patch
@@ -0,0 +1,23 @@
+Index: autofs-5.0.7/Makefile.rules
+===================================================================
+--- autofs-5.0.7.orig/Makefile.rules 2012-07-24 23:05:26.000000000 -0700
++++ autofs-5.0.7/Makefile.rules 2012-10-26 09:23:40.270204270 -0700
+@@ -34,14 +34,14 @@
+ else
+ CFLAGS ?= -O2 -Wall
+ LDFLAGS = -s
+-STRIP = strip --strip-debug
++STRIP = ${TARGET_PREFIX}strip --strip-debug
+ endif
+ endif
+
+-CC = gcc
+-CXX = g++
++CC ?= ${TARGET_PREFIX}gcc
++CXX ?= ${TARGET_PREFIX}g++
+ CXXFLAGS = $(CFLAGS)
+-LD = ld
++LD ?= ${TARGET_PREFIX}ld
+ SOLDFLAGS = -shared
+
+ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
new file mode 100644
index 000000000..fdb906b22
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
@@ -0,0 +1,24 @@
+[PATCH] add the needed stdarg.h
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ lib/defaults.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/defaults.c b/lib/defaults.c
+index 2b03ea2..5728e67 100644
+--- a/lib/defaults.c
++++ b/lib/defaults.c
+@@ -16,6 +16,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdarg.h>
+ #include <ctype.h>
+ #include <string.h>
+ #include <sys/utsname.h>
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch
new file mode 100644
index 000000000..af5be6a83
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch
@@ -0,0 +1,75 @@
+Description: Loading autofs module is #ifdef'ed in the source, so
+ there is no need to check for /proc (which is only used
+ to load module) or modprobe. Both modprobe and /proc
+ are always in the fixed location so there's no need to
+ check for these to start with.
+
+Upstream-Status: Backport [1]
+[1] http://www.spinics.net/lists/autofs/msg00139.html
+
+diff -urpN a/configure.in b/configure.in
+--- a/configure.in 2013-01-15 11:30:22.000000000 +0800
++++ b/configure.in 2013-01-15 11:31:45.000000000 +0800
+@@ -34,11 +34,6 @@ AC_MSG_CHECKING([for binaries in])
+ AC_MSG_RESULT([$searchpath])
+
+ #
+-# Make sure we have "/proc"
+-#
+-AF_LINUX_PROCFS()
+-
+-#
+ # Location of init.d directory?
+ #
+ AF_INIT_D()
+@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umo
+ AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
+ AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath)
+ AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath)
+-AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath)
+
+ AF_CHECK_PROG(LEX, flex lex, , $searchpath)
+ AF_CHECK_PROG(YACC, bison, , $searchpath)
+diff -urpN a/daemon/module.c b/daemon/module.c
+--- a/daemon/module.c 2013-01-15 11:30:49.000000000 +0800
++++ b/daemon/module.c 2013-01-15 11:32:00.000000000 +0800
+@@ -18,6 +18,8 @@
+ #include <stdlib.h>
+ #include "automount.h"
+
++#if 0
++/* see comment in daemon/automount.c around load_autofs4_module() call */
+ int load_autofs4_module(void)
+ {
+ FILE *fp;
+@@ -52,6 +54,7 @@ int load_autofs4_module(void)
+
+ return 1;
+ }
++#endif
+
+ struct lookup_mod *open_lookup(const char *name, const char *err_prefix,
+ const char *mapfmt, int argc, const char *const *argv)
+diff -urpN a/include/automount.h b/include/automount.h
+--- a/include/automount.h 2013-01-15 11:31:10.000000000 +0800
++++ b/include/automount.h 2013-01-15 11:32:06.000000000 +0800
+@@ -50,16 +50,11 @@
+ #error Failed to locate umount(8)!
+ #endif
+
+-#ifndef HAVE_MODPROBE
+-#error Failed to locate modprobe(8)!
+-#endif
+-
+-#ifndef HAVE_LINUX_PROCFS
+-#error Failed to verify existence of procfs filesystem!
+-#endif
+-
++#if 0
++/* see comment in daemon/automount.c around load_autofs4_module() call */
+ #define FS_MODULE_NAME "autofs4"
+ int load_autofs4_module(void);
++#endif
+
+ /* The -s (sloppy) option to mount is good, if we have it... */
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
new file mode 100644
index 000000000..09fea495d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
@@ -0,0 +1,28 @@
+From 54a9bd28a307dd74df044d779ca85adcf36aa202 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe.macdonald@windriver.com>
+Date: Tue, 18 Jun 2013 10:05:21 -0400
+Subject: [PATCH] Fix the dependency issue
+
+Upstream-Status: Pending
+
+autofs's lib sources have a dependency on a number of files that are
+generated by rpcgen during buildtime
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
+---
+ lib/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5418009..bff4e1d 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -75,3 +75,4 @@ install: all
+ clean:
+ rm -f $(LIB) $(RPCS) $(OBJS) $(YACCSRC) *.output *~
+
++$(OBJS): $(RPCS)
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
new file mode 100644
index 000000000..3a878980a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+
+From 44bdce8c6ed9b30c1643e5981172a4f9025f013c Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Wed, 13 Mar 2013 16:17:08 +0100
+Subject: [PATCH] autofs-5.0.7: include linux/nfs.h directly in rpc_subs.h
+
+Fixes compile error with uclibc. Glibc's nfs/nfs.h contains
+nothing but "#include linux/nfs.h". rpc_subs.h already includes
+other linux/nfs*.h files directly.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ include/rpc_subs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/rpc_subs.h b/include/rpc_subs.h
+index b6d59f9..a2d9648 100644
+--- a/include/rpc_subs.h
++++ b/include/rpc_subs.h
+@@ -18,7 +18,7 @@
+
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+-#include <nfs/nfs.h>
++#include <linux/nfs.h>
+ #include <linux/nfs2.h>
+ #include <linux/nfs3.h>
+
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-additional-distros.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-additional-distros.patch
new file mode 100644
index 000000000..6a35843ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-additional-distros.patch
@@ -0,0 +1,12 @@
+--- autofs-4.1.4/samples/rc.autofs.in~ 2005-04-11 06:30:54.000000000 -0500
++++ autofs-4.1.4/samples/rc.autofs.in 2007-04-07 13:18:44.000000000 -0500
+@@ -43,6 +43,9 @@
+ system=debian
+ elif [ -f /etc/redhat-release ]; then
+ system=redhat
++elif [ -f /etc/issue ] && grep -q "^SlugOS\|Yocto" /etc/issue ; then
++ # SlugOS and Yocto behave like Debian, at least for autofs purposes.
++ system=debian
+ else
+ echo "$0: Unknown system, please port and contact autofs@linux.kernel.org" 1>&2
+ exit 1
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
new file mode 100644
index 000000000..8f1af625f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
@@ -0,0 +1,44 @@
+Index: autofs-5.0.7/aclocal.m4
+===================================================================
+--- autofs-5.0.7.orig/aclocal.m4 2012-10-28 04:45:07.000000000 -0700
++++ autofs-5.0.7/aclocal.m4 2012-10-28 10:47:53.263996910 -0700
+@@ -7,6 +7,8 @@
+ AC_DEFUN(AF_PATH_INCLUDE,
+ [AC_PATH_PROGS($1,$2,$3,$4)
+ if test -n "$$1"; then
++ AH_TEMPLATE([HAVE_$1], [Have $2])
++ AH_TEMPLATE([PATH_$1], [Have $2])
+ AC_DEFINE(HAVE_$1,1,[define if you have $1])
+ AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1])
+ HAVE_$1=1
+Index: autofs-5.0.7/configure.in
+===================================================================
+--- autofs-5.0.7.orig/configure.in 2012-10-28 04:45:06.000000000 -0700
++++ autofs-5.0.7/configure.in 2012-10-28 10:50:07.580000628 -0700
+@@ -301,13 +301,15 @@
+ cat > pietest.c <<EOF
+ int main(void) { return 0; }
+ EOF
++AF_tmp_ldflags="$LDFLAGS"
++AF_tmp_cflags="$CFLAGS"
+ CFLAGS=-fPIE
+ LDFLAGS=-pie
+ DAEMON_CFLAGS=
+ DAEMON_LDFLAGS=
+ AC_MSG_CHECKING([whether gcc -fPIE works])
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
+- [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
++ [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no])
+ AC_MSG_RESULT([$gcc_supports_pie])
+ if test $gcc_supports_pie = yes ; then
+ DAEMON_CFLAGS="-fPIE"
+@@ -316,6 +318,8 @@
+ rm -f pietest.c
+ AC_SUBST(DAEMON_CFLAGS)
+ AC_SUBST(DAEMON_LDFLAGS)
++CFLAGS="${AF_tmp_cflags}"
++LDFLAGS="${AF_tmp_ldflags}"
+
+ #
+ # Enable ability to access value in external env variable
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
new file mode 100644
index 000000000..9b641838f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
@@ -0,0 +1,62 @@
+[PATCH] fix the YACC rule to fix a building failure
+
+Upstream-Statu: Pending
+
+The original rule will create the header file twice, one is that the header
+file as the object file is created, other time is when create the C source file.
+since YACC always has "-d" parameter.
+
+This lead to a race when compile amd_tok.o, the header file maybe rewritten.
+ |----------------------
+ |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function)
+ | ")" { return RBRACKET; }
+ | ^
+ |../Makefile.rules:64: recipe for target 'amd_tok.o' failed
+ |----------------------
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ lib/Makefile | 6 ++++--
+ modules/Makefile | 3 ++-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 4798a4b..c40cf86 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -57,7 +57,8 @@ mount_xdr.o: mount_xdr.c
+ master_tok.c: master_tok.l
+ $(LEX) -o$@ -Pmaster_ $?
+
+-master_parse.tab.c master_parse.tab.h: master_parse.y
++master_parse.tab.h: master_parse.tab.c
++master_parse.tab.c: master_parse.y
+ $(YACC) -v -d -p master_ -b master_parse $?
+
+ master_tok.o: master_tok.c master_parse.tab.h
+@@ -67,7 +68,8 @@ master_parse.tab.o: master_parse.tab.c master_parse.tab.h
+ nss_tok.c: nss_tok.l
+ $(LEX) -o$@ -Pnss_ $?
+
+-nss_parse.tab.c nss_parse.tab.h: nss_parse.y
++nss_parse.tab.h: nss_parse.tab.c
++nss_parse.tab.c: nss_parse.y
+ $(YACC) -v -d -p nss_ -b nss_parse $?
+
+ nss_tok.o: nss_tok.c nss_parse.tab.h
+diff --git a/modules/Makefile b/modules/Makefile
+index 237b70b..71415d0 100644
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l
+
+ amd_tok.o: amd_tok.c amd_parse.tab.h
+
+-amd_parse.tab.c amd_parse.tab.h: amd_parse.y
++amd_parse.tab.h: amd_parse.tab.c
++amd_parse.tab.c: amd_parse.y
+ $(YACC) -v -d -p amd_ -b amd_parse $?
+
+ amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
new file mode 100644
index 000000000..31c8510a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
@@ -0,0 +1,42 @@
+autofs: fails to compile with openldap disabled
+
+As of 5.0.6, it appears that changes were introduced so that
+if you compile with openldap disabled and openldap headers are not
+available, then autofs fails to build.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+--
+ lookup_ldap.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+---
+ include/lookup_ldap.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/include/lookup_ldap.h
++++ b/include/lookup_ldap.h
+@@ -1,7 +1,9 @@
+ #ifndef LOOKUP_LDAP_H
+ #define LOOKUP_LDAP_H
+
++#ifdef WITH_LDAP
+ #include <ldap.h>
++#endif
+
+ #ifdef WITH_SASL
+ #include <openssl/ssl.h>
+@@ -109,10 +111,12 @@
+
+ #define LDAP_AUTH_USESIMPLE 0x0008
+
++#ifdef WITH_LDAP
+ /* lookup_ldap.c */
+ LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_context *ctxt);
+ int unbind_ldap_connection(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt);
+ int authtype_requires_creds(const char *authtype);
++#endif
+
+ #ifdef WITH_SASL
+ /* cyrus-sasl.c */
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
new file mode 100644
index 000000000..634005bd2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
@@ -0,0 +1,25 @@
+[PATCH] force STRIP to emtpy
+
+otherwise the generate file will be stripped
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 710a2c9..e4334db 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -31,7 +31,7 @@ LDFLAGS ?= -s
+ endif
+
+ ifdef DONTSTRIP
+-STRIP ?= :
++STRIP = :
+ else
+ STRIP ?= strip --strip-debug
+ endif
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch
new file mode 100644
index 000000000..e93021d56
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch
@@ -0,0 +1,28 @@
+---
+ lib/rpc_subs.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
+index 5d6ead0..c7177f2 100644
+--- a/lib/rpc_subs.c
++++ b/lib/rpc_subs.c
+@@ -34,16 +34,6 @@
+ #include <poll.h>
+
+ #ifdef WITH_LIBTIRPC
+-#undef auth_destroy
+-#define auth_destroy(auth) \
+- do { \
+- int refs; \
+- if ((refs = auth_put((auth))) == 0) \
+- ((*((auth)->ah_ops->ah_destroy))(auth));\
+- } while (0)
+-#endif
+-
+-#ifdef WITH_LIBTIRPC
+ const rpcprog_t rpcb_prog = RPCBPROG;
+ const rpcvers_t rpcb_version = RPCBVERS;
+ #else
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch
new file mode 100644
index 000000000..d68944b45
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch
@@ -0,0 +1,26 @@
+Index: autofs-5.0.7/aclocal.m4
+===================================================================
+--- autofs-5.0.7.orig/aclocal.m4 2012-10-28 13:17:45.504237027 -0700
++++ autofs-5.0.7/aclocal.m4 2012-10-28 13:20:50.108242739 -0700
+@@ -403,7 +403,7 @@
+ # save current flags
+ af_check_libtirpc_save_cflags="$CFLAGS"
+ af_check_libtirpc_save_ldflags="$LDFLAGS"
+-CFLAGS="$CFLAGS -I/usr/include/tirpc"
++CFLAGS="$CFLAGS -I=/usr/include/tirpc"
+ LDFLAGS="$LDFLAGS -ltirpc"
+
+ AC_TRY_LINK(
+Index: autofs-5.0.7/Makefile.rules
+===================================================================
+--- autofs-5.0.7.orig/Makefile.rules 2012-10-28 13:17:45.308237022 -0700
++++ autofs-5.0.7/Makefile.rules 2012-10-28 13:21:25.720242803 -0700
+@@ -48,7 +48,7 @@
+ LIBS += -lpthread
+
+ ifdef TIRPCLIB
+-CFLAGS += -I/usr/include/tirpc
++CFLAGS += -I=/usr/include/tirpc
+ LIBS += $(TIRPCLIB)
+ endif
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
new file mode 100644
index 000000000..cf0363527
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
@@ -0,0 +1,20 @@
+Index: autofs-5.0.7/samples/auto.net
+===================================================================
+--- autofs-5.0.7.orig/samples/auto.net 2012-07-24 23:05:26.000000000 -0700
++++ autofs-5.0.7/samples/auto.net 2012-10-28 10:44:25.035991715 -0700
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # This file must be executable to work! chmod 755!
+
+Index: autofs-5.0.7/samples/auto.smb
+===================================================================
+--- autofs-5.0.7.orig/samples/auto.smb 2012-07-24 23:05:26.000000000 -0700
++++ autofs-5.0.7/samples/auto.smb 2012-10-28 10:44:25.035991715 -0700
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # This file must be executable to work! chmod 755!
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
new file mode 100644
index 000000000..282d6f0ad
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
@@ -0,0 +1,120 @@
+From 79034f969bbd12215d65b4337dfd38a13d02d4ef Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 13 Sep 2014 20:19:28 -0700
+Subject: [PATCH] autofs.init.in: remove bashism
+
+It can work without the bashism.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ redhat/autofs.init.in | 12 ++++++------
+ samples/rc.autofs.in | 10 +++++-----
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
+index 9d008ff..4f1c0d8 100644
+--- a/redhat/autofs.init.in
++++ b/redhat/autofs.init.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # rc file for automount using a Sun-style "master map".
+ #
+@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then
+ . $confdir/autofs
+ fi
+
+-function start() {
++start() {
+ # Make sure autofs4 module is loaded
+ if ! grep -q autofs /proc/filesystems
+ then
+@@ -102,7 +102,7 @@ function start() {
+ return $RETVAL
+ }
+
+-function stop() {
++stop() {
+ echo -n $"Stopping $prog: "
+ count=0
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
+@@ -125,7 +125,7 @@ function stop() {
+ return $RETVAL
+ }
+
+-function restart() {
++restart() {
+ status autofs > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ stop
+@@ -143,7 +143,7 @@ function restart() {
+ start
+ }
+
+-function reload() {
++reload() {
+ if [ ! -f /var/lock/subsys/autofs ]; then
+ echo $"$prog not running"
+ RETVAL=1
+@@ -161,7 +161,7 @@ function reload() {
+ return $RETVAL
+ }
+
+-function usage_message() {
++usage_message() {
+ echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}"
+ }
+
+diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
+index 487669f..e96cde1 100644
+--- a/samples/rc.autofs.in
++++ b/samples/rc.autofs.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # rc file for automount using a Sun-style "master map".
+ #
+@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then
+ . $confdir/autofs
+ fi
+
+-function start() {
++start() {
+ echo -n "Starting $prog: "
+
+ # Make sure autofs4 module is loaded
+@@ -85,7 +85,7 @@ function start() {
+ return $RETVAL
+ }
+
+-function stop() {
++stop() {
+ echo -n $"Stopping $prog: "
+ count=0
+ while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
+@@ -102,7 +102,7 @@ function stop() {
+ return $RETVAL
+ }
+
+-function restart() {
++restart() {
+ stop
+ while [ -n "`pidof $prog`" ] ; do
+ sleep 5
+@@ -110,7 +110,7 @@ function restart() {
+ start
+ }
+
+-function reload() {
++reload() {
+ pid=`pidof $prog`
+ if [ -z $pid ]; then
+ echo $"$prog not running"
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
new file mode 100644
index 000000000..93b76bd66
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
@@ -0,0 +1,39 @@
+using pkg-config to detect libxml-2.0 and krb5
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ configure.in | 16 ++++++++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 392d122..a3028aa 100644
+--- a/configure.in
++++ b/configure.in
+@@ -162,8 +162,20 @@ if test x$enable_sloppy_mount = xyes; then
+ fi
+
+ # LDAP SASL auth needs libxml and Kerberos
+-AF_CHECK_LIBXML()
+-AF_CHECK_KRB5()
++PKG_CHECK_MODULES(XML, [libxml-2.0],HAVE_LIBXML=1,HAVE_LIBXML=0)
++AC_SUBST([HAVE_LIBXML])
++XML_FLAGS=$XML_CFLAGS
++
++PKG_CHECK_MODULES(KRB5, [krb5],HAVE_KRB5=1,HAVE_KRB5=0)
++AC_SUBST([HAVE_KRB5])
++if test "x$HAVE_KRB5" = "x1"; then
++ SAVE_CFLAGS=$CFLAGS
++ SAVE_LIBS=$LIBS
++ CFLAGS="$CFLAGS $KRB5_FLAGS"
++ LIBS="$LIBS $KRB5_LIBS"
++
++ AC_CHECK_FUNCS([krb5_principal_get_realm])
++fi
+
+ AC_SEARCH_LIBS([versionsort],[])
+ if test "$ac_cv_search_versionsort" = "no"; then
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb
new file mode 100644
index 000000000..0f4c2478e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Kernel based automounter for linux"
+SECTION = "utils"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS += "libtirpc flex-native bison-native"
+
+inherit autotools-brokensep systemd
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
+ file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \
+ file://no-bash.patch \
+ file://cross.patch \
+ file://libtirpc.patch \
+ file://libtirpc-name-clash-backout.patch \
+ file://autofs-5.0.7-do-not-check-for-modprobe.patch \
+ file://fix_disable_ldap.patch \
+ file://autofs-5.0.7-fix-lib-deps.patch \
+ file://add-the-needed-stdarg.h.patch \
+ file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \
+ file://force-STRIP-to-emtpy.patch \
+ file://remove-bashism.patch \
+ file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
+"
+
+SRC_URI[md5sum] = "e143df66b614b8cdb1ff533735f8e12d"
+SRC_URI[sha256sum] = "795419383b120d15699ab3b89ea0f3d029f6fb28405a83982d305c4b7b61130f"
+
+inherit update-rc.d pkgconfig
+
+INITSCRIPT_NAME = "autofs"
+INITSCRIPT_PARAMS = "defaults"
+
+# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS
+CFLAGS += "${LDFLAGS}"
+
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd"
+
+PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+
+EXTRA_OEMAKE = "DONTSTRIP=1"
+EXTRA_OECONF += "--disable-mount-locking \
+ --enable-ignore-busy --with-openldap=no \
+ --with-sasl=no --with-libtirpc=yes \
+ --with-path=${STAGING_BINDIR_NATIVE} \
+"
+CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \
+ ac_cv_path_RPCGEN=rpcgen \
+"
+
+do_configure_prepend () {
+ sed -e "s:filagdir:flagdir:" -i configure.in
+ if [ ! -e acinclude.m4 ]; then
+ cp aclocal.m4 acinclude.m4
+ fi
+}
+
+do_install_append () {
+ if [ -d ${D}/run ]; then
+ rmdir ${D}/run
+ fi
+ if [ -d ${D}${localstatedir}/run ]; then
+ rmdir ${D}${localstatedir}/run
+ fi
+}
+
+INSANE_SKIP_${PN} = "dev-so"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "autofs.service"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
new file mode 100644
index 000000000..3fa8431c3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
@@ -0,0 +1,25 @@
+Fix hardcoded libdir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ plugins/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/plugins/Makefile.am b/plugins/Makefile.am
+index b00915f..25262a1 100644
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
+@@ -62,7 +62,7 @@ plugindir = @plugindir@
+
+ common_sources = plugin_common.c plugin_common.h
+
+-sasldir = $(prefix)/lib/sasl2
++sasldir = $(libdir)/sasl2
+ sasl_LTLIBRARIES = @SASL_MECHS@
+ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
+ libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch
new file mode 100644
index 000000000..6407721ae
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch
@@ -0,0 +1,46 @@
+Avoid to call AC_TRY_RUN
+
+Upstream-Status: Inappropriate [configuration]
+
+Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO
+on cross-compile environment by definition AC_ARG_ENABLE enable-spnego
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ cmulocal/sasl2.m4 | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4
+index 3c2841a..a5ecf81 100644
+--- a/cmulocal/sasl2.m4
++++ b/cmulocal/sasl2.m4
+@@ -281,6 +281,17 @@ if test "$gssapi" != no; then
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
++ AC_ARG_ENABLE([spnego],
++ [AC_HELP_STRING([--enable-spnego=<DIR>],
++ [enable SPNEGO support in GSSAPI libraries [no]])],
++ [spnego=$enableval],
++ [spnego=no])
++
++ if test "$spnego" = no; then
++ echo "no"
++ elif test "$spnego" = yes; then
++ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
++ else
+ AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
+ AC_TRY_RUN([
+ #ifdef HAVE_GSSAPI_H
+@@ -308,7 +319,7 @@ int main(void)
+ AC_MSG_RESULT(yes) ],
+ AC_MSG_RESULT(no))
+ LIBS="$cmu_save_LIBS"
+-
++ fi
+ else
+ AC_MSG_RESULT([disabled])
+ fi
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff
new file mode 100644
index 000000000..8eff5a8bd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff
@@ -0,0 +1,14 @@
+Author: Fabian Fagerholm <fabbe@debian.org>
+Description: Fix linking with libsasldb.a when saslauthd is built with sasldb
+support.
+--- a/saslauthd/configure.in
++++ b/saslauthd/configure.in
+@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then
+ AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
+ SASL_DB_PATH_CHECK()
+ SASL_DB_CHECK()
+- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
++ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
+ fi
+
+ AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff
new file mode 100644
index 000000000..2e5b1750d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff
@@ -0,0 +1,27 @@
+Author: Fabian Fagerholm <fabbe@debian.org>
+Description: This patch makes sure the non-PIC version of libsasldb.a, which
+is created out of non-PIC objects, is not going to overwrite the PIC version,
+which is created out of PIC objects. The PIC version is placed in .libs, and
+the non-PIC version in the current directory. This ensures that both non-PIC
+and PIC versions are available in the correct locations.
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -78,7 +78,7 @@ endif
+
+ libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
+ @echo adding static plugins and dependencies
+- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
++ $(AR) cru $@ $(SASL_STATIC_OBJS)
+ @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
+ if test ! -f $$i; then continue; fi; . $$i; \
+ for j in $$dependency_libs foo; do \
+--- a/sasldb/Makefile.am
++++ b/sasldb/Makefile.am
+@@ -63,6 +63,6 @@ libsasldb_a_SOURCES =
+ EXTRA_libsasldb_a_SOURCES =
+
+ libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
+- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
++ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC)
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch
new file mode 100644
index 000000000..ecbab845d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch
@@ -0,0 +1,31 @@
+From 92d72789c811b0d55f624a8bac5ccc4412f5996e Mon Sep 17 00:00:00 2001
+From: Ken Murchison <murch@andrew.cmu.edu>
+Date: Thu, 20 Dec 2012 18:14:50 -0500
+Subject: [PATCH] sasl.h: #include <stddef.h> for size_t on NetBSD
+
+This patch was imported from git://git.cyrusimap.org/cyrus-sasl
+commit 67a188693796a14e3a76ac603104807fbbfddfc4
+
+Upstream-Status: Backport
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ include/sasl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sasl.h b/include/sasl.h
+index fef4d51..8b8a63f 100755
+--- a/include/sasl.h
++++ b/include/sasl.h
+@@ -121,6 +121,8 @@
+ #ifndef SASL_H
+ #define SASL_H 1
+
++#include <stddef.h> /* For size_t */
++
+ /* Keep in sync with win32/common.mak */
+ #define SASL_VERSION_MAJOR 2
+ #define SASL_VERSION_MINOR 1
+--
+1.8.3.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
new file mode 100644
index 000000000..a91a9d334
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
@@ -0,0 +1,11 @@
+# Directory in which to place saslauthd's listening socket, pid file, and so
+# on. This directory must already exist.
+SOCKETDIR=@LOCALSTATEDIR@/run/saslauthd
+
+# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
+# of which mechanism your installation was compiled with the ablity to use.
+MECH=pam
+
+# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
+# for the list of accepted flags.
+FLAGS=
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
new file mode 100644
index 000000000..96dbae378
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=SASL authentication daemon.
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/run/saslauthd/saslauthd.pid
+EnvironmentFile=@SYSCONFDIR@/default/saslauthd
+ExecStart=@SBINDIR@/saslauthd -m $SOCKETDIR -a $MECH $FLAGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
new file mode 100644
index 000000000..5da3d965b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
@@ -0,0 +1,95 @@
+SUMMARY = "Generic client/server library for SASL authentication"
+SECTION = "libs"
+DEPENDS = "openssl virtual/db"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
+
+SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
+ file://avoid-to-call-AC_TRY_RUN.patch \
+ file://Fix-hardcoded-libdir.patch \
+ file://debian_patches_0009_sasldb_al.diff \
+ file://debian_patches_0014_avoid_pic_overwrite.diff \
+ file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \
+ file://saslauthd.service \
+ file://saslauthd.conf \
+ "
+
+inherit autotools-brokensep pkgconfig useradd systemd
+
+EXTRA_OECONF += "--with-dblib=berkeley \
+ --with-bdb-libdir=${STAGING_LIBDIR} \
+ --with-bdb-incdir=${STAGING_INCDIR} \
+ --with-bdb=db-5.3 \
+ --with-plugindir="${libdir}/sasl2" \
+ andrew_cv_runpath_switch=none"
+
+PACKAGECONFIG ??= "ntlm \
+ ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ "
+PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
+PACKAGECONFIG[des] = "--with-des,--without-des,,"
+PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
+PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,,"
+
+CFLAGS += "-fPIC"
+
+do_configure_prepend () {
+ rm -f acinclude.m4 config/libtool.m4
+
+ # make it be able to work with db 5.0 version
+ local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
+ for sed_file in $sed_files; do
+ sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file
+ done
+}
+
+do_compile_prepend () {
+ cd include
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} makemd5.c -o makemd5
+ touch makemd5.o makemd5.lo makemd5
+ cd ..
+}
+
+do_install_append() {
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system
+
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+ sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf
+
+ install -d ${D}${sysconfdir}/default/
+ install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd
+ sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd
+ fi
+}
+
+USERADD_PACKAGES = "${PN}-bin"
+USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "saslauthd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425"
+SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3"
+
+PACKAGES =+ "${PN}-bin"
+
+FILES_${PN} += "${libdir}/sasl2/*.so*"
+FILES_${PN}-bin += "${bindir} \
+ ${sysconfdir}/default/saslauthd \
+ ${systemd_unitdir}/system/saslauthd.service \
+ ${sysconfdir}/tmpfiles.d/saslauthd.conf"
+FILES_${PN}-dev += "${libdir}/sasl2/*.la"
+FILES_${PN}-dbg += "${libdir}/sasl2/.debug"
+FILES_${PN}-staticdev += "${libdir}/sasl2/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample
new file mode 100644
index 000000000..ec0584193
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample
@@ -0,0 +1,21 @@
+# options to dnrd
+
+# example: two default dns servers and dns servers for exampledomain.com. The
+# latter are load balanced (-b)
+#
+#
+
+# DNRD_OPTS="
+# -s XXX.XXX.XX.XXX
+# -s XXX.XXX.XX.XXX
+# -b
+# -s XXX.XXX.XX.XXX:exampledomain.com
+# -s XXX.XXX.XX.XXX:exampledomain.com"
+
+# example: dnrd user
+#
+
+# DNRD_USER="user"
+#
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init
new file mode 100644
index 000000000..2fe583fcf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# Startup script for dnrd
+#
+# Copyright 2008, Rakesh Pandit <rakesh.pandit@gmail.com>
+#
+# This source is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This source is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# chkconfig: - 85 15
+# description: dnrd is a proxying nameserver. It forwards DNS queries to the
+# appropriate nameserver, but can also act as the primary nameserver for
+# a subnet behind a firewall. It also has features such as caching DNS
+# requests, support for DNS servers, cache poisoning prevention, TCP
+# support, etc..
+
+# processname: dnrd
+# pidfile: /var/run/dnrd.pid
+# config: /etc/dnrd/dnrd.conf
+
+# Provides: dnrd
+# Required-Start:
+# Should-Start:
+# Required-Stop:
+# Default-Stop: 0 1 2 6
+# Short-Description: Start dnrd daemon
+# Description: Domain Name Relay Daemon
+# END INIT INFO
+
+exe=/usr/sbin/dnrd
+pfile=/etc/passwd
+
+# Source function library.
+. /etc/init.d/functions
+
+# Source conf file
+. /etc/dnrd/dnrd.conf
+
+[ -x $exe ] || exit 1
+[ -r "/etc/dnrd/dnrd.conf" ] || exit 1
+if [ $DNRD_USER ]
+then
+ grep "^${LOGIN}:" $pfile >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ echo "$DNRD_USER specified in /etc/dnrd/dnrd.conf does not exist!"
+ fi
+else
+ echo "DNRD_USER not set at /etc/dnrd/dnrd.conf!"
+ exit 1
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting dnrd: "
+ daemon dnrd $DNRD_OPTS -u $DNRD_USER
+ echo
+ touch /var/lock/subsys/dnrd
+ ;;
+ stop)
+ echo -n "Shutting down dnrd: "
+ killproc dnrd
+ echo
+ rm -f /var/lock/subsys/dnrd
+ rm -f /var/run/dnrd.pid
+ ;;
+ status)
+ status dnrd
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ reload)
+ echo -n "Reloading dnrd: "
+ killproc dnrd -HUP
+ echo
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|status}"
+ exit 1
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service
new file mode 100644
index 000000000..9c9fa6639
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Domain Name Relay Daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/dnrd.pid
+EnvironmentFile=/etc/dnrd/dnrd.conf
+ExecStart=/usr/sbin/dnrd $DNRD_OPTS -u $DNRD_USER
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
new file mode 100644
index 000000000..8769e5294
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
@@ -0,0 +1,41 @@
+SUMMARY = "A caching, forwarding DNS proxy server"
+DESCRIPTION = "\
+dnrd is a proxying nameserver. It forwards DNS queries to the appropriate \
+nameserver, but can also act as the primary nameserver for a subnet behind \
+a firewall. It also has features such as caching DNS requests, support for \
+DNS servers, cache poisoning prevention, TCP support, etc.."
+HOMEPAGE = "http://dnrd.sourceforge.net/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0be67017f1c770313ad7b40e18d568f1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://dnrd.service \
+ file://dnrd.conf.sample \
+ file://dnrd.init"
+SRC_URI[md5sum] = "41c9b070aae8ed403fc8c2aac7ab157c"
+SRC_URI[sha256sum] = "aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015"
+
+PNBLACKLIST[dnrd] ?= "BROKEN: dnrd-2.20.3-r0 do_package: QA Issue: dnrd: Files/directories were installed but not shipped in any package:"
+
+SYSTEMD_SERVICE_${PN} = "dnrd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+inherit autotools
+inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
+
+do_install() {
+ oe_runmake install DESTDIR=${D} INSTALL="install -p"
+
+ sed -i -e 's:/etc/rc.d/init.d/functions:/etc/init.d/functions:g' \
+ ${WORKDIR}/dnrd.init
+ install -d -m 0755 ${D}${sysconfdir}/init.d
+ install -d -m 0755 ${D}${sysconfdir}/dnrd
+ install -p -m 0644 ${WORKDIR}/dnrd.conf.sample ${D}${sysconfdir}/dnrd/dnrd.conf
+ install -p -m 0755 ${WORKDIR}/dnrd.init ${D}${sysconfdir}/init.d/dnrd
+
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d -m 0755 ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/dnrd.service ${D}${systemd_unitdir}/system
+ fi
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils
new file mode 100644
index 000000000..42fdd602f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d root root 0755 /var/lock/iscsi none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian
new file mode 100644
index 000000000..99a763861
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian
@@ -0,0 +1,119 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Starts and stops the iSCSI initiator services and logins to default targets
+### END INIT INFO
+#set -x
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/iscsid
+ADM=/usr/sbin/iscsiadm
+PIDFILE=/var/run/iscsid.pid
+
+[ -x "$DAEMON" ] || exit 0
+
+if [ ! -d /sys/class/ ]; then
+ echo "Failure:" "iSCSI requires a mounted sysfs, not started."
+ exit 1
+fi
+
+nodestartup_re='s/^node\.conn\[0]\.startup[ ]*=[ ]*//p'
+
+RETVAL=0
+
+start() {
+ echo "Starting iSCSI initiator service" "iscsid"
+ modprobe -q iscsi_tcp 2>/dev/null || :
+ modprobe -q ib_iser 2>/dev/null || :
+ if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
+ INITIATORNAME=$(iscsi-iname)
+ cat >/etc/iscsi/initiatorname.iscsi <<EOF
+## DO NOT EDIT OR REMOVE THIS FILE!
+## If you remove this file, the iSCSI daemon will not start.
+## If you change the InitiatorName, existing access control lists
+## may reject this initiator. The InitiatorName must be unique
+## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
+InitiatorName=$INITIATORNAME
+EOF
+ fi
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
+ RETVAL=$?
+ starttargets
+}
+
+starttargets() {
+ echo "Setting up iSCSI targets"
+ $ADM -m node --loginall=automatic
+}
+
+stoptargets() {
+ echo "Disconnecting iSCSI targets"
+ sync
+ $ADM -m node --logoutall=all
+ RETVAL=$?
+ #if RETVAL is 21, means no active sessions, consider ok
+ if [ "$RETVAL" = "21" ]; then
+ RETVAL=0
+ fi
+}
+
+stop() {
+ stoptargets
+ if [ $RETVAL -ne 0 ]; then
+ echo "Failure:" "Could not stop all targets, try again later"
+ return $RETVAL
+ fi
+
+ echo "Stopping iSCSI initiator service"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+ rm -f $PIDFILE
+ status=0
+ modprobe -r ib_iser 2>/dev/null
+ if [ "$?" -ne "0" -a "$?" -ne "1" ]; then
+ status=1
+ fi
+ modprobe -r iscsi_tcp 2>/dev/null
+ if [ "$?" -ne "0" -a "$?" -ne "1" ]; then
+ status=1
+ fi
+}
+
+restart() {
+ stop
+ if [ $RETVAL -ne 0 ]; then
+ echo "Failure:" "Stopping iSCSI initiator service failed, not starting"
+ return $RETVAL
+ fi
+ start
+}
+
+restarttargets() {
+ stoptargets
+ if [ $RETVAL -ne 0 ]; then
+ echo "Failure:" "Could not stop all targets, try again later"
+ return $RETVAL
+ fi
+ starttargets
+}
+
+status() {
+ #XXX FIXME: what to do here?
+ #status iscsid
+ # list active sessions
+ echo Current active iSCSI sessions:
+ $ADM -m session
+}
+
+case "$1" in
+ start|starttargets|stop|stoptargets|restart|restarttargets|status)
+ $1
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+exit $RETVAL
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator
new file mode 100644
index 000000000..7fa49a2d6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator
@@ -0,0 +1,4 @@
+# default command line settings for open-iscsi's iscsid
+
+OPTS_ISCSID=""
+OPTS_ISCSIADM=""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service
new file mode 100644
index 000000000..564b2d21d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Open-iSCSI initiator (i.e. client) target bindings
+After=iscsi-initiator.service
+Requires=iscsi-initiator.service
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/default/iscsi-initiator
+ExecStart=/usr/sbin/iscsiadm -m node --loginall=automatic $OPTS_ISCSIADM
+ExecStop=/usr/sbin/iscsiadm -m node --logoutall=all $OPTS_ISCSIADM
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch
new file mode 100644
index 000000000..ce48e2bb3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch
@@ -0,0 +1,21 @@
+iscsi-initiator-utils not to use static
+
+Upstream-status: Backport
+This patch is from fedora17.
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Vu Tran <vu.tran@windriver.com>
+
+diff --git a/usr/Makefile b/usr/Makefile
+index 673b7f1..fd14a10 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
+
+ iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
+ iscsistart.o statics.o
+- $(CC) $(CFLAGS) -static $^ -o $@
++ $(CC) $(CFLAGS) $^ -o $@
+ clean:
+ rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch
new file mode 100644
index 000000000..50227a774
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch
@@ -0,0 +1,240 @@
+iscsi-initiator-utils to use var for config
+
+Upstream-status: Backport
+This patch is from fedora.
+
+Use /var/lib/iscsi/ instead of /etc/iscsi/ for holding
+state files.
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Vu Tran <vu.tran@windriver.com>
+
+diff --git a/README b/README
+index 7364b2d..5e8bff8 100644
+--- a/README
++++ b/README
+@@ -164,10 +164,10 @@ available on all Linux installations.
+
+ The database contains two tables:
+
+-- Discovery table (/etc/iscsi/send_targets);
+-- Node table (/etc/iscsi/nodes).
++- Discovery table (/var/lib/iscsi/send_targets);
++- Node table (/var/lib/iscsi/nodes).
+
+-The regular place for iSCSI database files: /etc/iscsi/nodes
++The regular place for iSCSI database files: /var/lib/iscsi/nodes
+
+ The iscsiadm utility is a command-line tool to manage (update, delete,
+ insert, query) the persistent database.
+@@ -444,7 +444,7 @@ a scsi_host per HBA port).
+ To manage both types of initiator stacks, iscsiadm uses the interface (iface)
+ structure. For each HBA port or for software iscsi for each network
+ device (ethX) or NIC, that you wish to bind sessions to you must create
+-a iface config /etc/iscsi/ifaces.
++a iface config /var/lib/iscsi/ifaces.
+
+ Prep:
+
+@@ -478,29 +478,29 @@ Running:
+ iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
+ iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
+
+-Will report iface configurations that are setup in /etc/iscsi/ifaces.
++Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
+ The format is:
+
+ iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
+
+ For software iscsi, you can create the iface configs by hand, but it is
+ reccomended that you use iscsiadm's iface mode. There is a iface.example in
+-/etc/iscsi/ifaces which can be used as a template for the daring.
++/var/lib/iscsi/ifaces which can be used as a template for the daring.
+
+ For each network object you wish to bind a session to you must create
+-a seperate iface config in /etc/iscsi/ifaces and each iface config file
++a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
+ must have a unique name which is less than or equal to 64 characters.
+
+ Example:
+
+ If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
+ MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
+-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
++TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
+
+ iface.transport_name = tcp
+ iface.hwaddress = 00:0F:1F:92:6B:BF
+
+-and in /etc/iscsi/ifaces/iface1 you would enter:
++and in /var/lib/iscsi/ifaces/iface1 you would enter:
+
+ iface.transport_name = tcp
+ iface.hwaddress = 00:C0:DD:08:63:E7
+@@ -550,7 +550,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
+ qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty>
+
+
+-Will report iface configurations that are setup in /etc/iscsi/ifaces.
++Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
+ The format is:
+
+ iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
+@@ -636,7 +636,7 @@ need a seperate network connection to the target for discovery purposes.
+ *This will be fixed in the next version of open-iscsi*
+
+ For compatibility reasons, when you run iscsiadm to do discovery, it
+-will check for interfaces in /etc/iscsi/iscsi/ifaces that are using
++will check for interfaces in /var/lib/iscsi/iscsi/ifaces that are using
+ tcp for the iface.transport and it will bind the portals that are discovered
+ so that they will be logged in through those ifaces. This behavior can also
+ be overriden by passing in the interfaces you want to use. For the case
+@@ -654,7 +654,7 @@ we do not bind a session to a iface, then you can use the special iface
+
+ iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
+
+-And if you did not define any interfaces in /etc/iscsi/ifaces and do
++And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
+ not pass anything into iscsiadm, running iscsiadm will do the default
+ behavior, where we allow the network subsystem to decide which
+ device to use.
+@@ -696,7 +696,7 @@ To now log into targets it is the same as with sofware iscsi. See section
+
+ ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
+
+- This will search /etc/iscsi/send_targets for a record with the
++ This will search /var/lib/iscsi/send_targets for a record with the
+ ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it
+ will perform discovery using the settings stored in the record.
+ If a record does not exist, it will be created using the iscsid.conf
+@@ -705,7 +705,7 @@ To now log into targets it is the same as with sofware iscsi. See section
+ The argument to -p may also be a hostname instead of an address.
+ ./iscsiadm -m discoverydb -t st -p smoehost --discover
+
+- For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for
++ For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
+ interfaces using software iscsi. If any are found then nodes found
+ during discovery will be setup so that they can logged in through
+ those interfaces. To specify a specific iface, pass the
+@@ -761,7 +761,7 @@ To now log into targets it is the same as with sofware iscsi. See section
+ This command will perform discovery, but not manipulate the node DB.
+
+ - SendTargets iSCSI Discovery with a specific interface. If you
+- wish to only use a subset of the interfaces in /etc/iscsi/ifaces
++ wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
+ then you can pass them in during discovery:
+
+ ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
+@@ -1072,8 +1072,8 @@ where targetname is the name of the target and ip_address:port is the address
+ and port of the portal. tpgt, is the portal group tag of
+ the portal, and is not used in iscsiadm commands except for static
+ record creation. And iface name is the name of the iscsi interface
+-defined in /etc/iscsi/ifaces. If no interface was defined in
+-/etc/iscsi/ifaces or passed in, the default behavior is used.
++defined in /var/lib/iscsi/ifaces. If no interface was defined in
++/var/lib/iscsi/ifaces or passed in, the default behavior is used.
+ Default here is iscsi_tcp/tcp to be used over which ever NIC the
+ network layer decides is best.
+
+@@ -1188,7 +1188,7 @@ If set, iscsid will perform discovery to the address every
+ discovery.isns.discoveryd_poll_inval or
+ discovery.sendtargets.discoveryd_poll_inval seconds,
+ and it will log into any portals found from the discovery source using
+-the ifaces in /etc/iscsi/ifaces.
++the ifaces in /var/lib/iscsi/ifaces.
+
+ Note that for iSNS the poll_interval does not have to be set. If not set,
+ iscsid will only perform rediscovery when it gets a SCN from the server.
+diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
+index 7c209f6..e94cca0 100644
+--- a/doc/iscsiadm.8
++++ b/doc/iscsiadm.8
+@@ -89,7 +89,7 @@ This option is only valid for ping submode.
+ .TP
+ \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
+ The interface argument specifies the iSCSI interface to use for the operation.
+-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
++iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
+ iSCSI (qla4xxx) the iface config must have the hardware address
+ (iface.hwaddress = port's MAC address)
+ and the driver/transport_name (iface.transport_name). The iface's name is
+@@ -166,7 +166,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all
+ of their respective records are displayed; for \fIsession\fR, all active
+ sessions and connections are displayed; for \fIfw\fR, all boot firmware
+ values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
+-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
++for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
+
+ .TP
+ \fB\-n\fR, \fB\-\-name=\fIname\fR
+@@ -535,10 +535,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
+ The file containing the iSCSI InitiatorName and InitiatorAlias read by
+ \fBiscsid\fR and \fBiscsiadm\fR on startup.
+ .TP
+-/etc/iscsi/nodes/
++/var/lib/iscsi/nodes/
+ This directory contains the nodes with their targets.
+ .TP
+-/etc/iscsi/send_targets
++/var/lib/iscsi/send_targets
+ This directory contains the portals.
+
+ .SH "SEE ALSO"
+diff --git a/usr/idbm.c b/usr/idbm.c
+index 4d30aa9..316e54f 100644
+--- a/usr/idbm.c
++++ b/usr/idbm.c
+@@ -2468,9 +2468,9 @@ free_info:
+ int idbm_init(idbm_get_config_file_fn *fn)
+ {
+ /* make sure root db dir is there */
+- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
+- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
+- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
++ if (access(ISCSIVAR, F_OK) != 0) {
++ if (mkdir(ISCSIVAR, 0660) != 0) {
++ log_error("Could not make %s %d\n", ISCSIVAR,
+ errno);
+ return errno;
+ }
+diff --git a/usr/idbm.h b/usr/idbm.h
+index 245f046..f45e86e 100644
+--- a/usr/idbm.h
++++ b/usr/idbm.h
+@@ -28,12 +28,16 @@
+ #include "config.h"
+ #include "list.h"
+
+-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
+-#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
+-#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns"
+-#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static"
+-#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw"
+-#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets"
++#define ISCSIVAR "/var/lib/iscsi/"
++
++#define NODE_CONFIG_DIR ISCSIVAR"nodes"
++#define SLP_CONFIG_DIR ISCSIVAR"slp"
++#define ISNS_CONFIG_DIR ISCSIVAR"isns"
++#define STATIC_CONFIG_DIR ISCSIVAR"static"
++#define FW_CONFIG_DIR ISCSIVAR"fw"
++#define ST_CONFIG_DIR ISCSIVAR"send_targets"
++
++
+ #define ST_CONFIG_NAME "st_config"
+ #define ISNS_CONFIG_NAME "isns_config"
+
+diff --git a/usr/iface.h b/usr/iface.h
+index 01f7074..2c6ef72 100644
+--- a/usr/iface.h
++++ b/usr/iface.h
+@@ -20,7 +20,8 @@
+ #ifndef ISCSI_IFACE_H
+ #define ISCSI_IFACE_H
+
+-#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
++#include "idbm.h"
++#define IFACE_CONFIG_DIR ISCSIVAR"ifaces"
+
+ struct iface_rec;
+ struct list_head;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
new file mode 100644
index 000000000..b1397513b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Open-iSCSI initiator (i.e. client) service
+After=syslog.target
+
+[Service]
+EnvironmentFile=/etc/default/iscsi-initiator
+ExecStartPre=/sbin/modprobe iscsi_tcp
+ExecStart=/usr/sbin/iscsid -f $OPTS_ISCSID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
new file mode 100644
index 000000000..03f64594c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
@@ -0,0 +1,113 @@
+SUMMARY = "iSCSI daemon and utility programs"
+DESCRIPTION = "Open-iSCSI project is a high performance, transport \
+independent, multi-platform implementation of RFC3720. The iscsi package \
+provides the server daemon for the iSCSI protocol, as well as the utility \
+programs used to manage it. iSCSI is a protocol for distributed \
+disk access using SCSI commands sent over Internet Protocol networks."
+HOMEPAGE = "http://www.open-iscsi.org/"
+LICENSE = "GPLv2 & LGPLv2.1"
+SECTION = "net"
+DEPENDS = "openssl flex-native bison-native"
+
+LIC_FILES_CHKSUM = \
+ "file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
+ file://utils/open-isns/COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI = "http://www.open-iscsi.org/bits/open-iscsi-${PV}.tar.gz \
+ file://iscsi-initiator-utils-use-var-for-config.patch \
+ file://iscsi-initiator-utils-dont-use-static.patch \
+ file://initd.debian \
+ file://99_iscsi-initiator-utils \
+ file://iscsi-initiator \
+ file://iscsi-initiator.service \
+ file://iscsi-initiator-targets.service \
+"
+SRC_URI[md5sum] = "8b8316d7c9469149a6cc6234478347f7"
+SRC_URI[sha256sum] = "7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9"
+
+S = "${WORKDIR}/open-iscsi-${PV}"
+
+inherit update-rc.d systemd
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+do_configure () {
+ #need to support cross-compiling in open-isns only
+ (cd utils/open-isns; gnu-configize; \
+ ./configure --host=${TARGET_SYS} --build=${BUILD_SYS} --with-security=no )
+}
+
+do_compile () {
+ #make iscsistart one of PROGRAMS if install_user in do_install
+ #sed -i -e '/^PROGRAMS = /s;$; usr/iscsistart;' Makefile
+
+ #fix the ar used in open-isns
+ sed -i -e 's:ar cr :$(AR) cr :' ${S}/utils/open-isns/Makefile
+ oe_runmake user
+}
+
+do_install () {
+ #completely override the install_user as bugs in Makefile
+ #oe_runmake DESTDIR="${D}" install_user
+
+ #install necessary directories
+ install -d ${D}${sbindir} \
+ ${D}${sysconfdir}/init.d \
+ ${D}${sysconfdir}/iscsi \
+ ${D}${localstatedir}/lib/iscsi/nodes \
+ ${D}${localstatedir}/lib/iscsi/send_targets \
+ ${D}${localstatedir}/lib/iscsi/static \
+ ${D}${localstatedir}/lib/iscsi/isns \
+ ${D}${localstatedir}/lib/iscsi/slp \
+ ${D}${localstatedir}/lib/iscsi/ifaces \
+ ${D}/${mandir}/man8
+
+ install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \
+ ${S}/utils/iscsi-iname \
+ ${S}/usr/iscsistart ${D}/${sbindir}
+
+ install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8
+ install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi
+ install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid
+
+ sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/${BPN}/lock - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf
+ install -d ${D}/etc/default/
+ install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/iscsi-initiator.service \
+ ${WORKDIR}/iscsi-initiator-targets.service \
+ ${D}${systemd_unitdir}/system/
+ else
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles
+ fi
+}
+
+pkg_postinst_${PN}() {
+ #default there is no initiatorname.iscsi installed
+ #but it is needed or iscsid will fail
+
+ #will run only when postinst on target
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ if [ ! -f ${sysconfdir}/iscsi/initiatorname.iscsi ]; then
+ echo "InitiatorName=$(${sbindir}/iscsi-iname)" > \
+ ${sysconfdir}/iscsi/initiatorname.iscsi
+ fi
+
+ if [ -e /etc/init.d/populate-volatile.sh ]; then
+ /etc/init.d/populate-volatile.sh update
+ elif command -v systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
+ fi
+}
+
+SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service "
+INITSCRIPT_NAME = "iscsid"
+INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ."
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default
new file mode 100644
index 000000000..3acacfd90
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default
@@ -0,0 +1,2 @@
+# Uncomment to start SNMP subagent and enable CDP, SONMP and EDP protocol
+#DAEMON_ARGS="-x -c -s -e"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d
new file mode 100644
index 000000000..88bf95898
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d
@@ -0,0 +1,128 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: lldpd
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: LLDP daemon
+# Description: lldpd is a 802.1AB implementation, a L2 network
+# discovery protocol. It also supports CDP, EDP and
+# various other protocols.
+### END INIT INFO
+
+# Do NOT "set -e"
+
+log_daemon_msg() {
+ echo $*
+}
+
+log_end_msg() {
+ if [ $1 -eq 0 ]; then
+ success $*
+ else
+ failure $*
+ fi
+}
+
+log_failure_msg() {
+ echo $*
+}
+
+log_success_msg() {
+ echo $*
+}
+
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="LLDP daemon"
+NAME=lldpd
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CHROOT=/var/run/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# LSB log_* functions
+. /etc/init.d/functions
+
+do_start()
+{
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+}
+
+do_stop()
+{
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ status)
+ status_of_proc $DAEMON $NAME -p $PIDFILE && exit 0 || exit $?
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.2.bb
new file mode 100644
index 000000000..77ed09f54
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.2.bb
@@ -0,0 +1,65 @@
+SUMMARY = "A 802.1ab implementation (LLDP) to help you locate neighbors of all your equipments"
+SECTION = "net/misc"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
+
+DEPENDS = "libbsd libevent"
+
+SRC_URI = "\
+ http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \
+ file://lldpd.init.d \
+ file://lldpd.default \
+ "
+
+SRC_URI[md5sum] = "b809887bc927fb558fd5dd64b6c0a494"
+SRC_URI[sha256sum] = "6054f29d41faf32186a22331853a299c87f4419b4332df4a564f76a139305a32"
+
+inherit autotools update-rc.d useradd systemd pkgconfig bash-completion
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system -g lldpd --shell /bin/false lldpd"
+GROUPADD_PARAM_${PN} = "--system lldpd"
+
+EXTRA_OECONF += "--without-embedded-libevent \
+ --disable-oldies \
+ --with-privsep-user=lldpd \
+ --with-privsep-group=lldpd \
+ --with-systemdsystemunitdir=${systemd_system_unitdir} \
+ --without-sysusersdir \
+"
+
+PACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
+PACKAGECONFIG[json] = "--with-json,--without-json,jansson"
+PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxm2"
+PACKAGECONFIG[snmp] = "--with-snmp,--without-snmp,net-snmp"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+PACKAGECONFIG[seccomp] = "--with-seccomp,--without-seccomp,libseccomp"
+PACKAGECONFIG[cdp] = "--enable-cdp,--disable-cdp"
+PACKAGECONFIG[fdp] = "--enable-fdp,--disable-fdp"
+PACKAGECONFIG[edp] = "--enable-edp,--disable-edp"
+PACKAGECONFIG[sonmp] = "--enable-sonmp,--disable-sonmp"
+PACKAGECONFIG[lldpmed] = "--enable-lldpmed,--disable-lldpmed"
+PACKAGECONFIG[dot1] = "--enable-dot1,--disable-dot1"
+PACKAGECONFIG[dot3] = "--enable-dot3,--disable-dot3"
+PACKAGECONFIG[custom] = "--enable-custom,--disable-custom"
+
+INITSCRIPT_NAME = "lldpd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "lldpd.service"
+
+do_install_append() {
+ install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd
+ install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd
+ # Make an empty configuration file
+ touch ${D}${sysconfdir}/lldpd.conf
+}
+
+PACKAGES =+ "${PN}-zsh-completion"
+
+FILES_${PN} += "${libdir}/sysusers.d"
+RDEPENDS_${PN} += "os-release"
+
+FILES_${PN}-zsh-completion += "${datadir}/zsh/"
+# FIXME: zsh is broken in meta-oe so this cannot be enabled for now
+#RDEPENDS_${PN}-zsh-completion += "zsh"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch
new file mode 100644
index 000000000..aa590175c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch
@@ -0,0 +1,32 @@
+From 043e1a9ec83a59671ef8c4cad679dbf781e5ef98 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Sun, 29 Nov 2015 23:37:06 -0800
+Subject: [PATCH] configure: use BUILD_CC for ccdv
+
+ccdv is intended to be invoked from Makefiles only,
+it doesn't work for the cross compiling, so compile
+it with $BUILD_CC and corresponding CFLAGS.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 2f0fae0..a7e9112 100755
+--- a/configure
++++ b/configure
+@@ -11286,7 +11286,7 @@ panic:
+ } /* main */
+ /* eof ccdv.c */
+ EOF
+- ${CC-cc} $DEFS $CPPFLAGS $CFLAGS "ccdv.c" -o "ccdv" >/dev/null 2>&1
++ ${BUILD_CC} $DEFS ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} "ccdv.c" -o "ccdv" >/dev/null 2>&1
+ rm -f ccdv.c ccdv.o ccdv.c.gz.uu ccdv.c.gz
+ strip ./ccdv >/dev/null 2>&1
+ ./ccdv >/dev/null 2>&1
+--
+2.3.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb
new file mode 100644
index 000000000..893eacb99
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "A sophisticated console ftp client"
+HOMEPAGE = "http://ncftp.com/"
+SECTION = "net"
+LICENSE = "ClArtistic"
+LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9de76faeaedc4f908082e3f8142715f4"
+DEPENDS = "ncurses"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \
+"
+SRC_URI[md5sum] = "685e45f60ac11c89442c572c28af4228"
+SRC_URI[sha256sum] = "ac111b71112382853b2835c42ebe7bd59acb7f85dd00d44b2c19fbd074a436c4"
+
+inherit autotools-brokensep pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,,"
+
+do_configure() {
+ oe_runconf
+}
+do_install () {
+ install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir}
+ oe_runmake 'prefix=${D}${prefix}' 'BINDIR=${D}${bindir}' \
+ 'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \
+ install
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
new file mode 100644
index 000000000..624cd2d7b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
@@ -0,0 +1,43 @@
+From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Thu, 25 Jun 2015 11:44:27 +0900
+Subject: [PATCH] plmcd: error fix
+
+ld: cannot find -lsystemd-daemon
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ contrib/plmc/plmcd/Makefile.am | 2 +-
+ contrib/plmc/plmcd/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
+index 8d847f2..dd7913a 100644
+--- a/contrib/plmc/plmcd/Makefile.am
++++ b/contrib/plmc/plmcd/Makefile.am
+@@ -32,7 +32,7 @@ plmcd_SOURCES = \
+ plmcd_LDFLAGS = -lpthread
+
+ if ENABLE_SYSTEMD
+-plmcd_LDFLAGS += -lsystemd-daemon
++plmcd_LDFLAGS += -lsystemd
+ endif
+
+ plmcd_LDADD = \
+diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
+index 0185dc4..e40513a 100644
+--- a/contrib/plmc/plmcd/Makefile.in
++++ b/contrib/plmc/plmcd/Makefile.in
+@@ -106,7 +106,7 @@ build_triplet = @build@
+ host_triplet = @host@
+ target_triplet = @target@
+ sbin_PROGRAMS = plmcd$(EXEEXT)
+-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
++@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
+ subdir = plmcd
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch
new file mode 100644
index 000000000..016b64f2e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch
@@ -0,0 +1,11 @@
+--- opensaf-4.5.0.orig/Makefile.am 2014-12-31 14:45:54.088797989 +0800
++++ opensaf-4.5.0/Makefile.am 2014-12-31 14:45:08.328796688 +0800
+@@ -219,7 +219,7 @@ install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(pkgpiddir)
+ $(mkinstalldirs) $(DESTDIR)$(lockdir)
+ $(mkinstalldirs) $(DESTDIR)$(pkglocalstatedir)
+- cp -R samples/ $(DESTDIR)$(pkgdatadir)
++ cp -R $(srcdir)/samples/ $(DESTDIR)$(pkgdatadir)
+
+ install-data-hook:
+ @for i in $$(grep -lr -e 'xxLIBDIRxx' -e 'xxLOGDIRxx' -e 'xxCLCCLIDIRxx' $(DESTDIR)$(pkgimmxml_svcdir)/*.xml) ; do \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_4.7.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_4.7.0.bb
new file mode 100644
index 000000000..42e883a31
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_4.7.0.bb
@@ -0,0 +1,66 @@
+SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
+DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
+middleware consistent with Service Availability Forum (SA Forum) \
+specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
+established by leading Communications and Enterprise Computing Companies to \
+facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
+code base in commercial products. \
+The OpenSAF project was launched in mid 2007 and has been under development by \
+an informal group of supporters of the OpenSAF initiative. The OpenSAF \
+Foundation was founded on January 22nd 2008 with Emerson Network Power, \
+Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
+HOMEPAGE = "http://www.opensaf.org"
+
+inherit autotools useradd systemd pkgconfig
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
+ file://install-samples-from-srcdir.patch \
+ file://0001-plmcd-error-fix.patch \
+ "
+
+SRC_URI[md5sum] = "82dd2777a672140e22b8205f10aa55d3"
+SRC_URI[sha256sum] = "da9e138650b835728ad51d99268d3a31419b254c4cb4e87c6ec90bc45266d7d2"
+
+SECTION = "admin"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
+
+DEPENDS = "libxml2 python"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-f -r opensaf"
+USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
+
+SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
+
+do_configure_prepend () {
+ ( cd ${S}; autoreconf -f -i -s )
+}
+
+EXTRA_OECONF += " --libdir=${libdir}/opensaf "
+EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
+
+PKGLIBDIR="${libdir}/opensaf/opensaf"
+
+FILES_${PN} += "${localstatedir}/run"
+
+FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
+RDEPENDS_${PN} += "bash python"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+do_install_append() {
+ rm -fr "${D}${localstatedir}/lock"
+ rm -fr "${D}${localstatedir}/run"
+ rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
+ ${D}${systemd_unitdir}/system
+ install -m 0644 ${B}/contrib/plmc/config/*.service ${D}/${systemd_unitdir}/system
+
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb
new file mode 100755
index 000000000..855a64f70
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp
+
+make_aliasesdb() {
+ if [ "$(/usr/sbin/postconf -h alias_database)" = "hash:/etc/aliases" ]
+ then
+ # /etc/aliases.db may be used by other MTA, make sure nothing
+ # has touched it since our last newaliases call
+ [ /etc/aliases -nt /etc/aliases.db ] ||
+ [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] ||
+ [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return 0
+ /usr/bin/newaliases
+ touch -r /etc/aliases.db "$ALIASESDB_STAMP"
+ else
+ /usr/bin/newaliases
+ fi
+}
+
+make_aliasesdb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh
new file mode 100755
index 000000000..37a0dd088
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+HOSTNAME=$(/bin/hostname)
+
+if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ]; then
+ # If hostname is invalid, and myhostname not existed in main.cf
+ /usr/sbin/postconf -h "myhostname" 2>/dev/null
+ if [ $? -ne 0 ]; then
+ # Set "localhost" to main.cf
+ /usr/sbin/postconf -e "myhostname=localhost"
+ fi
+fi
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch
new file mode 100644
index 000000000..d023680f3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch
@@ -0,0 +1,93 @@
+From 190650e1cd5700cd6950ead3fcb17ebcec192a2e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 17:14:58 +0900
+Subject: [PATCH] Change fixed postconf to a variable for cross-compiling
+
+Upstreamstatus: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ postfix-install | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/postfix-install b/postfix-install
+index 1662c3d..d11fa12 100644
+--- a/postfix-install
++++ b/postfix-install
+@@ -226,8 +226,8 @@ test -z "$non_interactive" -a ! -t 0 && {
+ exit 1
+ }
+
+-test -x bin/postconf || {
+- echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2
++test -x "$POSTCONF" || {
++ echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2
+ exit 1
+ }
+
+@@ -248,7 +248,7 @@ do
+ case "$junk" in
+ *MAIL_VERSION*)
+ case "$mail_version" in
+- "") mail_version="`bin/postconf -dhx mail_version`" || exit 1
++ "") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
+ esac
+ val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1
+ case "$val" in
+@@ -434,7 +434,7 @@ template files main.cf.proto and master.cf.proto."
+
+ : ${install_root=/}
+ : ${tempdir=`pwd`}
+-: ${config_directory=`bin/postconf -c conf -h -d config_directory`}
++: ${config_directory=`$POSTCONF -c conf -h -d config_directory`}
+
+ # Find out the location of installed configuration files.
+
+@@ -500,7 +500,7 @@ test -f $CONFIG_DIRECTORY/main.cf && {
+ case "$junk" in
+ "") eval unset $name;;
+ esac
+- eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} ||
++ eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -hx $name\`} ||
+ exit 1
+ done
+ }
+@@ -513,7 +513,7 @@ do
+ case "$junk" in
+ "") eval unset $name;;
+ esac
+- eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1
++ eval : \${$name=\`$POSTCONF -c conf -d -hx $name\`} || exit 1
+ done
+
+ # Override settings manually.
+@@ -639,6 +639,8 @@ README_DIRECTORY=$install_root$readme_directory
+ SHLIB_DIRECTORY=$install_root$shlib_directory
+ META_DIRECTORY=$install_root$meta_directory
+
++test "x$POSTCONF" != "x" || POSTCONF="bin/postconf"
++
+ # Avoid repeated tests for existence of these; default permissions suffice.
+
+ test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
+@@ -810,7 +812,7 @@ IFS="$BACKUP_IFS"
+ # the wrong place when Postfix is being upgraded.
+
+ case "$mail_version" in
+-"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
++"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
+ esac
+
+ # Undo MAIL_VERSION expansion at the end of a parameter value. If
+@@ -830,7 +832,7 @@ do
+ esac
+ done
+
+-bin/postconf -c $CONFIG_DIRECTORY -e \
++"$POSTCONF" -c $CONFIG_DIRECTORY -e \
+ "daemon_directory = $daemon_directory" \
+ "data_directory = $data_directory" \
+ "command_directory = $command_directory" \
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient
new file mode 100644
index 000000000..6a8f2681b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient
@@ -0,0 +1 @@
+root@ permit_mynetworks,reject
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0 b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0
new file mode 100644
index 000000000..dc7feb57b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0
@@ -0,0 +1,102 @@
+# Configure your domain and accounts
+#mydomain=sample.com
+#FQDN from gethostname
+#myhostname =
+mydomain=localdomain
+mydestination = $myhostname, localhost.localdomain localhost
+mynetworks = 127.0.0.1/8
+inet_interfaces = 127.0.0.1
+
+virtual_mailbox_domains = sample.com, other.net
+virtual_mailbox_maps = hash:/etc/postfix/virtual
+virtual_alias_maps = hash:/etc/postfix/virtual_alias
+
+alias_maps = hash:/etc/aliases
+
+# You'll start with the following lines for maildir storage
+virtual_mailbox_base = /var/spool/vmail
+virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
+virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
+
+
+# You'll start with the following lines for IMAP storage
+#virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
+
+
+# General stuff here again
+#config_directory = /etc/postfix
+sample_directory = /etc/postfix
+queue_directory = /var/spool/postfix
+mail_spool_directory = /var/spool/mail
+readme_directory = no
+command_directory = /usr/sbin
+daemon_directory = @LIBEXECDIR@
+mail_owner = postfix
+setgid_group = postdrop
+unknown_local_recipient_reject_code = 450
+mynetworks_style = host
+debug_peer_level = 2
+sendmail_path = /usr/sbin/sendmail
+newaliases_path = /usr/bin/newaliases
+mailq_path = /usr/bin/mailq
+
+smtpd_data_restrictions =
+ permit_mynetworks,
+ reject_unauth_pipelining,
+ permit
+
+smtpd_client_restrictions =
+ permit_mynetworks,
+ # reject_unknown_client, # This can cause a lot of false rejects.
+ reject_invalid_hostname,
+ reject_rbl_client list.dsbl.org,
+ reject_rbl_client sbl.spamhaus.org,
+ reject_rbl_client cbl.abuseat.org,
+ reject_rbl_client dul.dnsbl.sorbs.net,
+ permit
+
+smtpd_helo_required = yes
+smtpd_helo_restrictions =
+ permit_mynetworks,
+ reject_unauth_pipelining,
+ # reject_non_fqdn_hostname, # This can cause a lot of false rejects.
+ # reject_unknown_hostname, # This can cause a lot of false rejects.
+ reject_invalid_hostname,
+ permit
+
+smtpd_sender_restrictions =
+ permit_mynetworks,
+ reject_non_fqdn_sender,
+ # check_sender_access hash:/etc/postfix/access_domains,
+ reject_unknown_sender_domain,
+ permit
+
+smtpd_recipient_restrictions =
+ permit_mynetworks,
+ permit_sasl_authenticated,
+ reject_unauth_destination,
+
+ # check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
+ # check_helo_access pcre:/etc/postfix/helo_checks.pcre,
+
+ # check_client_access hash:/etc/postfix/maps/access_client,
+ # check_client_access hash:/etc/postfix/maps/exceptions_client,
+ # check_helo_access hash:/etc/postfix/maps/access_helo,
+ # check_helo_access hash:/etc/postfix/maps/verify_helo,
+ # check_sender_access hash:/etc/postfix/maps/access_sender,
+ # check_sender_access hash:/etc/postfix/maps/verify_sender,
+ # check_recipient_access hash:/etc/postfix/maps/access_recipient,
+
+ # reject_multi_recipient_bounce,
+ reject_non_fqdn_recipient,
+ reject_unknown_recipient_domain,
+ # reject_unlisted_recipient,
+ #check_policy_service unix:private/policy,
+
+ # check_sender_access hash:/etc/postfix/maps/no_verify_sender,
+ # check_sender_access hash:/etc/postfix/access_domains,
+ # reject_unverified_sender,
+ # reject_unverified_recipient
+ check_recipient_access hash:/etc/postfix/internal_recipient
+
+disable_vrfy_command = yes
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch
new file mode 100644
index 000000000..98d5f7ed6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch
@@ -0,0 +1,116 @@
+From 4f49e2ce420fb3c17415937530493158ef312733 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 16:45:54 +0900
+Subject: [PATCH] 1)remove RANLIB, SYSLIBS, AR and get them from env.
+
+2)reference sysroot when searching header files
+3)include sysroot path instead of absolute include path
+for Linux2 and Linux3 systems.
+4)for non-native build, search STAGING_BASELIBDIR/LIBDIR
+ native build, search host library path for nsl and resolv library
+ which comes from libc
+
+Upstreamstatus: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ makedefs | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 8b84e47..893fb0d 100644
+--- a/makedefs
++++ b/makedefs
+@@ -170,9 +170,6 @@ echo "# pie=$pie"
+
+ # Defaults for most sane systems
+
+-RANLIB=ranlib
+-SYSLIBS=
+-AR=ar
+ ARFL=rv
+
+ # Ugly function to make our error message more visible among the
+@@ -424,12 +421,12 @@ case "$SYSTEM.$RELEASE" in
+ case "$CCARGS" in
+ *-DNO_DB*) ;;
+ *-DHAS_DB*) ;;
+- *) if [ -f /usr/include/db.h ]
++ *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
+ then
+ : we are all set
+- elif [ -f /usr/include/db/db.h ]
++ elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
+ then
+- CCARGS="$CCARGS -I/usr/include/db"
++ CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
+ else
+ # No, we're not going to try db1 db2 db3 etc.
+ # On a properly installed system, Postfix builds
+@@ -438,12 +435,12 @@ case "$SYSTEM.$RELEASE" in
+ echo "Install the appropriate db*-devel package first." 1>&2
+ exit 1
+ fi
+- SYSLIBS="-ldb"
++ SYSLIBS="$SYSLIBS -ldb"
+ ;;
+ esac
+ for name in nsl resolv $GDBM_LIBS
+ do
+- for lib in /usr/lib64 /lib64 /usr/lib /lib
++ for lib in $BUILD_SYSROOT_NSL_PATH
+ do
+ test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+ SYSLIBS="$SYSLIBS -l$name"
+@@ -463,7 +460,7 @@ case "$SYSTEM.$RELEASE" in
+ if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ]
+ then
+ :
+- elif [ ! -e /usr/include/sys/epoll.h ]
++ elif [ ! -e "$BUILD_SYSROOT"/usr/include/sys/epoll.h ]
+ then
+ echo CCARGS="$CCARGS -DNO_EPOLL"
+ else
+@@ -487,8 +484,6 @@ int main(int argc, char **argv)
+ }
+ EOF
+ ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+- ./makedefs.test 2>/dev/null ||
+- CCARGS="$CCARGS -DNO_EPOLL"
+ rm -f makedefs.test makedefs.test.[co]
+ fi;;
+ esac
+@@ -504,12 +499,12 @@ EOF
+ case "$CCARGS" in
+ *-DNO_DB*) ;;
+ *-DHAS_DB*) ;;
+- *) if [ -f /usr/include/db.h ]
++ *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
+ then
+ : we are all set
+- elif [ -f /usr/include/db/db.h ]
++ elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
+ then
+- CCARGS="$CCARGS -I/usr/include/db"
++ CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
+ else
+ # On a properly installed system, Postfix builds
+ # by including <db.h> and by linking with -ldb
+@@ -517,12 +512,12 @@ EOF
+ echo "Install the appropriate db*-devel package first." 1>&2
+ exit 1
+ fi
+- SYSLIBS="-ldb"
++ SYSLIBS="$SYSLIBS -ldb"
+ ;;
+ esac
+ for name in nsl resolv
+ do
+- for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
++ for lib in $BUILD_SYSROOT_NSL_PATH
+ do
+ test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+ SYSLIBS="$SYSLIBS -l$name"
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix
new file mode 100755
index 000000000..8c7a60175
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix
@@ -0,0 +1,94 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: postfix MTA
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: start and stop postfix
+# Description: Postfix is a Mail Transport Agent, which is the program
+# that moves mail from one machine to another.
+### END INIT INFO
+
+success() {
+ echo " Successful"
+ exit 0
+}
+
+fail() {
+ echo " Failed"
+ exit 1
+
+}
+
+check_return () {
+ local ret="$1"
+
+ if [ "$ret" = "0" ]; then
+ success
+ else
+ fail
+ fi
+}
+
+PIDFile=/var/spool/postfix/pid/master.pid
+case "$1" in
+
+ start)
+ echo -n "Starting Postfix..."
+ if [ ! -e /etc/aliases.db ]; then
+ # The alias database is necessary for postfix to work correctly.
+ echo "Creating aliases database ..."
+ newaliases
+ fi
+ if ! postfix status >/dev/null 2>&1; then
+ /usr/sbin/check_hostname.sh
+ postfix start
+ check_return $?
+ else
+ success
+ fi
+ ;;
+
+ stop)
+ echo -n "Stopping Postfix..."
+ if postfix status >/dev/null 2>&1; then
+ postfix stop
+ check_return $?
+ else
+ success
+ fi
+ ;;
+
+ reload)
+ echo -n "Reloading Postfix..."
+ if postfix status >/dev/null 2>&1; then
+ postfix reload
+ check_return $?
+ else
+ postfix start
+ check_return $?
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ status)
+ if postfix status >/dev/null 2>&1; then
+ pid=`sed -e 's/\s//g' $PIDFile`
+ echo "The Postfix mail system is running (PID: $pid)"
+ exit 0
+ else
+ echo "The Postfix mail system is not running"
+ exit 1
+ fi
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|status|reload|restart}"
+ exit 1
+ ;;
+esac
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
new file mode 100644
index 000000000..3a9a0a181
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Postfix Mail Transport Agent
+After=syslog.target network.target
+Conflicts=sendmail.service exim.service
+
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid
+ExecStartPre=-@SBINDIR@/check_hostname.sh
+ExecStartPre=-@LIBEXECDIR@/aliasesdb
+ExecStart=@SBINDIR@/postfix start
+ExecReload=@SBINDIR@/postfix reload
+ExecStop=@SBINDIR@/postfix stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
new file mode 100644
index 000000000..17dbf76ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -0,0 +1,251 @@
+SUMMARY = "Postfix Mail Transport Agent"
+DESCRIPTION = "Postfix is Wietse Venema's mail server that started life at \
+IBM research as an alternative to the widely-used Sendmail program. \
+Postfix attempts to be fast, easy to administer, and secure. The outsidei \
+has a definite Sendmail-ish flavor, but the inside is completely different."
+
+HOMEPAGE= "http://www.postfix.org"
+SECTION = "mail"
+DEPENDS = "virtual/db libpcre openssl postfix-native \
+ ${@base_contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
+"
+DEPENDS_class-native = "virtual/db-native openssl-native libpcre-native"
+
+LICENSE = "IPL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
+
+SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
+ file://makedefs.patch \
+ file://install.patch \
+ file://main.cf_2.0 \
+ file://postfix \
+ file://internal_recipient \
+ file://postfix.service \
+ file://aliasesdb \
+ file://check_hostname.sh \
+"
+
+S = "${WORKDIR}/postfix-${PV}"
+
+CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native"
+
+inherit update-rc.d useradd update-alternatives systemd
+
+INITSCRIPT_NAME = "postfix"
+INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ."
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = \
+"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \
+ -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \
+"
+GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail"
+
+export SYSLIBS = "${LDFLAGS}"
+
+# CCARGS specifies includes, defines
+# AUXLIBS specifies libraries
+# Linux2/Linux3 has HAS_DB defined
+# makedefs will make CC to be CC+CCARGS
+
+# ldap support
+export CCARGS-ldap = "\
+ ${@base_contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}"
+export AUXLIBS-ldap = "\
+ ${@base_contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}"
+
+# no native openldap
+export CCARGS-ldap_class-native = ""
+export AUXLIBS-ldap_class-native = ""
+
+# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
+# current openldap didn't enable SASL
+export CCARGS-sasl = "\
+ ${@base_contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I=/usr/include/sasl', '', d)}"
+export AUXLIBS-sasl = "\
+ ${@base_contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
+export CCARGS-sasl_class-native = ""
+export AUXLIBS-sasl_class-native = ""
+
+# PCRE, TLS support default
+export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
+export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
+export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
+
+# OPT,DEBUG is aready in CFLAGS
+# ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS
+EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
+
+do_compile () {
+ unset CFLAGS CPPFLAGS CXXFLAGS
+ local native_build
+
+ native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}"
+
+ # if not native build, then pass SYSTEM and RELEASE to makedefs
+ if [ "${native_build}" != "1" ]; then
+ # uname -s for target
+ SYSTEM="Linux"
+
+ # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6
+ RELEASE="2.6.34"
+ sed -i -e \
+ "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \
+ ${S}/Makefile.in
+ export BUILD_SYSROOT="${STAGING_DIR_HOST}"
+ export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \
+ ${STAGING_LIBDIR}"
+ else
+ # native build
+ export BUILD_SYSROOT="${STAGING_DIR_NATIVE}"
+
+ # ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32)
+ # on 64 bits, 32 libs in i386-linux-gnu
+ # let makedefs finds nsl and resolv libs, host CC will link
+ # the correct libraries
+ BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \
+ sed -n '/^libraries: =/s/libraries: =//p' | \
+ sed -e 's/:/\n/g' | xargs -n1 readlink -f | \
+ grep -v 'gcc\|/[0-9.]\+$' | sort -u)"
+ if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then
+ BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \
+ /lib/x86_64-linux-gnu \
+ /usr/lib /lib \
+ /lib/i386-linux-gnu"
+ fi
+ export BUILD_SYSROOT_NSL_PATH
+ fi
+
+ oe_runmake makefiles
+ oe_runmake
+}
+
+do_install_prepend_class-native() {
+ export POSTCONF="bin/postconf"
+}
+
+SYSTEMD_SERVICE_${PN} = "postfix.service"
+
+do_install () {
+ sh ./postfix-install 'install_root=${D}' \
+ 'config_directory=${sysconfdir}/postfix' \
+ 'daemon_directory=${libexecdir}' \
+ 'command_directory=${sbindir}' \
+ 'queue_directory=${localstatedir}/spool/postfix' \
+ 'sendmail_path=${sbindir}/sendmail.postfix' \
+ 'newaliases_path=${bindir}/newaliases' \
+ 'mailq_path=${bindir}/mailq' \
+ 'manpage_directory=${mandir}' \
+ 'readme_directory=${datadir}/doc/postfix' \
+ 'data_directory=${localstatedir}/lib/postfix' \
+ -non-interactive
+ rm -rf ${D}${localstatedir}/spool/postfix
+ mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
+ install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/
+ install -d ${D}${sysconfdir}/init.d
+ install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
+ sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf
+
+ install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/
+
+ install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
+ install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service
+ sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
+
+ install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}
+
+ install -m 770 -d ${D}${localstatedir}/spool/postfix
+ chown postfix:postfix ${D}${localstatedir}/spool/postfix
+
+ install -m 2755 -d ${D}${localstatedir}/spool/mail
+ chown postfix:nogroup ${D}${localstatedir}/spool/mail
+ install -m 0755 -d ${D}${localstatedir}/lib/postfix
+ chown postfix:nogroup ${D}${localstatedir}/lib/postfix
+ install -m 0755 -d ${D}${localstatedir}/spool/postfix
+ chown root:postfix ${D}${localstatedir}/spool/postfix
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/active
+ chown postfix:root ${D}${localstatedir}/spool/postfix/active
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce
+ chown postfix:root ${D}${localstatedir}/spool/postfix/bounce
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt
+ chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer
+ chown postfix:root ${D}${localstatedir}/spool/postfix/defer
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred
+ chown postfix:root ${D}${localstatedir}/spool/postfix/deferred
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush
+ chown postfix:root ${D}${localstatedir}/spool/postfix/flush
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold
+ chown postfix:root ${D}${localstatedir}/spool/postfix/hold
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming
+ chown postfix:root ${D}${localstatedir}/spool/postfix/incoming
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved
+ chown postfix:root ${D}${localstatedir}/spool/postfix/saved
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace
+ chown postfix:root ${D}${localstatedir}/spool/postfix/trace
+ install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop
+ chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop
+ install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid
+ chown root:root ${D}${localstatedir}/spool/postfix/pid
+ install -m 0700 -d ${D}${localstatedir}/spool/postfix/private
+ chown postfix:root ${D}${localstatedir}/spool/postfix/private
+ install -m 0710 -d ${D}${localstatedir}/spool/postfix/public
+ chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public
+ install -m 0755 -d ${D}${localstatedir}/spool/vmail
+ chown vmail:vmail ${D}${localstatedir}/spool/vmail
+
+ chown :postdrop ${D}${sbindir}/postqueue
+ chown :postdrop ${D}${sbindir}/postdrop
+ chmod g+s ${D}${sbindir}/postqueue
+ chmod g+s ${D}${sbindir}/postdrop
+}
+
+do_install_append_class-native() {
+ ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases
+ ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
+}
+
+do_install_append_class-target() {
+ # Remove references to buildmachine paths in target makedefs.out
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
+}
+
+NATIVE_INSTALL_WORKS = "1"
+
+ALTERNATIVE_${PN} = "sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_PRIORITY = "120"
+
+pkg_postinst_${PN} () {
+ if [ "x$D" = "x" ]; then
+ touch /etc/aliases
+ newaliases
+
+ # generate virtual_alias, default is hash
+ touch /etc/postfix/virtual_alias
+ postmap /etc/postfix/virtual_alias
+ else
+ touch $D/etc/aliases
+ newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
+ touch $D/etc/postfix/virtual_alias
+ postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
+
+ if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
+ # /usr/lib/sendmial is required by LSB core test
+ [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+ fi
+ fi
+}
+
+# Exclude .debug directories from the main package
+FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \
+ ${libexecdir}/* ${systemd_unitdir}/*"
+FILES_${PN}-dbg += "${libexecdir}/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.0.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.0.3.bb
new file mode 100644
index 000000000..7104a9d1c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.0.3.bb
@@ -0,0 +1,4 @@
+require postfix.inc
+
+SRC_URI[md5sum] = "61caffae689c11d09b4c972a394ae3b1"
+SRC_URI[sha256sum] = "401e46ec3450569dcce60d1d8ca22a19ab1f7f817b0cc730cdf4875ba608ac02"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2016-3125.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2016-3125.patch
new file mode 100644
index 000000000..69c9be031
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/CVE-2016-3125.patch
@@ -0,0 +1,247 @@
+From 7a8f683cedf9b0d1024a80362693c9f8b93a0f2b Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Thu, 10 Mar 2016 15:07:58 -0800
+Subject: [PATCH] Backport of fix for Bug#4230 to 1.3.5 branch.
+
+Upstream-Status: Backport
+CVE: CVE-2016-3125
+
+Author: TJ Saunders <tj@castaglia.org>
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ contrib/mod_tls.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 147 insertions(+), 20 deletions(-)
+
+diff --git a/contrib/mod_tls.c b/contrib/mod_tls.c
+index df92658..5883cc7 100644
+--- a/contrib/mod_tls.c
++++ b/contrib/mod_tls.c
+@@ -411,6 +411,13 @@ static int tls_required_on_ctrl = 0;
+ static int tls_required_on_data = 0;
+ static unsigned char *tls_authenticated = NULL;
+
++/* Define the minimum DH group length we allow (unless the AllowWeakDH
++ * TLSOption is used). Ideally this would be 2048, per https://weakdh.org,
++ * but for compatibility with older Java versions, which only support up to
++ * 1024, we'll use 1024. For now.
++ */
++#define TLS_DH_MIN_LEN 1024
++
+ /* mod_tls session flags */
+ #define TLS_SESS_ON_CTRL 0x0001
+ #define TLS_SESS_ON_DATA 0x0002
+@@ -438,6 +445,7 @@ static unsigned char *tls_authenticated = NULL;
+ #define TLS_OPT_USE_IMPLICIT_SSL 0x0200
+ #define TLS_OPT_ALLOW_CLIENT_RENEGOTIATIONS 0x0400
+ #define TLS_OPT_VERIFY_CERT_CN 0x0800
++#define TLS_OPT_ALLOW_WEAK_DH 0x1000
+
+ /* mod_tls SSCN modes */
+ #define TLS_SSCN_MODE_SERVER 0
+@@ -2417,24 +2425,139 @@ static int tls_ctrl_renegotiate_cb(CALLBACK_FRAME) {
+
+ static DH *tls_dh_cb(SSL *ssl, int is_export, int keylength) {
+ DH *dh = NULL;
++ EVP_PKEY *pkey;
++ int pkeylen = 0, use_pkeylen = FALSE;
++
++ /* OpenSSL will only ever call us (currently) with a keylen of 512 or 1024;
++ * see the SSL_EXPORT_PKEYLENGTH macro in ssl_locl.h. Sigh.
++ *
++ * Thus we adjust the DH parameter length according to the size of the
++ * RSA/DSA private key used for the current connection.
++ *
++ * NOTE: This MAY cause interoperability issues with some clients, notably
++ * Java 7 (and earlier) clients, since Java 7 and earlier supports
++ * Diffie-Hellman only up to 1024 bits. More sighs. To deal with these
++ * clients, then, you need to configure a certificate/key of 1024 bits.
++ */
++ pkey = SSL_get_privatekey(ssl);
++ if (pkey != NULL) {
++ if (EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA ||
++ EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
++ pkeylen = EVP_PKEY_bits(pkey);
++
++ if (pkeylen < TLS_DH_MIN_LEN) {
++ if (!(tls_opts & TLS_OPT_ALLOW_WEAK_DH)) {
++ pr_trace_msg(trace_channel, 11,
++ "certificate private key length %d less than %d bits, using %d "
++ "(see AllowWeakDH TLSOption)", pkeylen, TLS_DH_MIN_LEN,
++ TLS_DH_MIN_LEN);
++ pkeylen = TLS_DH_MIN_LEN;
++ }
++ }
++
++ if (pkeylen != keylen) {
++ pr_trace_msg(trace_channel, 13,
++ "adjusted DH parameter length from %d to %d bits", keylen, pkeylen);
++ use_pkeylen = TRUE;
++ }
++ }
++ }
+
+ if (tls_tmp_dhs != NULL &&
+ tls_tmp_dhs->nelts > 0) {
+ register unsigned int i;
+- DH **dhs;
++ DH *best_dh = NULL, **dhs;
++ int best_dhlen = 0;
+
+ dhs = tls_tmp_dhs->elts;
++
++ /* Search the configured list of DH parameters twice: once for any sizes
++ * matching the actual requested size (usually 1024), and once for any
++ * matching the certificate private key size (pkeylen).
++ *
++ * This behavior allows site admins to configure a TLSDHParamFile that
++ * contains 1024-bit parameters, for e.g. Java 7 (and earlier) clients.
++ */
++
++ /* Note: the keylen argument is in BITS, but DH_size() returns the number
++ * of BYTES.
++ */
+ for (i = 0; i < tls_tmp_dhs->nelts; i++) {
+- /* Note: the keylength argument is in BITS, but DH_size() returns
+- * the number of BYTES.
++ int dhlen;
++
++ dhlen = DH_size(dhs[i]) * 8;
++ if (dhlen == keylen) {
++ pr_trace_msg(trace_channel, 11,
++ "found matching DH parameter for key length %d", keylen);
++ return dhs[i];
++ }
++
++ /* Try to find the next "best" DH to use, where "best" means
++ * the smallest DH that is larger than the necessary keylen.
+ */
+- if (DH_size(dhs[i]) == (keylength / 8)) {
++ if (dhlen > keylen) {
++ if (best_dh != NULL) {
++ if (dhlen < best_dhlen) {
++ best_dh = dhs[i];
++ best_dhlen = dhlen;
++ }
++
++ } else {
++ best_dh = dhs[i];
++ best_dhlen = dhlen;
++ }
++ }
++ }
++
++ for (i = 0; i < tls_tmp_dhs->nelts; i++) {
++ int dhlen;
++
++ dhlen = DH_size(dhs[i]) * 8;
++ if (dhlen == pkeylen) {
++ pr_trace_msg(trace_channel, 11,
++ "found matching DH parameter for certificate private key length %d",
++ pkeylen);
+ return dhs[i];
+ }
++
++ if (dhlen > pkeylen) {
++ if (best_dh != NULL) {
++ if (dhlen < best_dhlen) {
++ best_dh = dhs[i];
++ best_dhlen = dhlen;
++ }
++
++ } else {
++ best_dh = dhs[i];
++ best_dhlen = dhlen;
++ }
++ }
++ }
++
++ if (best_dh != NULL) {
++ pr_trace_msg(trace_channel, 11,
++ "using best DH parameter for key length %d (length %d)", keylen,
++ best_dhlen);
++ return best_dh;
+ }
+ }
+
+- switch (keylength) {
++ /* Still no DH parameters found? Use the built-in ones. */
++
++ if (keylen < TLS_DH_MIN_LEN) {
++ if (!(tls_opts & TLS_OPT_ALLOW_WEAK_DH)) {
++ pr_trace_msg(trace_channel, 11,
++ "requested key length %d less than %d bits, using %d "
++ "(see AllowWeakDH TLSOption)", keylen, TLS_DH_MIN_LEN, TLS_DH_MIN_LEN);
++ keylen = TLS_DH_MIN_LEN;
++ }
++ }
++
++ if (use_pkeylen) {
++ keylen = pkeylen;
++ }
++
++ switch (keylen) {
+ case 512:
+ dh = get_dh512();
+ break;
+@@ -2443,32 +2566,33 @@ static DH *tls_dh_cb(SSL *ssl, int is_export, int keylength) {
+ dh = get_dh768();
+ break;
+
+- case 1024:
+- dh = get_dh1024();
+- break;
++ case 1024:
++ dh = get_dh1024();
++ break;
+
+- case 1536:
+- dh = get_dh1536();
+- break;
++ case 1536:
++ dh = get_dh1536();
++ break;
+
+- case 2048:
+- dh = get_dh2048();
+- break;
++ case 2048:
++ dh = get_dh2048();
++ break;
+
+- default:
+- tls_log("unsupported DH key length %d requested, returning 1024 bits",
+- keylength);
+- dh = get_dh1024();
+- break;
++ default:
++ tls_log("unsupported DH key length %d requested, returning 1024 bits",
++ keylen);
++ dh = get_dh1024();
++ break;
+ }
+
++ pr_trace_msg(trace_channel, 11, "using builtin DH for %d bits", keylen);
++
+ /* Add this DH to the list, so that it can be freed properly later. */
+ if (tls_tmp_dhs == NULL) {
+ tls_tmp_dhs = make_array(session.pool, 1, sizeof(DH *));
+ }
+
+ *((DH **) push_array(tls_tmp_dhs)) = dh;
+-
+ return dh;
+ }
+
+@@ -8445,6 +8569,9 @@ MODRET set_tlsoptions(cmd_rec *cmd) {
+ strcmp(cmd->argv[i], "AllowClientRenegotiations") == 0) {
+ opts |= TLS_OPT_ALLOW_CLIENT_RENEGOTIATIONS;
+
++ } else if (strcmp(cmd->argv[i], "AllowWeakDH") == 0) {
++ opts |= TLS_OPT_ALLOW_WEAK_DH;
++
+ } else if (strcmp(cmd->argv[i], "EnableDiags") == 0) {
+ opts |= TLS_OPT_ENABLE_DIAGS;
+
+--
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
new file mode 100644
index 000000000..4967bed1e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Inappropriate [configuration]
+
+proftpd tries to get the IP address from the hostname.
+Unluckily now the hostname is not properly configured in /etc/hosts.
+We can use this patch as a workaround.
+
+Author: Dexuan Cui <dexuan.cui@intel.com>
+Tue Oct 25 12:59:27 CST 2011
+
+--- proftpd-1.3.3c.orig/sample-configurations/basic.conf
++++ proftpd-1.3.3c/sample-configurations/basic.conf
+@@ -7,6 +7,9 @@
+ ServerType standalone
+ DefaultServer on
+
++#By default we bind to all interfaces.
++DefaultAddress 0.0.0.0
++
+ # Port 21 is the standard FTP port.
+ Port 21
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
new file mode 100644
index 000000000..19617a6bb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
@@ -0,0 +1,112 @@
+Upstream-Status: Inappropriate [configuration]
+
+combined the following patches into one:
+make, move-pidfile-to-var-run, move-runfile-to-var-run
+
+move pidfile to /var/run
+redefine PR_RUN_DIR as ${localstatedir}/run
+
+Signed-off-By: Armin Kuster <akuster808@gmail.com>
+
+
+Index: proftpd-1.3.5/Make.rules.in
+===================================================================
+--- proftpd-1.3.5.orig/Make.rules.in
++++ proftpd-1.3.5/Make.rules.in
+@@ -29,9 +29,9 @@ INSTALL=@INSTALL@
+ INSTALL_STRIP=@INSTALL_STRIP@
+ INSTALL_USER=@install_user@
+ INSTALL_GROUP=@install_group@
+-INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
+-INSTALL_SBIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
+-INSTALL_MAN=$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644
++INSTALL_BIN=$(INSTALL) -m 0755
++INSTALL_SBIN=$(INSTALL) -m 0755
++INSTALL_MAN=$(INSTALL) -m 0644
+
+ RM=rm -f
+ SHELL=@CONFIG_SHELL@
+Index: proftpd-1.3.5/Makefile.in
+===================================================================
+--- proftpd-1.3.5.orig/Makefile.in
++++ proftpd-1.3.5/Makefile.in
+@@ -105,7 +105,6 @@ check: proftpd$(EXEEXT)
+ $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
+ @if [ ! -d $@ ]; then \
+ mkdir -p $@; \
+- chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \
+ chmod 0755 $@; \
+ fi
+
+@@ -115,7 +114,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc
+ rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \
+ fi
+ ln -s proftpd $(DESTDIR)$(sbindir)/in.proftpd
+- -chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd
+
+ install-libs: $(DESTDIR)$(libdir)/proftpd
+ cd lib/ && $(MAKE) install
+@@ -152,11 +150,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE
+ $(INSTALL_SBIN) ftpshut $(DESTDIR)$(sbindir)/ftpshut
+ $(INSTALL_BIN) ftptop $(DESTDIR)$(bindir)/ftptop
+ $(INSTALL_BIN) ftpwho $(DESTDIR)$(bindir)/ftpwho
+- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
++ $(INSTALL) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
+
+ install-conf: $(DESTDIR)$(sysconfdir)
+ if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \
+- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 \
++ $(INSTALL) -m 0644 \
+ $(top_srcdir)/sample-configurations/basic.conf \
+ $(DESTDIR)$(sysconfdir)/proftpd.conf ; \
+ fi
+Index: proftpd-1.3.5/configure
+===================================================================
+--- proftpd-1.3.5.orig/configure
++++ proftpd-1.3.5/configure
+@@ -38255,7 +38255,7 @@ _ACEOF
+
+
+ cat >>confdefs.h <<_ACEOF
+-#define PR_RUN_DIR "`eval echo "${localstatedir}"`"
++#define PR_RUN_DIR "`eval echo "${localstatedir}"/run/`"
+ _ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+@@ -38263,7 +38263,7 @@ cat >>confdefs.h <<_ACEOF
+ _ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+-#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/proftpd.pid"`"
++#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/run/proftpd.pid"`"
+ _ACEOF
+
+
+Index: proftpd-1.3.5/configure.in
+===================================================================
+--- proftpd-1.3.5.orig/configure.in
++++ proftpd-1.3.5/configure.in
+@@ -2971,8 +2971,8 @@ locale_dir="`eval echo ${locale_dir}`"
+ AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`")
+
+ AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`")
+-AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`")
+-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`")
++AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/run/proftpd.conf"`")
++AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`")
+
+ prefix="$pr_saved_prefix"
+ exec_prefix="$pr_saved_exec_prefix"
+Index: proftpd-1.3.5/lib/libcap/Makefile
+===================================================================
+--- proftpd-1.3.5.orig/lib/libcap/Makefile
++++ proftpd-1.3.5/lib/libcap/Makefile
+@@ -26,7 +26,7 @@ OBJS=$(addsuffix .o, $(FILES))
+ all: $(LIBNAME)
+
+ _makenames: _makenames.c cap_names.sed
+- $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
++ $(BUILD_CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+
+ cap_names.h: _makenames
+ ./_makenames > cap_names.h
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
new file mode 100644
index 000000000..c64535cac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
@@ -0,0 +1,27 @@
+close RequireValidShell check
+
+Upstream-Status: Inappropriate [configuration]
+
+close RequireValidShell check since we like to make /bin/false as shell
+for ftp user
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ sample-configurations/basic.conf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sample-configurations/basic.conf b/sample-configurations/basic.conf
+index 314eb79..abcb284 100644
+--- a/sample-configurations/basic.conf
++++ b/sample-configurations/basic.conf
+@@ -53,6 +53,7 @@ AllowOverwrite on
+ # We want clients to be able to login with "anonymous" as well as "ftp"
+ UserAlias anonymous ftp
+
++ RequireValidShell off
+ # Limit the maximum number of anonymous logins
+ MaxClients 10
+
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch
new file mode 100644
index 000000000..7e2a8e3ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch
@@ -0,0 +1,42 @@
+The contrib directory now contains its own Makefile which is
+used during installation. It was required to pass DESTDIR through
+when it gets called from the base Makefile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
+---
+ Makefile.in | 2 +-
+ contrib/Makefile.in | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5b2e683..ee72fe1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -120,7 +120,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir)
+ test -z "$(SHARED_MODULE_OBJS)" -a -z "$(SHARED_MODULE_DIRS)" -a -z "$(STATIC_MODULE_DIRS)" || (cd modules/ && $(MAKE) install)
+
+ install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir)
+- cd contrib/ && $(MAKE) install-utils
++ cd contrib/ && $(MAKE) DESTDIR=${DESTDIR} install-utils
+ $(INSTALL_BIN) ftpcount $(DESTDIR)$(bindir)/ftpcount
+ $(INSTALL_BIN) ftpdctl $(DESTDIR)$(bindir)/ftpdctl
+ $(INSTALL_SBIN) ftpscrub $(DESTDIR)$(sbindir)/ftpscrub
+diff --git a/contrib/Makefile.in b/contrib/Makefile.in
+index 5bcc038..51d248c 100644
+--- a/contrib/Makefile.in
++++ b/contrib/Makefile.in
+@@ -18,6 +18,6 @@ Makefile: Makefile.in ../config.status
+ cd ../ && ./config.status
+
+ install-utils:
+- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
+- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
+- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
++ $(INSTALL) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
++ $(INSTALL) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
++ $(INSTALL) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default
new file mode 100644
index 000000000..b31f36ce2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default
@@ -0,0 +1,9 @@
+# Defaults for proftpd initscript
+
+# Master system-wide proftpd switch. The initscript
+# will not run if it is not set to yes.
+RUN="yes"
+
+# Default options.
+# For more exhaustive logging, try "-d 3".
+OPTIONS=""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
new file mode 100644
index 000000000..01c998c92
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
@@ -0,0 +1,220 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: proftpd
+# Required-Start: $remote_fs $syslog $local_fs $network
+# Required-Stop: $remote_fs $syslog $local_fs $network
+# Should-Start: $named
+# Should-Stop: $named
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts ProFTPD daemon
+# Description: This script runs the FTP service offered
+# by the ProFTPD daemon
+### END INIT INFO
+
+# Start the proftpd FTP daemon.
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/proftpd
+NAME=proftpd
+
+# Defaults
+RUN="no"
+OPTIONS=""
+CONFIG_FILE=/etc/proftpd.conf
+
+PIDFILE=`grep -i '^pidfile' $CONFIG_FILE|awk '{ print $2 }'`
+if [ "x$PIDFILE" = "x" ];
+then
+ PIDFILE=/var/run/proftpd.pid
+fi
+
+# Read config (will override defaults)
+[ -r /etc/default/proftpd ] && . /etc/default/proftpd
+
+trap "" 1
+trap "" 15
+
+test -f $DAEMON || exit 0
+
+. /etc/init.d/functions
+
+#
+# Servertype could be inetd|standalone|none.
+# In all cases check against inetd and xinetd support.
+#
+if ! egrep -qi "^[[:space:]]*ServerType.*standalone" $CONFIG_FILE
+then
+ if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.conf 2>/dev/null || \
+ egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.d/* 2>/dev/null || \
+ egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
+ then
+ RUN="no"
+ INETD="yes"
+ else
+ if ! egrep -qi "^[[:space:]]*ServerType.*inetd" $CONFIG_FILE
+ then
+ RUN="yes"
+ INETD="no"
+ else
+ RUN="no"
+ INETD="no"
+ fi
+ fi
+fi
+
+# /var/run could be on a tmpfs
+
+[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
+
+inetd_check()
+{
+ if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd ]; then
+ echo "Neither inetd nor xinetd appears installed: check your configuration."
+ fi
+}
+
+start()
+{
+ set -e
+ echo -n "Starting ftp server $NAME... "
+ start-stop-daemon --start --quiet --pidfile "$PIDFILE" --oknodo --exec $DAEMON -- -c $CONFIG_FILE $OPTIONS
+ echo "done."
+}
+
+signal()
+{
+
+ if [ "$1" = "stop" ]; then
+ SIGNAL="TERM"
+ echo -n "Stopping ftp server $NAME... "
+ else
+ if [ "$1" = "reload" ]; then
+ SIGNAL="HUP"
+ echo -n "Reloading ftp server $NAME... "
+ else
+ echo "ERR: wrong parameter given to signal()"
+ exit 1
+ fi
+ fi
+ if [ -f "$PIDFILE" ]; then
+ start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
+ if [ $? = 0 ]; then
+ echo "done."
+ return
+ else
+ SIGNAL="KILL"
+ start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
+ if [ $? != 0 ]; then
+ echo
+ [ $2 != 0 ] || exit 0
+ else
+ echo "done."
+ return
+ fi
+ fi
+ if [ "$SIGNAL" = "KILL" ]; then
+ rm -f "$PIDFILE"
+ fi
+ else
+ echo "done."
+ return
+ fi
+}
+
+case "$1" in
+ start)
+ if [ "x$RUN" = "xyes" ] ; then
+ start
+ else
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "ProFTPD is started from inetd/xinetd."
+ inetd_check
+ else
+ echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+ fi
+ fi
+ ;;
+
+ force-start)
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "Warning: ProFTPD is started from inetd/xinetd (trying to start anyway)."
+ inetd_check
+ fi
+ start
+ ;;
+
+ stop)
+ if [ "x$RUN" = "xyes" ] ; then
+ signal stop 0
+ else
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "ProFTPD is started from inetd/xinetd."
+ inetd_check
+ else
+ echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+ fi
+ fi
+ ;;
+
+ force-stop)
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "Warning: ProFTPD is started from inetd/xinetd (trying to kill anyway)."
+ inetd_check
+ fi
+ signal stop 0
+ ;;
+
+ reload)
+ signal reload 0
+ ;;
+
+ force-reload|restart)
+ if [ "x$RUN" = "xyes" ] ; then
+ signal stop 1
+ sleep 2
+ start
+ else
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "ProFTPD is started from inetd/xinetd."
+ inetd_check
+ else
+ echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+ fi
+ fi
+ ;;
+
+ status)
+ if [ "x$INETD" = "xyes" ] ; then
+ echo "ProFTPD is started from inetd/xinetd."
+ inetd_check
+ exit 0
+ else
+ if [ -f "$PIDFILE" ]; then
+ pid=$(cat $PIDFILE)
+ else
+ pid="x"
+ fi
+ if [ `pidof proftpd|grep "$pid"|wc -l` -ne 0 ] ; then
+ echo "ProFTPD is started in standalone mode, currently running."
+ exit 0
+ else
+ echo "ProFTPD is started in standalone mode, currently not running."
+ exit 3
+ fi
+ fi
+ ;;
+
+ check-config)
+ $DAEMON -t >/dev/null && echo "ProFTPD configuration OK" && exit 0
+ exit 1
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload|check-config}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service
new file mode 100644
index 000000000..ba97f8e1c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=proftpd Daemon
+
+[Service]
+Type=forking
+ExecStart=-@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf
+StandardError=syslog
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb
new file mode 100644
index 000000000..57d4984bd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Secure and configurable FTP server"
+SECTION = "net"
+HOMEPAGE = "http://www.proftpd.org"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
+
+SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
+ file://basic.conf.patch \
+ file://proftpd-basic.init \
+ file://default \
+ file://close-RequireValidShell-check.patch \
+ file://contrib.patch \
+ file://build_fixup.patch \
+ file://proftpd.service \
+ file://CVE-2016-3125.patch \
+ "
+
+SRC_URI[md5sum] = "b9d3092411478415b31d435f8e26d173"
+SRC_URI[sha256sum] = "a1f48df8539c414ec56e0cea63dcf4b8e16e606c05f10156f030a4a67fae5696"
+
+inherit autotools-brokensep useradd update-rc.d systemd
+
+PACKAGECONFIG ??= "sia shadow"
+PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+
+PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
+PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
+PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
+PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
+PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
+
+# enable POSIX.1e capabilities
+PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
+
+#enable support for POSIX ACLs
+PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
+
+#enable proftpd controls via ftpdct
+PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
+
+#prevent proftpd from using its bundled getopt implementation.
+PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
+
+#do not strip debugging symbols from installed code
+PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
+
+#enable SIA authentication support (Tru64)
+PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
+PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
+
+#enable Native Language Support (NLS)
+PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
+
+#add mod_dso to core modules
+PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
+PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
+
+#omit mod_auth_file from core modules
+PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
+
+
+# proftpd uses libltdl which currently makes configuring using
+# autotools.bbclass a pain...
+do_configure () {
+ oe_runconf
+ cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool
+}
+
+FTPUSER = "ftp"
+FTPGROUP = "ftp"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install
+ rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
+ [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
+ sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
+ sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
+
+ # create the pub directory
+ mkdir -p ${D}/home/${FTPUSER}/pub/
+ chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
+
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
+ sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -i ${D}${systemd_unitdir}/system/*.service
+}
+
+INITSCRIPT_NAME = "proftpd"
+INITSCRIPT_PARAM = "defaults 85 15"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "proftpd.service"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
+USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
+ --shell /bin/false ${FTPUSER}"
+
+FILES_${PN} += "/home/${FTPUSER}"
+
+RDEPENDS_${PN} += "perl"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch
new file mode 100644
index 000000000..e4578dda7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch
@@ -0,0 +1,35 @@
+From 4c850b92a1cf8cfa19677c66bcde2edfab1a4490 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 24 Feb 2015 23:02:14 -0500
+Subject: [PATCH] ptpd: use pkgconfig
+
+Yocto uses pkg-config for libpcap, rather than pcap-config, so use that
+instead as the source for libs and cflags.
+
+Upstream-status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dc9541f..288f547 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -112,10 +112,10 @@ case "$try_pcap" in
+ yes)
+ case "$PATH_PCAP_CONFIG" in
+ /*)
+- PCAP_LIBS=`$PATH_PCAP_CONFIG --libs`
++ PCAP_LIBS=`$PATH_PCAP_CONFIG --libs libpcap`
+ AC_SUBST([PCAP_LIBS])
+ # Separate CPPFLAGS and CFLAGS
+- foo=`$PATH_PCAP_CONFIG --cflags`
++ foo=`$PATH_PCAP_CONFIG --cflags libpcap`
+ PCAP_CPPFLAGS=
+ PCAP_CFLAGS=
+ for i in $foo; do
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf
new file mode 100644
index 000000000..ddd571036
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf
@@ -0,0 +1,7 @@
+#
+# PTPD Configuration
+#
+# See man ptpd2 for arguments.
+#
+# Example arguments
+PTPDARGS="-d 1 -i eth0"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service
new file mode 100644
index 000000000..f84799eb5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ptpd time precision daemon
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/ptpd
+ExecStart=@BINDIR@/ptpd2 $PTPDARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb
new file mode 100644
index 000000000..f6aaee0eb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb
@@ -0,0 +1,58 @@
+SUMMARY = "The PTP daemon (PTPd)"
+DESCRIPTION = "The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as \
+defined by the relevant IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, \
+and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise \
+time coordination of LAN connected computers."
+HOMEPAGE = "http://sourceforge.net/projects/ptpd"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d"
+
+DEPENDS = "libpcap"
+
+inherit autotools systemd
+
+# return something like '1.2.3' or '1.2.3/rc1'
+#
+def get_sub(d):
+ parts = d.getVar('PV',True).split('-')
+ try:
+ return parts[0] + '/' + parts[1]
+ except:
+ return parts[0]
+
+SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \
+ file://ptpd-use-pkgconfig.patch \
+ file://ptpd.service \
+ file://ptpd.conf \
+"
+
+SRC_URI[md5sum] = "253bab7ab51d969616ea811be1f132f3"
+SRC_URI[sha256sum] = "0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93"
+
+S = "${WORKDIR}/ptpd-${PV}"
+
+EXTRA_OEMAKE = ""
+
+EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config"
+
+do_install() {
+ install -d ${D}${bindir} ${D}${mandir}/man8
+ install -m 0755 ${B}/src/ptpd2 ${D}${bindir}
+ install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system
+
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service
+ sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service
+
+ install -d ${D}${sysconfdir}/default/
+ install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd
+ fi
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "ptpd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch
new file mode 100644
index 000000000..76523fb99
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch
@@ -0,0 +1,39 @@
+From 1bafadf2502334a3e972ff667061469316d0d2ca Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Tue, 4 Aug 2015 02:46:39 +0200
+Subject: [PATCH] Remove hardcoded /usr/local includes from configure.ac
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+---
+ configure.ac | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6c78e8c..851d45d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,18 +100,6 @@ AC_ARG_VAR(PYTHON,local path to the python interpreter)
+ python_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/python/bin:/opt/python/usr/bin:/opt/python/usr/local/bin"
+ AC_PATH_PROG(PYTHON,python,/usr/bin/env python,$python_possible_path)
+
+-if test -d /usr/local/include; then
+- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+-fi
+-
+-if test -d /usr/kerberos/include; then
+- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
+-fi
+-
+-if test -d /usr/local/lib; then
+- LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-fi
+-
+ CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
+
+ dnl Checks for header files
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch
new file mode 100644
index 000000000..4cb33bc5c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch
@@ -0,0 +1,31 @@
+From 0290bd6f4ceddff2c52dff833c9d31d24de7d0e1 Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Tue, 4 Aug 2015 03:07:01 +0200
+Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is specified
+
+We especially don't want stripping enabled.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+---
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 851d45d..dc410a1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -423,8 +423,6 @@ AC_ARG_WITH(minimal,
+ AC_DEFINE(NO_FTP_USERS)
+ AC_DEFINE(WITHOUT_ASCII)
+ AC_DEFINE(BORING_MODE)
+- CFLAGS="$CFLAGS -Os -fomit-frame-pointer -fno-unroll-loops "
+- LDFLAGS="$LDFLAGS -s "
+ fi ])
+
+ AC_ARG_WITH(paranoidmsg,
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb
new file mode 100644
index 000000000..c1f150405
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb
@@ -0,0 +1,22 @@
+SUMMARY = "FTP Server with a strong focus on software security"
+DESCRIPTION = "Pure-FTPd is a free (BSD license), secure, production-quality and standard-conformant FTP server."
+HOMEPAGE = "http://www.pureftpd.org/project/pure-ftpd"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90352fb2bfe17f4261687a0d6e09f489"
+
+DEPENDS = "libcap"
+
+
+SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \
+ file://0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch \
+ file://nostrip.patch \
+"
+SRC_URI[md5sum] = "4195af8f0e5ee2a798b1014071dae3a3"
+SRC_URI[sha256sum] = "7be73a8e58b190a7054d2ae00c5e650cb9e091980420082d02ec3c3b68d8e7f9"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-minimal"
+PACKAGECONFIG[libsodium] ="ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=yes, \
+ ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default
new file mode 100644
index 000000000..7cb73c771
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default
@@ -0,0 +1 @@
+OPTIONS="-u radvd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init
new file mode 100755
index 000000000..8b26317ee
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init
@@ -0,0 +1,135 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides: radvd
+# Required-Start: $remote_fs $named $syslog
+# Required-Stop: $remote_fs $named $syslog
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Description: router advertisement daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/radvd
+NAME=radvd
+DESC=radvd
+CONFIG=/etc/radvd.conf
+SAVED_SETTINGS=/var/run/radvd/saved-settings
+PIDFILE=/var/run/radvd/radvd.pid
+OPTIONS="-u radvd -p $PIDFILE"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+# Check for IPv6 support in kernel
+if test \! -e /proc/sys/net/ipv6; then
+ echo "IPv6 support must be enabled in the kernel for $DESC to work."
+ exit
+fi
+
+save_settings()
+{
+ local file=$1
+
+ rm -f $file
+ for if_conf in /proc/sys/net/ipv6/conf/*; do
+ echo -e "$if_conf/forwarding\t `cat $if_conf/forwarding`" >> $file
+ done
+ return 0
+}
+
+restore_settings()
+{
+ file=$1
+
+ if [ ! -f $file ]; then
+ echo "$0: warning: cannot restore settings"
+ return
+ fi
+
+ (
+ while read f value; do
+ if [ -w $f ]; then
+ echo $value > $f
+ fi
+ done
+ ) < $file
+}
+
+chkconfig() {
+ if [ ! -e $CONFIG -o ! -s $CONFIG ]; then
+ echo ""
+ echo "* $CONFIG does not exist or is empty."
+ echo "* See /usr/share/doc/radvd/radvd.conf.example for a simple"
+ echo "* configuration suitable for most systems, and radvd.conf(5)"
+ echo "* for configuration file syntax. radvd will *not* be started."
+ exit 0
+ fi
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ chkconfig
+ save_settings $SAVED_SETTINGS
+
+ # We must enable IPv6 forwarding for radvd to work
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+
+ # Check for stale pidfile; radvd won't start if one is lying around
+ if [ -f $PIDFILE ] && ! ps `cat $PIDFILE` > /dev/null; then
+ rm -f $PIDFILE
+ fi
+ if ! start-stop-daemon --oknodo --start --pidfile $PIDFILE \
+ --exec $DAEMON -- $OPTIONS; then
+ echo "failed." && exit 1
+ fi
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ if ! [ -f $PIDFILE ] ; then
+ echo "not running."
+ exit 0
+ fi
+ start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
+ --exec $DAEMON
+ restore_settings $SAVED_SETTINGS
+ rm -f $SAVED_SETTINGS
+ echo "$NAME."
+ ;;
+ status)
+ status $DAEMON;
+ exit $?
+ ;;
+ reload|force-reload)
+ echo "Reloading $DESC configuration files."
+ start-stop-daemon --stop --signal HUP --quiet --pidfile \
+ $PIDFILE --exec $DAEMON
+ ;;
+ restart)
+ chkconfig
+ echo -n "Restarting $DESC: "
+ if ! start-stop-daemon --stop --quiet --pidfile \
+ $PIDFILE --exec $DAEMON; then
+ # stop failed, so we were not running
+ save_settings $SAVED_SETTINGS
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ fi
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile \
+ $PIDFILE --exec $DAEMON -- $OPTIONS
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|status|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service
new file mode 100644
index 000000000..e60798a6b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Router advertisement daemon for IPv6
+After=network.target
+ConditionPathExists=@SYSCONFDIR@/radvd.conf
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/default/radvd
+ExecStart=@SBINDIR@/radvd -n $OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
new file mode 100644
index 000000000..89256a40e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radvd root 0755 /var/run/radvd none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
new file mode 100644
index 000000000..47e4736b7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
@@ -0,0 +1,67 @@
+SUMMARY = "IPv6 router advertisement daemon"
+DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \
+listens to router solicitations and sends router \
+advertisements as described in RFC 2461, Neighbor \
+Discovery for IP Version 6 (IPv6). With these \
+advertisements hosts can automatically configure their \
+addresses and some other parameters. They also can \
+choose a default router based on these advertisements."
+HOMEPAGE = "http://www.litech.org/radvd/"
+SECTION = "net"
+DEPENDS = "flex-native libdaemon"
+
+# License is BSD-Style (with advertising clause) but also has an additional 0th clause
+LICENSE = "radvd"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
+
+SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
+ file://radvd.init \
+ file://radvd.service \
+ file://volatiles.03_radvd \
+ file://radvd.default"
+
+inherit autotools update-rc.d useradd pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "radvd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+ install -m 0755 -d ${D}${sysconfdir}/init.d \
+ ${D}${sysconfdir}/default/volatiles \
+ ${D}${docdir}/radvd
+ # Install init script and volatiles
+ install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd
+
+ install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd
+
+ # Install systemd service files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \
+ -e 's#@SBINDIR@#${sbindir}#g' \
+ -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service
+
+ # Install default environment file
+ install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd
+
+ # Documentation
+ for i in radvd.conf.example README; do \
+ install -m 0644 ${S}/$i ${D}${docdir}/radvd; \
+ done
+}
+
+INITSCRIPT_NAME = "radvd"
+INITSCRIPT_PARAMS = "defaults 20 80"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd"
+
+pkg_postinst_${PN} () {
+ if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.11.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.11.bb
new file mode 100644
index 000000000..c0b7532ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.11.bb
@@ -0,0 +1,5 @@
+
+require radvd.inc
+
+SRC_URI[md5sum] = "57fc6021f6a5e5472e455937685472a3"
+SRC_URI[sha256sum] = "80ad60b15689e9591a5af393a57a1d93304deeff2e46482f0fd98046c00622f8"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch
new file mode 100644
index 000000000..5f845bb4c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch
@@ -0,0 +1,31 @@
+From faa212a4e0aaf442ff58fca50770a8fadc1038e3 Mon Sep 17 00:00:00 2001
+Message-Id: <faa212a4e0aaf442ff58fca50770a8fadc1038e3.1382041123.git.Jim.Somerville@windriver.com>
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Thu, 17 Oct 2013 16:17:48 -0400
+Subject: [PATCH 1/1] Add default entry for cross compile
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+---
+ acinclude/krb5.m4 | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4
+index 5d9ac36..7a072a2 100644
+--- a/acinclude/krb5.m4
++++ b/acinclude/krb5.m4
+@@ -82,7 +82,11 @@ main(void)
+
+ return 0;
+ }
+-]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ])
++]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ],
++[
++ dnl Can't test in cross compiled env - so assume good
++ squid_cv_broken_heimdal_krb5_h=no
++])
+ ],
+ [
+ dnl Can't test in cross compiled env - so assume good
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2016-3947.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2016-3947.patch
new file mode 100644
index 000000000..c83e6ab51
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/CVE-2016-3947.patch
@@ -0,0 +1,48 @@
+From 0fe108ecb2bbdf684f159950eaa55d22f07c4008 Mon Sep 17 00:00:00 2001
+From: Catalin Enache <catalin.enache@windriver.com>
+Date: Wed, 20 Apr 2016 15:17:18 +0300
+Subject: [PATCH] pinger: Fix buffer overflow in Icmp6::Recv
+
+Upstream-Status: Backport
+CVE: CVE-2016-3947
+
+Author: Yuriy M. Kaminskiy <yumkam@gmail.com>
+Committer: Amos Jeffries <squid3@treenet.co.nz
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ src/icmp/Icmp6.cc | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/icmp/Icmp6.cc b/src/icmp/Icmp6.cc
+index 794a51a..ee84b80 100644
+--- a/src/icmp/Icmp6.cc
++++ b/src/icmp/Icmp6.cc
+@@ -256,7 +256,7 @@ Icmp6::Recv(void)
+ #define ip6_hops // HOPS!!! (can it be true??)
+
+ ip = (struct ip6_hdr *) pkt;
+- pkt += sizeof(ip6_hdr);
++ NP: echo size needs to +sizeof(ip6_hdr);
+
+ debugs(42, DBG_CRITICAL, HERE << "ip6_nxt=" << ip->ip6_nxt <<
+ ", ip6_plen=" << ip->ip6_plen <<
+@@ -267,7 +267,6 @@ Icmp6::Recv(void)
+ */
+
+ icmp6header = (struct icmp6_hdr *) pkt;
+- pkt += sizeof(icmp6_hdr);
+
+ if (icmp6header->icmp6_type != ICMP6_ECHO_REPLY) {
+
+@@ -292,7 +291,7 @@ Icmp6::Recv(void)
+ return;
+ }
+
+- echo = (icmpEchoData *) pkt;
++ echo = (icmpEchoData *) (pkt + sizeof(icmp6_hdr));
+
+ preply.opcode = echo->opcode;
+
+--
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
new file mode 100644
index 000000000..2304c5f1d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
@@ -0,0 +1,43 @@
+From 0d5b337ff5ef7dd48f970f08bd95d6327917cfd1 Mon Sep 17 00:00:00 2001
+Message-Id: <0d5b337ff5ef7dd48f970f08bd95d6327917cfd1.1382375807.git.Jim.Somerville@windriver.com>
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Mon, 21 Oct 2013 12:50:44 -0400
+Subject: [PATCH 1/1] Fix flawed dynamic -ldb link test in configure
+
+The test uses dbopen, but just ignores the fact
+that this function may not exist in the db version
+used. This leads to the dynamic link test failing
+and the configure script just making assumptions
+about why and setting the need for -ldb incorrectly.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+---
+ configure.ac | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 962a748..42e6a93 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3051,8 +3051,16 @@ AC_CHECK_DECL(dbopen,,,[
+ #include <db.h>
+ #endif])
+
+-dnl 1.85
+-SQUID_CHECK_DBOPEN_NEEDS_LIBDB
++if test "x$ac_cv_have_decl_dbopen" = "xyes"; then
++ dnl 1.85
++ SQUID_CHECK_DBOPEN_NEEDS_LIBDB
++else
++ # dbopen isn't there. So instead of running a compile/link test that
++ # uses it and is thus guaranteed to fail, we just assume that we will
++ # need to link in the db library, rather than fabricate some other
++ # dynamic compile/link test.
++ ac_cv_dbopen_libdb="yes"
++fi
+ if test "x$ac_cv_dbopen_libdb" = "xyes"; then
+ LIB_DB="-ldb"
+ fi
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
new file mode 100644
index 000000000..4ca27444a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
@@ -0,0 +1,29 @@
+From 17e5a28667f667859c48bee25e575a072d39ee1b Mon Sep 17 00:00:00 2001
+Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com>
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Wed, 16 Oct 2013 16:41:03 -0400
+Subject: [PATCH 1/1] Set up for cross compilation
+
+Set the host compiler to BUILD_CXX so
+proper cross compilation can occur.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+---
+ configure.ac | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c2d3033..dda9ed9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,6 +19,7 @@ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_0x.m4])
+ m4_include([acinclude/ax_cxx_0x_types.m4])
+
++HOSTCXX="$BUILD_CXX"
+ PRESET_CFLAGS="$CFLAGS"
+ PRESET_CXXFLAGS="$CXXFLAGS"
+ PRESET_LDFLAGS="$LDFLAGS"
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
new file mode 100644
index 000000000..7b6dcc820
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
@@ -0,0 +1,64 @@
+Subject: [PATCH] Skip AC_RUN_IFELSE tests
+
+Upstream-Status: Inappropriate [cross compiling specific]
+
+Such tests are not supported in a cross compile
+environment. Choose sane defaults.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ acinclude/krb5.m4 | 10 +++++++++-
+ acinclude/lib-checks.m4 | 8 ++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4
+index 946bea8..7a072a2 100644
+--- a/acinclude/krb5.m4
++++ b/acinclude/krb5.m4
+@@ -82,7 +82,15 @@ main(void)
+
+ return 0;
+ }
+-]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ])
++]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ],
++[
++ dnl Can't test in cross compiled env - so assume good
++ squid_cv_broken_heimdal_krb5_h=no
++])
++ ],
++ [
++ dnl Can't test in cross compiled env - so assume good
++ squid_cv_broken_heimdal_krb5_h=no
+ ])
+ ])
+ ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H
+diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4
+index 2bf98ee..50dba9b 100644
+--- a/acinclude/lib-checks.m4
++++ b/acinclude/lib-checks.m4
+@@ -128,7 +128,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[
+ AC_DEFINE(SQUID_SSLGETCERTIFICATE_BUGGY, 1)
+ AC_MSG_RESULT([yes])
+ ],
+- [])
++ [
++ AC_MSG_RESULT([skipped - can't test in cross-compiled env])
++ ])
+
+ AC_MSG_CHECKING(whether the workaround for SSL_get_certificate works)
+ AC_RUN_IFELSE([
+@@ -154,7 +156,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[
+ [
+ AC_MSG_RESULT([no])
+ ],
+-[])
++[
++ AC_MSG_RESULT([skipped - can't test in cross-compiled env])
++])
+
+ SQUID_STATE_ROLLBACK(check_SSL_get_certificate)
+ ])
+--
+1.7.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest
new file mode 100644
index 000000000..de79a293c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+#
+make -C test-suite -k runtest-TESTS
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 000000000..9e2ceab88
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,31 @@
+From 2192fdbc90b0ff2d5408e8763df200620870deea Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 13 Oct 2014 01:32:37 -0700
+Subject: [PATCH] squid: use serial-tests config needed by ptest
+
+ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+
+Upstream-Status: Inappropriate [default automake behavior incompatible with ptest]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6f7171f..ab9b93e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,7 +3,7 @@ AC_PREREQ(2.61)
+ AC_CONFIG_HEADERS([include/autoconf.h])
+ AC_CONFIG_AUX_DIR(cfgaux)
+ AC_CONFIG_SRCDIR([src/main.cc])
+-AM_INIT_AUTOMAKE([tar-ustar nostdinc])
++AM_INIT_AUTOMAKE([tar-ustar nostdinc serial-tests])
+ AC_REVISION($Revision$)dnl
+ AC_PREFIX_DEFAULT(/usr/local/squid)
+ AM_MAINTAINER_MODE
+--
+1.7.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid
new file mode 100644
index 000000000..b96865d73
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d squid squid 0755 /var/run/squid none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.7.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.7.bb
new file mode 100644
index 000000000..e35aad7cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.7.bb
@@ -0,0 +1,79 @@
+SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux"
+DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \
+Squid offers a rich access control, authorization and logging environment to \
+develop web proxy and content serving applications. \
+Squid offers a rich set of traffic optimization options, most of which are \
+enabled by default for simpler installation and high performance. \
+"
+HOMEPAGE = "http://www.squid-cache.org"
+SECTION = "web"
+LICENSE = "GPLv2+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \
+ file://Set-up-for-cross-compilation.patch \
+ file://Skip-AC_RUN_IFELSE-tests.patch \
+ file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \
+ file://squid-use-serial-tests-config-needed-by-ptest.patch \
+ file://run-ptest \
+ file://volatiles.03_squid \
+ file://CVE-2016-3947.patch \
+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \
+ file://errors/COPYRIGHT;md5=0fed8f1462f6fdbc62bb431bcb618f46 \
+ "
+SRC_URI[md5sum] = "06e43abc67aedcc3903a2780de20a3ed"
+SRC_URI[sha256sum] = "b7dcec8c5cb7f5687aff4256a7522f670c310a350cc9e9c0f29f3fd9cf88d017"
+
+DEPENDS = "libtool krb5 openldap db cyrus-sasl"
+
+inherit autotools useradd ptest
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid"
+
+PACKAGECONFIG ??= "${@base_contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \
+ ${@base_contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \
+ "
+PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
+PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,,"
+
+BASIC_AUTH = "DB SASL LDAP NIS"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+BASIC_AUTH += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}"
+
+EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}'"
+export BUILDCXXFLAGS="${BUILD_CXXFLAGS}"
+
+TESTDIR = "test-suite"
+do_compile_ptest() {
+ oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+ cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
+ cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
+
+ # do NOT need to rebuild Makefile itself
+ sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/volatiles.03_squid
+ rmdir "${D}${localstatedir}/run/${BPN}"
+ rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run"
+}
+
+FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
+FILES_${PN}-dbg += "/usr/src/debug"
+FILES_${PN}-doc += "${datadir}/*.txt"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-ptest += "make"
+
+# http://errors.yoctoproject.org/Errors/Details/35128/
+PNBLACKLIST[squid] ?= "BROKEN: sysroots/qemuarm/usr/include/linux/in.h:28:16: error: redeclaration of 'IPPROTO_IP'"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch
new file mode 100644
index 000000000..d01c20d38
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch
@@ -0,0 +1,81 @@
+From bd5773947af5ca80ca546ad5625818fc912bdd60 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Thu, 22 Aug 2013 08:56:09 +0800
+Subject: [PATCH] tftp-hpa: add error check for disk filled up
+
+Upstream-status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html]
+
+Add error check when the write-buffer is finally flushed to the file,
+the caller can detect if the disk filled up (or had an i/o error) and
+return a NOSAPCE nak to the other side.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ common/tftpsubs.c | 8 +++++---
+ tftpd/tftpd.c | 12 ++++++++++--
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index 8c999f6..b4d4ffe 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -206,20 +206,22 @@ int write_behind(FILE * file, int convert)
+
+ p = buf;
+ ct = count;
++ count = 0;
+ while (ct--) { /* loop over the buffer */
+ c = *p++; /* pick up a character */
+ if (prevchar == '\r') { /* if prev char was cr */
+ if (c == '\n') /* if have cr,lf then just */
+- fseek(file, -1, 1); /* smash lf on top of the cr */
++ count = count - 1;
+ else if (c == '\0') /* if have cr,nul then */
+ goto skipit; /* just skip over the putc */
+ /* else just fall through and allow it */
+ }
+- putc(c, file);
++ buf[count] = c;
++ count ++;
+ skipit:
+ prevchar = c;
+ }
+- return count;
++ return write(fileno(file), buf, count);
+ }
+
+ /* When an error has occurred, it is possible that the two sides
+diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
+index 1873e70..c2adbda 100644
+--- a/tftpd/tftpd.c
++++ b/tftpd/tftpd.c
+@@ -1681,7 +1681,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac
+ syslog(LOG_WARNING, "tftpd: write(ack): %m");
+ goto abort;
+ }
+- write_behind(file, pf->f_convert);
++ if(write_behind(file, pf->f_convert) < 0) {
++ nak(ENOSPACE, NULL);
++ (void)fclose(file);
++ goto abort;
++ }
+ for (;;) {
+ n = recv_time(peer, dp, PKTSIZE, 0, &r_timeout);
+ if (n < 0) { /* really? */
+@@ -1712,7 +1716,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac
+ goto abort;
+ }
+ } while (size == segsize);
+- write_behind(file, pf->f_convert);
++ if(write_behind(file, pf->f_convert) < 0) {
++ nak(ENOSPACE, NULL);
++ (void)fclose(file);
++ goto abort;
++ }
+ (void)fclose(file); /* close data file */
+
+ ap->th_opcode = htons((u_short) ACK); /* send the "final" ack */
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default
new file mode 100644
index 000000000..1dce7fdfe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default
@@ -0,0 +1,3 @@
+#Defaults for tftpd-hpa
+RUN_DAEMON="yes"
+OPTIONS="-l -s /var/lib/tftpboot"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch
new file mode 100644
index 000000000..452aa05f8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch
@@ -0,0 +1,39 @@
+[PATCH] fix the empty file writting
+
+Upstream-Status: pending
+
+With the feature that checking the disk filled up, the return
+value of function write_behind was checked and used to detect
+the disk status. While for empty file, without data being
+written, this function will return -1 thus the disk filled up
+error was miss-raised.
+
+make write_behind to return 0 if written file is empty, to fix
+the this bug.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ common/tftpsubs.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index b4ea3f2..9f6cafc 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -198,9 +198,12 @@ int write_behind(FILE * file, int convert)
+ nextone = !nextone; /* incr for next time */
+ buf = dp->th_data;
+
+- if (count <= 0)
++ if (count < 0)
+ return -1; /* nak logic? */
+
++ if (count == 0)
++ return 0;
++
+ if (convert == 0)
+ return write(fileno(file), buf, count);
+
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init
new file mode 100644
index 000000000..9e1843635
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init
@@ -0,0 +1,105 @@
+#! /bin/sh
+#
+# Author: Jaakko Niemi <liiwi@iki.fi>
+# Modified from skeleton file in sarge
+
+### BEGIN INIT INFO
+# Provides: tftp-hpa
+# Required-Start: $local_fs $remote_fs $syslog $network
+# Required-Stop: $local_fs $remote_fs $syslog $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: HPA's tftp client
+# Description: tftp server to allow booting clients which support
+# the PXE protocol.
+### END INIT INFO
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="HPA's tftpd"
+NAME=in.tftpd-hpa
+SCRIPTNAME=/etc/init.d/tftpd-hpa
+
+# Read config file if it is present.
+if [ -r /etc/default/tftpd-hpa ]
+then
+ . /etc/default/tftpd-hpa
+fi
+
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+if [ "$RUN_DAEMON" != "yes" ] ; then
+ echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
+ exit 0
+fi
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --name $NAME
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+ start-stop-daemon --stop --quiet --name $NAME --signal 1
+}
+
+case "$1" in
+ start)
+ echo "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this an "exit 0".
+ #
+ # echo -n "Reloading $DESC configuration..."
+ # d_reload
+ # echo "done."
+ #;;
+ 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".
+ #
+ echo "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
new file mode 100644
index 000000000..3f690609a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
@@ -0,0 +1,25 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c
+--- tftp-hpa-0.49/tftpd/remap.c.zero 2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/remap.c 2008-11-25 11:41:09.000000000 -0500
+@@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f)
+ int lineno = 0;
+ int err = 0;
+
++ memset(this_rule, '\0', sizeof(struct rule));
+ while (lineno++, fgets(line, MAXLINE, f)) {
+ rv = parseline(line, this_rule, lineno);
+ if (rv < 0)
+@@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f)
+ *last_rule = this_rule;
+ last_rule = &this_rule->next;
+ this_rule = tfmalloc(sizeof(struct rule));
++ memset(this_rule, '\0', sizeof(struct rule));
+ }
+ }
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
new file mode 100644
index 000000000..98a86b78b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
@@ -0,0 +1,60 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.48/tftp-xinetd.tftpboot tftp-hpa-0.48/tftp-xinetd
+--- tftp-hpa-0.48/tftp-xinetd.tftpboot 2007-01-31 00:51:05.000000000 +0100
++++ tftp-hpa-0.48/tftp-xinetd 2008-05-20 12:05:53.000000000 +0200
+@@ -10,7 +10,7 @@ service tftp
+ wait = yes
+ user = root
+ server = /usr/sbin/in.tftpd
+- server_args = -s /tftpboot
++ server_args = -s /var/lib/tftpboot
+ disable = yes
+ per_source = 11
+ cps = 100 2
+diff -up tftp-hpa-0.48/README.security.tftpboot tftp-hpa-0.48/README.security
+--- tftp-hpa-0.48/README.security.tftpboot 2008-05-29 17:36:32.000000000 +0200
++++ tftp-hpa-0.48/README.security 2008-05-29 17:37:21.000000000 +0200
+@@ -17,10 +17,10 @@ probably the following:
+
+ 1. Create a separate "tftpd" user and group only used for tftpd;
+ 2. Have all your boot files in a single directory tree (usually called
+- /tftpboot).
+-3. Specify "-p -u tftpd -s /tftpboot" on the tftpd command line; if
++ /var/lib/tftpboot).
++3. Specify "-p -u tftpd -s /var/lib/tftpboot" on the tftpd command line; if
+ you want clients to be able to create files use
+- "-p -c -U 002 -u tftpd -s /tftpboot" (replace 002 with whatever
++ "-p -c -U 002 -u tftpd -s /var/lib/tftpboot" (replace 002 with whatever
+ umask is appropriate for your setup.)
+
+ =======================================
+@@ -40,12 +40,12 @@ directly. Thus, if your /etc/inetd.conf
+ line):
+
+ tftp dgram udp wait root /usr/sbin/tcpd
+-/usr/sbin/in.tftpd -s /tftpboot -r blksize
++/usr/sbin/in.tftpd -s /var/lib/tftpboot -r blksize
+
+ ... it's better to change to ...
+
+ tftp dgram udp wait root /usr/sbin/in.tftpd
+-in.tftpd -s /tftpboot -r blksize
++in.tftpd -s /var/lib/tftpboot -r blksize
+
+ You should make sure that you are using "wait" option in tftpd; you
+ also need to have tftpd spawned as root in order for chroot (-s) to
+diff -up tftp-hpa-0.48/tftpd/sample.rules.tftpboot tftp-hpa-0.48/tftpd/sample.rules
+--- tftp-hpa-0.48/tftpd/sample.rules.tftpboot 2008-05-29 17:38:46.000000000 +0200
++++ tftp-hpa-0.48/tftpd/sample.rules 2008-05-29 17:38:05.000000000 +0200
+@@ -30,5 +30,5 @@ rg \\ / # Convert backslashes to slash
+ rg \# @ # Convert hash marks to @ signs
+ rg /../ /..no../ # Convert /../ to /..no../
+ e ^ok/ # These are always ok
+-r ^[^/] /tftpboot/\0 # Convert non-absolute files
++r ^[^/] /var/lib/tftpboot/\0 # Convert non-absolute files
+ a \.pvt$ # Reject requests for private files
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
new file mode 100644
index 000000000..7ae1a8722
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
@@ -0,0 +1,21 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes 2009-01-15 15:28:50.000000000 +0100
++++ tftp-hpa-0.49/tftpd/tftpd.c 2009-01-15 15:31:36.000000000 +0100
+@@ -932,7 +932,10 @@ int main(int argc, char **argv)
+ exit(EX_OSERR);
+ }
+ #ifdef __CYGWIN__
+- chdir("/"); /* Cygwin chroot() bug workaround */
++ if (chdir("/") < 0) { /* Cygwin chroot() bug workaround */
++ syslog(LOG_ERR, "chroot: %m");
++ exit(EX_OSERR);
++ }
+ #endif
+ }
+ #ifdef HAVE_SETREGID
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
new file mode 100644
index 000000000..6b8ceaaeb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
@@ -0,0 +1,165 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/config.h.cmd_arg tftp-hpa-0.49/config.h
+--- tftp-hpa-0.49/config.h.cmd_arg 2010-04-19 15:29:10.567331454 +0200
++++ tftp-hpa-0.49/config.h 2010-04-20 07:33:03.133232772 +0200
+@@ -291,6 +291,7 @@ typedef int socklen_t;
+ /* Prototypes for libxtra functions */
+
+ void *xmalloc(size_t);
++void *xrealloc(void *, size_t);
+ char *xstrdup(const char *);
+
+ #ifndef HAVE_BSD_SIGNAL
+diff -up tftp-hpa-0.49/configure.in.cmd_arg tftp-hpa-0.49/configure.in
+--- tftp-hpa-0.49/configure.in.cmd_arg 2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/configure.in 2010-04-19 11:05:12.387340698 +0200
+@@ -152,6 +152,7 @@ OBJROOT=`pwd`
+
+ XTRA=false
+ PA_SEARCH_LIBS_AND_ADD(xmalloc, iberty)
++PA_SEARCH_LIBS_AND_ADD(xrealloc, iberty)
+ PA_SEARCH_LIBS_AND_ADD(xstrdup, iberty)
+ PA_SEARCH_LIBS_AND_ADD(bsd_signal, bsd, bsdsignal)
+ PA_SEARCH_LIBS_AND_ADD(getopt_long, getopt, getopt_long)
+diff -up tftp-hpa-0.49/lib/xrealloc.c.cmd_arg tftp-hpa-0.49/lib/xrealloc.c
+--- tftp-hpa-0.49/lib/xrealloc.c.cmd_arg 2010-04-19 11:05:12.387340698 +0200
++++ tftp-hpa-0.49/lib/xrealloc.c 2010-04-19 11:05:12.387340698 +0200
+@@ -0,0 +1,20 @@
++/*
++ * xrealloc.c
++ *
++ * Simple error-checking version of realloc()
++ *
++ */
++
++#include "config.h"
++
++void *xrealloc(void *ptr, size_t size)
++{
++ void *p = realloc(ptr, size);
++
++ if (!p) {
++ fprintf(stderr, "Out of memory!\n");
++ exit(128);
++ }
++
++ return p;
++}
+diff -up tftp-hpa-0.49/tftp/main.c.cmd_arg tftp-hpa-0.49/tftp/main.c
+--- tftp-hpa-0.49/tftp/main.c.cmd_arg 2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/tftp/main.c 2010-04-19 11:05:12.389329337 +0200
+@@ -89,11 +89,14 @@ int connected;
+ const struct modes *mode;
+ #ifdef WITH_READLINE
+ char *line = NULL;
++char *remote_pth = NULL;
+ #else
+ char line[LBUFLEN];
++char remote_pth[LBUFLEN];
+ #endif
+ int margc;
+-char *margv[20];
++char **margv;
++int sizeof_margv=0;
+ const char *prompt = "tftp> ";
+ sigjmp_buf toplevel;
+ void intr(int);
+@@ -379,6 +382,10 @@ static void getmoreargs(const char *part
+ free(line);
+ line = NULL;
+ }
++ if (remote_pth) {
++ free(remote_pth);
++ remote_pth = NULL;
++ }
+ line = xmalloc(len + elen + 1);
+ strcpy(line, partial);
+ strcpy(line + len, eline);
+@@ -535,6 +542,7 @@ void put(int argc, char *argv[])
+ int fd;
+ int n, err;
+ char *cp, *targ;
++ long dirlen, namelen, lastlen=0;
+
+ if (argc < 2) {
+ getmoreargs("send ", "(file) ");
+@@ -588,9 +596,22 @@ void put(int argc, char *argv[])
+ }
+ /* this assumes the target is a directory */
+ /* on a remote unix system. hmmmm. */
+- cp = strchr(targ, '\0');
+- *cp++ = '/';
++ dirlen = strlen(targ)+1;
++#ifdef WITH_READLINE
++ remote_pth = xmalloc(dirlen+1);
++#endif
++ strcpy(remote_pth, targ);
++ remote_pth[dirlen-1] = '/';
++ cp = remote_pth + dirlen;
+ for (n = 1; n < argc - 1; n++) {
++#ifdef WITH_READLINE
++ namelen = strlen(tail(argv[n])) + 1;
++ if (namelen > lastlen) {
++ remote_pth = xrealloc(remote_pth, dirlen + namelen + 1);
++ cp = remote_pth + dirlen;
++ lastlen = namelen;
++ }
++#endif
+ strcpy(cp, tail(argv[n]));
+ fd = open(argv[n], O_RDONLY | mode->m_openflags);
+ if (fd < 0) {
+@@ -600,9 +621,9 @@ void put(int argc, char *argv[])
+ }
+ if (verbose)
+ printf("putting %s to %s:%s [%s]\n",
+- argv[n], hostname, targ, mode->m_mode);
++ argv[n], hostname, remote_pth, mode->m_mode);
+ sa_set_port(&peeraddr, port);
+- tftp_sendfile(fd, targ, mode->m_mode);
++ tftp_sendfile(fd, remote_pth, mode->m_mode);
+ }
+ }
+
+@@ -801,6 +822,10 @@ static void command(void)
+ free(line);
+ line = NULL;
+ }
++ if (remote_pth) {
++ free(remote_pth);
++ remote_pth = NULL;
++ }
+ line = readline(prompt);
+ if (!line)
+ exit(0); /* EOF */
+@@ -872,7 +897,13 @@ struct cmd *getcmd(char *name)
+ static void makeargv(void)
+ {
+ char *cp;
+- char **argp = margv;
++ char **argp;
++
++ if (!sizeof_margv) {
++ sizeof_margv = 20;
++ margv = xmalloc(sizeof_margv * sizeof(char *));
++ }
++ argp = margv;
+
+ margc = 0;
+ for (cp = line; *cp;) {
+@@ -882,6 +913,11 @@ static void makeargv(void)
+ break;
+ *argp++ = cp;
+ margc += 1;
++ if (margc == sizeof_margv) {
++ sizeof_margv += 20;
++ margv = xrealloc(margv, sizeof_margv * sizeof(char *));
++ argp = margv + margc;
++ }
+ while (*cp != '\0' && !isspace(*cp))
+ cp++;
+ if (*cp == '\0')
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
new file mode 100644
index 000000000..85110eb28
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
@@ -0,0 +1,24 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.tzfix 2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/tftpd.c 2008-11-25 11:45:27.000000000 -0500
+@@ -350,6 +350,14 @@ int main(int argc, char **argv)
+ const char *pidfile = NULL;
+ u_short tp_opcode;
+
++ time_t my_time = 0;
++ struct tm* p_tm;
++ char envtz[10];
++ my_time = time(NULL);
++ p_tm = localtime(&my_time);
++ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
++ setenv("TZ", envtz, 0);
++
+ /* basename() is way too much of a pain from a portability standpoint */
+
+ p = strrchr(argv[0], '/');
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
new file mode 100644
index 000000000..08d2b5b7d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
@@ -0,0 +1,32 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49.orig/tftp/tftp.c 2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftp/tftp.c 2009-08-05 09:47:18.072585848 -0400
+@@ -279,15 +279,16 @@
+ struct tftphdr *tp, const char *mode)
+ {
+ char *cp;
++ size_t len;
+
+ tp->th_opcode = htons((u_short) request);
+ cp = (char *)&(tp->th_stuff);
+- strcpy(cp, name);
+- cp += strlen(name);
+- *cp++ = '\0';
+- strcpy(cp, mode);
+- cp += strlen(mode);
+- *cp++ = '\0';
++ len = strlen(name) + 1;
++ memcpy(cp, name, len);
++ cp += len;
++ len = strlen(mode) + 1;
++ memcpy(cp, mode, len);
++ cp += len;
+ return (cp - (char *)tp);
+ }
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
new file mode 100644
index 000000000..720cd69de
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
@@ -0,0 +1,20 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftp/tftp.c.stats tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49/tftp/tftp.c.stats 2011-01-03 15:38:34.217918067 +0100
++++ tftp-hpa-0.49/tftp/tftp.c 2011-01-03 15:38:37.498917014 +0100
+@@ -400,8 +400,8 @@ static void printstats(const char *direc
+ {
+ double delta;
+
+- delta = (tstop.tv_sec + (tstop.tv_usec / 100000.0)) -
+- (tstart.tv_sec + (tstart.tv_usec / 100000.0));
++ delta = (tstop.tv_sec + (tstop.tv_usec / 1000000.0)) -
++ (tstart.tv_sec + (tstart.tv_usec / 1000000.0));
+ if (verbose) {
+ printf("%s %lu bytes in %.1f seconds", direction, amount, delta);
+ printf(" [%.0f bit/s]", (amount * 8.) / delta);
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
new file mode 100644
index 000000000..216349d26
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
@@ -0,0 +1,29 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-5.2/tftpd/recvfrom.c.test tftp-hpa-5.2/tftpd/recvfrom.c
+--- tftp-hpa-5.2/tftpd/recvfrom.c.test 2011-12-11 23:13:52.000000000 +0100
++++ tftp-hpa-5.2/tftpd/recvfrom.c 2012-01-04 10:05:17.852042256 +0100
+@@ -149,16 +149,16 @@ myrecvfrom(int s, void *buf, int len, un
+
+ /* Try to enable getting the return address */
+ #ifdef IP_RECVDSTADDR
+- if (from->sa_family == AF_INET)
++ if (from->sa_family == AF_INET || !from->sa_family)
+ setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
+ #endif
+ #ifdef IP_PKTINFO
+- if (from->sa_family == AF_INET)
++ if (from->sa_family == AF_INET || !from->sa_family)
+ setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
+ #endif
+ #ifdef HAVE_IPV6
+ #ifdef IPV6_RECVPKTINFO
+- if (from->sa_family == AF_INET6)
++ if (from->sa_family == AF_INET6 || !from->sa_family)
+ setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
+ #endif
+ #endif
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch
new file mode 100644
index 000000000..3e220ec38
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch
@@ -0,0 +1,38 @@
+From 6ed1eb8829dee351b54e183bc42c007cb306aaa5 Mon Sep 17 00:00:00 2001
+From: Zhang Xiao <xiao.zhang@windriver.com>
+Date: Wed, 11 Jun 2014 14:01:16 +0800
+Subject: [PATCH] tftp-hpa: bug fix on separated CR and LF
+
+In ascii mode, if the CR and LF was separated into different transfer
+blocks, LF will be just dropped instead of replacing the previous CR.
+Add a checking on the first character to fix it.
+
+Upstream-Status: pending
+
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+ common/tftpsubs.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index b4d4ffe..b4ea3f2 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -207,6 +207,14 @@ int write_behind(FILE * file, int convert)
+ p = buf;
+ ct = count;
+ count = 0;
++
++ /* Check the first character together with prevchar */
++ c = *p;
++ if ((prevchar == '\r') && (c == '\n')) {
++ lseek(fileno(file), -1, SEEK_CUR);
++ count++;
++ }
++
+ while (ct--) { /* loop over the buffer */
+ c = *p++; /* pick up a character */
+ if (prevchar == '\r') { /* if prev char was cr */
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
new file mode 100644
index 000000000..fe7016396
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
@@ -0,0 +1,18 @@
+# default: off
+# description: The tftp server serves files using the trivial file transfer \
+# protocol. The tftp protocol is often used to boot diskless \
+# workstations, download configuration files to network-aware printers, \
+# and to start the installation process for some operating systems.
+service tftp
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/sbin/in.tftpd-hpa
+ server_args = -s /var/lib/tftpboot
+ disable = yes
+ per_source = 11
+ cps = 100 2
+ flags = IPv6
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
new file mode 100644
index 000000000..98842e4e9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Client for the Trivial File Transfer Protocol"
+DESCRIPTION = \
+"The Trivial File Transfer Protocol (TFTP) is normally used only for \
+booting diskless workstations. The tftp package provides the user \
+interface for TFTP, which allows users to transfer files to and from a \
+remote machine. This program and TFTP provide very little security, \
+and should not be enabled unless it is expressly needed."
+DEPENDS = "tcp-wrappers readline"
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://MCONFIG.in;beginline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \
+ file://tftp/tftp.c;beginline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4"
+
+
+SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.tar.bz2 \
+ file://tftp-0.40-remap.patch \
+ file://tftp-0.42-tftpboot.patch \
+ file://tftp-0.49-chk_retcodes.patch \
+ file://tftp-0.49-cmd_arg.patch \
+ file://tftp-hpa-0.39-tzfix.patch \
+ file://tftp-hpa-0.49-fortify-strcpy-crash.patch \
+ file://tftp-hpa-0.49-stats.patch \
+ file://tftp-hpa-5.2-pktinfo.patch \
+ file://default \
+ file://init \
+ file://add-error-check-for-disk-filled-up.patch \
+ file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \
+ file://fix-writing-emtpy-file.patch \
+"
+
+SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21"
+SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269"
+
+inherit autotools-brokensep update-rc.d update-alternatives
+
+export AR = "${HOST_PREFIX}ar cq"
+
+EXTRA_OECONF += "--disable-option-checking"
+
+# configure.in has errors
+do_configure() {
+ oe_runconf
+}
+
+do_install() {
+ oe_runmake install INSTALLROOT=${D}
+ mv ${D}${bindir}/tftp ${D}${bindir}/tftp-hpa
+ mv ${D}${sbindir}/in.tftpd ${D}${sbindir}/in.tftpd-hpa
+
+ install -m 755 -d ${D}${localstatedir}/lib/tftpboot/
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
+}
+
+FILES_${PN} = "${bindir}"
+
+PACKAGES += "tftp-hpa-server"
+SUMMARY_tftp-hpa-server = "Server for the Trivial File Transfer Protocol"
+FILES_tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}"
+CONFFILES_tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa"
+
+INITSCRIPT_PACKAGES = "tftp-hpa-server"
+INITSCRIPT_NAME = "tftpd-hpa"
+INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ."
+
+ALTERNATIVE_${PN} = "tftp"
+ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa"
+ALTERNATIVE_PRIORITY = "50"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch
new file mode 100644
index 000000000..d2eb15614
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch
@@ -0,0 +1,16 @@
+Remove CC and CFLAGS values, we set these ourselves
+
+Upstream-Status: Inappropriate [config]
+
+diff -urN vblade-19.old//makefile vblade-19//makefile
+--- vblade-19.old//makefile 2008-10-08 22:07:40.000000000 +0100
++++ vblade-19//makefile 2008-11-18 19:07:51.700365029 +0000
+@@ -9,8 +9,6 @@
+ mandir = ${sharedir}/man
+
+ O=aoe.o bpf.o ${PLATFORM}.o ata.o
+-CFLAGS += -Wall -g -O2
+-CC = gcc
+
+ vblade: $O
+ ${CC} -o vblade $O
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb
new file mode 100644
index 000000000..a357e4037
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_20.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Virtual EtherDrive blade AoE target"
+SECTION = "admin"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BPN}-${PV}.tgz \
+ file://cross.patch"
+
+SRC_URI[md5sum] = "3c80e4a6bc7d66ae0c235b88cb44bd59"
+SRC_URI[sha256sum] = "c8fe2fc4f2fba8e07e5cfdf17335982584eef2cd5c78bf8b1db93f2b56e7121d"
+
+inherit autotools-brokensep
+
+do_install() {
+ install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade
+ install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed
+ install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
new file mode 100644
index 000000000..5f2860e84
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
@@ -0,0 +1,55 @@
+vsftpd: change default value of secure_chroot_dir
+
+Upstream-Status: Pending
+
+Change secure_chroot_dir pointing to a volatile directory.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+---
+ INSTALL | 6 +++---
+ tunables.c | 2 +-
+ vsftpd.conf.5 | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff -urpN a/INSTALL b/INSTALL
+--- a/INSTALL 2013-09-13 10:23:57.504972397 +0800
++++ b/INSTALL 2013-09-13 10:25:25.664971779 +0800
+@@ -27,11 +27,11 @@ user in case it does not already exist.
+ [root@localhost root]# useradd nobody
+ useradd: user nobody exists
+
+-2b) vsftpd needs the (empty) directory /usr/share/empty in the default
++2b) vsftpd needs the (empty) directory /var/run/vsftpd/empty in the default
+ configuration. Add this directory in case it does not already exist. e.g.:
+
+-[root@localhost root]# mkdir /usr/share/empty/
+-mkdir: cannot create directory `/usr/share/empty': File exists
++[root@localhost root]# mkdir /var/run/vsftpd/empty/
++mkdir: cannot create directory `/var/run/vsftpd/empty': File exists
+
+ 2c) For anonymous FTP, you will need the user "ftp" to exist, and have a
+ valid home directory (which is NOT owned or writable by the user "ftp").
+diff -urpN a/tunables.c b/tunables.c
+--- a/tunables.c 2013-09-13 10:26:29.554972817 +0800
++++ b/tunables.c 2013-09-13 10:27:18.104972210 +0800
+@@ -254,7 +254,7 @@ tunables_load_defaults()
+ /* -rw------- */
+ tunable_chown_upload_mode = 0600;
+
+- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
++ install_str_setting("/var/run/vsftpd/empty", &tunable_secure_chroot_dir);
+ install_str_setting("ftp", &tunable_ftp_username);
+ install_str_setting("root", &tunable_chown_username);
+ install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
+diff -urpN a/vsftpd.conf.5 b/vsftpd.conf.5
+--- a/vsftpd.conf.5 2013-09-13 10:09:33.774972462 +0800
++++ b/vsftpd.conf.5 2013-09-13 10:10:41.914971989 +0800
+@@ -969,7 +969,7 @@ This option should be the name of a dire
+ directory should not be writable by the ftp user. This directory is used
+ as a secure chroot() jail at times vsftpd does not require filesystem access.
+
+-Default: /usr/share/empty
++Default: /var/run/vsftpd/empty
+ .TP
+ .B ssl_ciphers
+ This option can be used to select which SSL ciphers vsftpd will allow for
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init
new file mode 100755
index 000000000..72adf0d9a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: vsftpd
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: Very Secure Ftp Daemon
+# Description: vsftpd is a Very Secure FTP daemon. It was written completely from
+# scratch
+### END INIT INFO
+
+DAEMON=/usr/sbin/vsftpd
+NAME=vsftpd
+DESC="FTP Server"
+ARGS=""
+FTPDIR=/var/lib/ftp
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "* starting $DESC: $NAME... "
+ if ! test -d $FTPDIR; then
+ mkdir -p $FTPDIR/in
+ chown ftp $FTPDIR -R
+ chmod a-w $FTPDIR
+ chmod u+w $FTPDIR/in
+ fi
+ start-stop-daemon -S -b -x $DAEMON -- $ARGS
+ echo "done."
+ ;;
+ stop)
+ echo -n "* stopping $DESC: $NAME... "
+ start-stop-daemon -K -x $DAEMON
+ echo "done."
+ ;;
+ restart)
+ echo "* restarting $DESC: $NAME... "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd
new file mode 100644
index 000000000..8a602ba37
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd
@@ -0,0 +1 @@
+d root root 0755 /var/run/vsftpd/empty none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf
new file mode 100644
index 000000000..bb1929480
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf
@@ -0,0 +1,139 @@
+# Example config file /etc/vsftpd.conf
+#
+# The default compiled in settings are fairly paranoid. This sample file
+# loosens things up a bit, to make the ftp daemon more usable.
+# Please see vsftpd.conf.5 for all compiled in defaults.
+#
+# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
+# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
+# capabilities.
+
+# run standalone
+listen=YES
+
+# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
+anonymous_enable=NO
+#
+# Uncomment this to allow local users to log in.
+local_enable=YES
+#
+# Uncomment this to enable any form of FTP write command.
+write_enable=YES
+#
+# Default umask for local users is 077. You may wish to change this to 022,
+# if your users expect that (022 is used by most other ftpd's)
+local_umask=022
+#
+# Uncomment this to allow the anonymous FTP user to upload files. This only
+# has an effect if the above global write enable is activated. Also, you will
+# obviously need to create a directory writable by the FTP user.
+#anon_upload_enable=YES
+#
+# Uncomment this if you want the anonymous FTP user to be able to create
+# new directories.
+#anon_mkdir_write_enable=YES
+#
+# Activate directory messages - messages given to remote users when they
+# go into a certain directory.
+dirmessage_enable=YES
+#
+# Activate logging of uploads/downloads.
+xferlog_enable=YES
+#
+# Make sure PORT transfer connections originate from port 20 (ftp-data).
+connect_from_port_20=YES
+#
+# If you want, you can arrange for uploaded anonymous files to be owned by
+# a different user. Note! Using "root" for uploaded files is not
+# recommended!
+#chown_uploads=YES
+#chown_username=whoever
+#
+# You may override where the log file goes if you like. The default is shown
+# below.
+#xferlog_file=/var/log/vsftpd.log
+#
+# If you want, you can have your log file in standard ftpd xferlog format
+xferlog_std_format=YES
+#
+# You may change the default value for timing out an idle session.
+#idle_session_timeout=600
+#
+# You may change the default value for timing out a data connection.
+#data_connection_timeout=120
+#
+# It is recommended that you define on your system a unique user which the
+# ftp server can use as a totally isolated and unprivileged user.
+#nopriv_user=ftp
+#
+# Enable this and the server will recognise asynchronous ABOR requests. Not
+# recommended for security (the code is non-trivial). Not enabling it,
+# however, may confuse older FTP clients.
+#async_abor_enable=YES
+#
+# By default the server will pretend to allow ASCII mode but in fact ignore
+# the request. Turn on the below options to have the server actually do ASCII
+# mangling on files when in ASCII mode.
+# Beware that turning on ascii_download_enable enables malicious remote parties
+# to consume your I/O resources, by issuing the command "SIZE /big/file" in
+# ASCII mode.
+# These ASCII options are split into upload and download because you may wish
+# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
+# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
+# on the client anyway..
+#ascii_upload_enable=YES
+#ascii_download_enable=YES
+#
+# You may fully customise the login banner string:
+#ftpd_banner=Welcome to blah FTP service.
+#
+# You may specify a file of disallowed anonymous e-mail addresses. Apparently
+# useful for combatting certain DoS attacks.
+#deny_email_enable=YES
+# (default follows)
+#banned_email_file=/etc/vsftpd.banned_emails
+#
+# You may specify an explicit list of local users to chroot() to their home
+# directory. If chroot_local_user is YES, then this list becomes a list of
+# users to NOT chroot().
+#chroot_list_enable=YES
+# (default follows)
+#chroot_list_file=/etc/vsftpd.chroot_list
+#
+# You may activate the "-R" option to the builtin ls. This is disabled by
+# default to avoid remote users being able to cause excessive I/O on large
+# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+# the presence of the "-R" option, so there is a strong case for enabling it.
+#ls_recurse_enable=YES
+#
+# This string is the name of the PAM service vsftpd will use.
+pam_service_name=vsftpd
+#
+# This option is examined if userlist_enable is activated. If you set this
+# setting to NO, then users will be denied login unless they are explicitly
+# listed in the file specified by userlist_file. When login is denied, the
+# denial is issued before the user is asked for a password.
+userlist_deny=YES
+#
+# If enabled, vsftpd will load a list of usernames, from the filename given by
+# userlist_file. If a user tries to log in using a name in this file, they
+# will be denied before they are asked for a password. This may be useful in
+# preventing cleartext passwords being transmitted. See also userlist_deny.
+userlist_enable=YES
+#
+# If enabled, vsftpd will display directory listings with the time in your
+# local time zone. The default is to display GMT. The times returned by the
+# MDTM FTP command are also affected by this option.
+use_localtime=YES
+#
+# If set to YES, local users will be (by default) placed in a chroot() jail in
+# their home directory after login. Warning: This option has security
+# implications, especially if the users have upload permission, or shell access.
+# Only enable if you know what you are doing. Note that these security implications
+# are not vsftpd specific. They apply to all FTP daemons which offer to put
+# local users in chroot() jails.
+chroot_local_user=YES
+#
+allow_writeable_chroot=YES
+#
+tcp_wrappers=YES
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers
new file mode 100644
index 000000000..096142f5d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers
@@ -0,0 +1,15 @@
+# Users that are not allowed to login via ftp
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+nobody
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service
new file mode 100644
index 000000000..e27102026
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Vsftpd ftp daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/vsftpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list
new file mode 100644
index 000000000..d283e3d26
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list
@@ -0,0 +1,20 @@
+# vsftpd userlist
+# If userlist_deny=NO, only allow users in this file
+# If userlist_deny=YES (default), never allow users in this file, and
+# do not even prompt for a password.
+# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
+# for users that are denied.
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+nobody
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
new file mode 100644
index 000000000..1980d09fd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
@@ -0,0 +1,44 @@
+Use DESTDIR within install to allow installing under a prefix
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -24,21 +24,21 @@
+ $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS)
+
+ install:
+- if [ -x /usr/local/sbin ]; then \
+- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
++ if [ -x ${DESTDIR}/usr/local/sbin ]; then \
++ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/local/sbin/vsftpd; \
+ else \
+- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
+- if [ -x /usr/local/man ]; then \
+- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
+- elif [ -x /usr/share/man ]; then \
+- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
++ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/sbin/vsftpd; fi
++ if [ -x ${DESTDIR}/usr/local/man ]; then \
++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/local/man/man8/vsftpd.8; \
++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/local/man/man5/vsftpd.conf.5; \
++ elif [ -x ${DESTDIR}/usr/share/man ]; then \
++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/share/man/man8/vsftpd.8; \
++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/share/man/man5/vsftpd.conf.5; \
+ else \
+- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
+- if [ -x /etc/xinetd.d ]; then \
+- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/man/man8/vsftpd.8; \
++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/man/man5/vsftpd.conf.5; fi
++ if [ -x ${DESTDIR}/etc/xinetd.d ]; then \
++ $(INSTALL) -m 644 xinetd.d/vsftpd ${DESTDIR}/etc/xinetd.d/vsftpd; fi
+
+ clean:
+ rm -f *.o *.swp vsftpd
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
new file mode 100644
index 000000000..9a10f722f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
@@ -0,0 +1,21 @@
+Hardcode LIBS instead of using a script to determine available libs
+
+We want to avoid this dynamic detection so we have a deterministic
+build.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -5,7 +5,7 @@
+ #CFLAGS = -g
+ CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
+
+-LIBS = `./vsf_findlibs.sh`
++LIBS = -lssl -lcrypto -lnsl -lresolv
+ LINK = -Wl,-s
+
+ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
new file mode 100644
index 000000000..fd3160037
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
@@ -0,0 +1,17 @@
+Disable stripping at link time
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,6 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+ #-pedantic -Wconversion
+
+ LIBS = -lssl -lcrypto -lnsl -lresolv
+-LINK = -Wl,-s
+ LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now
+
+ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
new file mode 100644
index 000000000..fdcf3a02b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
@@ -0,0 +1,17 @@
+Disable PAM
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h
+--- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200
++++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200
+@@ -2,7 +2,7 @@
+ #define VSF_BUILDDEFS_H
+
+ #define VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
++#undef VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+
+ #endif /* VSF_BUILDDEFS_H */
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch
new file mode 100644
index 000000000..cf0d68e27
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch
@@ -0,0 +1,16 @@
+Disable PAM
+
+Upstream-Status: Inappropriate [config]
+
+diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h
+--- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200
++++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200
+@@ -2,7 +2,7 @@
+ #define VSF_BUILDDEFS_H
+
+ #undef VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
++#undef VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+
+ #endif /* VSF_BUILDDEFS_H */
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
new file mode 100644
index 000000000..32f7e8218
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
@@ -0,0 +1,77 @@
+Fix the CVE-2015-1419
+
+Upstream-Status: Pending
+
+Try to fix deny_file parsing to do more what is expected. Taken
+from fedora. CVE-2015-1419
+
+ftp://195.220.108.108/linux/fedora/linux/development/rawhide/source/SRPMS/v/vsftpd-3.0.2-13.fc22.src.rpm
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+diff -up vsftpd-2.1.0/ls.c.filter vsftpd-2.1.0/ls.c
+--- vsftpd-2.1.0/ls.c.filter 2008-02-02 02:30:41.000000000 +0100
++++ vsftpd-2.1.0/ls.c 2009-01-08 19:31:15.000000000 +0100
+@@ -239,9 +239,31 @@ vsf_filename_passes_filter(const struct
+ int ret = 0;
+ char last_token = 0;
+ int must_match_at_current_pos = 1;
++
++
+ str_copy(&filter_remain_str, p_filter_str);
+- str_copy(&name_remain_str, p_filename_str);
+-
++
++ if (!str_isempty (&filter_remain_str) && !str_isempty(p_filename_str)) {
++ if (str_get_char_at(p_filter_str, 0) == '/') {
++ if (str_get_char_at(p_filename_str, 0) != '/') {
++ str_getcwd (&name_remain_str);
++
++ if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */
++ str_append_char (&name_remain_str, '/');
++
++ str_append_str (&name_remain_str, p_filename_str);
++ }
++ else
++ str_copy (&name_remain_str, p_filename_str);
++ } else {
++ if (str_get_char_at(p_filter_str, 0) != '{')
++ str_basename (&name_remain_str, p_filename_str);
++ else
++ str_copy (&name_remain_str, p_filename_str);
++ }
++ } else
++ str_copy(&name_remain_str, p_filename_str);
++
+ while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
+ {
+ static struct mystr s_match_needed_str;
+diff -up vsftpd-2.1.0/str.c.filter vsftpd-2.1.0/str.c
+--- vsftpd-2.1.0/str.c.filter 2008-12-17 06:54:16.000000000 +0100
++++ vsftpd-2.1.0/str.c 2009-01-08 19:31:15.000000000 +0100
+@@ -680,3 +680,14 @@ str_replace_unprintable(struct mystr* p_
+ }
+ }
+
++void
++str_basename (struct mystr* d_str, const struct mystr* path)
++{
++ static struct mystr tmp;
++
++ str_copy (&tmp, path);
++ str_split_char_reverse(&tmp, d_str, '/');
++
++ if (str_isempty(d_str))
++ str_copy (d_str, path);
++}
+diff -up vsftpd-2.1.0/str.h.filter vsftpd-2.1.0/str.h
+--- vsftpd-2.1.0/str.h.filter 2008-12-17 06:53:23.000000000 +0100
++++ vsftpd-2.1.0/str.h 2009-01-08 19:32:14.000000000 +0100
+@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst
+ int str_atoi(const struct mystr* p_str);
+ filesize_t str_a_to_filesize_t(const struct mystr* p_str);
+ unsigned int str_octal_to_uint(const struct mystr* p_str);
++void str_basename (struct mystr* d_str, const struct mystr* path);
+
+ /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string
+ * buffer, starting at character position 'p_pos'. The extracted line will
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
new file mode 100644
index 000000000..69745b3a1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
@@ -0,0 +1,25 @@
+Enable tcp_wrapper.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ builddefs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/builddefs.h b/builddefs.h
+index e908352..0106d1a 100644
+--- a/builddefs.h
++++ b/builddefs.h
+@@ -1,7 +1,7 @@
+ #ifndef VSF_BUILDDEFS_H
+ #define VSF_BUILDDEFS_H
+
+-#undef VSF_BUILD_TCPWRAPPERS
++#define VSF_BUILD_TCPWRAPPERS
+ #define VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+
+--
+1.7.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
new file mode 100644
index 000000000..4ee881ddd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
@@ -0,0 +1,109 @@
+SUMMARY = "Very Secure FTP server"
+HOMEPAGE = "https://security.appspot.com/vsftpd.html"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271"
+
+DEPENDS = "libcap openssl"
+
+SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \
+ file://makefile-destdir.patch \
+ file://makefile-libs.patch \
+ file://makefile-strip.patch \
+ file://init \
+ file://vsftpd.conf \
+ file://vsftpd.user_list \
+ file://vsftpd.ftpusers \
+ file://change-secure_chroot_dir.patch \
+ file://volatiles.99_vsftpd \
+ file://vsftpd.service \
+ file://vsftpd-2.1.0-filter.patch \
+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \
+ file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \
+ file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb"
+SRC_URI[md5sum] = "da119d084bd3f98664636ea05b5bb398"
+SRC_URI[sha256sum] = "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7"
+
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
+SRC_URI +="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)}"
+
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}"
+PAMLIB = "${@base_contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}"
+NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}"
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}"
+
+inherit update-rc.d useradd systemd
+
+CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf"
+LDFLAGS_append =" -lcrypt -lcap"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_configure() {
+ # Fix hardcoded /usr, /etc, /var mess.
+ cat tunables.c|sed s:\"/usr:\"${prefix}:g|sed s:\"/var:\"${localstatedir}:g \
+ |sed s:\"/etc:\"${sysconfdir}:g > tunables.c.new
+ mv tunables.c.new tunables.c
+}
+
+do_compile() {
+ oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} -lwrap"
+}
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man8
+ install -d ${D}${mandir}/man5
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${sysconfdir}
+ install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
+ install -d ${D}/${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+
+ install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
+ install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
+ if ! test -z "${PAMLIB}" ; then
+ install -d ${D}${sysconfdir}/pam.d/
+ cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd
+ sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd
+ sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd
+ fi
+ if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /var/run/vsftpd/empty 0755 root root -" \
+ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+ fi
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service
+}
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "vsftpd"
+INITSCRIPT_PARAMS_${PN} = "defaults 80"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \
+ --shell /bin/false ftp "
+GROUPADD_PARAM_${PN} = "-r ftp"
+
+SYSTEMD_SERVICE_${PN} = "vsftpd.service"
+
+pkg_postinst_${PN}() {
+ if [ -z "$D" ]; then
+ if type systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+ fi
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch
new file mode 100644
index 000000000..4444234b2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/access-sk_v6_daddr-iff-IPV6-defined.patch
@@ -0,0 +1,28 @@
+The element skc_v6_daddr (in struct sock_common) is defined in
+kernel source only when CONFIG_IPV6 is enabled. Hence, access
+sk_v6_daddr element (i.e __sk_common.skc_v6_daddr) only when CONFIG_IPV6
+is defined; to fix below error in world build:
+
+-- snip --
+/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source/include/net/sock.h:330:33: error: 'struct sock_common' has no member named 'skc_v6_daddr'
+-- CUT --
+
+Upstream-Status: Pending
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+
+--- iscsitarget-1.4.20.3+svn502_org/kernel/conn.c 2015-12-29 21:57:50.547932217 -0800
++++ iscsitarget-1.4.20.3+svn502/kernel/conn.c 2015-12-29 22:47:25.254657627 -0800
+@@ -46,10 +46,12 @@ void conn_info_show(struct seq_file *seq
+ snprintf(buf, sizeof(buf),
+ "%pI4", &inet_sk(sk)->inet_daddr);
+ break;
++#if defined(CONFIG_IPV6)
+ case AF_INET6:
+ snprintf(buf, sizeof(buf), "[%pI6]",
+ &(sk)->sk_v6_daddr);
+ break;
++#endif /* defined(CONFIG_IPV6) */
+ default:
+ break;
+ }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_bio_struct_of_linux_v4.3_and_above.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_bio_struct_of_linux_v4.3_and_above.patch
new file mode 100644
index 000000000..0e8b792af
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_bio_struct_of_linux_v4.3_and_above.patch
@@ -0,0 +1,75 @@
+1. test_bit was used to return true boolean value, if
+ BIO_UPTODATE bit of bio->bi_flags is set. But the same
+ job can be done by checking bio->bi_error, implemented in
+ linux kernel 4.3 and above. If bio->bi_error is set, then
+ it denotes error.
+
+Ref: https://github.com/torvalds/linux/commit/4246a0b63bd8f56a1469b12eafeb875b1041a451
+
+It solves below build error:
+-- snip --
+iscsitarget-1.4.20.3+svn502/kernel/block-io.c:40:19: error: 'BIO_UPTODATE' undeclared (first use in this function)
+ error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? error : -EIO;
+-- CUT --
+
+2. bio can always be filled to a maximum value of BIO_MAX_PAGES,
+ so no need to check for min value for linux kernel 4.3 and above.
+
+Ref: https://github.com/torvalds/linux/commit/b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c
+
+It solves below build error:
+-- snip --
+iscsitarget-1.4.20.3+svn502/kernel/block-io.c:80:15: error: implicit declaration of function 'bio_get_nr_vecs' [-Werror=implicit-function-declaration]
+ max_pages = bio_get_nr_vecs(bio_data->bdev);
+-- CUT --
+
+Upstream-Status: Pending
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+
+diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c iscsitarget-1.4.20.3+svn502/kernel/block-io.c
+--- iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c 2016-04-01 09:07:12.891810059 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/block-io.c 2016-04-01 09:15:59.076469313 +0530
+@@ -33,7 +33,11 @@ static void blockio_bio_endio(struct bio
+ {
+ struct tio_work *tio_work = bio->bi_private;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++ error = bio->bi_error ? -EIO : error;
++#else
+ error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? error : -EIO;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) */
+
+ if (error)
+ atomic_set(&tio_work->error, error);
+@@ -61,6 +65,10 @@ blockio_make_request(struct iet_volume *
+ u32 size = tio->size;
+ u32 tio_index = 0;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++ int err = 0;
++ loff_t ppos = tio->offset;
++#else
+ int max_pages = 1;
+ int err = 0;
+
+@@ -69,6 +77,7 @@ blockio_make_request(struct iet_volume *
+ /* Calculate max_pages for bio_alloc (memory saver) */
+ if (bdev_q)
+ max_pages = bio_get_nr_vecs(bio_data->bdev);
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) */
+
+ tio_work = kzalloc(sizeof (*tio_work), GFP_KERNEL);
+ if (!tio_work)
+@@ -80,7 +89,11 @@ blockio_make_request(struct iet_volume *
+
+ /* Main processing loop, allocate and fill all bios */
+ while (size && tio_index < tio->pg_cnt) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++ bio = bio_alloc(GFP_KERNEL, BIO_MAX_PAGES);
++#else
+ bio = bio_alloc(GFP_KERNEL, min(max_pages, BIO_MAX_PAGES));
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) */
+ if (!bio) {
+ err = -ENOMEM;
+ goto out;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/fix-errors-observed-with-linux-3.19-and-greater.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/fix-errors-observed-with-linux-3.19-and-greater.patch
new file mode 100644
index 000000000..6878ca2d0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/fix-errors-observed-with-linux-3.19-and-greater.patch
@@ -0,0 +1,198 @@
+Fix build errors with linux kernel v3.19 and above
+
+Below errors came up while building iscsitarget for
+qemux86-64 (and others) because,
+1. 'struct user_msghdr' is being used for userland-side msghdr instead
+of 'struct msghdr', which is used for kernel-side msghdr in linux v3.19
+and above.
+
+error snippet:
+-- snip --
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/iscsi.c: In function 'cmnd_skip_pdu':
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/iscsi.c:492:16: error: 'struct msghdr' has no member named 'msg_iov'
+| conn->read_msg.msg_iov = conn->read_iov;
+-- CUT --
+
+Reference:
+https://github.com/torvalds/linux/commit/666547ff591cebdedc4679bf6b1b3f3383a8dea3
+
+2. 'SERVICE_ACTION_IN' has been renamed to SERVICE_ACTION_IN_16 in linux v3.19
+and above.
+
+error snippet:
+-- snip --
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/iscsi.c: In function 'scsi_cmnd_start':
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/iscsi.c:989:7: error: 'SERVICE_ACTION_IN' undeclared (first use in this function)
+| case SERVICE_ACTION_IN:
+-- CUT --
+
+Reference:
+https://github.com/torvalds/linux/commit/eb846d9f147455e4e5e1863bfb5e31974bb69b7c
+
+3. In linux v3.19 and above, f_dentry member has been removed from
+'struct file' structure.
+
+error snippet:
+-- snip --
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/conn.c: In function 'iet_socket_bind':
+| /CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work/qemux86_64-poky-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/conn.c:130:34: error: 'struct file' has no member named 'f_dentry'
+| conn->sock = SOCKET_I(conn->file->f_dentry->d_inode);
+-- CUT --
+
+new helper function file_inode(file) should be used instead.
+
+References:
+1. https://github.com/torvalds/linux/commit/78d28e651f97866d608d9b41f8ad291e65d47dd5
+2. https://github.com/torvalds/linux/commit/496ad9aa8ef448058e36ca7a787c61f2e63f0f54
+
+Upstream-Status: Pending
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+
+--- iscsitarget-1.4.20.3+svn502_org/kernel/conn.c 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/conn.c 2015-08-24 17:27:06.897653698 +0530
+@@ -127,7 +127,11 @@ static void iet_socket_bind(struct iscsi
+
+ dprintk(D_GENERIC, "%llu\n", (unsigned long long) session->sid);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ conn->sock = SOCKET_I(file_inode(conn->file));
++#else
+ conn->sock = SOCKET_I(conn->file->f_dentry->d_inode);
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ conn->sock->sk->sk_user_data = conn;
+
+ write_lock_bh(&conn->sock->sk->sk_callback_lock);
+--- iscsitarget-1.4.20.3+svn502_org/kernel/file-io.c 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/file-io.c 2015-08-24 17:30:54.390131100 +0530
+@@ -69,7 +69,11 @@ static int fileio_make_request(struct ie
+ static int fileio_sync(struct iet_volume *lu, struct tio *tio)
+ {
+ struct fileio_data *p = lu->private;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ struct inode *inode = file_inode(p->filp);
++#else
+ struct inode *inode = p->filp->f_dentry->d_inode;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ struct address_space *mapping = inode->i_mapping;
+ loff_t ppos, count;
+ int res;
+@@ -213,7 +217,11 @@ static int fileio_attach(struct iet_volu
+ eprintk("%d\n", err);
+ goto out;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ inode = file_inode(p->filp);
++#else
+ inode = p->filp->f_dentry->d_inode;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+
+ if (S_ISREG(inode->i_mode))
+ ;
+--- iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.c 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/iscsi.c 2015-08-24 17:33:50.950490156 +0530
+@@ -986,7 +986,11 @@ static void scsi_cmnd_start(struct iscsi
+ set_cmnd_lunit(req);
+
+ switch (req_hdr->scb[0]) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ case SERVICE_ACTION_IN_16:
++#else
+ case SERVICE_ACTION_IN:
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ if ((req_hdr->scb[1] & 0x1f) != 0x10)
+ goto error;
+ case INQUIRY:
+--- iscsitarget-1.4.20.3+svn502_org/kernel/iscsi.h 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/iscsi.h 2015-08-24 17:35:31.354690051 +0530
+@@ -257,7 +257,11 @@ struct iscsi_conn {
+ struct timer_list nop_timer;
+
+ struct iscsi_cmnd *read_cmnd;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ struct user_msghdr read_msg;
++#else
+ struct msghdr read_msg;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ struct iovec read_iov[ISCSI_CONN_IOV_MAX];
+ u32 read_size;
+ u32 read_overflow;
+--- iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/nthread.c 2015-08-24 17:41:56.187428925 +0530
+@@ -80,8 +80,11 @@ static int is_data_available(struct iscs
+ set_fs(oldfs);
+ return (res >= 0) ? avail : res;
+ }
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++static void forward_iov(struct user_msghdr *msg, int len)
++#else
+ static void forward_iov(struct msghdr *msg, int len)
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ {
+ while (msg->msg_iov->iov_len <= len) {
+ len -= msg->msg_iov->iov_len;
+@@ -96,7 +99,11 @@ static void forward_iov(struct msghdr *m
+ static int do_recv(struct iscsi_conn *conn, int state)
+ {
+ mm_segment_t oldfs;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ struct user_msghdr msg;
++#else
+ struct msghdr msg;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ struct iovec iov[ISCSI_CONN_IOV_MAX];
+ int i, len, res;
+
+@@ -461,7 +468,11 @@ static void exit_tx(struct iscsi_conn *c
+ static int tx_ddigest(struct iscsi_cmnd *cmnd, int state)
+ {
+ int res, rest = cmnd->conn->write_size;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ struct user_msghdr msg = {.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT};
++#else
+ struct msghdr msg = {.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT};
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ struct kvec iov;
+
+ iov.iov_base = (char *) (&cmnd->ddigest) + (sizeof(u32) - rest);
+--- iscsitarget-1.4.20.3+svn502_org/kernel/target_disk.c 2015-08-24 16:13:26.481924679 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/target_disk.c 2015-08-24 17:43:42.167625159 +0530
+@@ -606,7 +606,11 @@ static int disk_execute_cmnd(struct iscs
+ case REQUEST_SENSE:
+ send_data_rsp(cmnd, build_request_sense_response);
+ break;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ case SERVICE_ACTION_IN_16:
++#else
+ case SERVICE_ACTION_IN:
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ send_data_rsp(cmnd, build_service_action_in_response);
+ break;
+ case READ_6:
+--- iscsitarget-1.4.20.3+svn502_org/kernel/volume.c 2015-08-24 16:13:26.477924674 +0530
++++ iscsitarget-1.4.20.3+svn502/kernel/volume.c 2015-08-24 18:28:15.697074780 +0530
+@@ -398,7 +398,11 @@ int is_volume_reserved(struct iet_volume
+ case READ_CAPACITY:
+ /* allowed commands when reserved */
+ break;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ case SERVICE_ACTION_IN_16:
++#else
+ case SERVICE_ACTION_IN:
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ if ((scb[1] & 0x1F) == 0x10)
+ break;
+ /* fall through */
+@@ -465,7 +469,11 @@ int is_volume_reserved(struct iet_volume
+ if (excl_access_ro && !registered)
+ err = -EBUSY;
+ break;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++ case SERVICE_ACTION_IN_16:
++#else
+ case SERVICE_ACTION_IN:
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
+ if ((scb[1] & 0x1F) == 0x10)
+ break;
+ /* fall through */
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch
new file mode 100644
index 000000000..95bd047b9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/files/use-kernel-makefile-to-get-kernel-version.patch
@@ -0,0 +1,67 @@
+Get linux kernel version from Makefile of kernel source
+
+We get below messages while building iscsitarget,
+
+-- snip --
+x86_64-poky-linux-gcc: error:
+/CGE7_SHDD/project_yocto_1.8/poky/build/tmp/work-shared/qemux86-64/kernel-source/include/linux/version.h:
+No such file or directory
+x86_64-poky-linux-gcc: fatal error: no input files
+compilation terminated.
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+/bin/sh: line 0: [: too many arguments
+-- CUT --
+
+These messages are due to absence of include/linux/version.h file in
+kernel source directory and failed to compute linux kernel version.
+So, use kernel source Makefile ( i.e $(KSRC)/Makefile) to find out
+actual kernel version.
+
+Upstream-Status: Pending
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+
+--- iscsitarget-1.4.20.3+svn499_org/Makefile 2014-01-27 00:00:45.000000000 +0530
++++ iscsitarget-1.4.20.3+svn499/Makefile 2015-07-23 10:44:47.013600285 +0530
+@@ -18,27 +18,11 @@ ifeq ($(KSRC),)
+ endif
+
+
+-ifneq ($(wildcard $(KSRC)/include/generated/utsrelease.h),)
+- VERSION_FILE := $(KSRC)/include/generated/utsrelease.h
+-else
+- ifneq ($(wildcard $(KSRC)/include/linux/utsrelease.h),)
+- VERSION_FILE := $(KSRC)/include/linux/utsrelease.h
+- else
+- VERSION_FILE := $(KSRC)/include/linux/version.h
+- endif
+-endif
+-
+-KVER := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -E -dM $(VERSION_FILE) | \
+- grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
+-
+ KMOD := /lib/modules/$(KVER)/extra
+-
+-KMAJ := $(shell echo $(KVER) | \
+- sed -e 's/^\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*.*/\1/')
+-KMIN := $(shell echo $(KVER) | \
+- sed -e 's/^[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*.*/\1/')
+-KREV := $(shell echo $(KVER) | \
+- sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/')
++KMAJ := $(shell cat $(KSRC)/Makefile | grep ^VERSION | gawk -F " " '{ print $$NF }')
++KMIN := $(shell cat $(KSRC)/Makefile | grep ^PATCHLEVEL | gawk -F " " '{ print $$NF }')
++KREV := $(shell cat $(KSRC)/Makefile | grep ^SUBLEVEL | gawk -F " " '{ print $$NF }')
++KVER := ${KMAJ}.${KMIN}.${KREV}
+
+ kver_eq = $(shell [ $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -eq $(3) ] && \
+ echo 1 || echo 0)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
new file mode 100644
index 000000000..4c5eed6de
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "iSCSI Enterprise Target is aimed to develop an \
+ open source iSCSI target with professional features, \
+ that works well in enterprise environment under real \
+ workload, and is scalable and versatile enough to meet the \
+ challenge of future storage needs and developments."
+HOMEPAGE = "http://iscsitarget.sourceforge.net/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e233eda45c807aa29aeaa6d94bc48a2"
+DEPENDS = "openssl virtual/kernel"
+
+SRC_URI = "http://ftp.heanet.ie/mirrors/ubuntu/pool/universe/i/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://use-kernel-makefile-to-get-kernel-version.patch \
+ file://fix-errors-observed-with-linux-3.19-and-greater.patch \
+ file://access-sk_v6_daddr-iff-IPV6-defined.patch \
+ file://build_with_updated_bio_struct_of_linux_v4.3_and_above.patch"
+
+SRC_URI[md5sum] = "ef9bc823bbabd3c772208c00d5f2d089"
+SRC_URI[sha256sum] = "d3196ccb78a43266dce28587bfe30d8ab4db7566d7bce96057dfbb84100babb5"
+
+inherit module
+
+do_configure[noexec] = "1"
+
+# make_scripts requires kernel source directory to create
+# kernel scripts
+do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
+
+do_compile() {
+ oe_runmake KSRC=${STAGING_KERNEL_DIR} LDFLAGS='' V=1
+}
+
+do_install() {
+ # Module
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/iscsi
+ install -m 0644 kernel/iscsi_trgt.ko \
+ ${D}/lib/modules/${KERNEL_VERSION}/kernel/iscsi/iscsi_trgt.ko
+
+ # Userspace utilities
+ install -d ${D}${sbindir}
+ install -m 0755 usr/ietd ${D}${sbindir}/ietd
+ install -m 0755 usr/ietadm ${D}${sbindir}/ietadm
+
+ # Config files, init scripts
+ mkdir -p ${D}${sysconfdir}/iet
+ install -m 0644 etc/ietd.conf ${D}/${sysconfdir}/iet/ietd.conf
+ install -m 0644 etc/initiators.allow ${D}${sysconfdir}/iet/initiators.allow
+ install -m 0644 etc/targets.allow ${D}${sysconfdir}/iet/targets.allow
+ mkdir -p ${D}${sysconfdir}/init.d
+ install -m 0755 etc/initd/initd ${D}${sysconfdir}/init.d/iscsi-target
+ install -m 0644 etc/initiators.deny ${D}${sysconfdir}/iet/initiators.deny
+}
+
+FILES_${PN} += "${sbindir} \
+ ${sysconfdir}"
+
+RDEPENDS_${PN} = "kernel-module-iscsi-trgt"
+RRECOMMENDS_${PN} = "kernel-module-crc32c kernel-module-libcrc32c"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb
new file mode 100644
index 000000000..7b11d206c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Connection tracking userspace tools for Linux"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libnetfilter-conntrack libnetfilter-cttimeout \
+ libnetfilter-cthelper libnetfilter-queue bison-native"
+
+SRC_URI = " \
+ http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \
+ file://conntrack-failover \
+ file://init \
+ file://0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch \
+"
+SRC_URI[tar.md5sum] = "b1f9d006e7bf000a77395ff7cd3fac16"
+SRC_URI[tar.sha256sum] = "e5c423dc077f9ca8767eaa6cf40446943905711c6a8fe27f9cc1977d4d6aa11e"
+
+inherit autotools-brokensep update-rc.d pkgconfig
+
+INITSCRIPT_NAME = "conntrackd"
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/conntrackd
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0644 doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample
+ install -m 0755 ${WORKDIR}/conntrack-failover ${D}/${sysconfdir}/init.d/conntrack-failover
+ install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/conntrackd
+
+ # Fix hardcoded paths in scripts
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd
+ sed -i 's!/var/!${localstatedir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample
+ sed -i 's!^export PATH=.*!export PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}/${sysconfdir}/init.d/conntrackd
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch
new file mode 100644
index 000000000..a7ab6d687
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch
@@ -0,0 +1,85 @@
+From c392c159605956c7bd4a264ab4490e2b2704c0cd Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Fri, 13 Jun 2014 12:53:17 +0200
+Subject: [PATCH] conntrackd: build: fix crash when optional kernel modules are
+ not loaded
+
+Upstream-Status: Backport
+
+Fix a possible crash if conntrackd sees DCCP, SCTP and ICMPv6 traffic
+and the corresponding kernel modules that track this traffic are not
+available.
+
+Fixes: http://bugzilla.netfilter.org/show_bug.cgi?id=910
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ src/build.c | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/src/build.c b/src/build.c
+index 5799b51..9ba8b57 100644
+--- a/src/build.c
++++ b/src/build.c
+@@ -105,14 +105,14 @@ static enum nf_conntrack_attr nat_type[] =
+ ATTR_ORIG_NAT_SEQ_OFFSET_AFTER, ATTR_REPL_NAT_SEQ_CORRECTION_POS,
+ ATTR_REPL_NAT_SEQ_OFFSET_BEFORE, ATTR_REPL_NAT_SEQ_OFFSET_AFTER };
+
++/* ICMP, UDP and TCP are always loaded with nf_conntrack_ipv4 */
+ static void build_l4proto_tcp(const struct nf_conntrack *ct, struct nethdr *n)
+ {
+- ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
+- sizeof(struct nfct_attr_grp_port));
+-
+ if (!nfct_attr_is_set(ct, ATTR_TCP_STATE))
+ return;
+
++ ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
++ sizeof(struct nfct_attr_grp_port));
+ ct_build_u8(ct, ATTR_TCP_STATE, n, NTA_TCP_STATE);
+ if (CONFIG(sync).tcp_window_tracking) {
+ ct_build_u8(ct, ATTR_TCP_WSCALE_ORIG, n, NTA_TCP_WSCALE_ORIG);
+@@ -122,12 +122,12 @@ static void build_l4proto_tcp(const struct nf_conntrack *ct, struct nethdr *n)
+
+ static void build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n)
+ {
+- ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
+- sizeof(struct nfct_attr_grp_port));
+-
++ /* SCTP is optional, make sure nf_conntrack_sctp is loaded */
+ if (!nfct_attr_is_set(ct, ATTR_SCTP_STATE))
+ return;
+
++ ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
++ sizeof(struct nfct_attr_grp_port));
+ ct_build_u8(ct, ATTR_SCTP_STATE, n, NTA_SCTP_STATE);
+ ct_build_u32(ct, ATTR_SCTP_VTAG_ORIG, n, NTA_SCTP_VTAG_ORIG);
+ ct_build_u32(ct, ATTR_SCTP_VTAG_REPL, n, NTA_SCTP_VTAG_REPL);
+@@ -135,18 +135,22 @@ static void build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n)
+
+ static void build_l4proto_dccp(const struct nf_conntrack *ct, struct nethdr *n)
+ {
+- ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
+- sizeof(struct nfct_attr_grp_port));
+-
++ /* DCCP is optional, make sure nf_conntrack_dccp is loaded */
+ if (!nfct_attr_is_set(ct, ATTR_DCCP_STATE))
+ return;
+
++ ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
++ sizeof(struct nfct_attr_grp_port));
+ ct_build_u8(ct, ATTR_DCCP_STATE, n, NTA_DCCP_STATE);
+ ct_build_u8(ct, ATTR_DCCP_ROLE, n, NTA_DCCP_ROLE);
+ }
+
+ static void build_l4proto_icmp(const struct nf_conntrack *ct, struct nethdr *n)
+ {
++ /* This is also used by ICMPv6 and nf_conntrack_ipv6 is optional */
++ if (!nfct_attr_is_set(ct, ATTR_ICMP_TYPE))
++ return;
++
+ ct_build_u8(ct, ATTR_ICMP_TYPE, n, NTA_ICMP_TYPE);
+ ct_build_u8(ct, ATTR_ICMP_CODE, n, NTA_ICMP_CODE);
+ ct_build_u16(ct, ATTR_ICMP_ID, n, NTA_ICMP_ID);
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover
new file mode 100644
index 000000000..6d92e637f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# (C) 2008 by Pablo Neira Ayuso <pablo@netfilter.org>
+# (C) 2009 Roman I Khimov <khimov@altell.ru>
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+#
+# Description:
+#
+# This is the script for primary-backup setups for keepalived
+# (http://www.keepalived.org). You may adapt it to make it work with other
+# high-availability managers.
+#
+# Do not forget to include the required modifications to your keepalived.conf
+# file to invoke this script during keepalived's state transitions.
+#
+# Contributions to improve this script are welcome :).
+#
+## Modified to work as init.d script under pacemaker control
+
+CONNTRACKD_BIN=/usr/sbin/conntrackd
+CONNTRACKD_LOCK=/var/lock/conntrack.lock
+CONNTRACKD_CONFIG=/etc/conntrackd/conntrackd.conf
+
+case "$1" in
+ start)
+ #
+ # commit the external cache into the kernel table
+ #
+ $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -c
+ if [ $? -eq 1 ]
+ then
+ logger "ERROR: failed to invoke conntrackd -c"
+ fi
+
+ #
+ # flush the internal and the external caches
+ #
+ $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -f
+ if [ $? -eq 1 ]
+ then
+ logger "ERROR: failed to invoke conntrackd -f"
+ fi
+
+ #
+ # resynchronize my internal cache to the kernel table
+ #
+ $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -R
+ if [ $? -eq 1 ]
+ then
+ logger "ERROR: failed to invoke conntrackd -R"
+ fi
+
+ #
+ # send a bulk update to backups
+ #
+ $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -B
+ if [ $? -eq 1 ]
+ then
+ logger "ERROR: failed to invoke conntrackd -B"
+ fi
+ ;;
+ stop)
+ $CONNTRACKD_BIN -t
+ $CONNTRACKD_BIN -n
+ ;;
+ status)
+ ;;
+ *)
+ logger "ERROR: unknown command"
+ echo "Usage: conntrack-failover {start|stop|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init
new file mode 100644
index 000000000..bce2075a7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# /etc/init.d/conntrackd
+#
+# Maximilian Wilhelm <max@rfc2324.org>
+# -- Mon, 06 Nov 2006 18:39:07 +0100
+#
+# Roman I Khimov <khimov@altell.ru>
+# -- Tue, 27 Oct 2009 14:34:00 +0300
+
+### BEGIN INIT INFO
+# Provides: conntrackd
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Description: Starts conntrackd
+# short-description: Starts conntrackd
+### END INIT INFO
+
+export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+NAME="conntrackd"
+DAEMON="/usr/sbin/conntrackd"
+CONFIG="/etc/conntrackd/conntrackd.conf"
+PIDFILE="/var/run/${NAME}.pid"
+
+
+# Gracefully exit if there is no daemon (debian way of life)
+if [ ! -x "${DAEMON}" ]; then
+ exit 0
+fi
+
+# Check for config file
+if [ ! -f /etc/conntrackd/conntrackd.conf ]; then
+ echo "Error: There is no config file for $NAME" >&2
+ exit 1;
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting $NAME: "
+ for i in nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_proto_dccp nf_conntrack_tftp \
+ nf_conntrack_sane nf_conntrack_pptp nf_conntrack_irc nf_conntrack_amanda nf_conntrack_h323 \
+ nf_conntrack_proto_udplite nf_conntrack_proto_gre nf_conntrack_proto_sctp nf_conntrack_ftp \
+ nf_conntrack_sip; do
+ modprobe $i >/dev/null 2>/dev/null &
+ done
+ start-stop-daemon --start --quiet --make-pidfile --pidfile "/var/run/${NAME}.pid" --background --exec "${DAEMON}"
+ RET=$?
+ if [ "$?" = "0" ]; then
+ sleep 2
+ # Sync with other server
+ conntrackd -n
+ echo "done."
+ else
+ echo "FAILED!"
+ fi
+ exit $RET
+ ;;
+ stop)
+ echo -n "Stopping $NAME:"
+ start-stop-daemon --stop --quiet --oknodo --pidfile "/var/run/${NAME}.pid" && echo "done." || echo "FAILED!"
+ ;;
+ status)
+ echo -n "conntrackd "
+ 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)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/conntrackd {start|stop|restart}"
+ exit 1
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch
new file mode 100644
index 000000000..c260403ea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## debian_defaultconfig.dpatch by <hesso@pool.math.tu-berlin.de>
+##
+## DP: Debian enhancements to the ebtables "sysconfig" default settings.
+
+@DPATCH@
+
+--- ebtables-2.0.8.1.orig/ebtables-config
++++ ebtables-2.0.8.1/ebtables-config
+@@ -1,17 +1,3 @@
+-# Save (and possibly restore) in text format.
+-# Value: yes|no, default: yes
+-# Save the firewall rules in text format to __SYSCONFIG__/ebtables
+-# If EBTABLES_BINARY_FORMAT="no" then restoring the firewall rules
+-# is done using this text format.
+-EBTABLES_TEXT_FORMAT="yes"
+-
+-# Save (and restore) in binary format.
+-# Value: yes|no, default: yes
+-# Save (and restore) the firewall rules in binary format to (and from)
+-# __SYSCONFIG__/ebtables.<chain>. Enabling this option will make
+-# firewall initialisation a lot faster.
+-EBTABLES_BINARY_FORMAT="yes"
+-
+ # Unload modules on restart and stop
+ # Value: yes|no, default: yes
+ # This option has to be 'yes' to get to a sane state for a firewall
+@@ -19,6 +5,12 @@
+ # modules.
+ EBTABLES_MODULES_UNLOAD="yes"
+
++# Load firewall rules on system startup.
++# Value: yes|no, default: no
++# Restores the ebtables rulesets from the last saved state when the
++# system boots up.
++EBTABLES_LOAD_ON_START="no"
++
+ # Save current firewall rules on stop.
+ # Value: yes|no, default: no
+ # Saves all firewall rules if firewall gets stopped
+@@ -35,3 +27,9 @@
+ # Save rule counters when saving a kernel table to a file. If the
+ # rule counters were saved, they will be restored when restoring the table.
+ EBTABLES_SAVE_COUNTER="no"
++
++# Backup suffix for ruleset save files.
++# Value: <string>, default: "~"
++# Keep one backup level of saved rules.
++# Set this variable to the empty string to disable backups.
++EBTABLES_BACKUP_SUFFIX="~"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
new file mode 100644
index 000000000..640025dba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
@@ -0,0 +1,163 @@
+#!/bin/sh
+
+[ -x /sbin/ebtables ] || exit 1
+
+EBTABLES_DUMPFILE_STEM=/etc/ebtables/dump
+
+RETVAL=0
+prog="ebtables"
+desc="Ethernet bridge filtering"
+umask 0077
+
+#default configuration
+EBTABLES_MODULES_UNLOAD="yes"
+EBTABLES_LOAD_ON_START="no"
+EBTABLES_SAVE_ON_STOP="no"
+EBTABLES_SAVE_ON_RESTART="no"
+EBTABLES_SAVE_COUNTER="no"
+EBTABLES_BACKUP_SUFFIX="~"
+
+config=/etc/default/$prog
+[ -f "$config" ] && . "$config"
+
+function get_supported_tables() {
+ EBTABLES_SUPPORTED_TABLES=
+ /sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission
+ if [ $? -eq 0 ]; then
+ echo "Error: insufficient privileges to access the ebtables rulesets."
+ exit 1
+ fi
+ for table in filter nat broute; do
+ /sbin/ebtables -t $table -L &> /dev/null
+ if [ $? -eq 0 ]; then
+ EBTABLES_SUPPORTED_TABLES="${EBTABLES_SUPPORTED_TABLES} $table"
+ fi
+ done
+}
+
+function load() {
+ RETVAL=0
+ get_supported_tables
+ echo -n "Restoring ebtables rulesets: "
+ for table in $EBTABLES_SUPPORTED_TABLES; do
+ echo -n "$table "
+ if [ -s ${EBTABLES_DUMPFILE_STEM}.$table ]; then
+ /sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table --atomic-commit
+ RET=$?
+ if [ $RET -ne 0 ]; then
+ echo -n "(failed) "
+ RETVAL=$RET
+ fi
+ else
+ echo -n "(no saved state) "
+ fi
+ done
+ if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+ echo -n "no kernel support. "
+ else
+ echo -n "done. "
+ fi
+ if [ $RETVAL -eq 0 ]; then
+ echo "ok"
+ else
+ echo "fail"
+ fi
+}
+
+function clear() {
+ RETVAL=0
+ get_supported_tables
+ echo -n "Clearing ebtables rulesets: "
+ for table in $EBTABLES_SUPPORTED_TABLES; do
+ echo -n "$table "
+ /sbin/ebtables -t $table --init-table
+ done
+
+ if [ "$EBTABLES_MODULES_UNLOAD" = "yes" ]; then
+ for mod in $(grep -E '^(ebt|ebtable)_' /proc/modules | cut -d' ' -f1) ebtables; do
+ rmmod $mod 2> /dev/null
+ done
+ fi
+ if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+ echo -n "no kernel support. "
+ else
+ echo -n "done. "
+ fi
+ if [ $RETVAL -eq 0 ]; then
+ echo "ok"
+ else
+ echo "fail"
+ fi
+}
+
+function save() {
+ RETVAL=0
+ get_supported_tables
+ echo -n "Saving ebtables rulesets: "
+ for table in $EBTABLES_SUPPORTED_TABLES; do
+ echo -n "$table "
+ [ -n "$EBTABLES_BACKUP_SUFFIX" ] && [ -s ${EBTABLES_DUMPFILE_STEM}.$table ] && \
+ mv ${EBTABLES_DUMPFILE_STEM}.$table ${EBTABLES_DUMPFILE_STEM}.$table$EBTABLES_BACKUP_SUFFIX
+ /sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table --atomic-save
+ RET=$?
+ if [ $RET -ne 0 ]; then
+ echo -n "(failed) "
+ RETVAL=$RET
+ else
+ if [ "$EBTABLES_SAVE_COUNTER" = "no" ]; then
+ /sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table -Z
+ fi
+ fi
+ done
+ if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+ echo -n "no kernel support. "
+ else
+ echo -n "done. "
+ fi
+ if [ $RETVAL -eq 0 ]; then
+ echo "ok"
+ else
+ echo "fail"
+ fi
+}
+
+case "$1" in
+ start)
+ [ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
+ ;;
+ stop)
+ [ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
+ clear
+ ;;
+ restart|reload|force-reload)
+ [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save
+ clear
+ [ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
+ ;;
+ load)
+ load
+ ;;
+ save)
+ save
+ ;;
+ status)
+ get_supported_tables
+ if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+ echo "No kernel support for ebtables."
+ RETVAL=1
+ else
+ echo -n "Ebtables support available, number of installed rules: "
+ for table in $EBTABLES_SUPPORTED_TABLES; do
+ COUNT=$(( $(/sbin/ebtables -t $table -L | sed -e "/^Bridge chain/! d" -e "s/^.*entries: //" -e "s/,.*$/ +/") 0 ))
+ echo -n "$table($COUNT) "
+ done
+ echo ok
+ RETVAL=0
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload|load|save|status}" >&2
+ RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init
new file mode 100755
index 000000000..c9a77a29e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# init script for the Ethernet Bridge filter tables
+#
+# Written by Dag Wieers <dag@wieers.com>
+# Modified by Rok Papez <rok.papez@arnes.si>
+# Bart De Schuymer <bdschuym@pandora.be>
+# Adapted to Debian by Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
+# Adapted to OpenEmbedded by Roman I Khimov <khimov@altell.ru>
+#
+# chkconfig: - 15 85
+# description: Ethernet Bridge filtering tables
+#
+### BEGIN INIT INFO
+# Provides: ebtables
+# Required-Start:
+# Required-Stop:
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: ebtables ruleset management
+# Description: Saves and restores the state of the ebtables rulesets.
+### END INIT INFO
+
+/usr/sbin/ebtables.common $1
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service
new file mode 100644
index 000000000..3abd1fe3e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ethernet Bridge Filtering Tables
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@SBINDIR@/ebtables.common start
+ExecStop=@SBINDIR@/ebtables.common stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch
new file mode 100644
index 000000000..bcd9bed23
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch
@@ -0,0 +1,43 @@
+diff --git a/Makefile b/Makefile
+index c1106a4..7ea6b7a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -157,31 +157,31 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\//\\\//g')
+ scripts: ebtables-save ebtables.sysv ebtables-config
+ cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
+ mkdir -p $(DESTDIR)$(BINDIR)
+- install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
++ install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
+ cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
+ if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
+- if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
++ if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
+ cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
+ if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
+- if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
++ if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
+ rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
+
+ tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
+ $(MANDIR)/man8/ebtables.8: ebtables.8
+ mkdir -p $(DESTDIR)$(@D)
+ sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
+- install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
++ install -m 0644 ebtables.8_ $(DESTDIR)$@
+ rm -f ebtables.8_
+
+ $(DESTDIR)$(ETHERTYPESFILE): ethertypes
+ mkdir -p $(@D)
+- install -m 0644 -o root -g root $< $@
++ install -m 0644 $< $@
+
+ .PHONY: exec
+ exec: ebtables ebtables-restore
+ mkdir -p $(DESTDIR)$(BINDIR)
+- install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
+- install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
++ install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
++ install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
+
+ .PHONY: install
+ install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) exec scripts
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch
new file mode 100644
index 000000000..336119d6b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch
@@ -0,0 +1,25 @@
+link ebtables with --no-as-needed and adjust the link order to fix runtime crash
+
+Program terminated with signal 11, Segmentation fault.
+#0 0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+(gdb) bt
+#0 0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+#1 0x00007ffaa83824dc in do_command () from /lib64/ebtables/libebtc.so
+#2 0x000000000040065c in ?? ()
+#3 0x00007ffaa7fed755 in __libc_start_main () from /lib64/libc.so.6
+#4 0x0000000000400691 in ?? ()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: ebtables-v2.0.10-4/Makefile
+===================================================================
+--- ebtables-v2.0.10-4.orig/Makefile 2011-12-15 12:02:47.000000000 -0800
++++ ebtables-v2.0.10-4/Makefile 2012-12-17 22:09:45.065973753 -0800
+@@ -90,7 +90,7 @@
+ $(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
+
+ ebtables: $(OBJECTS) ebtables-standalone.o libebtc.so
+- $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
++ $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -Wl,--no-as-needed $(EXT_LIBSI) -lebtc \
+ -Wl,-rpath,$(LIBDIR)
+
+ ebtablesu: ebtablesu.c
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
new file mode 100644
index 000000000..e9b726c5f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
@@ -0,0 +1,90 @@
+SUMMARY = "Filtering tool for a Linux-based bridging firewall"
+DESCRIPTION = "Utility for basic Ethernet frame filtering on a Linux bridge, \
+ advanced logging, MAC DNAT/SNAT and brouting."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=53b4a999993871a28ab1488fdbd2e73e"
+SECTION = "net"
+PR = "r3"
+
+RDEPENDS_${PN} += "perl"
+
+RRECOMMENDS_${PN} += "kernel-module-ebtables \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ebtables/ebtables-v${PV}.tar.gz \
+ file://installnonroot.patch \
+ file://01debian_defaultconfig.patch \
+ file://ebtables.init \
+ file://ebtables.common \
+ file://ebtables.service \
+ file://no-as-needed.patch \
+"
+
+SRC_URI[md5sum] = "506742a3d44b9925955425a659c1a8d0"
+SRC_URI[sha256sum] = "dc6f7b484f207dc712bfca81645f45120cb6aee3380e77a1771e9c34a9a4455d"
+
+S = "${WORKDIR}/ebtables-v${PV}"
+
+inherit update-rc.d systemd
+
+python __anonymous () {
+ import re
+
+ karch = d.getVar('KARCH', True)
+ multilib = d.getVar('MLPREFIX', True)
+
+ if multilib and karch == 'powerpc64':
+ searchstr = "lib.?32"
+ reg = re.compile(searchstr)
+ if reg.search(multilib):
+ d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
+}
+
+EXTRA_OEMAKE = " \
+ BINDIR=${base_sbindir} \
+ MANDIR=${mandir} \
+ ETHERTYPESPATH=${sysconfdir} \
+ INITDIR=${sysconfdir}/init.d \
+ SYSCONFIGDIR=${sysconfdir}/default \
+ LIBDIR=${base_libdir}/ebtables \
+ 'CC=${CC}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS} -Wl,--no-as-needed' \
+ 'LD=${LD}' \
+"
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/ebtables.common ${D}${sbindir}/ebtables.common
+ # Fix hardcoded paths in scripts
+ sed -i 's!/sbin/!${base_sbindir}/!g' ${D}${sbindir}/ebtables.common
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sbindir}/ebtables.common
+
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/ebtables
+ oe_runmake DESTDIR='${D}' install
+ install -m 0755 ${WORKDIR}/ebtables.init ${D}/${sysconfdir}/init.d/ebtables
+ mv ${D}${sysconfdir}/default/ebtables-config ${D}${sysconfdir}/default/ebtables
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ebtables
+
+ # The script ebtables-save refernces perl in exec_prefix, so
+ # move it to sbindir to avoid QA issue
+ install -d ${D}/${sbindir}
+ mv ${D}/${base_sbindir}/ebtables-save ${D}/${sbindir}
+
+ # Install systemd service files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/ebtables.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/ebtables.service
+}
+
+CONFFILES_${PN} += "${sysconfdir}/default/ebtables"
+
+INITSCRIPT_NAME = "ebtables"
+INITSCRIPT_PARAMS = "start 41 S . stop 41 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ebtables.service"
+
+FILES_${PN}-dbg += "${base_libdir}/ebtables/.debug"
+FILES_${PN} += "${base_libdir}/ebtables/*.so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libmnl/libmnl_1.0.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libmnl/libmnl_1.0.3.bb
new file mode 100644
index 000000000..b3a5f2e95
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libmnl/libmnl_1.0.3.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Minimalistic user-space Netlink utility library"
+DESCRIPTION = "Minimalistic user-space library oriented to Netlink developers, providing \
+ functions for common tasks in parsing, validating, and constructing both the Netlink header and TLVs."
+HOMEPAGE = "http://www.netfilter.org/projects/libmnl/index.html"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "http://www.netfilter.org/projects/libmnl/files/libmnl-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "7d95fc3bea3365bc03c48e484224f65f"
+SRC_URI[tar.sha256sum] = "6f14336e9acdbc62c2dc71bbb59ce162e54e9af5c80153e92476c5443fe784de"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch
new file mode 100644
index 000000000..16e4af405
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch
@@ -0,0 +1,89 @@
+VLAs in structs and unions (non-PODs) is unsupported in non-gcc compilers
+therefore convert it to not use VLAs instead use fixed arrays
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: libnetfilter_conntrack-1.0.4/src/conntrack/api.c
+===================================================================
+--- libnetfilter_conntrack-1.0.4.orig/src/conntrack/api.c
++++ libnetfilter_conntrack-1.0.4/src/conntrack/api.c
+@@ -954,16 +954,15 @@ int nfct_query(struct nfct_handle *h,
+ const enum nf_conntrack_query qt,
+ const void *data)
+ {
+- size_t size = 4096; /* enough for now */
+ union {
+- char buffer[size];
++ char buffer[4096];
+ struct nfnlhdr req;
+ } u;
+
+ assert(h != NULL);
+ assert(data != NULL);
+
+- if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, size) == -1)
++ if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, 4096) == -1)
+ return -1;
+
+ return nfnl_query(h->nfnlh, &u.req.nlh);
+@@ -986,16 +985,15 @@ int nfct_send(struct nfct_handle *h,
+ const enum nf_conntrack_query qt,
+ const void *data)
+ {
+- size_t size = 4096; /* enough for now */
+ union {
+- char buffer[size];
++ char buffer[4096];
+ struct nfnlhdr req;
+ } u;
+
+ assert(h != NULL);
+ assert(data != NULL);
+
+- if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, size) == -1)
++ if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, 4096) == -1)
+ return -1;
+
+ return nfnl_send(h->nfnlh, &u.req.nlh);
+Index: libnetfilter_conntrack-1.0.4/src/expect/api.c
+===================================================================
+--- libnetfilter_conntrack-1.0.4.orig/src/expect/api.c
++++ libnetfilter_conntrack-1.0.4/src/expect/api.c
+@@ -669,16 +669,15 @@ int nfexp_query(struct nfct_handle *h,
+ const enum nf_conntrack_query qt,
+ const void *data)
+ {
+- size_t size = 4096; /* enough for now */
+ union {
+- char buffer[size];
++ char buffer[4096];
+ struct nfnlhdr req;
+ } u;
+
+ assert(h != NULL);
+ assert(data != NULL);
+
+- if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, size) == -1)
++ if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, 4096) == -1)
+ return -1;
+
+ return nfnl_query(h->nfnlh, &u.req.nlh);
+@@ -701,16 +700,15 @@ int nfexp_send(struct nfct_handle *h,
+ const enum nf_conntrack_query qt,
+ const void *data)
+ {
+- size_t size = 4096; /* enough for now */
+ union {
+- char buffer[size];
++ char buffer[4096];
+ struct nfnlhdr req;
+ } u;
+
+ assert(h != NULL);
+ assert(data != NULL);
+
+- if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, size) == -1)
++ if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, 4096) == -1)
+ return -1;
+
+ return nfnl_send(h->nfnlh, &u.req.nlh);
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.4.bb
new file mode 100644
index 000000000..ecbc86ba7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Netfilter connection tracking library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter connection tracking state table"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_conntrack/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_conntrack/files/libnetfilter_conntrack-${PV}.tar.bz2;name=tar \
+ file://replace-VLAs-in-union.patch \
+"
+SRC_URI[tar.md5sum] = "18cf80c4b339a3285e78822dbd4f08d7"
+SRC_URI[tar.sha256sum] = "d9ec4a3caf49417f2b0a2d8d44249133e8c3ec78c757b7eb8c273f1cb6929c7d"
+
+S = "${WORKDIR}/libnetfilter_conntrack-${PV}"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb
new file mode 100644
index 000000000..3d3799726
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Netfilter connection tracking helper library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter user-space helper infrastructure"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_cthelper/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "b2efab1a3a198a5add448960ba011acd"
+SRC_URI[tar.sha256sum] = "07618e71c4d9a6b6b3dc1986540486ee310a9838ba754926c7d14a17d8fccf3d"
+
+S = "${WORKDIR}/libnetfilter_cthelper-${PV}"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb
new file mode 100644
index 000000000..dcf748562
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Netfilter connection tracking timeout library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter fine-grain connection tracking timeout infrastructure"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "7697437fc9ebb6f6b83df56a633db7f9"
+SRC_URI[tar.sha256sum] = "aeab12754f557cba3ce2950a2029963d817490df7edb49880008b34d7ff8feba"
+
+S = "${WORKDIR}/libnetfilter_cttimeout-${PV}"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
new file mode 100644
index 000000000..30c9ae6bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Netfilter logging library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter log message (NFLOG)"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_log/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_log/files/libnetfilter_log-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "2a4bb0654ae675a52d2e8d1c06090b94"
+SRC_URI[tar.sha256sum] = "74e0fe75753dba3ac114531b5e73240452c789a3f3adccf5c51217da1d933b21"
+
+S = "${WORKDIR}/libnetfilter_log-${PV}"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.2.bb
new file mode 100644
index 000000000..ddf2aa5c4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.2.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Netfilter packet queue access library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to access the Linux kernel netfilter packet queue"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_queue/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_queue/files/libnetfilter_queue-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "df09befac35cb215865b39a36c96a3fa"
+SRC_URI[tar.sha256sum] = "838490eb5dbe358f9669823704982f5313a8d397111562373200203f93ac1a32"
+
+S = "${WORKDIR}/libnetfilter_queue-${PV}"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb
new file mode 100644
index 000000000..edd0f866f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Low-level library for netfilter related kernel/userspace communication"
+DESCRIPTION = "libnfnetlink is the low-level library for netfilter related \
+kernel/userspace communication. It provides a generic messaging \
+infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log, \
+nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or \
+management tools in userspace."
+HOMEPAGE = "http://www.netfilter.org/projects/libnfnetlink/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "http://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-${PV}.tar.bz2;name=tar"
+SRC_URI[tar.md5sum] = "98927583d2016a9fb1936fed992e2c5e"
+SRC_URI[tar.sha256sum] = "f270e19de9127642d2a11589ef2ec97ef90a649a74f56cf9a96306b04817b51a"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.0.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.0.5.bb
new file mode 100644
index 000000000..6171151df
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.0.5.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26"
+SECTION = "libs"
+DEPENDS = "libmnl"
+
+SRC_URI = "http://netfilter.org/projects/libnftnl/files/${BP}.tar.bz2 \
+ "
+
+SRC_URI[md5sum] = "af0c62ce6bbd7a7d39def0996c1c17c9"
+SRC_URI[sha256sum] = "f6d4f5a702e38bc7987f2363f9fcd65930e8b702595c221a497e2f3a359be497"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/files/fix-to-generate-ntf.8.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/files/fix-to-generate-ntf.8.patch
new file mode 100644
index 000000000..8dce90a75
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/files/fix-to-generate-ntf.8.patch
@@ -0,0 +1,26 @@
+[PATCH] disable to make ntf.8 man
+
+Upstream-Status: Pending
+
+$DB2MAN do not support the xinclude parameter whether it is
+docbook2x-man or other, so disable to make ntf.8 man
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ doc/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index a92de7f..537c36b 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -1,5 +1,5 @@
+ if BUILD_MAN
+-man_MANS = nft.8
++#man_MANS = nft.8
+ endif
+
+ if BUILD_PDF
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.5.bb
new file mode 100644
index 000000000..11b5e5a90
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.5.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Netfilter Tables userspace utillites"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
+SECTION = "net"
+
+DEPENDS = "libmnl libnftnl readline gmp"
+RRECOMMENDS_${PN} += "kernel-module-nf-tables \
+ "
+
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \
+ file://fix-to-generate-ntf.8.patch \
+ "
+
+SRC_URI[md5sum] = "94bfe1c54bcb9f6ed974835f2fca8069"
+SRC_URI[sha256sum] = "1fb6dff333d8a4fc347cbbe273bf905a2634b27a8c39df0d3a45d5a3fde10ad6"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-irc/znc/znc_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-irc/znc/znc_git.bb
new file mode 100644
index 000000000..22aecbad2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-irc/znc/znc_git.bb
@@ -0,0 +1,31 @@
+SUMMARY = "ZNC, an advanced IRC bouncer"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+DEPENDS = "openssl zlib icu"
+
+PV = "1.6.0"
+
+SRC_URI = "git://github.com/znc/znc.git;name=znc \
+ git://github.com/jimloco/Csocket.git;destsuffix=git/third_party/Csocket;name=Csocket \
+ "
+SRCREV_znc = "f47e8465efa4e1cd948b9caae93ac401b4355df8"
+SRCREV_Csocket = "07b4437396122650e5b8fb3d014e820a5decf4ee"
+
+# This constructs a composite revision based on multiple SRCREV's.
+#
+SRCREV_FORMAT = "znc_Csocket"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+# ZNC has a custom autogen.sh that states that this command is needed *and* expected to fail
+do_configure_prepend() {
+ automake --add-missing || true
+}
+
+do_install_append() {
+ sed -i 's/-fdebug-prefix-map[^ ]*//g; s#${STAGING_DIR_TARGET}##g' ${D}${libdir}/pkgconfig/*.pc
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch
new file mode 100644
index 000000000..ea36b1cd9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/0001-testmmap-fix-compile-issue-with-gcc-5.x.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+From c81bf54d6eb870286662a11d3b4a994717c47696 Mon Sep 17 00:00:00 2001
+From: Armin Kuster <akuster808@gmail.com>
+Date: Tue, 8 Sep 2015 05:36:27 -0700
+Subject: [PATCH] testmmap: fix compile issue with gcc 5.x
+
+this fixes:
+examples/testmmap.c:540:10: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka const int}' [-Werror=format=]
+| printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
+| ^
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+---
+ examples/testmmap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/testmmap.c b/examples/testmmap.c
+index d7f6acc..934489a 100644
+--- a/examples/testmmap.c
++++ b/examples/testmmap.c
+@@ -537,7 +537,7 @@ do_if()
+ for (i = 0; i < 5; i++)
+ printf("spare1[%d] %u\n", i, nifp->ni_spare1[i]);
+ for (i = 0; i < (nifp->ni_tx_rings + nifp->ni_rx_rings + 2); i++)
+- printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
++ printf("ring_ofs[%d] %zd\n", i, nifp->ring_ofs[i]);
+ }
+
+ struct netmap_ring *
+--
+2.3.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch
new file mode 100644
index 000000000..b050bf001
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch
@@ -0,0 +1,97 @@
+The makefile assumes building locally.
+
+Upstream Status: Inappropriate [Native]
+
+The configure is not auto-make based
+
+Signed-of-by: Armin Kuster <akuster@mvista.com>
+
+Index: LINUX/netmap.mak.in
+===================================================================
+--- a/LINUX/netmap.mak.in
++++ b/LINUX/netmap.mak.in
+@@ -12,10 +12,9 @@ SRCDIR:=@SRCDIR@
+ # The following commands are needed to build the modules as out-of-tree,
+ # in fact the kernel sources path must be specified.
+
+-PWD ?= $(CURDIR)
+
+ # Additional compile flags (e.g. header location)
+-EXTRA_CFLAGS := -I$(PWD) -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP
++EXTRA_CFLAGS := -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP
+ EXTRA_CFLAGS += -Wno-unused-but-set-variable
+ EXTRA_CFLAGS += $(foreach s,$(SUBSYS),-DCONFIG_NETMAP_$(shell echo $s|tr a-z- A-Z_))
+
+Index: LINUX/configure
+===================================================================
+--- a/LINUX/configure
++++ b/LINUX/configure
+@@ -349,52 +349,6 @@ reset_tests() {
+ EOF
+ }
+
+-# run_tests: run all accumulated tests and exec the pertinent
+-# success/failure actions for each one.
+-run_tests() {
+- local t= # prevent -EOF to eat the make TAB
+- cat > $TMPDIR/Makefile <<-EOF
+- ifneq (\$(KERNELRELEASE),)
+- obj-m := $TESTOBJS
+- else
+- S_DRIVERS := $(drv print)
+- all: \$(S_DRIVERS:%=get-%)
+- $t \$(MAKE) -C $ksrc M=\$\$PWD $kopts
+-
+- -include $TOPDIR/drivers.mak
+- EOF
+- for d in $(drv print); do
+- cat >> $TMPDIR/Makefile <<-EOF
+- get-$d:
+- $t [ -z "\$($d-src)" ] || cp -Rp \$($d-src) \$(if \$($d-dst),\$($d-dst),.)
+- $t touch get-$d
+- EOF
+- done
+- echo endif >> $TMPDIR/Makefile
+- {
+- cat <<-EOF
+-##############################################################################
+-## BEGIN RUNNING TESTS: $(date)
+-##############################################################################
+-## Makefile:
+- EOF
+- cat $TMPDIR/Makefile
+- cat <<-EOF
+-##############################################################################
+- EOF
+- } >> config.log
+- (
+- cd $TMPDIR
+- make -k -j $(grep -c processor /proc/cpuinfo)
+- ) >> config.log
+- eval "$TESTPOSTPROC"
+- cat >> config.log <<-EOF
+-##############################################################################
+-## END RUNNING TESTS: $(date)
+-##############################################################################
+- EOF
+-}
+-
+ configh=netmap_linux_config.h
+ # succes/failure actions are expected to write some macros
+ # in netma_linux_config.h. The following functions can be
+@@ -619,7 +573,6 @@ configuration. Please check 'config.log'
+ reset_tests
+ rm -f drivers.mak
+ add_test true broken_buildsystem < /dev/null
+-run_tests
+
+ drvname2config() {
+ local name=$1
+@@ -1280,7 +1233,6 @@ cat > $configh <<-EOF
+ EOF
+
+ # the TESTPOSTPROC script will add macros to $configh
+-run_tests
+
+ define DRIVER_SUFFIX \"$drvsuffix\"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
new file mode 100644
index 000000000..406a4f3cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
@@ -0,0 +1,89 @@
+require netmap.inc
+
+DEPENDS = "virtual/kernel"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
+inherit module
+
+CLEANBROKEN = "1"
+
+export INSTALL_MOD_DIR="kernel/netmap-modules"
+
+EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \
+ --kernel-sources=${STAGING_KERNEL_DIR} \
+ --install-mod-path=${D} \
+ --driver-suffix="-netmap" \
+ "
+
+# The driver builds are optional, but for deterministic builds,
+# we should be able to explicitly enable/disable the builds
+# for them in a proper place (maybe in BSP).
+# But we can't use PACKAGECONFIG since there is no option for
+# each driver, and the options are:
+# --no-drivers do not compile any driver
+# --no-drivers= do not compile the given drivers (comma sep.)
+# --drivers= only compile the given drivers (comma sep.)
+#
+# So use NETMAP_DRIVERS and the following python code to add proper
+# configs to EXTRA_OECONF.
+#
+# The default is no-drivers, and all supported drivers are listed
+# in NETMAP_ALL_DRIVERS.
+NETMAP_DRIVERS ??= ""
+NETMAP_ALL_DRIVERS = "ixgbe igb e1000e e1000 veth.c forcedeth.c virtio_net.c r8169.c"
+
+python __anonymous () {
+ drivers_list = d.getVar("NETMAP_DRIVERS", True).split()
+ all_drivers_list = d.getVar("NETMAP_ALL_DRIVERS", True).split()
+ config_drivers = "--drivers=" + ",".join(drivers_list)
+
+ extra_oeconf_drivers = bb.utils.contains_any('NETMAP_DRIVERS', all_drivers_list, config_drivers, '--no-drivers', d)
+ d.appendVar("EXTRA_OECONF", extra_oeconf_drivers)
+}
+
+LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}"
+LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}"
+
+do_configure () {
+ cd ${S}/LINUX
+ ./configure ${EXTRA_OECONF}
+}
+
+do_configure_append () {
+ cat >> ${S}/LINUX/netmap_linux_config.h <<EOF
+#define NETMAP_LINUX_HAVE_HRTIMER_MODE_REL
+#define NETMAP_LINUX_HAVE_HRTIMER_FORWARD_NOW
+#define NETMAP_LINUX_HAVE_PHYS_ADDR_T
+#define NETMAP_LINUX_HAVE_ACCESS_ONCE
+#define NETMAP_LINUX_HAVE_NETDEV_OPS
+#define NETMAP_LINUX_HAVE_INIT_NET
+#define NETMAP_LINUX_HAVE_LIVE_ADDR_CHANGE
+#define NETMAP_LINUX_HAVE_TX_SKB_SHARING
+#define NETMAP_LINUX_HAVE_UNLOCKED_IOCTL
+#define NETMAP_LINUX_HAVE_PERNET_OPS_ID
+#define NETMAP_LINUX_VIRTIO_FUNCTIONS
+#define NETMAP_LINUX_VIRTIO_FREE_PAGES
+#define NETMAP_LINUX_VIRTIO_GET_VRSIZE
+#define NETMAP_LINUX_TIMER_RTYPE enum hrtimer_restart
+#define NETMAP_LINUX_VIRTIO_MULTI_QUEUE
+#define NETMAP_LINUX_HAVE_E1000E_EXT_RXDESC
+#define NETMAP_LINUX_HAVE_E1000E_DOWN2
+EOF
+
+if ${@ 'false' if (bb.utils.vercmp_string(d.getVar('KERNEL_VERSION', True), '3.17') < 0) else 'true' } ; then
+ echo OK
+ cat >> ${S}/LINUX/netmap_linux_config.h <<EOF
+#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
+EOF
+fi
+}
+
+do_compile () {
+ cd ${S}/LINUX
+ oe_runmake
+}
+
+do_install () {
+ cd ${S}/LINUX
+ oe_runmake install
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc
new file mode 100644
index 000000000..ab33e765d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap.inc
@@ -0,0 +1,17 @@
+SUMMARY = "netmap and VALE - very fast packet I/O from userspace (FreeBSD/Linux)"
+DESCRIPTION= "NETMAP is a framework for very fast packet I/O from userspace. VALE is an equally fast in-kernel software switch using the netmap API. Both are implemented as a single kernel module for FreeBSD and Linux, and can deal with line rate on real or emulated 10 Gbit ports."
+SECTION = "networking"
+HOMEPAGE = "http://code.google.com/p/netmap/"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;beginline=13;endline=14;md5=56ae0b9c7ba0476ab9098de94c2714d6"
+
+SRCREV = "da9e19e69b84e4f6f8ae125f8d01b42a4abade6a"
+PV = "master+git${SRCPV}"
+
+SRC_URI = "git://github.com/luigirizzo/netmap.git"
+SRC_URI += "file://makefile_fixup.patch"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = '(x86_64|i.86|mips|arm).*-linux'
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb
new file mode 100644
index 000000000..a0285851a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/netmap/netmap_git.bb
@@ -0,0 +1,34 @@
+require netmap.inc
+
+DEPENDS = "netmap-modules"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \
+ --kernel-sources=${STAGING_KERNEL_DIR} \
+ --no-drivers \
+ --disable-generic \
+ --prefix=${prefix} \
+ --destdir=${D} \
+ --cc='${CC}' \
+ --ld='${LD}' \
+ "
+SRC_URI += "file://0001-testmmap-fix-compile-issue-with-gcc-5.x.patch"
+
+do_configure () {
+ cd ${S}/LINUX
+ ./configure ${EXTRA_OECONF}
+}
+
+do_compile () {
+ cd ${S}/LINUX
+ make apps
+}
+
+do_install () {
+ cd ${S}/LINUX
+ make install-apps DESTDIR=${D}
+}
+
+FILES_${PN} += "${bindir}"
+RDEPENDS_${PN} = "kernel-module-netmap"
+RRECOMMENDS_${PN} = "kernel-module-netmap"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch
new file mode 100644
index 000000000..5a47fd917
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch
@@ -0,0 +1,28 @@
+This adds ARG_MAX define to be _SC_ARG_MAX
+
+Upstream-Status: Inappropriate.
+Most distros have their own verion for this fix.
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-ftp-0.17/ftp/glob.c
+===================================================================
+--- netkit-ftp-0.17.orig/ftp/glob.c
++++ netkit-ftp-0.17/ftp/glob.c
+@@ -50,6 +50,7 @@ char glob_rcsid[] =
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+
+ #include "ftp_var.h" /* for protos only */
+ #include "glob.h"
+@@ -57,6 +58,9 @@ char glob_rcsid[] =
+ #define QUOTE 0200
+ #define TRIM 0177
+ #define eq(a,b) (strcmp(a, b)==0)
++#ifndef ARG_MAX
++#define ARG_MAX (sysconf(_SC_ARG_MAX))
++#endif
+ #define GAVSIZ (ARG_MAX/6)
+ #define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb
new file mode 100644
index 000000000..37f5bc725
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "netkit-ft includes the ftp client."
+SECTION = "net"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+LICENSE = "BSD"
+
+LIC_FILES_CHKSUM = "file://ftp/ftp.c;beginline=2;endline=3;md5=2d40a75a50d83b8f6317b3f53db72bfa"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}-31.debian.tar.xz;name=patch31 \
+ file://Add_ARG_MAX_define.patch \
+"
+
+SRC_URI[archive.md5sum] = "94441610c9b86ef45c4c6ec609444060"
+SRC_URI[archive.sha256sum] = "61c913299b81a4671ff089aac821329f7db9bc111aa812993dd585798b700349"
+SRC_URI[patch31.md5sum] = "93d71e28ce70df69e080c7f90da63cac"
+SRC_URI[patch31.sha256sum] = "4edd46a32d70daa7ba00f0ebf0118dc5d17dff23d6e46aa21a2722be2e22d1c1"
+
+inherit autotools-brokensep
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+}
+
+BINMODE = "0755"
+MANMODE = "0644"
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man5
+
+ install -m${BINMODE} ${S}/ftp/ftp ${D}${bindir}
+ ln -sf ftp ${D}${bindir}/pftp
+ install -m${MANMODE} ${S}/ftp/ftp.1 ${D}${mandir}/man1
+ ln -sf ftp.1 ${D}${mandir}/man1/pftp.1
+ install -m${MANMODE} ${S}/ftp/netrc.5 ${D}${mandir}/man5
+}
+
+PACKAGES = "${PN} ${PN}-doc ${BPN}-dbg"
+FILES_${PN} = "${bindir}/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+ ${bindir}/.debug"
+
+RDEPENDS_${PN} = "readline"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch
new file mode 100644
index 000000000..d54cea9fd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch
@@ -0,0 +1,39 @@
+This fixes an issue when building with gcc 4.x
+
+https://github.com/openembedded/openembedded/tree/master/recipes/netkit-rpc/netkit-rpc
+
+Upstream-status: Backported
+
+Signed-off-By: Armin Kuster <akuster808@gmail.com>
+
+--- netkit-rpc-0.17/rpcgen/rpc_cout.c~gcc4
++++ netkit-rpc-0.17/rpcgen/rpc_cout.c
+@@ -101,8 +101,6 @@
+ case DEF_TYPEDEF:
+ emit_typedef(def);
+ break;
+- default:
+- /* can't happen */
+ }
+ print_trailer();
+ }
+@@ -664,9 +662,6 @@
+ decl->name,decl->array_max);
+ emit_single_in_line(decl,flag,REL_VECTOR);
+ f_print(fout,"\t\t }\n\t\t };\n");
+-
+- default:
+- /* ?... do nothing I guess */
+ }
+ }
+
+--- netkit-rpc-0.17/rpcgen/rpc_hout.c~gcc4
++++ netkit-rpc-0.17/rpcgen/rpc_hout.c
+@@ -106,8 +106,6 @@
+ f_print(fout, "\n");
+ pprogramdef(def);
+ break;
+- default:
+- /* ?... shouldn't happen I guess */
+ }
+ }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
new file mode 100644
index 000000000..abc9d88cb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "netkit-rpc includes rpcinfo and rpcgen."
+HOMEPAGE = "http://ftp.linux.org.uk/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "SPL-1.0"
+LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89"
+
+SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \
+ file://gcc4.patch"
+SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642"
+SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b"
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ echo "LDFLAGS=${LDFLAGS}" > MCONFIG
+ echo "CC=${CC}" >> MCONFIG
+ echo "LD=${LD}" >> MCONFIG
+ echo "CFLAGS=${CFLAGS}" >> MCONFIG
+ echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+}
+
+do_compile () {
+ oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}'
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man8
+
+ # remove strip flag
+ sed -i 's/install -s/install/' rpcinfo/Makefile
+ sed -i 's/install -s/install/' rpcgen/Makefile
+
+ oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+ 'DAEMONMODE=0755' 'MANMODE=0644' \
+ 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' install
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
new file mode 100644
index 000000000..1d3631d47
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
@@ -0,0 +1,27 @@
+fix host variable when rsh is renamed to other.
+
+Upstream-Status: Pending
+
+If rsh is renamed to other, like rsh.netkit, host variable is assigned to
+rsh.netkit, which is wrong.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ rsh/rsh.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/rsh/rsh.c b/rsh/rsh.c
+index ac594f9..11f533e 100644
+--- a/rsh/rsh.c
++++ b/rsh/rsh.c
+@@ -100,7 +100,6 @@ main(int argc, char *argv[])
+ #else
+ if (!strcmp(p, "rsh")) asrsh = 1;
+ #endif
+- else host = p;
+
+ /* handle "rsh host flags" */
+ if (!host && argc > 2 && argv[1][0] != '-') {
+--
+1.7.5.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
new file mode 100644
index 000000000..efd060f36
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
@@ -0,0 +1,30 @@
+make rexec support ipv6
+
+Upstream-status: Pending
+
+rexec equals rexec_af(... ,AF_INET) which only support ipv4,
+use rexec_af(..., AF_UNSPEC) to support both ipv6 and ipv4.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ rexec/rexec.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rexec/rexec.c b/rexec/rexec.c
+index 0913c02..9c8f769 100644
+--- a/rexec/rexec.c
++++ b/rexec/rexec.c
+@@ -214,8 +214,8 @@ int main(int argc, char *argv[])
+ passwd = getpass("Password: ");
+ }
+
+- if ( (sock = rexec(&host, port_exec, user_name, passwd, command,
+- p_to_aux_sock)) < 0 )
++ if ( (sock = rexec_af(&host, port_exec, user_name, passwd, command,
++ p_to_aux_sock, AF_UNSPEC)) < 0 )
+ {
+ fprintf(stderr,"%s: Error in rexec system call: ",argv[0]);
+ perror(NULL);
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch
new file mode 100644
index 000000000..fdd535be1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch
@@ -0,0 +1,39 @@
+netkit-rsh:
+Allow to build with no PAM enabled.
+
+Upstream-Status: Inappropriate [ no upstream maintaner ]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-rsh-0.17/rshd/rshd.c
+===================================================================
+--- netkit-rsh-0.17.orig/rshd/rshd.c
++++ netkit-rsh-0.17/rshd/rshd.c
+@@ -110,9 +110,11 @@ extern char **environ;
+ static void error(const char *fmt, ...);
+ static void doit(struct sockaddr *fromp, socklen_t fromlen);
+ static char *getstr(char *, size_t, const char *);
++#ifdef USE_PAM
+ static int err_conv(
+ int, const struct pam_message **, struct pam_response **, void *
+ );
++#endif /* USE_PAM */
+
+ extern int _check_rhosts_file;
+
+@@ -256,6 +258,7 @@ static void stderr_parent(int sock, int
+ }
+
+
++#ifdef USE_PAM
+ static int err_conv(
+ int num_msg, const struct pam_message **msg,
+ struct pam_response **resp, void *appdata_ptr
+@@ -266,6 +269,7 @@ static int err_conv(
+ (void) appdata_ptr;
+ return PAM_CONV_ERR;
+ }
++#endif
+
+ static struct passwd *doauth(const char *remuser,
+ const char *hostname,
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
new file mode 100644
index 000000000..94e5dda50
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
@@ -0,0 +1,10 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rexec" must be
+# listed in /etc/securetty.
+auth required pam_nologin.so
+auth required pam_env.so
+auth include common-auth
+account include common-account
+session optional pam_keyinit.so force revoke
+session include common-session
+session required pam_loginuid.so
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
new file mode 100644
index 000000000..7354360ae
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
@@ -0,0 +1,20 @@
+# default: off
+# description:
+# Rexecd is the server for the rexec program. The server provides remote
+# execution facilities with authentication based on user names and
+# passwords.
+#
+service exec
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = /usr/sbin/tcpd
+ server_args = /usr/sbin/in.rexecd
+ disable = yes
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
new file mode 100644
index 000000000..b30f139cb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
@@ -0,0 +1,12 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rlogin" must be
+# listed in /etc/securetty.
+auth required pam_nologin.so
+auth required pam_securetty.so
+auth required pam_env.so
+auth include common-auth
+account include common-account
+password include common-password
+session optional pam_keyinit.so force revoke
+session include common-session
+session required pam_loginuid.so
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
new file mode 100644
index 000000000..70493e603
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
@@ -0,0 +1,23 @@
+# default: off
+# description:
+# Rlogind is a server for the rlogin program. The server provides remote
+# execution with authentication based on privileged port numbers from trusted
+# host
+#
+service login
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = /usr/sbin/tcpd
+ server_args = /usr/sbin/in.rlogind -a
+ disable = yes
+}
+
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch
new file mode 100644
index 000000000..c12ee9b46
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch
@@ -0,0 +1,77 @@
+This fixes a build issue caused by linking order.
+
+Upstream-Status: Inappropriate
+Most distos have there own verison of this fix. This was derived by
+* Fix link order to list libraries after the objects that require them
+(LP: #771080).
+
+-- Colin Watson <cjwatson@ubuntu.com> Tue, 13 Sep 2011 10:07:08 +0100
+
+
+signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-rsh-0.17/rsh/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rsh/Makefile
++++ netkit-rsh-0.17/rsh/Makefile
+@@ -6,7 +6,7 @@ include ../MRULES
+ OBJS = rsh.o
+
+ rsh: $(OBJS)
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+ install: rsh
+ install -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR)
+Index: netkit-rsh-0.17/rshd/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rshd/Makefile
++++ netkit-rsh-0.17/rshd/Makefile
+@@ -11,7 +11,7 @@ LIBS += -ldl -lpam
+ endif
+
+ rshd: $(OBJS)
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+ install: rshd
+ install -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd
+Index: netkit-rsh-0.17/rlogin/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rlogin/Makefile
++++ netkit-rsh-0.17/rlogin/Makefile
+@@ -7,7 +7,7 @@ PROG=rlogin
+ OBJS=rlogin.o
+
+ $(PROG): $(OBJS)
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+ install: $(PROG)
+ install -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR)
+Index: netkit-rsh-0.17/rlogind/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rlogind/Makefile
++++ netkit-rsh-0.17/rlogind/Makefile
+@@ -13,7 +13,7 @@ LIBS += -ldl -lpam -lpam_misc
+ endif
+
+ rlogind: $(OBJS)
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+ rlogind.o: pathnames.h logwtmp.h rlogind.h ../version.h
+ logwtmp.o: logwtmp.h
+Index: netkit-rsh-0.17/rexecd/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rexecd/Makefile
++++ netkit-rsh-0.17/rexecd/Makefile
+@@ -24,7 +24,7 @@ endif
+ CFLAGS += -DRESTRICT_FTP=1
+
+ rexecd: rexecd.o
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+
+ install: rexecd
+ install -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
new file mode 100644
index 000000000..072327a76
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
@@ -0,0 +1,10 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rsh" must be
+# listed in /etc/securetty.
+auth required pam_nologin.so
+auth required pam_securetty.so
+auth required pam_env.so
+account include common-account
+session optional pam_keyinit.so force revoke
+session include common-session
+session required pam_loginuid.so
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
new file mode 100644
index 000000000..a842eb974
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
@@ -0,0 +1,21 @@
+# default: off
+# description:
+# The rshd server is a server for the rcmd(3) routine and,
+# consequently, for the rsh(1) program. The server provides
+# remote execution facilities with authentication based on
+# privileged port numbers from trusted hosts.
+#
+service shell
+{
+ socket_type = stream
+ protocol = tcp
+ flags = NAMEINARGS
+ wait = no
+ user = root
+ group = root
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = /usr/sbin/tcpd
+ server_args = /usr/sbin/in.rshd -aL
+ disable = yes
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
new file mode 100644
index 000000000..e29369c49
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
@@ -0,0 +1,100 @@
+DESCRIPTION = "netkit-rsh includes the rsh daemon and client."
+SECTION = "net"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+LICENSE = "BSD-4-Clause"
+DEPENDS = "xinetd libgcrypt"
+
+LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \
+ file://rsh-redone_link_order_file.patch \
+ file://no_pam_build_fix.patch \
+ file://rexec.xinetd.netkit \
+ file://rlogin.xinetd.netkit \
+ file://rsh.xinetd.netkit \
+ file://netkit-rsh-0.17-rexec-ipv6.patch \
+ file://fix-host-variable.patch \
+"
+
+SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096"
+SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669"
+SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3"
+SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9"
+
+# Other support files
+PAM_SRC_URI = "file://rexec.pam \
+ file://rlogin.pam \
+ file://rsh.pam"
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+inherit pkgconfig
+
+CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations"
+LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam", "", d)}"
+PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam"
+
+do_configure () {
+ ./configure --prefix=${prefix} --exec-prefix=${exec_prefix}
+ echo "INSTALLROOT=${D}" > MCONFIG
+
+ if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then
+ echo "USE_PAM=1" >> MCONFIG
+ fi
+
+ # didn't want to patch these next changes
+ sed -i 's/netkit-//' ${S}/rsh/pathnames.h
+ sed -i 's/netkit-//' ${S}/rcp/pathnames.h
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man8
+ install -d ${D}${sysconfdir}/xinetd.d
+
+ oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+ 'DAEMONMODE=0755' 'MANMODE=0644' \
+ 'SUIDMODE=4755' \
+ 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' install
+
+ if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then
+ install -d ${D}${sysconfdir}/pam.d
+ install -m 0644 debian/hosts.equiv ${D}/${sysconfdir}
+ install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec
+ install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin
+ install -m 0664 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
+ fi
+ cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec
+ cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin
+ cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh
+}
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+ ${sbindir}/.debug ${bindir}/.debug"
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN}-client = "rcp rexec rlogin rsh"
+ALTERNATIVE_${PN}-server = "rshd rexecd rlogind"
+ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd"
+ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd"
+ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd"
+ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
+ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind"
+ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
+
+RCONFLICTS_${PN}-server += "inetutils-rshd"
+RPROVIDES_${PN}-server = "rshd"
+
+RDEPENDS_${PN}-server = "xinetd"
+RDEPENDS_${PN}-server += "tcp-wrappers"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
new file mode 100644
index 000000000..d85178d71
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
@@ -0,0 +1,30 @@
+From c23cc112a480f90950de5cf1de09b1a7e732bf21 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 15 Dec 2014 18:31:13 -0800
+Subject: [PATCH] rpc.rusersd/Makefile: fix parallel build issue
+
+Fixed:
+rusers.x: No such file or directory
+Makefile:44: recipe for target 'rusers_xdr.c' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ rpc.rusersd/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpc.rusersd/Makefile b/rpc.rusersd/Makefile
+index 792f528..65a424a 100644
+--- a/rpc.rusersd/Makefile
++++ b/rpc.rusersd/Makefile
+@@ -40,5 +40,5 @@ rusers.x:
+ rusers.h: $(RUSERSX) rusers.x
+ $(RPCGEN) -h -o rusers.h rusers.x
+
+-rusers_xdr.c: $(RUSERSX)
++rusers_xdr.c: $(RUSERSX) rusers.x
+ $(RPCGEN) -c -C -o rusers_xdr.c rusers.x
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
new file mode 100644
index 000000000..24eb96f36
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
@@ -0,0 +1,70 @@
+DESCRIPTION = "netkit-rusers includes rusers - Displays who is logged in to machines on local network \
+ rusersd - Logged in users server"
+HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e"
+DEPENDS = " tcp-wrappers libtirpc rpcbind"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \
+ file://rpc.rusersd-Makefile-fix-parallel-build-issue.patch \
+"
+
+SRC_URI[archive.md5sum] = "dc99a80b9fde2ab427c874f88f1c1602"
+SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bbccafe198c24b6d"
+SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc"
+SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067"
+
+inherit autotools-brokensep
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+ echo "USE_GLIBC=1" >> MCONFIG
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man8
+ install -d ${D}${sysconfdir}/xinetd.d
+
+ sed -i 's/install -s/install/' rusers/Makefile
+ sed -i 's/install -s/install/' rup/Makefile
+ sed -i 's/install -s/install/' rpc.rusersd/Makefile
+
+ oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+ 'DAEMONMODE=0755' 'MANMODE=0644' \
+ 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' install
+
+ # create the xinetd config file
+ cat >rusersd.conf <<EOF
+ service rusersd
+ {
+ disable = yes
+ type = RPC
+ rpc_version = 1-2
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = ${sbindir}/rpc.rusersd
+ }
+EOF
+ install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd
+}
+
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+ ${bindir}/.debug ${sbindir}/.debug"
+
+RDEPENDS_${PN}-server = "tcp-wrappers xinetd rpcbind"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
new file mode 100755
index 000000000..f6419032e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: rwhod
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Server for rwho and ruptime services
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/rwhod
+PIDFILE=/var/run/rwhod.pid
+CONF_FILE="/etc/default/rwhod"
+DESC="Who daemon "
+# default options. Change them in /etc/default/rwhod
+RWHOD_OPTIONS="-b"
+
+# rwhod init.d script for ntpdc from ntp.isc.org
+test -f $DAEMON || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+[ -r $CONF_FILE ] && . $CONF_FILE
+
+startdaemon(){
+ echo -n "Starting $DESC" " rwhod "
+ start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $RWHOD_OPTIONS
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping $DESC" " rwhod "
+ start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+ echo "done"
+}
+
+case "$1" in
+ start)
+ startdaemon
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ startdaemon
+ ;;
+ restart)
+ stopdaemon
+ sleep 1
+ startdaemon
+ ;;
+ reload)
+ stopdaemon
+ sleep 1
+ startdaemon
+ ;;
+ status)
+ status /usr/sbin/rwhod;
+ exit $?
+ ;;
+ *)
+ echo "Usage: rwhod { start | stop | status | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
new file mode 100644
index 000000000..62d3a942d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
@@ -0,0 +1,2 @@
+#Options for the rwhod daemon.
+RWHOD_OPTIONS="-b"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
new file mode 100644
index 000000000..04baa4286
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
@@ -0,0 +1,83 @@
+DESCRIPTION = "netkit-rwho includes, ruptime rwho and rwhod (Daemon to maintain data for rwho/ruptime)"
+HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://rwho/rwho.c;beginline=2;endline=3;md5=5a85f13c0142d72fc378e00f15da5b9e"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \
+ file://rwhod \
+ file://rwhod.default \
+"
+SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75"
+SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7"
+SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9"
+SRC_URI[patch13.sha256sum] = "53aefa27d98b565bf756db57120c03bd224a238e45699d92076420272a6eba8e"
+
+inherit autotools-brokensep useradd update-rc.d update-alternatives
+
+CFLAGS += " -D_GNU_SOURCE"
+
+debian_do_patch() {
+ cd ${S}
+ while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series
+}
+
+python do_patch() {
+ bb.build.exec_func('debian_do_patch', d)
+ bb.build.exec_func('patch_do_patch', d)
+}
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+}
+
+do_install () {
+ # rwho & ruptime
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man1
+ #rwhod
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man8
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ sed -i 's/install -s/install/' rwho/Makefile
+ sed -i 's/install -s/install/' ruptime/Makefile
+ sed -i 's/install -s/install/' rwhod/Makefile
+ oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+ 'DAEMONMODE=0755' 'MANMODE=0644' \
+ 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' install
+
+ install -m 0644 ${WORKDIR}/rwhod.default ${D}${sysconfdir}/default/rwhod
+ install -m 755 ${WORKDIR}/rwhod ${D}${sysconfdir}/init.d
+
+ mkdir -p -m 755 ${D}${localstatedir}/spool/rwho
+ chown -R rwhod ${D}${localstatedir}/spool/rwho
+}
+
+pkg_postinst_${PN}-server() {
+ ${sysconfdir}/init.d/rwhod start
+}
+
+pkg_postrm_${PN}-server() {
+ ${sysconfdir}/init.d/rwhod stop
+}
+
+INITSCRIPT_NAME = "rwhod"
+INITSCRIPT_PARAM = "defaults 85 15"
+
+USERADD_PACKAGES = "${PN}-server"
+GROUPADD_PARAM_${PN}-server = "--system rwhod"
+USERADD_PARAM_${PN}-server = "--system -g rwhod --home-dir ${localstatedir}/spool/rwho \
+ --no-create-home --shell /bin/false rwhod"
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${localstatedir} ${sysconfdir}/default/* ${sysconfdir}/init.d/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+ ${bindir}/.debug ${sbindir}/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch
new file mode 100644
index 000000000..7fff8cffc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch
@@ -0,0 +1,1217 @@
+From f09a6460a62aacb87bb8683d16aa3ce55848bf7e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 28 Nov 2014 07:06:24 +0900
+Subject: [PATCH 1/2] To aviod buffer overflow in telnet
+
+This patch is from Fedora.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ telnet/Makefile | 4 +-
+ telnet/commands.cc | 270 +++++++++++++++++++++++++++++++++++-----------------
+ telnet/defines.h | 2 +
+ telnet/externs.h | 7 +-
+ telnet/main.cc | 65 ++++++++++---
+ telnet/netlink.cc | 78 +++++++++------
+ telnet/netlink.h | 7 +-
+ telnet/network.cc | 1 +
+ telnet/proto.h | 2 +-
+ telnet/ring.cc | 2 +-
+ telnet/ring.h | 2 +-
+ telnet/sys_bsd.cc | 11 +++
+ telnet/telnet.1 | 37 +++++--
+ telnet/telnet.cc | 45 +++++----
+ telnet/terminal.cc | 17 +++-
+ telnet/utilities.cc | 2 +
+ 16 files changed, 380 insertions(+), 172 deletions(-)
+
+diff --git a/telnet/Makefile b/telnet/Makefile
+index cef866f..39249e1 100644
+--- a/telnet/Makefile
++++ b/telnet/Makefile
+@@ -7,7 +7,7 @@ include ../MRULES
+
+ # -DAUTHENTICATE
+ CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
+-LIBS += $(LIBTERMCAP)
++LIBS = $(LIBTERMCAP)
+
+ SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
+ terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
+@@ -22,7 +22,7 @@ depend:
+ $(CXX) $(CXXFLAGS) -MM $(SRCS) >depend.mk
+
+ install: telnet
+- install -s -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR)
++ install -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR)
+ install -m$(MANMODE) telnet.1 $(INSTALLROOT)$(MANDIR)/man1
+
+ clean:
+diff --git a/telnet/commands.cc b/telnet/commands.cc
+index d92bccd..02c593e 100644
+--- a/telnet/commands.cc
++++ b/telnet/commands.cc
+@@ -86,10 +86,6 @@ char cmd_rcsid[] =
+
+ #define HELPINDENT ((int) sizeof ("connect"))
+
+-#ifndef MAXHOSTNAMELEN
+-#define MAXHOSTNAMELEN 64
+-#endif MAXHOSTNAMELEN
+-
+ #if defined(HAS_IPPROTO_IP) && defined(IP_TOS)
+ int tos = -1;
+ #endif /* defined(HAS_IPPROTO_IP) && defined(IP_TOS) */
+@@ -98,7 +94,7 @@ static unsigned long sourceroute(char *arg, char **cpp, int *lenp);
+
+
+ char *hostname;
+-static char _hostname[MAXHOSTNAMELEN];
++static char *_hostname;
+
+ //typedef int (*intrtn_t)(int argc, const char *argv[]);
+
+@@ -161,7 +157,7 @@ class command_entry {
+ assert(argc>=1);
+ if (nargs>=0 && argc!=nargs+1) {
+ fprintf(stderr, "Wrong number of arguments for command.\n");
+- fprintf(stderr, "Try %s ? for help\n", argv[0]);
++ fprintf(stderr, "Try ? %s for help\n", argv[0]);
+ return 0; /* is this right? */
+ }
+ if (nargs==-2) {
+@@ -480,6 +476,7 @@ static int send_wontcmd(const char *name, const char *) {
+ int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) {
+ char **cpp;
+ extern char *telopts[];
++ long opt;
+
+ if (isprefix(name, "help") || isprefix(name, "?")) {
+ register int col, len;
+@@ -506,16 +503,23 @@ int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) {
+ name, cmd);
+ return 0;
+ }
++
++ opt = cpp - telopts;
+ if (cpp == 0) {
+- fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n",
++ char *end;
++
++ opt = strtol(name, &end, 10);
++ if (*end || opt < 0 || opt > 255) {
++ fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n",
+ name, cmd);
+- return 0;
++ return 0;
++ }
+ }
+ if (!connected) {
+ printf("?Need to be connected first.\n");
+ return 0;
+ }
+- (*func)(cpp - telopts, 1);
++ (*func)(opt, 1);
+ return 1;
+ }
+
+@@ -689,9 +693,9 @@ static struct togglelist Togglelist[] = {
+ "print encryption debugging information" },
+ #endif
+
+- { "skiprc", "don't read ~/.telnetrc file",
++ { "skiprc", "don't read the telnetrc files",
+ NULL, &skiprc,
+- "read ~/.telnetrc file" },
++ "read the telnetrc files" },
+ { "binary",
+ "sending and receiving of binary data",
+ togbinary, NULL,
+@@ -1615,15 +1619,20 @@ void ayt_status(int) {
+ #endif
+
+ int tn(int argc, const char *argv[]) {
+- register struct hostent *host = 0;
+ struct sockaddr_in sn;
+- struct servent *sp = 0;
+ char *srp = NULL;
+ int srlen;
+-
+- const char *cmd, *volatile user = 0;
++ int family = 0;
++ const char *cmd, *volatile user = 0, *srchostp = 0;
+ const char *portp = NULL;
+ char *hostp = NULL;
++ char *resolv_hostp;
++ struct addrinfo hints;
++ struct addrinfo *hostaddr = 0;
++ int res;
++ char name[NI_MAXHOST];
++ char service[NI_MAXSERV];
++ struct addrinfo *tmpaddr;
+
+ /* clear the socket address prior to use */
+ memset(&sn, 0, sizeof(sn));
+@@ -1632,6 +1641,10 @@ int tn(int argc, const char *argv[]) {
+ printf("?Already connected to %s\n", hostname);
+ return 0;
+ }
++ if (_hostname) {
++ delete[] _hostname;
++ _hostname = 0;
++ }
+ if (argc < 2) {
+ (void) strcpy(line, "open ");
+ printf("(to) ");
+@@ -1657,11 +1670,33 @@ int tn(int argc, const char *argv[]) {
+ --argc;
+ continue;
+ }
++ if (strcmp(*argv, "-b") == 0) {
++ --argc; ++argv;
++ if (argc == 0)
++ goto usage;
++ srchostp = *argv++;
++ --argc;
++ continue;
++ }
+ if (strcmp(*argv, "-a") == 0) {
+ --argc; ++argv;
+ autologin = 1;
+ continue;
+ }
++ if (strcmp(*argv, "-6") == 0) {
++ --argc; ++argv;
++#ifdef AF_INET6
++ family = AF_INET6;
++#else
++ puts("IPv6 unsupported");
++#endif
++ continue;
++ }
++ if (strcmp(*argv, "-4") == 0) {
++ --argc; ++argv;
++ family = AF_INET;
++ continue;
++ }
+ if (hostp == 0) {
+ /* this leaks memory - FIXME */
+ hostp = strdup(*argv++);
+@@ -1680,6 +1715,8 @@ int tn(int argc, const char *argv[]) {
+ if (hostp == 0)
+ goto usage;
+
++ resolv_hostp = hostp;
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+ if (hostp[0] == '@' || hostp[0] == '!') {
+ if ((hostname = strrchr(hostp, ':')) == NULL)
+@@ -1696,78 +1733,122 @@ int tn(int argc, const char *argv[]) {
+ } else {
+ sn.sin_addr.s_addr = temp;
+ sn.sin_family = AF_INET;
++ /*
++ * For source route we just make sure to get the IP given
++ * on the command line when looking up the port.
++ */
++ resolv_hostp = inet_ntoa(sn.sin_addr);
+ }
+ }
+- else {
+-#endif
+- if (inet_aton(hostp, &sn.sin_addr)) {
+- sn.sin_family = AF_INET;
+- strcpy(_hostname, hostp);
+- hostname = _hostname;
+- }
+- else {
+- host = gethostbyname(hostp);
+- if (host) {
+- sn.sin_family = host->h_addrtype;
+- if (host->h_length > (int)sizeof(sn.sin_addr)) {
+- host->h_length = sizeof(sn.sin_addr);
+- }
+-#if defined(h_addr) /* In 4.3, this is a #define */
+- memcpy((caddr_t)&sn.sin_addr,
+- host->h_addr_list[0], host->h_length);
+-#else /* defined(h_addr) */
+- memcpy((caddr_t)&sn.sin_addr, host->h_addr, host->h_length);
+-#endif /* defined(h_addr) */
+- strncpy(_hostname, host->h_name, sizeof(_hostname));
+- _hostname[sizeof(_hostname)-1] = '\0';
+- hostname = _hostname;
+- } else {
+- herror(hostp);
+- return 0;
+- }
+- }
+-#if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+- }
+ #endif
++
++ /* User port or the default name of telnet. */
+ if (portp) {
+ if (*portp == '-') {
+ portp++;
+ telnetport = 1;
+- } else
++ } else {
+ telnetport = 0;
+- sn.sin_port = atoi(portp);
+- if (sn.sin_port == 0) {
+- sp = getservbyname(portp, "tcp");
+- if (sp)
+- sn.sin_port = sp->s_port;
+- else {
+- printf("%s: bad port number\n", portp);
+- return 0;
++ if (*portp >='0' && *portp<='9') {
++ char *end;
++ long int p;
++
++ p=strtol(portp, &end, 10);
++ if (ERANGE==errno && (LONG_MIN==p || LONG_MAX==p)) {
++ fprintf(stderr, "telnet: port %s overflows\n", portp);
++ return 0;
++ } else if (p<=0 || p>=65536) {
++ fprintf(stderr, "telnet: port %s out of range\n", portp);
++ return 0;
++ }
+ }
+- }
+- else {
+- sn.sin_port = htons(sn.sin_port);
+ }
+- }
++ }
+ else {
+- if (sp == 0) {
+- sp = getservbyname("telnet", "tcp");
+- if (sp == 0) {
+- fprintf(stderr, "telnet: tcp/telnet: unknown service\n");
+- return 0;
+- }
+- sn.sin_port = sp->s_port;
+- }
++ portp = "telnet";
+ telnetport = 1;
+ }
+- printf("Trying %s...\n", inet_ntoa(sn.sin_addr));
++
++ /* We only understand SOCK_STREAM sockets. */
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_NUMERICHOST;
++ hints.ai_family = family;
++
++ if (srchostp) {
++ res = getaddrinfo(srchostp, "0", &hints, &hostaddr);
++ if (res) {
++ fprintf(stderr, "telnet: could not resolve %s: %s\n", srchostp,
++ gai_strerror(res));
++ return 0;
++ }
++ hints.ai_family = hostaddr->ai_family;
++ res = nlink.bind(hostaddr);
++ freeaddrinfo(hostaddr);
++ if (res < 0)
++ return 0;
++ }
++
++ /* Resolve both the host and service simultaneously. */
++ res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr);
++ if (res == EAI_NONAME) {
++ hints.ai_flags = AI_CANONNAME;
++ res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr);
++ } else if (hostaddr) {
++ hostaddr->ai_canonname = 0;
++ }
++ if (res || !hostaddr) {
++ fprintf(stderr, "telnet: could not resolve %s/%s: %s\n", resolv_hostp, portp, gai_strerror(res));
++ return 0;
++ }
++
++ /* Try to connect to every listed round robin IP. */
++ tmpaddr = hostaddr;
++ errno = 0;
+ do {
+- int x = nlink.connect(debug, host, &sn, srp, srlen, tos);
+- if (!x) return 0;
+- else if (x==1) continue;
++ int x;
++
++ if (!tmpaddr) {
++ if (errno)
++ perror("telnet: Unable to connect to remote host");
++ else
++ fputs("telnet: Unable to connect to remote host: "
++ "Bad port number\n", stderr);
++err:
++ freeaddrinfo(hostaddr);
++ return 0;
++ }
++
++ if (tmpaddr->ai_family == AF_UNIX) {
++nextaddr:
++ tmpaddr = tmpaddr->ai_next;
++ continue;
++ }
++
++ getnameinfo(tmpaddr->ai_addr, tmpaddr->ai_addrlen,
++ name, sizeof(name), service, sizeof(service),
++ NI_NUMERICHOST | NI_NUMERICSERV);
++
++ printf("Trying %s...\n", name);
++ x = nlink.connect(debug, tmpaddr, srp, srlen, tos);
++ if (!x)
++ goto err;
++ else if (x==1)
++ goto nextaddr;
++
+ connected++;
+ } while (connected == 0);
+- cmdrc(hostp, hostname);
++ if (tmpaddr->ai_canonname == 0) {
++ hostname = new char[strlen(hostp)+1];
++ strcpy(hostname, hostp);
++ }
++ else {
++ hostname = new char[strlen(tmpaddr->ai_canonname)+1];
++ strcpy(hostname, tmpaddr->ai_canonname);
++ }
++
++ cmdrc(hostp, hostname, portp);
++ freeaddrinfo(hostaddr);
+ if (autologin && user == NULL) {
+ struct passwd *pw;
+
+@@ -2013,30 +2094,21 @@ static int help(command_table *tab, int argc, const char *argv[]) {
+ return 0;
+ }
+
+-static char *rcname = 0;
+-static char rcbuf[128];
+-
+-void cmdrc(const char *m1, const char *m2) {
++static void readrc(const char *m1, const char *m2, const char *port,
++ const char *rcname)
++{
+ FILE *rcfile;
+ int gotmachine = 0;
+ int l1 = strlen(m1);
+ int l2 = strlen(m2);
+- char m1save[64];
+-
+- if (skiprc) return;
++ int lport = strlen(port);
++ char m1save[l1 + 1];
++ char portsave[lport + 1];
+
+ strcpy(m1save, m1);
+ m1 = m1save;
+-
+- if (rcname == 0) {
+- rcname = getenv("HOME");
+- if (rcname)
+- strcpy(rcbuf, rcname);
+- else
+- rcbuf[0] = '\0';
+- strcat(rcbuf, "/.telnetrc");
+- rcname = rcbuf;
+- }
++ strcpy(portsave, port);
++ port = portsave;
+
+ rcfile = fopen(rcname, "r");
+ if (!rcfile) return;
+@@ -2061,6 +2133,13 @@ void cmdrc(const char *m1, const char *m2) {
+ strncpy(line, &line[7], sizeof(line) - 7);
+ else
+ continue;
++
++ if (line[0] == ':') {
++ if (!strncasecmp(&line[1], port, lport))
++ continue;
++ strncpy(line, &line[lport + 1], sizeof(line) - lport - 1);
++ }
++
+ if (line[0] != ' ' && line[0] != '\t' && line[0] != '\n')
+ continue;
+ gotmachine = 1;
+@@ -2073,6 +2152,21 @@ void cmdrc(const char *m1, const char *m2) {
+ fclose(rcfile);
+ }
+
++void cmdrc(const char *m1, const char *m2, const char *port) {
++ char *rcname = NULL;
++
++ if (skiprc) return;
++
++ readrc(m1, m2, port, "/etc/telnetrc");
++ if (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1)
++ {
++ perror ("asprintf");
++ return;
++ }
++ readrc(m1, m2, port, rcname);
++ free (rcname);
++}
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+
+ /*
+diff --git a/telnet/defines.h b/telnet/defines.h
+index 2784400..d5edc46 100644
+--- a/telnet/defines.h
++++ b/telnet/defines.h
+@@ -50,3 +50,5 @@
+ #define MODE_COMMAND_LINE(m) ((m)==-1)
+
+ #define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */
++
++#define MODE_OUT8 0x8000 /* binary mode sans -opost */
+diff --git a/telnet/externs.h b/telnet/externs.h
+index 955df79..0730e8a 100644
+--- a/telnet/externs.h
++++ b/telnet/externs.h
+@@ -48,9 +48,7 @@
+ typedef unsigned char cc_t;
+ #endif
+
+-#ifdef __linux__
+ #include <unistd.h> /* get _POSIX_VDISABLE */
+-#endif
+
+ #ifndef _POSIX_VDISABLE
+ #error "Please fix externs.h to define _POSIX_VDISABLE"
+@@ -60,7 +58,8 @@ typedef unsigned char cc_t;
+
+ extern int autologin; /* Autologin enabled */
+ extern int skiprc; /* Don't process the ~/.telnetrc file */
+-extern int eight; /* use eight bit mode (binary in and/or out */
++extern int eight; /* use eight bit mode (binary in and/or out) */
++extern int binary; /* use binary option (in and/or out) */
+ extern int flushout; /* flush output */
+ extern int connected; /* Are we connected to the other side? */
+ extern int globalmode; /* Mode tty should be in */
+@@ -225,6 +224,8 @@ cc_t *tcval(int);
+
+ //#if 0
+ extern struct termios new_tc;
++extern struct termios old_tc;
++
+
+ #define termEofChar new_tc.c_cc[VEOF]
+ #define termEraseChar new_tc.c_cc[VERASE]
+diff --git a/telnet/main.cc b/telnet/main.cc
+index b67f2ce..b626e54 100644
+--- a/telnet/main.cc
++++ b/telnet/main.cc
+@@ -45,7 +45,10 @@ char main_rcsid[] =
+
+ #include <sys/types.h>
+ #include <getopt.h>
++#include <stdlib.h>
+ #include <string.h>
++#include <netdb.h>
++#include <errno.h>
+
+ #include "ring.h"
+ #include "externs.h"
+@@ -80,12 +83,13 @@ tninit(void)
+ void usage(void) {
+ fprintf(stderr, "Usage: %s %s%s%s%s\n",
+ prompt,
+- " [-8] [-E] [-L] [-a] [-d] [-e char] [-l user] [-n tracefile]",
+- "\n\t",
++ "[-4] [-6] [-8] [-E] [-L] [-a] [-d] [-e char] [-l user]",
++ "\n\t[-n tracefile] [ -b addr ]",
+ #ifdef TN3270
++ "\n\t"
+ "[-noasynch] [-noasynctty] [-noasyncnet] [-r] [-t transcom]\n\t",
+ #else
+- "[-r] ",
++ " [-r] ",
+ #endif
+ "[host-name [port]]"
+ );
+@@ -102,7 +106,8 @@ main(int argc, char *argv[])
+ extern char *optarg;
+ extern int optind;
+ int ch;
+- char *user;
++ char *user, *srcaddr;
++ int family;
+
+ tninit(); /* Clear out things */
+ #if defined(CRAY) && !defined(__STDC__)
+@@ -110,21 +115,38 @@ main(int argc, char *argv[])
+ #endif
+
+ TerminalSaveState();
++ if ((old_tc.c_cflag & (CSIZE|PARENB)) != CS8)
++ eight = 0;
+
+ if ((prompt = strrchr(argv[0], '/'))!=NULL)
+ ++prompt;
+ else
+ prompt = argv[0];
+
+- user = NULL;
++ user = srcaddr = NULL;
++ family = 0;
+
+ rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE;
+ autologin = -1;
+
+- while ((ch = getopt(argc, argv, "8EKLS:X:ade:k:l:n:rt:x")) != EOF) {
++ while ((ch = getopt(argc, argv,
++ "4678EKLS:X:ab:de:k:l:n:rt:x")) != EOF) {
+ switch(ch) {
++ case '4':
++ family = AF_INET;
++ break;
++ case '6':
++#ifdef AF_INET6
++ family = AF_INET6;
++#else
++ fputs("IPv6 unsupported\n", stderr);
++#endif
++ break;
++ case '7':
++ eight = 0; /* 7-bit ouput and input */
++ break;
+ case '8':
+- eight = 3; /* binary output and input */
++ binary = 3; /* binary output and input */
+ break;
+ case 'E':
+ rlogin = escapechar = _POSIX_VDISABLE;
+@@ -133,23 +155,26 @@ main(int argc, char *argv[])
+ //autologin = 0;
+ break;
+ case 'L':
+- eight |= 2; /* binary output only */
++ binary |= 2; /* binary output only */
+ break;
+ case 'S':
+ {
+-#ifdef HAS_GETTOS
+ extern int tos;
++ int num;
+
+- if ((tos = parsetos(optarg, "tcp")) < 0)
++#ifdef HAS_GETTOS
++ if ((num = parsetos(optarg, "tcp")) < 0) {
++#else
++ errno = 0;
++ num = strtol(optarg, 0, 0);
++ if (errno) {
++#endif
+ fprintf(stderr, "%s%s%s%s\n",
+ prompt, ": Bad TOS argument '",
+ optarg,
+ "; will try to use default TOS");
+-#else
+- fprintf(stderr,
+- "%s: Warning: -S ignored, no parsetos() support.\n",
+- prompt);
+-#endif
++ } else
++ tos = num;
+ }
+ break;
+ case 'X':
+@@ -210,6 +235,9 @@ main(int argc, char *argv[])
+ "%s: -x ignored, no encryption support.\n",
+ prompt);
+ break;
++ case 'b':
++ srcaddr = optarg;
++ break;
+ case '?':
+ default:
+ usage();
+@@ -233,6 +261,13 @@ main(int argc, char *argv[])
+ *argp++ = "-l";
+ *argp++ = user;
+ }
++ if (srcaddr) {
++ *argp++ = "-b";
++ *argp++ = srcaddr;
++ }
++ if (family) {
++ *argp++ = family == AF_INET ? "-4" : "-6";
++ }
+ *argp++ = argv[0]; /* host */
+ if (argc > 1)
+ *argp++ = argv[1]; /* port */
+diff --git a/telnet/netlink.cc b/telnet/netlink.cc
+index f439cff..f839747 100644
+--- a/telnet/netlink.cc
++++ b/telnet/netlink.cc
+@@ -79,22 +79,61 @@ void netlink::close(int doshutdown) {
+ shutdown(net, 2);
+ }
+ ::close(net);
++ net = -1;
+ }
+
+-int netlink::connect(int debug, struct hostent *host,
+- struct sockaddr_in *sn,
+- char *srcroute, int srlen, int tos)
++int netlink::bind(struct addrinfo *addr)
+ {
+- int on=1;
++ int res;
++
++ res = socket(addr->ai_family);
++ if (res < 2) {
++ if (res == 1)
++ perror("telnet: socket");
++ return -1;
++ }
++
++ if (::bind(net, addr->ai_addr, addr->ai_addrlen) < 0) {
++ perror("telnet: bind");
++ return -1;
++ }
++
++ return 0;
++}
++
++int netlink::socket(int family)
++{
++ if (this->family != family)
++ close(0);
+
+- net = socket(AF_INET, SOCK_STREAM, 0);
+ if (net < 0) {
+- perror("telnet: socket");
+- return 0;
++ this->family = family;
++ net = ::socket(family, SOCK_STREAM, 0);
++ if (net < 0) {
++ if (errno == EAFNOSUPPORT)
++ return 1;
++ perror("telnet: socket");
++ return 0;
++ }
+ }
+
++ return 2;
++}
++
++int netlink::connect(int debug, struct addrinfo *addr,
++ char *srcroute, int srlen, int tos)
++{
++ int on=1;
++ int res;
++
++ res = socket(addr->ai_family);
++ if (res < 2)
++ return res;
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+ if (srcroute) {
++ if (addr->ai_family != AF_INET)
++ fputs("Source route is only supported for IPv4\n", stderr);
+ if (setsockopt(net, IPPROTO_IP, IP_OPTIONS, srcroute, srlen) < 0)
+ perror("setsockopt (IP_OPTIONS)");
+ }
+@@ -108,7 +147,7 @@ int netlink::connect(int debug, struct hostent *host,
+ #endif
+ if (tos < 0) tos = 020; /* Low Delay bit */
+ if (tos && (setsockopt(net, IPPROTO_IP, IP_TOS, &tos, sizeof(int)) < 0)
+- && (errno != ENOPROTOOPT))
++ && (errno != ENOPROTOOPT) && (errno != EOPNOTSUPP))
+ perror("telnet: setsockopt (IP_TOS) (ignored)");
+ #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
+
+@@ -116,27 +155,8 @@ int netlink::connect(int debug, struct hostent *host,
+ perror("setsockopt (SO_DEBUG)");
+ }
+
+- if (::connect(net, (struct sockaddr *)sn, sizeof(*sn)) < 0) {
+-#if defined(h_addr) /* In 4.3, this is a #define */
+- if (host && host->h_addr_list[1]) {
+- int oerrno = errno;
+-
+- fprintf(stderr, "telnet: connect to address %s: ",
+- inet_ntoa(sn->sin_addr));
+- errno = oerrno;
+- perror(NULL);
+- host->h_addr_list++;
+- if (host->h_length > (int)sizeof(sn->sin_addr)) {
+- host->h_length = sizeof(sn->sin_addr);
+- }
+- memcpy(&sn->sin_addr, host->h_addr_list[0], host->h_length);
+- close(net);
+- return 1;
+- }
+-#endif /* defined(h_addr) */
+-
+- perror("telnet: Unable to connect to remote host");
+- return 0;
++ if (::connect(net, addr->ai_addr, addr->ai_addrlen) < 0) {
++ return 1;
+ }
+ return 2;
+ }
+diff --git a/telnet/netlink.h b/telnet/netlink.h
+index 9852b30..0ac8a08 100644
+--- a/telnet/netlink.h
++++ b/telnet/netlink.h
+@@ -1,13 +1,16 @@
+
+ class netlink {
++ private:
++ int family;
+ protected:
+ int net;
+ public:
+ netlink();
+ ~netlink();
+
+- int connect(int debug, struct hostent *host,
+- struct sockaddr_in *sin,
++ int bind(struct addrinfo *hostaddr);
++ int socket(int family);
++ int connect(int debug, struct addrinfo *hostaddr,
+ char *srcroute, int srlen,
+ int tos);
+ void close(int doshutdown);
+diff --git a/telnet/network.cc b/telnet/network.cc
+index 6a2c374..0dcf3e2 100644
+--- a/telnet/network.cc
++++ b/telnet/network.cc
+@@ -40,6 +40,7 @@ char net_rcsid[] =
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <arpa/telnet.h>
+
+diff --git a/telnet/proto.h b/telnet/proto.h
+index 8be4a39..92f2419 100644
+--- a/telnet/proto.h
++++ b/telnet/proto.h
+@@ -13,7 +13,7 @@ int TerminalWindowSize(long *rows, long *cols);
+ void auth_encrypt_user(char *);
+ void auth_name(unsigned char *, int);
+ void auth_printsub(unsigned char *, int, unsigned char *, int);
+-void cmdrc(const char *m1, const char *m2);
++void cmdrc(const char *, const char *, const char *);
+ void env_init(void);
+ int getconnmode(void);
+ void init_network(void);
+diff --git a/telnet/ring.cc b/telnet/ring.cc
+index be57396..772c6c5 100644
+--- a/telnet/ring.cc
++++ b/telnet/ring.cc
+@@ -165,7 +165,7 @@ int ringbuf::flush() {
+
+ /////////////////////////////////////////////////// supply //////////////
+
+-void ringbuf::printf(const char *format, ...) {
++void ringbuf::xprintf(const char *format, ...) {
+ char xbuf[256];
+ va_list ap;
+ va_start(ap, format);
+diff --git a/telnet/ring.h b/telnet/ring.h
+index 15d3f3f..049377e 100644
+--- a/telnet/ring.h
++++ b/telnet/ring.h
+@@ -83,7 +83,7 @@ class ringbuf {
+ // manual supply
+ void putch(char c) { write(&c, 1); }
+ void write(const char *buffer, int ct);
+- void printf(const char *format, ...);
++ void xprintf(const char *format, ...);
+ int empty_count() { return size - count; }
+
+ // automatic supply
+diff --git a/telnet/sys_bsd.cc b/telnet/sys_bsd.cc
+index 93fba7e..a8c9aab 100644
+--- a/telnet/sys_bsd.cc
++++ b/telnet/sys_bsd.cc
+@@ -189,18 +189,25 @@ void NetSetPgrp(int fd) {
+ * Various signal handling routines.
+ */
+
++#if 0
+ static void deadpeer(int /*sig*/) {
+ setcommandmode();
+ siglongjmp(peerdied, -1);
+ }
++#endif
+
+ static void intr(int /*sig*/) {
+ if (localchars) {
+ intp();
+ }
+ else {
++#if 0
+ setcommandmode();
+ siglongjmp(toplevel, -1);
++#else
++ signal(SIGINT, SIG_DFL);
++ raise(SIGINT);
++#endif
+ }
+ }
+
+@@ -214,6 +221,8 @@ static void intr2(int /*sig*/) {
+ sendabort();
+ return;
+ }
++ signal(SIGQUIT, SIG_DFL);
++ raise(SIGQUIT);
+ }
+
+ #ifdef SIGWINCH
+@@ -238,7 +247,9 @@ void ayt(int sig) {
+ void sys_telnet_init(void) {
+ signal(SIGINT, intr);
+ signal(SIGQUIT, intr2);
++#if 0
+ signal(SIGPIPE, deadpeer);
++#endif
+ #ifdef SIGWINCH
+ signal(SIGWINCH, sendwin);
+ #endif
+diff --git a/telnet/telnet.1 b/telnet/telnet.1
+index 54a47fb..8365e42 100644
+--- a/telnet/telnet.1
++++ b/telnet/telnet.1
+@@ -42,8 +42,9 @@
+ protocol
+ .Sh SYNOPSIS
+ .Nm telnet
+-.Op Fl 8ELadr
++.Op Fl 468ELadr
+ .Op Fl S Ar tos
++.Op Fl b Ar address
+ .Op Fl e Ar escapechar
+ .Op Fl l Ar user
+ .Op Fl n Ar tracefile
+@@ -68,6 +69,10 @@ command implicitly; see the description below.
+ .Pp
+ Options:
+ .Bl -tag -width indent
++.It Fl 4
++Force IPv4 address resolution.
++.It Fl 6
++Force IPv6 address resolution.
+ .It Fl 8
+ Request 8-bit operation. This causes an attempt to negotiate the
+ .Dv TELNET BINARY
+@@ -89,6 +94,8 @@ of the
+ option if supported by the remote system. The username is retrieved
+ via
+ .Xr getlogin 3 .
++.It Fl b Ar address
++Use bind(2) on the local socket to bind it to a specific local address.
+ .It Fl d
+ Sets the initial value of the
+ .Ic debug
+@@ -474,17 +481,29 @@ protocol without making a mess. Protocol negotiation can be forced by
+ placing a dash before the port number.
+ .Pp
+ After establishing a connection, any commands associated with the
+-remote host in the user's
++remote host in
++.Pa /etc/telnetrc
++and the user's
+ .Pa .telnetrc
+-file are executed.
++file are executed, in that order.
+ .Pp
+-The format of the .telnetrc file is as follows: Lines beginning with a
++The format of the telnetrc files is as follows: Lines beginning with a
+ #, and blank lines, are ignored. The rest of the file should consist
+ of hostnames and sequences of
+ .Nm telnet
+ commands to use with that host. Commands should be one per line,
+ indented by whitespace; lines beginning without whitespace are
+-interpreted as hostnames. Upon connecting to a particular host, the
++interpreted as hostnames. Lines beginning with the special hostname
++.Ql DEFAULT
++will apply to all hosts. Hostnames including
++.Ql DEFAULT
++may be followed immediately by a colon and a port number or string.
++If a port is specified it must match exactly with what is specified
++on the command line. If no port was specified on the command line,
++then the value
++.Ql telnet
++is used.
++Upon connecting to a particular host, the
+ commands associated with that host are executed.
+ .It Ic quit
+ Close any open session and exit
+@@ -1184,9 +1203,7 @@ escape sequences are preceded by a '*' to aid in locating them.
+ When the skiprc toggle is
+ .Dv TRUE ,
+ .Tn telnet
+-does not read the
+-.Pa \&.telnetrc
+-file. The initial value for this toggle is
++does not read the telnetrc files. The initial value for this toggle is
+ .Dv FALSE.
+ .It Ic termdata
+ Toggles the display of all terminal data (in hexadecimal format).
+@@ -1239,7 +1256,9 @@ to the other side via the
+ .Dv TELNET ENVIRON
+ option.
+ .Sh FILES
+-.Bl -tag -width ~/.telnetrc -compact
++.Bl -tag -width /etc/telnetrc -compact
++.It Pa /etc/telnetrc
++global telnet startup values
+ .It Pa ~/.telnetrc
+ user customized telnet startup values
+ .El
+diff --git a/telnet/telnet.cc b/telnet/telnet.cc
+index 4fc3b1f..7eca811 100644
+--- a/telnet/telnet.cc
++++ b/telnet/telnet.cc
+@@ -88,7 +88,8 @@ char do_dont_resp[256];
+ char will_wont_resp[256];
+
+ int
+-eight = 0,
++ eight = 3,
++ binary = 0,
+ autologin = 0, /* Autologin anyone? */
+ skiprc = 0,
+ connected,
+@@ -639,14 +640,14 @@ static const char *gettermname(void) {
+ if (resettermname) {
+ resettermname = 0;
+ tname = env_getvalue("TERM", 0);
+- if (!tname || my_setupterm(tname, 1, &err)) {
++ if (!tname /* || my_setupterm(tname, 1, &err) */) {
+ termbuf[0] = 0;
+ tname = "UNKNOWN";
+ }
+ mklist(termbuf, tname, termtypes);
+ next = 0;
+ }
+- if (next==termtypes.num()) next = 0;
++ if (next==termtypes.num()-1) next = 0;
+ return termtypes[next++];
+ }
+ /*
+@@ -681,7 +682,7 @@ static void suboption(void) {
+ }
+ #endif /* TN3270 */
+ name = gettermname();
+- netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
++ netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
+ TELQUAL_IS, name, IAC, SE);
+ }
+ break;
+@@ -693,7 +694,7 @@ static void suboption(void) {
+ if (SB_GET() == TELQUAL_SEND) {
+ long oospeed, iispeed;
+ TerminalSpeeds(&iispeed, &oospeed);
+- netoring.printf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED,
++ netoring.xprintf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED,
+ TELQUAL_IS, oospeed, iispeed, IAC, SE);
+ }
+ break;
+@@ -780,7 +781,7 @@ static void suboption(void) {
+ send_wont(TELOPT_XDISPLOC, 1);
+ break;
+ }
+- netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
++ netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
+ TELQUAL_IS, dp, IAC, SE);
+ }
+ break;
+@@ -798,7 +799,7 @@ void lm_will(unsigned char *cmd, int len) {
+ return;
+ }
+
+- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ DONT, cmd[0], IAC, SE);
+ }
+
+@@ -815,7 +816,7 @@ void lm_do(unsigned char *cmd, int len) {
+ /*@*/ printf("lm_do: no command!!!\n"); /* Should not happen... */
+ return;
+ }
+- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ WONT, cmd[0], IAC, SE);
+ }
+
+@@ -838,7 +839,7 @@ void lm_mode(unsigned char *cmd, int len, int init) {
+ k |= MODE_ACK;
+ }
+
+- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE,
++ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE,
+ k, IAC, SE);
+
+ setconnmode(0); /* set changed mode */
+@@ -933,11 +934,11 @@ void slc_mode_import(int def) {
+
+ void slc_import(int def) {
+ if (def) {
+- netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++ netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE);
+ }
+ else {
+- netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++ netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ LM_SLC, 0, SLC_VARIABLE, 0, IAC, SE);
+ }
+ }
+@@ -1050,6 +1051,7 @@ void slc_check(void) {
+
+
+ unsigned char slc_reply[128];
++unsigned char const * const slc_reply_eom = &slc_reply[sizeof(slc_reply)];
+ unsigned char *slc_replyp;
+
+ void slc_start_reply(void) {
+@@ -1061,6 +1063,14 @@ void slc_start_reply(void) {
+ }
+
+ void slc_add_reply(int func, int flags, int value) {
++ /* A sequence of up to 6 bytes my be written for this member of the SLC
++ * suboption list by this function. The end of negotiation command,
++ * which is written by slc_end_reply(), will require 2 additional
++ * bytes. Do not proceed unless there is sufficient space for these
++ * items.
++ */
++ if (&slc_replyp[6+2] > slc_reply_eom)
++ return;
+ if ((*slc_replyp++ = func) == IAC)
+ *slc_replyp++ = IAC;
+ if ((*slc_replyp++ = flags) == IAC)
+@@ -1142,6 +1152,7 @@ void env_opt(unsigned char *buf, int len) {
+ }
+ }
+
++/* OPT_REPLY_SIZE must be a multiple of 2. */
+ #define OPT_REPLY_SIZE 256
+ unsigned char *opt_reply;
+ unsigned char *opt_replyp;
+@@ -1173,6 +1184,7 @@ void env_opt_start_info(void) {
+
+ void env_opt_add(const char *ep) {
+ const char *vp;
++ const unsigned char *tp;
+ unsigned char c;
+
+ if (opt_reply == NULL) /*XXX*/
+@@ -1185,11 +1197,12 @@ void env_opt_add(const char *ep) {
+ return;
+ }
+ vp = env_getvalue(ep, 1);
+- if (opt_replyp + (vp ? strlen(vp) : 0) + strlen(ep) + 6 > opt_replyend)
++ tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6;
++ if (tp > opt_replyend)
+ {
+ register int len;
+- opt_replyend += OPT_REPLY_SIZE;
+- len = opt_replyend - opt_reply;
++ len = ((tp - opt_reply) + OPT_REPLY_SIZE - 1) & ~(OPT_REPLY_SIZE - 1);
++ opt_replyend = opt_reply + len;
+ opt_reply = (unsigned char *)realloc(opt_reply, len);
+ if (opt_reply == NULL) {
+ /*@*/ printf("env_opt_add: realloc() failed!!!\n");
+@@ -1740,8 +1753,8 @@ void telnet(const char * /*user*/) {
+ send_do(TELOPT_STATUS, 1);
+ if (env_getvalue("DISPLAY", 0))
+ send_will(TELOPT_XDISPLOC, 1);
+- if (eight)
+- tel_enter_binary(eight);
++ if (binary)
++ tel_enter_binary(binary);
+ }
+ #endif /* !defined(TN3270) */
+
+diff --git a/telnet/terminal.cc b/telnet/terminal.cc
+index 9eb47ae..764f18f 100644
+--- a/telnet/terminal.cc
++++ b/telnet/terminal.cc
+@@ -45,6 +45,8 @@ char terminal_rcsid[] =
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
+
+ #include "ring.h"
+ #include "defines.h"
+@@ -155,9 +157,11 @@ int getconnmode(void) {
+ if (localflow)
+ mode |= MODE_FLOW;
+
+- if (my_want_state_is_will(TELOPT_BINARY))
++ if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY))
+ mode |= MODE_INBIN;
+
++ if (eight & 2)
++ mode |= MODE_OUT8;
+ if (his_want_state_is_will(TELOPT_BINARY))
+ mode |= MODE_OUTBIN;
+
+@@ -449,10 +453,13 @@ void TerminalNewMode(int f)
+ // breaks SunOS.
+ tmp_tc.c_iflag |= ISTRIP;
+ }
+- if (f & MODE_OUTBIN) {
++ if (f & (MODE_OUTBIN|MODE_OUT8)) {
+ tmp_tc.c_cflag &= ~(CSIZE|PARENB);
+ tmp_tc.c_cflag |= CS8;
+- tmp_tc.c_oflag &= ~OPOST;
++ if (f & MODE_OUTBIN)
++ tmp_tc.c_oflag &= ~OPOST;
++ else
++ tmp_tc.c_oflag |= OPOST;
+ } else {
+ tmp_tc.c_cflag &= ~(CSIZE|PARENB);
+ tmp_tc.c_cflag |= old_tc.c_cflag & (CSIZE|PARENB);
+@@ -468,7 +475,7 @@ void TerminalNewMode(int f)
+
+ #ifdef SIGINFO
+ signal(SIGINFO, ayt);
+-#endif SIGINFO
++#endif /* SIGINFO */
+
+ #if defined(NOKERNINFO)
+ tmp_tc.c_lflag |= NOKERNINFO;
+@@ -504,7 +511,7 @@ void TerminalNewMode(int f)
+
+ #ifdef SIGINFO
+ signal(SIGINFO, ayt_status);
+-#endif SIGINFO
++#endif /* SIGINFO */
+
+ #ifdef SIGTSTP
+ signal(SIGTSTP, SIG_DFL);
+diff --git a/telnet/utilities.cc b/telnet/utilities.cc
+index 0448f0a..66839ab 100644
+--- a/telnet/utilities.cc
++++ b/telnet/utilities.cc
+@@ -47,6 +47,8 @@ char util_rcsid[] =
+ #include <sys/socket.h>
+ #include <unistd.h>
+ #include <ctype.h>
++#include <string.h>
++#include <stdlib.h>
+
+ #include "ring.h"
+ #include "defines.h"
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch
new file mode 100644
index 000000000..b9a98f1d6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch
@@ -0,0 +1,41 @@
+From 31362e4c0d02b4a2b952ad0dd32acfb573c442f3 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 28 Nov 2014 07:17:40 +0900
+Subject: [PATCH 2/2] WARNING Fix and modify "CFLAGS"
+
+WARNING: QA Issue: File '/usr/sbin/in.telnetd' from netkit-telnet was
+already stripped, this will prevent future debugging! [already-stripped]
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ telnetd/Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/telnetd/Makefile b/telnetd/Makefile
+index 72650b4..a4cf9fa 100644
+--- a/telnetd/Makefile
++++ b/telnetd/Makefile
+@@ -9,7 +9,8 @@ include ../MRULES
+ # take out -DPARANOID_TTYS.
+
+ CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
+- -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
++ -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS \
++ -DLOGIN_WRAPPER=\"/${libdir}/telnetlogin\"
+ # LIBS += $(LIBTERMCAP)
+
+ OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
+@@ -27,7 +28,7 @@ $(OBJS): defs.h ext.h pathnames.h telnetd.h logwtmp.h logout.h setproctitle.h
+ telnetd.o: ../version.h
+
+ install: telnetd
+- install -s -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd
++ install -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd
+ install -m$(MANMODE) issue.net.5 $(INSTALLROOT)$(MANDIR)/man5/
+ install -m$(MANMODE) telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/in.telnetd.8
+ ln -sf in.telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/telnetd.8
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch
new file mode 100644
index 000000000..b3fe36b7b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch
@@ -0,0 +1,48 @@
+To support the cross-compile
+
+Upstream-Status: Pending
+
+make the configure to support the cross-compile, by only to compile the
+target, and not to run it
+
+Roy Li <rongqing.li@windriver.com>
+Index: netkit-telnet-0.17/configure
+===================================================================
+--- netkit-telnet-0.17.orig/configure 2008-11-23 22:01:26.000000000 +0100
++++ netkit-telnet-0.17/configure 2008-11-23 22:05:00.000000000 +0100
+@@ -94,7 +94,7 @@
+ echo -n 'Checking if C compiler works... '
+ if (
+ $CC __conftest.c -o __conftest || exit 1
+- ./__conftest || exit 1
++ # Idiots belong shot! ./__conftest || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'yes'
+ else
+@@ -141,7 +141,7 @@
+ echo -n 'Checking if C++ compiler works... '
+ if (
+ $CXX __conftest.cc -o __conftest || exit 1
+- ./__conftest || exit 1
++ # Iditios belong shot! ./__conftest || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'yes'
+ else
+@@ -284,7 +284,7 @@
+ else
+ if (
+ $CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest || exit 1
+- ./__conftest || exit 1
++ # running still does not work./__conftest || exit 1
+ ) >/dev/null 2>&1; then
+ echo '-D__USE_BSD_SIGNAL'
+ CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
+@@ -501,7 +501,7 @@
+ EOF
+ if (
+ $CXX $CXXFLAGS __conftest.cc $LIBBSD -o __conftest || exit 1
+- ./__conftest || exit 1
++ # argh! morons!./__conftest || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'ok'
+ else
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd
new file mode 100644
index 000000000..12204c71b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd
@@ -0,0 +1,14 @@
+# default: on
+# description: The telnet server serves telnet sessions; it uses \
+# unencrypted username/password pairs for authentication.
+service telnet
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/in.telnetd
+ log_on_failure += USERID
+ disable = yes
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
new file mode 100644
index 000000000..9438adc0f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "netkit-telnet includes the telnet daemon and client."
+SECTION = "net"
+DEPENDS = "ncurses"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef"
+
+SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \
+ file://To-aviod-buffer-overflow-in-telnet.patch \
+ file://Warning-fix-in-the-step-of-install.patch \
+ file://telnet-xinetd \
+ file://cross-compile.patch \
+"
+
+EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
+ MANMODE=644 MANDIR=${mandir}"
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \
+ -e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \
+ -e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \
+ -i MCONFIG
+}
+
+do_compile () {
+ oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnet
+ oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' LIBS=-lutil SUB=telnetd
+ oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnetlogin
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 telnet/telnet ${D}${bindir}/telnet.${PN}
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man5
+ install -d ${D}${mandir}/man8
+ oe_runmake SUB=telnetd install
+ rm -rf ${D}${mandir}/man1
+ install -D -m 4750 ${B}/telnetlogin/telnetlogin ${D}/${libdir}/telnetlogin
+ # fix up hardcoded paths
+ sed -i -e 's,/usr/sbin/,${sbindir}/,' ${WORKDIR}/telnet-xinetd
+ install -d ${D}/etc/xinetd.d/
+ install -p -m644 ${WORKDIR}/telnet-xinetd ${D}/etc/xinetd.d/telnet
+}
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+ update-alternatives --install ${bindir}/telnet telnet telnet.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+#!/bin/sh
+ update-alternatives --remove telnet telnet.${PN} 100
+}
+
+SRC_URI[md5sum] = "d6beabaaf53fe6e382c42ce3faa05a36"
+SRC_URI[sha256sum] = "9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00"
+FILES_${PN} += "${sbindir}/in.* ${libdir}/* ${sysconfdir}/xinetd.d/*"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf
new file mode 100644
index 000000000..7bc6ca96b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf
@@ -0,0 +1,11 @@
+service tftp
+{
+ disable = no
+ socket_type = dgram
+ port = 69
+ protocol = udp
+ wait = yes
+ user = nobody
+ server = /usr/sbin/in.tftpd
+ server_args = /tftpboot
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
new file mode 100644
index 000000000..67a541d25
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
@@ -0,0 +1,54 @@
+SUMMARY = "tftp - Trivial file transfer protocol client"
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+DEPENDS = "tcp-wrappers"
+
+LIC_FILES_CHKSUM = "file://tftp/tftp.c;beginline=2;endline=3;md5=84d2cfe1e60863a7d82648734ba4d30c"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
+ file://tftp.conf \
+"
+
+SRC_URI[archive.md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8"
+SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d"
+SRC_URI[patch18.md5sum] = "cb29e7a33dd85105ba6e6ec4f971e42c"
+SRC_URI[patch18.sha256sum] = "092437d27b4fa88c044ef6290372fee5ce06d223607f0e22a6e527065c8930e7"
+
+inherit autotools-brokensep
+
+do_configure () {
+ ./configure --prefix=${prefix}
+ echo "CFLAGS=${CFLAGS}" > MCONFIG
+}
+
+do_compile () {
+ oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' 'CFLAGS=${CFLAGS}'
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man8
+ install -d ${D}${sysconfdir}/xinetd.d
+
+ sed -i 's/install -s/install/' tftp/Makefile
+ sed -i 's/install -s/install/' tftpd/Makefile
+
+ oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+ 'DAEMONMODE=0755' 'MANMODE=0644' \
+ 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' install
+
+ install ${WORKDIR}/tftp.conf ${D}/${sysconfdir}/xinetd.d/tftp
+}
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}/xinetd.d/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+ ${bindir}/.debug ${sbindir}/.debug"
+
+RDEPENDS_${PN}-server = "tcp-wrappers xinetd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
new file mode 100644
index 000000000..10e98a416
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
@@ -0,0 +1,42 @@
+SUMMARY = "ACCEL-PPP is a high performance VPN server application for linux"
+HOMEPAGE = "http://sourceforge.net/apps/trac/accel-ppp/wiki"
+SECTION = "net"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+DEPENDS = "openssl libpcre"
+
+inherit cmake
+
+PR = "r1"
+PV = "1.7.3+git"
+
+SRCREV = "4acfa46c321a344b9a6ce4128e72d1e02828d8a0"
+SRC_URI = "git://accel-ppp.git.sourceforge.net/gitroot/accel-ppp/accel-ppp;branch=1.7"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE = " \
+ -DBUILD_DRIVER=FALSE \
+ -DCMAKE_INSTALL_PREFIX=${prefix} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLOG_PGSQL=FALSE \
+ -DRADIUS=FALSE \
+ -DNETSNMP=FALSE \
+"
+FILES_${PN}-dbg += "/usr/lib/${BPN}/.debug/*"
+
+PACKAGES =+ "${PN}-libs"
+FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
+INSANE_SKIP_${PN}-libs = "dev-so"
+RDEPENDS_${PN} += "${PN}-libs"
+
+do_install_prepend() {
+ cmlist=`find ${S} -name CMakeLists.txt`
+ for file in $cmlist; do
+ sed -i -e "s:LIBRARY DESTINATION lib/accel-ppp:LIBRARY DESTINATION ${baselib}/accel-ppp:g" \
+ -e "s:\${CMAKE_INSTALL_PREFIX}/lib/accel-ppp:\${CMAKE_INSTALL_PREFIX}/${baselib}/accel-ppp:g" \
+ $cmlist
+ done
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
new file mode 100755
index 000000000..2b8fe18b3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
@@ -0,0 +1,66 @@
+#! /bin/sh
+# /etc/init.d/snmpd: start snmp daemon.
+
+. /etc/init.d/functions
+
+test -x /usr/sbin/snmpd || exit 0
+test -x /usr/sbin/snmptrapd || exit 0
+
+# Defaults
+export MIBDIRS=/usr/share/snmp/mibs
+SNMPDRUN=yes
+SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid'
+TRAPDRUN=no
+TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
+PIDFILE=/var/run/snmpd.pid
+SPIDFILE=/var/run/snmptrapd.pid
+
+# Reads config file if exists (will override defaults above)
+[ -r /etc/default/snmpd ] && . /etc/default/snmpd
+
+case "$1" in
+ start)
+ echo -n "Starting network management services:"
+ if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf -a ! -f "$PIDFILE" ]; then
+ start-stop-daemon -o --start --quiet --name snmpd --pidfile "$PIDFILE" \
+ --exec /usr/sbin/snmpd -- $SNMPDOPTS
+ echo -n " snmpd"
+ fi
+ if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf -a ! -f "$SPIDFILE" ]; then
+ start-stop-daemon -o --start --quiet --name snmptrapd --pidfile "$SPIDFILE" \
+ --exec /usr/sbin/snmptrapd -- $TRAPDOPTS
+ echo -n " snmptrapd"
+ fi
+ echo "."
+
+ test ! -x /sbin/restorecon || /sbin/restorecon -FR /var/lib/net-snmp
+ ;;
+ stop)
+ echo -n "Stopping network management services:"
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon -o --stop --quiet --pidfile $PIDFILE --name snmpd
+ fi
+ echo -n " snmpd"
+ if [ -f "$SPIDFILE" ] ; then
+ start-stop-daemon -o --stop --quiet --pidfile $SPIDFILE --name snmptrapd
+ rm -rf $SPIDFILE
+ fi
+ echo -n " snmptrapd"
+ echo "."
+ ;;
+ status)
+ status /usr/sbin/snmpd;
+ exit $?
+ ;;
+ restart|reload|force-reload)
+ $0 stop
+ # Allow the daemons time to exit completely.
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/snmpd {start|stop|status|restart|reload|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf
new file mode 100644
index 000000000..728171c42
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf
@@ -0,0 +1,422 @@
+###############################################################################
+#
+# EXAMPLE.conf:
+# An example configuration file for configuring the ucd-snmp snmpd agent.
+#
+###############################################################################
+#
+# This file is intended to only be an example. If, however, you want
+# to use it, it should be placed in /etc/snmp/snmpd.conf.
+# When the snmpd agent starts up, this is where it will look for it.
+#
+# You might be interested in generating your own snmpd.conf file using
+# the "snmpconf" program (perl script) instead. It's a nice menu
+# based interface to writing well commented configuration files. Try it!
+#
+# Note: This file is automatically generated from EXAMPLE.conf.def.
+# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
+# configure & make, and then make sure you read the EXAMPLE.conf file
+# instead, as it will tailor itself to your configuration.
+
+# All lines beginning with a '#' are comments and are intended for you
+# to read. All other lines are configuration commands for the agent.
+
+#
+# PLEASE: read the snmpd.conf(5) manual page as well!
+#
+
+
+###############################################################################
+# Access Control
+###############################################################################
+
+# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
+# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
+# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
+
+# By far, the most common question I get about the agent is "why won't
+# it work?", when really it should be "how do I configure the agent to
+# allow me to access it?"
+#
+# By default, the agent responds to the "public" community for read
+# only access, if run out of the box without any configuration file in
+# place. The following examples show you other ways of configuring
+# the agent so that you can change the community names, and give
+# yourself write access as well.
+#
+# The following lines change the access permissions of the agent so
+# that the COMMUNITY string provides read-only access to your entire
+# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
+# localhost (127.0.0.1, not its real ipaddress).
+#
+# For more information, read the FAQ as well as the snmpd.conf(5)
+# manual page.
+
+####
+# First, map the community name (COMMUNITY) into a security name
+# (local and mynetwork, depending on where the request is coming
+# from):
+
+# sec.name source community
+com2sec paranoid default public
+#com2sec readonly default public
+#com2sec readwrite default private
+
+####
+# Second, map the security names into group names:
+
+# sec.model sec.name
+group MyROSystem v1 paranoid
+group MyROSystem v2c paranoid
+group MyROSystem usm paranoid
+group MyROGroup v1 readonly
+group MyROGroup v2c readonly
+group MyROGroup usm readonly
+group MyRWGroup v1 readwrite
+group MyRWGroup v2c readwrite
+group MyRWGroup usm readwrite
+
+####
+# Third, create a view for us to let the groups have rights to:
+
+# incl/excl subtree mask
+view all included .1 80
+view system included .iso.org.dod.internet.mgmt.mib-2.system
+
+####
+# Finally, grant the 2 groups access to the 1 view with different
+# write permissions:
+
+# context sec.model sec.level match read write notif
+access MyROSystem "" any noauth exact system none none
+access MyROGroup "" any noauth exact all none none
+access MyRWGroup "" any noauth exact all all none
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# System contact information
+#
+
+# It is also possible to set the sysContact and sysLocation system
+# variables through the snmpd.conf file. **PLEASE NOTE** that setting
+# the value of these objects here makes these objects READ-ONLY
+# (regardless of any access control settings). Any attempt to set the
+# value of an object whose value is given here will fail with an error
+# status of notWritable.
+
+syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
+syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
+
+# Example output of snmpwalk:
+# % snmpwalk -v 1 -c public localhost system
+# system.sysDescr.0 = "SunOS name sun4c"
+# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
+# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
+# system.sysContact.0 = "Me <me@somewhere.org>"
+# system.sysName.0 = "name"
+# system.sysLocation.0 = "Right here, right now."
+# system.sysServices.0 = 72
+
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Process checks.
+#
+# The following are examples of how to use the agent to check for
+# processes running on the host. The syntax looks something like:
+#
+# proc NAME [MAX=0] [MIN=0]
+#
+# NAME: the name of the process to check for. It must match
+# exactly (ie, http will not find httpd processes).
+# MAX: the maximum number allowed to be running. Defaults to 0.
+# MIN: the minimum number to be running. Defaults to 0.
+
+#
+# Examples:
+#
+
+# Make sure mountd is running
+#proc mountd
+
+# Make sure there are no more than 4 ntalkds running, but 0 is ok too.
+#proc ntalkd 4
+
+# Make sure at least one sendmail, but less than or equal to 10 are running.
+#proc sendmail 10 1
+
+# A snmpwalk of the prTable would look something like this:
+#
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.2
+# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
+# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
+# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
+# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
+# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
+# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
+# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
+# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
+# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
+# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
+# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
+#
+# Note that the errorFlag for mountd is set to 1 because one is not
+# running (in this case an rpc.mountd is, but thats not good enough),
+# and the ErrMessage tells you what's wrong. The configuration
+# imposed in the snmpd.conf file is also shown.
+#
+# Special Case: When the min and max numbers are both 0, it assumes
+# you want a max of infinity and a min of 1.
+#
+
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Executables/scripts
+#
+
+#
+# You can also have programs run by the agent that return a single
+# line of output and an exit code. Here are two examples.
+#
+# exec NAME PROGRAM [ARGS ...]
+#
+# NAME: A generic name.
+# PROGRAM: The program to run. Include the path!
+# ARGS: optional arguments to be passed to the program
+
+# a simple hello world
+#exec echotest /bin/echo hello world
+
+# Run a shell script containing:
+#
+# #!/bin/sh
+# echo hello world
+# echo hi there
+# exit 35
+#
+# Note: this has been specifically commented out to prevent
+# accidental security holes due to someone else on your system writing
+# a /tmp/shtest before you do. Uncomment to use it.
+#
+#exec shelltest /bin/sh /tmp/shtest
+
+# Then,
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8
+# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
+# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
+# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
+# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
+# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
+# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
+# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
+# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
+# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
+# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
+# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
+# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0
+
+# Note that the second line of the /tmp/shtest shell script is cut
+# off. Also note that the exit status of 35 was returned.
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# disk checks
+#
+
+# The agent can check the amount of available disk space, and make
+# sure it is above a set limit.
+
+# disk PATH [MIN=DEFDISKMINIMUMSPACE]
+#
+# PATH: mount path to the disk in question.
+# MIN: Disks with space below this value will have the Mib's errorFlag set.
+# Default value = DEFDISKMINIMUMSPACE.
+
+# Check the / partition and make sure it contains at least 10 megs.
+
+#disk / 10000
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9
+# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
+# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
+# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
+# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
+# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
+# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
+# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
+# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
+# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
+# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# load average checks
+#
+
+# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
+#
+# 1MAX: If the 1 minute load average is above this limit at query
+# time, the errorFlag will be set.
+# 5MAX: Similar, but for 5 min average.
+# 15MAX: Similar, but for 15 min average.
+
+# Check for loads:
+#load 12 14 14
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.10
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Extensible sections.
+#
+
+# This alleviates the multiple line output problem found in the
+# previous executable mib by placing each mib in its own mib table:
+
+# Run a shell script containing:
+#
+# #!/bin/sh
+# echo hello world
+# echo hi there
+# exit 35
+#
+# Note: this has been specifically commented out to prevent
+# accidental security holes due to someone else on your system writing
+# a /tmp/shtest before you do. Uncomment to use it.
+#
+# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.50
+# enterprises.ucdavis.50.1.1 = 1
+# enterprises.ucdavis.50.2.1 = "shelltest"
+# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
+# enterprises.ucdavis.50.100.1 = 35
+# enterprises.ucdavis.50.101.1 = "hello world."
+# enterprises.ucdavis.50.101.2 = "hi there."
+# enterprises.ucdavis.50.102.1 = 0
+
+# Now the Output has grown to two lines, and we can see the 'hi
+# there.' output as the second line from our shell script.
+#
+# Note that you must alter the mib.txt file to be correct if you want
+# the .50.* outputs above to change to reasonable text descriptions.
+
+# Other ideas:
+#
+# exec .1.3.6.1.4.1.2021.51 ps /bin/ps
+# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
+# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Pass through control.
+#
+
+# Usage:
+# pass MIBOID EXEC-COMMAND
+#
+# This will pass total control of the mib underneath the MIBOID
+# portion of the mib to the EXEC-COMMAND.
+#
+# Note: You'll have to change the path of the passtest script to your
+# source directory or install it in the given location.
+#
+# Example: (see the script for details)
+# (commented out here since it requires that you place the
+# script in the right location. (its not installed by default))
+
+# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/passtest
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.255
+# enterprises.ucdavis.255.1 = "life the universe and everything"
+# enterprises.ucdavis.255.2.1 = 42
+# enterprises.ucdavis.255.2.2 = OID: 42.42.42
+# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
+# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
+# enterprises.ucdavis.255.5 = 42
+# enterprises.ucdavis.255.6 = Gauge: 42
+#
+# % snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.255.5
+# enterprises.ucdavis.255.5 = 42
+#
+# % snmpset -v 1 -c public localhost .1.3.6.1.4.1.2021.255.1 s "New string"
+# enterprises.ucdavis.255.1 = "New string"
+#
+
+# For specific usage information, see the man/snmpd.conf.5 manual page
+# as well as the local/passtest script used in the above example.
+
+###############################################################################
+# Subagent control
+#
+
+# The agent can support subagents using a number of extension mechanisms.
+# From the 4.2.1 release, AgentX support is being compiled in by default.
+# However, this is still experimental code, so should not be used on
+# critical production systems.
+# Please see the file README.agentx for more details.
+#
+# If having read, marked, learnt and inwardly digested this information,
+# you decide that you do wish to make use of this mechanism, simply
+# uncomment the following directive.
+#
+# master agentx
+#
+# I repeat - this is *NOT* regarded as suitable for front-line production
+# systems, though it is probably stable enough for day-to-day use.
+# Probably.
+#
+# No refunds will be given.
+
+###############################################################################
+# Further Information
+#
+# See the snmpd.conf manual page, and the output of "snmpd -H".
+# MUCH more can be done with the snmpd.conf than is shown as an
+# example here.
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf
new file mode 100644
index 000000000..8d2e4375e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf
@@ -0,0 +1,18 @@
+###############################################################################
+#
+# EXAMPLE.conf:
+# An example configuration file for configuring the ucd-snmp snmptrapd agent.
+#
+###############################################################################
+#
+# This file is intended to only be an example. If, however, you want
+# to use it, it should be placed in /etc/snmp/snmptrapd.conf.
+# When the snmptrapd agent starts up, this is where it will look for it.
+#
+# All lines beginning with a '#' are comments and are intended for you
+# to read. All other lines are configuration commands for the agent.
+
+#
+# PLEASE: read the snmptrapd.conf(5) manual page as well!
+#
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
new file mode 100644
index 000000000..c6401fed3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
@@ -0,0 +1,37 @@
+From 261a22096c79f8e6ef7b387514a74d208e4e5945 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 21 Aug 2015 18:23:13 +0900
+Subject: [PATCH] config_os_headers: Error Fix
+
+ERROR: This autoconf log indicates errors, it looked at host include
+and/or library paths while determining system capabilities.
+cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation [-Wpoison-system-directories]
+conftest.c:168:17: fatal error: pkg.h: No such file or directory
+ #include <pkg.h>
+ ^
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.d/config_os_headers | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index 708aa09..0df32ca 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -482,8 +482,8 @@ then
+ unset ac_cv_header_pkg_h
+ netsnmp_save_CPPFLAGS="$CPPFLAGS"
+ netsnmp_save_LDFLAGS="$LDFLAGS"
+- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+- LDFLAGS="$LDFLAGS -L/usr/local/lib"
++ CPPFLAGS="$CPPFLAGS"
++ LDFLAGS="$LDFLAGS"
+ AC_CHECK_HEADERS(pkg.h,
+ NETSNMP_SEARCH_LIBS(pkg_init, pkg,
+ AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_libs2-Error-Fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_libs2-Error-Fix.patch
new file mode 100644
index 000000000..5866a95ed
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_libs2-Error-Fix.patch
@@ -0,0 +1,31 @@
+From e24fcd140f3f6dd18fd836b197c6d4bb773e50e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org>
+Date: Wed, 4 Nov 2015 16:49:30 +0100
+Subject: [PATCH] config_os_libs2: Error Fix
+
+ERROR: This autoconf log indicates errors, it looked at host include
+and/or library paths while determining system capabilities.
+---
+ configure.d/config_os_libs2 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
+index 47491e2..e3647f9 100644
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -226,10 +226,10 @@ if test "x$with_nl" != "xno"; then
+ case $target_os in
+ linux*) # Check for libnl (linux)
+ netsnmp_save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS"
+ NETSNMP_SEARCH_LIBS(nl_connect, nl-3,
+ [AC_CHECK_HEADERS(netlink/netlink.h)
+- EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"],
++ EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES"],
+ [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS])
+ if test "x$ac_cv_header_netlink_netlink_h" != xyes; then
+ NETSNMP_SEARCH_LIBS(nl_connect, nl, [
+--
+2.5.0
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
new file mode 100644
index 000000000..af242fafb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
@@ -0,0 +1,33 @@
+From d3027a227bc0f603a5b650d01f97ee1dec515be5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 18 Sep 2015 00:28:45 -0400
+Subject: [PATCH] snmplib/keytools.c: Don't check for return from
+ EVP_MD_CTX_init()
+
+EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
+
+snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/patches/1317/]
+ snmplib/keytools.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/snmplib/keytools.c b/snmplib/keytools.c
+index 0ccb3a6..880fc14 100644
+--- a/snmplib/keytools.c
++++ b/snmplib/keytools.c
+@@ -153,8 +153,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
+ ctx = EVP_MD_CTX_create();
+ #else
+ ctx = malloc(sizeof(*ctx));
+- if (!EVP_MD_CTX_init(ctx))
+- return SNMPERR_GENERR;
++ EVP_MD_CTX_init(ctx);
+ #endif
+ #ifndef NETSNMP_DISABLE_MD5
+ if (ISTRANSFORM(hashtype, HMACMD5Auth)) {
+--
+2.5.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/dont-return-incompletely-parsed-varbinds.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/dont-return-incompletely-parsed-varbinds.patch
new file mode 100644
index 000000000..6bd0f93c4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/dont-return-incompletely-parsed-varbinds.patch
@@ -0,0 +1,131 @@
+From 6b93e686bdb6a908d00595608646a05527a5326b Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 21 Aug 2015 12:39:12 +0900
+Subject: [PATCH] the snmp_pdu_parse() function could leave incompletely parsed
+ varBind variables in the list of variables in case the parsing of the SNMP
+ PDU failed. If later processing tries to operate on the stale and
+ incompletely processed varBind (e.g. when printing the variables), this can
+ lead to e.g. crashes or, possibly, execution of arbitrary code
+
+Upstream-Status: Backport [net-snmp]
+
+Written-by: Robert Story
+---
+ snmplib/snmp_api.c | 53 ++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 28 insertions(+), 25 deletions(-)
+
+diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c
+index 191debf..15a2d39 100644
+--- a/snmplib/snmp_api.c
++++ b/snmplib/snmp_api.c
+@@ -4350,10 +4350,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ u_char type;
+ u_char msg_type;
+ u_char *var_val;
+- int badtype = 0;
+ size_t len;
+ size_t four;
+- netsnmp_variable_list *vp = NULL;
++ netsnmp_variable_list *vp = NULL, *vplast = NULL;
+ oid objid[MAX_OID_LEN];
+ u_char *p;
+
+@@ -4493,31 +4492,17 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ (ASN_SEQUENCE | ASN_CONSTRUCTOR),
+ "varbinds");
+ if (data == NULL)
+- return -1;
++ goto fail;
+
+ /*
+ * get each varBind sequence
+ */
+ while ((int) *length > 0) {
+- netsnmp_variable_list *vptemp;
+- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp));
+- if (NULL == vptemp) {
+- return -1;
+- }
+- if (NULL == vp) {
+- pdu->variables = vptemp;
+- } else {
+- vp->next_variable = vptemp;
+- }
+- vp = vptemp;
++ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
++ if (NULL == vp)
++ goto fail;
+
+- vp->next_variable = NULL;
+- vp->val.string = NULL;
+ vp->name_length = MAX_OID_LEN;
+- vp->name = NULL;
+- vp->index = 0;
+- vp->data = NULL;
+- vp->dataFreeHook = NULL;
+ DEBUGDUMPSECTION("recv", "VarBind");
+ data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type,
+ &vp->val_len, &var_val, length);
+@@ -4604,7 +4589,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ vp->val.string = (u_char *) malloc(vp->val_len);
+ }
+ if (vp->val.string == NULL) {
+- return -1;
++ goto fail;
+ }
+ p = asn_parse_string(var_val, &len, &vp->type, vp->val.string,
+ &vp->val_len);
+@@ -4619,7 +4604,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ vp->val_len *= sizeof(oid);
+ vp->val.objid = (oid *) malloc(vp->val_len);
+ if (vp->val.objid == NULL) {
+- return -1;
++ goto fail;
+ }
+ memmove(vp->val.objid, objid, vp->val_len);
+ break;
+@@ -4631,7 +4616,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ case ASN_BIT_STR:
+ vp->val.bitstring = (u_char *) malloc(vp->val_len);
+ if (vp->val.bitstring == NULL) {
+- return -1;
++ goto fail;
+ }
+ p = asn_parse_bitstring(var_val, &len, &vp->type,
+ vp->val.bitstring, &vp->val_len);
+@@ -4640,12 +4625,30 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
+ break;
+ default:
+ snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
+- badtype = -1;
++ goto fail;
+ break;
+ }
+ DEBUGINDENTADD(-4);
++
++ if (NULL == vplast) {
++ pdu->variables = vp;
++ } else {
++ vplast->next_variable = vp;
++ }
++ vplast = vp;
++ vp = NULL;
++
+ }
+- return badtype;
++ return 0;
++
++ fail:
++ DEBUGMSGTL(("recv", "error while parsing VarBindList\n"));
++ /** if we were parsing a var, remove it from the pdu and free it */
++ if (vp)
++ snmp_free_var(vp);
++
++ return -1;
++
+ }
+
+ /*
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
new file mode 100644
index 000000000..a360c3a12
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
@@ -0,0 +1,25 @@
+LIB_LDCONFIG_CMD failed since it is using a host dir $(libdir)
+which is /usr/lib64 does not exist on host when compile 64bit
+image.
+
+In fact, configuring dynamic linker run-time bindings is meaningless
+at this step, If it is needed, Poky would write ldconfig scripts to
+rpm-postinst for each recipe while do_package, in package.bbclass.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+diff --git a/Makefile.top b/Makefile.top
+index 862fb94..ed7dcfc 100644
+--- a/Makefile.top
++++ b/Makefile.top
+@@ -86,7 +86,7 @@ LIBREVISION = 2
+ LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+ LIB_EXTENSION = la
+ LIB_VERSION =
+-LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
++LIB_LDCONFIG_CMD = echo "do not ldconfig\n"
+ LINK = $(LIBTOOL) --mode=link $(LINKCC)
+ # RANLIB = @RANLIB@
+ RANLIB = :
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
new file mode 100644
index 000000000..74b0c12e0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
@@ -0,0 +1,35 @@
+net-snmp: add knob whether nlist.h are checked
+
+Previously, it still was checked when there was no nlish.h in sysroots directory.
+Add knob to decide whether nlist.h are checked or not.
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.d/config_os_headers | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index d903f58..a05d30e 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -31,6 +31,7 @@ AC_CHECK_HEADERS([getopt.h pthread.h regex.h ] dnl
+ [sys/un.h ])
+
+ # Library and Agent:
++if test "x$with_elf" != "xno"; then
+ AC_CHECK_HEADERS([nlist.h],,,[
+ AC_INCLUDES_DEFAULT
+ [
+@@ -38,6 +39,7 @@ AC_INCLUDES_DEFAULT
+ #define LIBBSD_DISABLE_DEPRECATED 1
+ #endif
+ ]])
++fi
+
+ # Library:
+ AC_CHECK_HEADERS([fcntl.h io.h kstat.h ] dnl
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
new file mode 100644
index 000000000..9fb19b3e0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
@@ -0,0 +1,37 @@
+From 4bb4024b395f19d36ab3569e2773ea80d8cc5261 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 14 Jan 2015 15:10:06 +0800
+Subject: [PATCH] testing: add the output format for ptest
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ testing/RUNTESTS | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/testing/RUNTESTS b/testing/RUNTESTS
+index e11c969..fb90f76 100755
+--- a/testing/RUNTESTS
++++ b/testing/RUNTESTS
+@@ -25,13 +25,17 @@ failed_count=0
+ rm -f failed_tests
+ for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
+ echo "RUNNING $i"
++ test_name=`basename $i`
+ ${srcdir}/testing/fulltests/support/simple_run $i
+ if [ $? = 0 ]; then
++ echo "PASS: $test_name"
+ success_count=`expr $success_count + 1`
+ else
++ echo "FAIL: $test_name"
+ failed_count=`expr $failed_count + 1`
+ echo "$i" >> failed_tests
+ fi
++ echo
+ done
+
+ if [ -f failed_tests ]; then
+--
+1.7.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
new file mode 100755
index 000000000..2334217bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd testing
+./RUNTESTS
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service
new file mode 100644
index 000000000..447683f85
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-Ls0-6d"
+EnvironmentFile=-/etc/default/snmpd
+ExecStart=/usr/sbin/snmpd $OPTIONS -a -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service
new file mode 100644
index 000000000..951f9f270
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Trap Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-Lsd"
+EnvironmentFile=-/etc/default/snmptrapd
+ExecStart=/usr/sbin/snmptrapd $OPTIONS -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch
new file mode 100644
index 000000000..c6af8c0f3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch
@@ -0,0 +1,1652 @@
+From 0cad0c6c36af2a2d589563804c9ed2b37b7085fb Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 21 Aug 2015 14:37:02 +0900
+Subject: [PATCH] ystemd support backported from the master branch as of
+ 23/04/2012 (post 5.7.1, pre 5.8).
+
+The following commits have been cherry-picked:
+
+19499c3c90bf9d7b2b9e5d08baa26cc6bba28a11
+fef6cddfdb94da1a6b1fb768af62918b80f11fd3
+0641e43c694c485cbbffef0556efc4641bd3ff50
+76530a89f1c8bbd0b63acce63e10d5d4812a1a16 (conflict resolved)
+bf108d7f1354f6276fc43c129963f2c49b9fc242
+3692875172352f72cf3afd0d35f355e83d7e421b
+74412748067c685e1d8ab6ed3bcc3ca9c2774844
+86132e3f1e6ef7b4e0b96d8fa24e37c81b71b0e0
+63557cf8986a33dba1d4429b583a901361052c4f
+
+Upstream-Status: Backport
+
+Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com>
+---
+ README.systemd | 41 +++
+ agent/snmpd.c | 33 +-
+ apps/snmptrapd.c | 32 +-
+ configure.d/config_modules_lib | 8 +
+ configure.d/config_project_with_enable | 9 +
+ dist/snmpd.servic | 18 +
+ dist/snmpd.socket | 17 +
+ dist/snmptrapd.service | 16 +
+ dist/snmptrapd.socket | 14 +
+ include/net-snmp/library/sd-daemon.h | 290 ++++++++++++++++
+ snmplib/sd-daemon.c | 532 +++++++++++++++++++++++++++++
+ snmplib/transports/snmpTCPDomain.c | 43 ++-
+ snmplib/transports/snmpTCPIPv6Domain.c | 46 ++-
+ snmplib/transports/snmpUDPIPv4BaseDomain.c | 33 +-
+ snmplib/transports/snmpUDPIPv6Domain.c | 34 +-
+ snmplib/transports/snmpUnixDomain.c | 66 ++--
+ win32/libsnmp/Makefile.in | 6 +
+ win32/net-snmp/net-snmp-config.h | 2 +
+ win32/net-snmp/net-snmp-config.h.in | 2 +
+ 19 files changed, 1176 insertions(+), 66 deletions(-)
+ create mode 100644 README.systemd
+ create mode 100644 dist/snmpd.servic
+ create mode 100644 dist/snmpd.socket
+ create mode 100644 dist/snmptrapd.service
+ create mode 100644 dist/snmptrapd.socket
+ create mode 100644 include/net-snmp/library/sd-daemon.h
+ create mode 100644 snmplib/sd-daemon.c
+
+diff --git a/README.systemd b/README.systemd
+new file mode 100644
+index 0000000..dba15d1
+--- /dev/null
++++ b/README.systemd
+@@ -0,0 +1,41 @@
++README.systemd
++--------------
++Net-SNMP provides two daemons, which support systemd system manager.
++See http://www.freedesktop.org/wiki/Software/systemd to learn how
++systemd works. Both socket activation and notification is supported by these
++daemons.
++
++To enable systemd support, the sources must be compiled with
++--with-systemd configure option.
++
++snmpd - The SNMP agent
++----------------------
++Socket activation od snmpd daemon is implemented, but it's discouraged.
++The reason is simple - snmpd not only listens and processes SNMP requests
++from network, but also gathers system statistics counters, sends traps and
++communicates with subagents. It even opens few netlink sockets.
++
++In other words, snmpd should run from system start to properly work.
++This can be done in two ways:
++1) either as snmpd service unit with 'Type=notification' and without a socket
++ unit
++2) or as snmpd service unit with 'Type=simple', appropriate socket socket unit
++ and the snmpd service enabled. This way systemd creates the snmpd listening
++ socket early during boot and passes the sockets to snmpd slightly later
++ (but still during machine boot). This way systemd can paralelize start of
++ services, which depend on snmpd. Admins must adjust the socket file manually,
++ depending if the snmpd support AgentX, IPv6, SMUX etc.
++
++snmpd should be started with '-f' command line parameter to disable forking -
++systemd does that for us automatically.
++
++
++snmptrapd - The trap processing daemon
++--------------------------------------
++snmptrapd supports full socket activation and also notification (if needed).
++Both 'Type=simple' (with appropriate socket unit) and 'Type=notify' services
++will work. Again, '-f' parameter should be provided on snmptrapd command line.
++
++If integration with SNMP agent using AgentX protocol is enabled, snmptrapd should
++start during boot and not after first SNMP trap arrives. Same rules as for snmpd
++applies then.
+diff --git a/agent/snmpd.c b/agent/snmpd.c
+index cfc7bce..116ee5c 100644
+--- a/agent/snmpd.c
++++ b/agent/snmpd.c
+@@ -164,6 +164,10 @@ typedef long fd_mask;
+
+ #endif
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ netsnmp_feature_want(logging_file)
+ netsnmp_feature_want(logging_stdio)
+ netsnmp_feature_want(logging_syslog)
+@@ -443,19 +447,29 @@ main(int argc, char *argv[])
+ int agent_mode = -1;
+ char *pid_file = NULL;
+ char option_compatability[] = "-Le";
++#ifndef WIN32
++ int prepared_sockets = 0;
++#endif
+ #if HAVE_GETPID
+ int fd;
+ FILE *PID;
+ #endif
+
+ #ifndef WIN32
++#ifndef NETSNMP_NO_SYSTEMD
++ /* check if systemd has sockets for us and don't close them */
++ prepared_sockets = netsnmp_sd_listen_fds(0);
++#endif /* NETSNMP_NO_SYSTEMD */
++
+ /*
+ * close all non-standard file descriptors we may have
+ * inherited from the shell.
+ */
+- for (i = getdtablesize() - 1; i > 2; --i) {
+- (void) close(i);
+- }
++ if (!prepared_sockets) {
++ for (i = getdtablesize() - 1; i > 2; --i) {
++ (void) close(i);
++ }
++}
+ #endif /* #WIN32 */
+
+ /*
+@@ -1107,6 +1121,19 @@ main(int argc, char *argv[])
+ netsnmp_addrcache_initialise();
+
+ /*
++ * Let systemd know we're up.
++ */
++#ifndef NETSNMP_NO_SYSTEMD
++ netsnmp_sd_notify(1, "READY=1\n");
++ if (prepared_sockets)
++ /*
++ * Clear the environment variable, we already processed all the sockets
++ * by now.
++ */
++ netsnmp_sd_listen_fds(1);
++#endif
++
++ /*
+ * Forever monitor the dest_port for incoming PDUs.
+ */
+ DEBUGMSGTL(("snmpd/main", "We're up. Starting to process data.\n"));
+diff --git a/apps/snmptrapd.c b/apps/snmptrapd.c
+index bce0d47..c6a74ec 100644
+--- a/apps/snmptrapd.c
++++ b/apps/snmptrapd.c
+@@ -125,6 +125,10 @@ SOFTWARE.
+
+ #include <net-snmp/net-snmp-features.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #ifndef BSD4_3
+ #define BSD4_2
+ #endif
+@@ -657,16 +661,25 @@ main(int argc, char *argv[])
+ int agentx_subagent = 1;
+ #endif
+ netsnmp_trapd_handler *traph;
++#ifndef WIN32
++ int prepared_sockets = 0;
++#endif
+
+
+ #ifndef WIN32
++#ifndef NETSNMP_NO_SYSTEMD
++ /* check if systemd has sockets for us and don't close them */
++ prepared_sockets = netsnmp_sd_listen_fds(0);
++#endif
+ /*
+ * close all non-standard file descriptors we may have
+ * inherited from the shell.
+ */
+- for (i = getdtablesize() - 1; i > 2; --i) {
+- (void) close(i);
+- }
++ if (!prepared_sockets) {
++ for (i = getdtablesize() - 1; i > 2; --i) {
++ (void) close(i);
++ }
++}
+ #endif /* #WIN32 */
+
+ #ifdef SIGTERM
+@@ -1318,6 +1331,19 @@ main(int argc, char *argv[])
+ #endif
+ #endif
+
++ /*
++ * Let systemd know we're up.
++ */
++#ifndef NETSNMP_NO_SYSTEMD
++ netsnmp_sd_notify(1, "READY=1\n");
++ if (prepared_sockets)
++ /*
++ * Clear the environment variable, we already processed all the sockets
++ * by now.
++ */
++ netsnmp_sd_listen_fds(1);
++#endif
++
+ #ifdef WIN32SERVICE
+ trapd_status = SNMPTRAPD_RUNNING;
+ #endif
+diff --git a/configure.d/config_modules_lib b/configure.d/config_modules_lib
+index 362ba0a..bb69daa 100644
+--- a/configure.d/config_modules_lib
++++ b/configure.d/config_modules_lib
+@@ -53,6 +53,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"
+ other_ftobjs_list="$other_ftobjs_list winpipe.ft"
+ fi
+
++# Linux systemd
++if test "x$with_systemd" == "xyes"; then
++ other_src_list="$other_src_list sd-daemon.c"
++ other_objs_list="$other_objs_list sd-daemon.o"
++ other_lobjs_list="$other_lobjs_list sd-daemon.lo"
++ other_ftobjs_list="$other_ftobjs_list sd-daemon.ft"
++fi
++
+ AC_SUBST(other_src_list)
+ AC_SUBST(other_objs_list)
+ AC_SUBST(other_lobjs_list)
+diff --git a/configure.d/config_project_with_enable b/configure.d/config_project_with_enable
+index 61ba026..d782d12 100644
+--- a/configure.d/config_project_with_enable
++++ b/configure.d/config_project_with_enable
+@@ -690,6 +690,15 @@ if test "x$with_dummy_values" != "xyes"; then
+ data for])
+ fi
+
++NETSNMP_ARG_WITH(systemd,
++[ --with-systemd Provide systemd support. See README.systemd
++ for details.])
++# Define unless specifically suppressed (i.e., option defaults to false).
++if test "x$with_systemd" != "xyes"; then
++ AC_DEFINE(NETSNMP_NO_SYSTEMD, 1,
++ [If you don't want to integrate with systemd.])
++fi
++
+ NETSNMP_ARG_ENABLE(set-support,
+ [ --disable-set-support Do not allow SNMP set requests.])
+ if test "x$enable_set_support" = "xno"; then
+diff --git a/dist/snmpd.servic b/dist/snmpd.servic
+new file mode 100644
+index 0000000..31391e5
+--- /dev/null
++++ b/dist/snmpd.servic
+@@ -0,0 +1,18 @@
++#
++# SNMP agent service file for systemd
++#
++#
++# The service should be enabled, i.e. snmpd should start during machine boot.
++# Socket activation shall not be used. See README.systemd for details.
++
++[Unit]
++Description=Simple Network Management Protocol (SNMP) daemon.
++After=syslog.target network.target
++
++[Service]
++# Type=notify is also supported. It should be set when snmpd.socket is not used.
++Type=simple
++ExecStart=/usr/sbin/snmpd -f
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/dist/snmpd.socket b/dist/snmpd.socket
+new file mode 100644
+index 0000000..7f3a2d9
+--- /dev/null
++++ b/dist/snmpd.socket
+@@ -0,0 +1,17 @@
++[Unit]
++Description=Socket listening for SNMP and AgentX messages
++
++[Socket]
++ListenDatagram=0.0.0.0:161
++# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
++# It must match listening addresses/ports defined in snmpd.service
++# or snmpd.conf.
++# ListenStream=0.0.0.0:161
++# ListenDatagram=[::]:161
++# ListenStream=[::]:161
++#
++# Uncomment AgentX socket if snmpd.conf enables AgentX protocol.
++# ListenStream=/var/agentx/master
++
++[Install]
++WantedBy=sockets.target
+diff --git a/dist/snmptrapd.service b/dist/snmptrapd.service
+new file mode 100644
+index 0000000..e88a5b4
+--- /dev/null
++++ b/dist/snmptrapd.service
+@@ -0,0 +1,16 @@
++#
++# SNMP trap-processing service file for systemd
++#
++
++[Unit]
++Description=Simple Network Management Protocol (SNMP) Trap daemon.
++After=syslog.target network.target
++
++[Service]
++# Type=notify is also supported. It should be set when snmptrapd.socket is not
++# used.
++Type=simple
++ExecStart=/usr/sbin/snmptrapd -f
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/dist/snmptrapd.socket b/dist/snmptrapd.socket
+new file mode 100644
+index 0000000..2d24fb8
+--- /dev/null
++++ b/dist/snmptrapd.socket
+@@ -0,0 +1,14 @@
+++[Unit]
+++Description=Socket listening for SNMP trap messages
+++
+++[Socket]
+++ListenDatagram=0.0.0.0:162
+++# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
+++# It must match listening addresses/ports defined in snmptrapd.service
+++# or snmptrapd.conf.
+++# ListenStream=0.0.0.0:162
+++# ListenDatagram=[::]:162
+++# ListenStream=[::]:162
+++
+++[Install]
+++WantedBy=sockets.target
+diff --git a/include/net-snmp/library/sd-daemon.h b/include/net-snmp/library/sd-daemon.h
+new file mode 100644
+index 0000000..85274c9
+--- /dev/null
++++ b/include/net-snmp/library/sd-daemon.h
+@@ -0,0 +1,290 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++#ifndef SNMPD_SD_DAEMON_H
++#define SNMPD_SD_DAEMON_H
++
++/***
++ Copyright 2010 Lennart Poettering
++
++ Permission is hereby granted, free of charge, to any person
++ obtaining a copy of this software and associated documentation files
++ (the "Software"), to deal in the Software without restriction,
++ including without limitation the rights to use, copy, modify, merge,
++ publish, distribute, sublicense, and/or sell copies of the Software,
++ and to permit persons to whom the Software is furnished to do so,
++ subject to the following conditions:
++
++ The above copyright notice and this permission notice shall be
++ included in all copies or substantial portions of the Software.
++
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ SOFTWARE.
++***/
++
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#ifdef HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++ Reference implementation of a few systemd related interfaces for
++ writing daemons. These interfaces are trivial to implement. To
++ simplify porting we provide this reference implementation.
++ Applications are welcome to reimplement the algorithms described
++ here if they do not want to include these two source files.
++
++ The following functionality is provided:
++
++ - Support for logging with log levels on stderr
++ - File descriptor passing for socket-based activation
++ - Daemon startup and status notification
++ - Detection of systemd boots
++
++ You may compile this with -DDISABLE_SYSTEMD to disable systemd
++ support. This makes all those calls NOPs that are directly related to
++ systemd (i.e. only sd_is_xxx() will stay useful).
++
++ Since this is drop-in code we don't want any of our symbols to be
++ exported in any case. Hence we declare hidden visibility for all of
++ them.
++
++ You may find an up-to-date version of these source files online:
++
++ http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h
++ http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c
++
++ This should compile on non-Linux systems, too, but with the
++ exception of the sd_is_xxx() calls all functions will become NOPs.
++
++ See sd-daemon(7) for more information.
++*/
++
++#ifndef _sd_printf_attr_
++#if __GNUC__ >= 4
++#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
++#else
++#define _sd_printf_attr_(a,b)
++#endif
++#endif
++
++/*
++ Log levels for usage on stderr:
++
++ fprintf(stderr, SD_NOTICE "Hello World!\n");
++
++ This is similar to printk() usage in the kernel.
++*/
++#define SD_EMERG "<0>" /* system is unusable */
++#define SD_ALERT "<1>" /* action must be taken immediately */
++#define SD_CRIT "<2>" /* critical conditions */
++#define SD_ERR "<3>" /* error conditions */
++#define SD_WARNING "<4>" /* warning conditions */
++#define SD_NOTICE "<5>" /* normal but significant condition */
++#define SD_INFO "<6>" /* informational */
++#define SD_DEBUG "<7>" /* debug-level messages */
++
++/* The first passed file descriptor is fd 3 */
++#define SD_LISTEN_FDS_START 3
++
++/*
++ Returns how many file descriptors have been passed, or a negative
++ errno code on failure. Optionally, removes the $LISTEN_FDS and
++ $LISTEN_PID file descriptors from the environment (recommended, but
++ problematic in threaded environments). If r is the return value of
++ this function you'll find the file descriptors passed as fds
++ SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative
++ errno style error code on failure. This function call ensures that
++ the FD_CLOEXEC flag is set for the passed file descriptors, to make
++ sure they are not passed on to child processes. If FD_CLOEXEC shall
++ not be set, the caller needs to unset it after this call for all file
++ descriptors that are used.
++
++ See sd_listen_fds(3) for more information.
++*/
++int netsnmp_sd_listen_fds(int unset_environment);
++
++/*
++ Helper call for identifying a passed file descriptor. Returns 1 if
++ the file descriptor is a FIFO in the file system stored under the
++ specified path, 0 otherwise. If path is NULL a path name check will
++ not be done and the call only verifies if the file descriptor
++ refers to a FIFO. Returns a negative errno style error code on
++ failure.
++
++ See sd_is_fifo(3) for more information.
++*/
++int netsnmp_sd_is_fifo(int fd, const char *path);
++
++/*
++ Helper call for identifying a passed file descriptor. Returns 1 if
++ the file descriptor is a special character device on the file
++ system stored under the specified path, 0 otherwise.
++ If path is NULL a path name check will not be done and the call
++ only verifies if the file descriptor refers to a special character.
++ Returns a negative errno style error code on failure.
++
++ See sd_is_special(3) for more information.
++*/
++int netsnmp_sd_is_special(int fd, const char *path);
++
++/*
++ Helper call for identifying a passed file descriptor. Returns 1 if
++ the file descriptor is a socket of the specified family (AF_INET,
++ ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If
++ family is 0 a socket family check will not be done. If type is 0 a
++ socket type check will not be done and the call only verifies if
++ the file descriptor refers to a socket. If listening is > 0 it is
++ verified that the socket is in listening mode. (i.e. listen() has
++ been called) If listening is == 0 it is verified that the socket is
++ not in listening mode. If listening is < 0 no listening mode check
++ is done. Returns a negative errno style error code on failure.
++
++ See sd_is_socket(3) for more information.
++*/
++int netsnmp_sd_is_socket(int fd, int family, int type, int listening);
++
++/*
++ Helper call for identifying a passed file descriptor. Returns 1 if
++ the file descriptor is an Internet socket, of the specified family
++ (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM,
++ SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version
++ check is not done. If type is 0 a socket type check will not be
++ done. If port is 0 a socket port check will not be done. The
++ listening flag is used the same way as in sd_is_socket(). Returns a
++ negative errno style error code on failure.
++
++ See sd_is_socket_inet(3) for more information.
++*/
++int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port);
++
++/*
++ Helper call for identifying a passed file descriptor. Returns 1 if
++ the file descriptor is an AF_UNIX socket of the specified type
++ (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0
++ a socket type check will not be done. If path is NULL a socket path
++ check will not be done. For normal AF_UNIX sockets set length to
++ 0. For abstract namespace sockets set length to the length of the
++ socket name (including the initial 0 byte), and pass the full
++ socket path in path (including the initial 0 byte). The listening
++ flag is used the same way as in sd_is_socket(). Returns a negative
++ errno style error code on failure.
++
++ See sd_is_socket_unix(3) for more information.
++*/
++int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
++
++/*
++ Informs systemd about changed daemon state. This takes a number of
++ newline separated environment-style variable assignments in a
++ string. The following variables are known:
++
++ READY=1 Tells systemd that daemon startup is finished (only
++ relevant for services of Type=notify). The passed
++ argument is a boolean "1" or "0". Since there is
++ little value in signaling non-readiness the only
++ value daemons should send is "READY=1".
++
++ STATUS=... Passes a single-line status string back to systemd
++ that describes the daemon state. This is free-from
++ and can be used for various purposes: general state
++ feedback, fsck-like programs could pass completion
++ percentages and failing programs could pass a human
++ readable error message. Example: "STATUS=Completed
++ 66% of file system check..."
++
++ ERRNO=... If a daemon fails, the errno-style error code,
++ formatted as string. Example: "ERRNO=2" for ENOENT.
++
++ BUSERROR=... If a daemon fails, the D-Bus error-style error
++ code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut"
++
++ MAINPID=... The main pid of a daemon, in case systemd did not
++ fork off the process itself. Example: "MAINPID=4711"
++
++ Daemons can choose to send additional variables. However, it is
++ recommended to prefix variable names not listed above with X_.
++
++ Returns a negative errno-style error code on failure. Returns > 0
++ if systemd could be notified, 0 if it couldn't possibly because
++ systemd is not running.
++
++ Example: When a daemon finished starting up, it could issue this
++ call to notify systemd about it:
++
++ sd_notify(0, "READY=1");
++
++ See sd_notifyf() for more complete examples.
++
++ See sd_notify(3) for more information.
++*/
++int netsnmp_sd_notify(int unset_environment, const char *state);
++
++/*
++ Similar to sd_notify() but takes a format string.
++
++ Example 1: A daemon could send the following after initialization:
++
++ sd_notifyf(0, "READY=1\n"
++ "STATUS=Processing requests...\n"
++ "MAINPID=%lu",
++ (unsigned long) getpid());
++
++ Example 2: A daemon could send the following shortly before
++ exiting, on failure:
++
++ sd_notifyf(0, "STATUS=Failed to start up: %s\n"
++ "ERRNO=%i",
++ strerror(errno),
++ errno);
++
++ See sd_notifyf(3) for more information.
++*/
++int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3);
++
++/*
++ Returns > 0 if the system was booted with systemd. Returns < 0 on
++ error. Returns 0 if the system was not booted with systemd. Note
++ that all of the functions above handle non-systemd boots just
++ fine. You should NOT protect them with a call to this function. Also
++ note that this function checks whether the system, not the user
++ session is controlled by systemd. However the functions above work
++ for both user and system services.
++
++ See sd_booted(3) for more information.
++*/
++int netsnmp_sd_booted(void);
++
++/**
++ * Find an socket with given parameters. See man sd_is_socket_inet for
++ * description of the arguments.
++ *
++ * Returns the file descriptor if it is found, 0 otherwise.
++ */
++int netsnmp_sd_find_inet_socket(int family, int type, int listening, int port);
++
++/**
++ * Find an unix socket with given parameters. See man sd_is_socket_unix for
++ * description of the arguments.
++ *
++ * Returns the file descriptor if it is found, 0 otherwise.
++ */
++int
++netsnmp_sd_find_unix_socket(int type, int listening, const char *path);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* SNMPD_SD_DAEMON_H */
+diff --git a/snmplib/sd-daemon.c b/snmplib/sd-daemon.c
+new file mode 100644
+index 0000000..42dba29
+--- /dev/null
++++ b/snmplib/sd-daemon.c
+@@ -0,0 +1,532 @@
++/*
++ * Systemd integration parts.
++ *
++ * Most of this file is directly copied from systemd sources.
++ * Changes:
++ * - all functions were renamed to have netsnmp_ prefix
++ * - includes were changed to match Net-SNMP style.
++ * - removed gcc export macros
++ * - removed POSIX message queues
++ */
++
++#include <net-snmp/net-snmp-config.h>
++#include <net-snmp/net-snmp-features.h>
++#include <net-snmp/types.h>
++#include <net-snmp/library/snmp_debug.h>
++
++#ifndef NETSNMP_NO_SYSTEMD
++
++/***
++ Copyright 2010 Lennart Poettering
++
++ Permission is hereby granted, free of charge, to any person
++ obtaining a copy of this software and associated documentation files
++ (the "Software"), to deal in the Software without restriction,
++ including without limitation the rights to use, copy, modify, merge,
++ publish, distribute, sublicense, and/or sell copies of the Software,
++ and to permit persons to whom the Software is furnished to do so,
++ subject to the following conditions:
++
++ The above copyright notice and this permission notice shall be
++ included in all copies or substantial portions of the Software.
++
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ SOFTWARE.
++***/
++
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++#include <sys/fcntl.h>
++#include <netinet/in.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stddef.h>
++#include <limits.h>
++
++#include <net-snmp/library/sd-daemon.h>
++
++int netsnmp_sd_listen_fds(int unset_environment) {
++
++ int r, fd;
++ const char *e;
++ char *p = NULL;
++ unsigned long l;
++
++ if (!(e = getenv("LISTEN_PID"))) {
++ r = 0;
++ goto finish;
++ }
++
++ errno = 0;
++ l = strtoul(e, &p, 10);
++
++ if (errno != 0) {
++ r = -errno;
++ goto finish;
++ }
++
++ if (!p || *p || l <= 0) {
++ r = -EINVAL;
++ goto finish;
++ }
++
++ /* Is this for us? */
++ if (getpid() != (pid_t) l) {
++ r = 0;
++ goto finish;
++ }
++
++ if (!(e = getenv("LISTEN_FDS"))) {
++ r = 0;
++ goto finish;
++ }
++
++ errno = 0;
++ l = strtoul(e, &p, 10);
++
++ if (errno != 0) {
++ r = -errno;
++ goto finish;
++ }
++
++ if (!p || *p) {
++ r = -EINVAL;
++ goto finish;
++ }
++
++ for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
++ int flags;
++
++ if ((flags = fcntl(fd, F_GETFD)) < 0) {
++ r = -errno;
++ goto finish;
++ }
++
++ if (flags & FD_CLOEXEC)
++ continue;
++
++ if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
++ r = -errno;
++ goto finish;
++ }
++ }
++
++ r = (int) l;
++
++finish:
++ if (unset_environment) {
++ unsetenv("LISTEN_PID");
++ unsetenv("LISTEN_FDS");
++ }
++
++ return r;
++}
++
++int netsnmp_sd_is_fifo(int fd, const char *path) {
++ struct stat st_fd;
++
++ if (fd < 0)
++ return -EINVAL;
++
++ memset(&st_fd, 0, sizeof(st_fd));
++ if (fstat(fd, &st_fd) < 0)
++ return -errno;
++
++ if (!S_ISFIFO(st_fd.st_mode))
++ return 0;
++
++ if (path) {
++ struct stat st_path;
++
++ memset(&st_path, 0, sizeof(st_path));
++ if (stat(path, &st_path) < 0) {
++
++ if (errno == ENOENT || errno == ENOTDIR)
++ return 0;
++
++ return -errno;
++ }
++
++ return
++ st_path.st_dev == st_fd.st_dev &&
++ st_path.st_ino == st_fd.st_ino;
++ }
++
++ return 1;
++}
++
++int netsnmp_sd_is_special(int fd, const char *path) {
++ struct stat st_fd;
++
++ if (fd < 0)
++ return -EINVAL;
++
++ if (fstat(fd, &st_fd) < 0)
++ return -errno;
++
++ if (!S_ISREG(st_fd.st_mode) && !S_ISCHR(st_fd.st_mode))
++ return 0;
++
++ if (path) {
++ struct stat st_path;
++
++ if (stat(path, &st_path) < 0) {
++
++ if (errno == ENOENT || errno == ENOTDIR)
++ return 0;
++
++ return -errno;
++ }
++
++ if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode))
++ return
++ st_path.st_dev == st_fd.st_dev &&
++ st_path.st_ino == st_fd.st_ino;
++ else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode))
++ return st_path.st_rdev == st_fd.st_rdev;
++ else
++ return 0;
++ }
++
++ return 1;
++}
++
++static int sd_is_socket_internal(int fd, int type, int listening) {
++ struct stat st_fd;
++
++ if (fd < 0 || type < 0)
++ return -EINVAL;
++
++ if (fstat(fd, &st_fd) < 0)
++ return -errno;
++
++ if (!S_ISSOCK(st_fd.st_mode))
++ return 0;
++
++ if (type != 0) {
++ int other_type = 0;
++ socklen_t l = sizeof(other_type);
++
++ if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0)
++ return -errno;
++
++ if (l != sizeof(other_type))
++ return -EINVAL;
++
++ if (other_type != type)
++ return 0;
++ }
++
++ if (listening >= 0) {
++ int accepting = 0;
++ socklen_t l = sizeof(accepting);
++
++ if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0)
++ return -errno;
++
++ if (l != sizeof(accepting))
++ return -EINVAL;
++
++ if (!accepting != !listening)
++ return 0;
++ }
++
++ return 1;
++}
++
++union sockaddr_union {
++ struct sockaddr sa;
++ struct sockaddr_in in4;
++ struct sockaddr_in6 in6;
++ struct sockaddr_un un;
++ struct sockaddr_storage storage;
++};
++
++int netsnmp_sd_is_socket(int fd, int family, int type, int listening) {
++ int r;
++
++ if (family < 0)
++ return -EINVAL;
++
++ if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++ return r;
++
++ if (family > 0) {
++ union sockaddr_union sockaddr;
++ socklen_t l;
++
++ memset(&sockaddr, 0, sizeof(sockaddr));
++ l = sizeof(sockaddr);
++
++ if (getsockname(fd, &sockaddr.sa, &l) < 0)
++ return -errno;
++
++ if (l < sizeof(sa_family_t))
++ return -EINVAL;
++
++ return sockaddr.sa.sa_family == family;
++ }
++
++ return 1;
++}
++
++int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
++ union sockaddr_union sockaddr;
++ socklen_t l;
++ int r;
++
++ if (family != 0 && family != AF_INET && family != AF_INET6)
++ return -EINVAL;
++
++ if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++ return r;
++
++ memset(&sockaddr, 0, sizeof(sockaddr));
++ l = sizeof(sockaddr);
++
++ if (getsockname(fd, &sockaddr.sa, &l) < 0)
++ return -errno;
++
++ if (l < sizeof(sa_family_t))
++ return -EINVAL;
++
++ if (sockaddr.sa.sa_family != AF_INET &&
++ sockaddr.sa.sa_family != AF_INET6)
++ return 0;
++
++ if (family > 0)
++ if (sockaddr.sa.sa_family != family)
++ return 0;
++
++ if (port > 0) {
++ if (sockaddr.sa.sa_family == AF_INET) {
++ if (l < sizeof(struct sockaddr_in))
++ return -EINVAL;
++
++ return htons(port) == sockaddr.in4.sin_port;
++ } else {
++ if (l < sizeof(struct sockaddr_in6))
++ return -EINVAL;
++
++ return htons(port) == sockaddr.in6.sin6_port;
++ }
++ }
++
++ return 1;
++}
++
++int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
++ union sockaddr_union sockaddr;
++ socklen_t l;
++ int r;
++
++ if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++ return r;
++
++ memset(&sockaddr, 0, sizeof(sockaddr));
++ l = sizeof(sockaddr);
++
++ if (getsockname(fd, &sockaddr.sa, &l) < 0)
++ return -errno;
++
++ if (l < sizeof(sa_family_t))
++ return -EINVAL;
++
++ if (sockaddr.sa.sa_family != AF_UNIX)
++ return 0;
++
++ if (path) {
++ if (length <= 0)
++ length = strlen(path);
++
++ if (length <= 0)
++ /* Unnamed socket */
++ return l == offsetof(struct sockaddr_un, sun_path);
++
++ if (path[0])
++ /* Normal path socket */
++ return
++ (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
++ memcmp(path, sockaddr.un.sun_path, length+1) == 0;
++ else
++ /* Abstract namespace socket */
++ return
++ (l == offsetof(struct sockaddr_un, sun_path) + length) &&
++ memcmp(path, sockaddr.un.sun_path, length) == 0;
++ }
++
++ return 1;
++}
++
++int netsnmp_sd_notify(int unset_environment, const char *state) {
++ int fd = -1, r;
++ struct msghdr msghdr;
++ struct iovec iovec;
++ union sockaddr_union sockaddr;
++ const char *e;
++
++ if (!state) {
++ r = -EINVAL;
++ goto finish;
++ }
++
++ if (!(e = getenv("NOTIFY_SOCKET")))
++ return 0;
++
++ /* Must be an abstract socket, or an absolute path */
++ if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
++ r = -EINVAL;
++ goto finish;
++ }
++
++ if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
++ r = -errno;
++ goto finish;
++ }
++
++ memset(&sockaddr, 0, sizeof(sockaddr));
++ sockaddr.sa.sa_family = AF_UNIX;
++ strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path));
++
++ if (sockaddr.un.sun_path[0] == '@')
++ sockaddr.un.sun_path[0] = 0;
++
++ memset(&iovec, 0, sizeof(iovec));
++ iovec.iov_base = (char *)state;
++ iovec.iov_len = strlen(state);
++
++ memset(&msghdr, 0, sizeof(msghdr));
++ msghdr.msg_name = &sockaddr;
++ msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
++
++ if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
++ msghdr.msg_namelen = sizeof(struct sockaddr_un);
++
++ msghdr.msg_iov = &iovec;
++ msghdr.msg_iovlen = 1;
++
++ if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
++ r = -errno;
++ goto finish;
++ }
++
++ r = 1;
++
++finish:
++ if (unset_environment)
++ unsetenv("NOTIFY_SOCKET");
++
++ if (fd >= 0)
++ close(fd);
++
++ return r;
++}
++
++int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) {
++ va_list ap;
++ char *p = NULL;
++ int r;
++
++ va_start(ap, format);
++ r = vasprintf(&p, format, ap);
++ va_end(ap);
++
++ if (r < 0 || !p)
++ return -ENOMEM;
++
++ r = netsnmp_sd_notify(unset_environment, p);
++ free(p);
++
++ return r;
++}
++
++int netsnmp_sd_booted(void) {
++ struct stat a, b;
++
++ /* We simply test whether the systemd cgroup hierarchy is
++ * mounted */
++
++ if (lstat("/sys/fs/cgroup", &a) < 0)
++ return 0;
++
++ if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
++ return 0;
++
++ return a.st_dev != b.st_dev;
++}
++
++/* End of original sd-daemon.c from systemd sources */
++
++int
++netsnmp_sd_find_inet_socket(int family, int type, int listening, int port)
++{
++ int count, fd;
++
++ count = netsnmp_sd_listen_fds(0);
++ if (count <= 0) {
++ DEBUGMSGTL(("systemd:find_inet_socket", "No LISTEN_FDS found.\n"));
++ return 0;
++ }
++ DEBUGMSGTL(("systemd:find_inet_socket", "LISTEN_FDS reports %d sockets.\n",
++ count));
++
++ for (fd = 3; fd < 3+count; fd++) {
++ int rc = netsnmp_sd_is_socket_inet(fd, family, type, listening, port);
++ if (rc < 0)
++ DEBUGMSGTL(("systemd:find_inet_socket",
++ "sd_is_socket_inet error: %d\n", rc));
++ if (rc > 0) {
++ DEBUGMSGTL(("systemd:find_inet_socket",
++ "Found the socket in LISTEN_FDS\n"));
++ return fd;
++ }
++ }
++ DEBUGMSGTL(("systemd:find_inet_socket", "Socket not found in LISTEN_FDS\n"));
++ return 0;
++}
++
++int
++netsnmp_sd_find_unix_socket(int type, int listening, const char *path)
++{
++ int count, fd;
++
++ count = netsnmp_sd_listen_fds(0);
++ if (count <= 0) {
++ DEBUGMSGTL(("systemd:find_unix_socket", "No LISTEN_FDS found.\n"));
++ return 0;
++ }
++ DEBUGMSGTL(("systemd:find_unix_socket", "LISTEN_FDS reports %d sockets.\n",
++ count));
++
++ for (fd = 3; fd < 3+count; fd++) {
++ int rc = netsnmp_sd_is_socket_unix(fd, type, listening, path, 0);
++ if (rc < 0)
++ DEBUGMSGTL(("systemd:find_unix_socket",
++ "netsnmp_sd_is_socket_unix error: %d\n", rc));
++ if (rc > 0) {
++ DEBUGMSGTL(("systemd:find_unix_socket",
++ "Found the socket in LISTEN_FDS\n"));
++ return fd;
++ }
++ }
++ DEBUGMSGTL(("systemd:find_unix_socket", "Socket not found in LISTEN_FDS\n"));
++ return 0;
++}
++
++#endif /* ! NETSNMP_NO_SYSTEMD */
+diff --git a/snmplib/transports/snmpTCPDomain.c b/snmplib/transports/snmpTCPDomain.c
+index 7feb028..a41b926 100644
+--- a/snmplib/transports/snmpTCPDomain.c
++++ b/snmplib/transports/snmpTCPDomain.c
+@@ -43,6 +43,10 @@
+ #include <net-snmp/library/snmpTCPBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ /*
+ * needs to be in sync with the definitions in snmplib/snmpUDPDomain.c
+ * and perl/agent/agent.xs
+@@ -149,6 +153,7 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+ netsnmp_transport *t = NULL;
+ netsnmp_udp_addr_pair *addr_pair = NULL;
+ int rc = 0;
++ int socket_initialized = 0;
+
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+ if (local)
+@@ -178,7 +183,19 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+ t->domain_length =
+ sizeof(netsnmp_snmpTCPDomain) / sizeof(netsnmp_snmpTCPDomain[0]);
+
+- t->sock = socket(PF_INET, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++ /*
++ * Maybe the socket was already provided by systemd...
++ */
++ if (local) {
++ t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_STREAM, 1,
++ ntohs(addr->sin_port));
++ if (t->sock)
++ socket_initialized = 1;
++ }
++#endif
++ if (!socket_initialized)
++ t->sock = socket(PF_INET, SOCK_STREAM, 0);
+ if (t->sock < 0) {
+ netsnmp_transport_free(t);
+ return NULL;
+@@ -215,11 +232,13 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+ setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt,
+ sizeof(opt));
+
+- rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+
+ /*
+@@ -236,11 +255,13 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+ * Now sit here and wait for connections to arrive.
+ */
+
+- rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+
+ /*
+diff --git a/snmplib/transports/snmpTCPIPv6Domain.c b/snmplib/transports/snmpTCPIPv6Domain.c
+index d2e0a2d..22de6d4 100644
+--- a/snmplib/transports/snmpTCPIPv6Domain.c
++++ b/snmplib/transports/snmpTCPIPv6Domain.c
+@@ -49,6 +49,10 @@
+ #include <net-snmp/library/snmpTCPBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #include "inet_ntop.h"
+
+ oid netsnmp_TCPIPv6Domain[] = { TRANSPORT_DOMAIN_TCP_IPV6 };
+@@ -140,6 +144,8 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+ {
+ netsnmp_transport *t = NULL;
+ int rc = 0;
++ char *str = NULL;
++ int socket_initialized = 0;
+
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+ if (local)
+@@ -174,7 +180,19 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+ t->domain = netsnmp_TCPIPv6Domain;
+ t->domain_length = sizeof(netsnmp_TCPIPv6Domain) / sizeof(oid);
+
+- t->sock = socket(PF_INET6, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++ /*
++ * Maybe the socket was already provided by systemd...
++ */
++ if (local) {
++ t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_STREAM, 1,
++ ntohs(addr->sin6_port));
++ if (t->sock)
++ socket_initialized = 1;
++ }
++#endif
++ if (!socket_initialized)
++ t->sock = socket(PF_INET6, SOCK_STREAM, 0);
+ if (t->sock < 0) {
+ netsnmp_transport_free(t);
+ return NULL;
+@@ -220,12 +238,14 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+
+ setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt));
+
+- rc = bind(t->sock, (struct sockaddr *) addr,
+- sizeof(struct sockaddr_in6));
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = bind(t->sock, (struct sockaddr *) addr,
++ sizeof(struct sockaddr_in6));
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+
+ /*
+@@ -242,11 +262,13 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+ * Now sit here and wait for connections to arrive.
+ */
+
+- rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+
+ /*
+diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c
+index 8c0fb05..00e5bbc 100644
+--- a/snmplib/transports/snmpUDPIPv4BaseDomain.c
++++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c
+@@ -40,6 +40,10 @@
+
+ #include <net-snmp/library/snmpSocketBaseDomain.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
+ int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from,
+ socklen_t *fromlen, struct sockaddr *dstip,
+@@ -64,6 +68,7 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+ char *client_socket = NULL;
+ netsnmp_indexed_addr_pair addr_pair;
+ socklen_t local_addr_len;
++ int socket_initialized = 0;
+
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+ if (local)
+@@ -88,7 +93,19 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+ free(str);
+ }
+
+- t->sock = socket(PF_INET, SOCK_DGRAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++ /*
++ * Maybe the socket was already provided by systemd...
++ */
++ if (local) {
++ t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_DGRAM, -1,
++ ntohs(addr->sin_port));
++ if (t->sock)
++ socket_initialized = 1;
++ }
++#endif
++ if (!socket_initialized)
++ t->sock = socket(PF_INET, SOCK_DGRAM, 0);
+ DEBUGMSGTL(("UDPBase", "openned socket %d as local=%d\n", t->sock, local));
+ if (t->sock < 0) {
+ netsnmp_transport_free(t);
+@@ -151,12 +168,14 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+ }
+ }
+ #endif /* !defined(WIN32) */
+- rc = bind(t->sock, (struct sockaddr *) addr,
+- sizeof(struct sockaddr));
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = bind(t->sock, (struct sockaddr *) addr,
++ sizeof(struct sockaddr));
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+ t->data = NULL;
+ t->data_length = 0;
+diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c
+index 18de876..fd2ced4 100644
+--- a/snmplib/transports/snmpUDPIPv6Domain.c
++++ b/snmplib/transports/snmpUDPIPv6Domain.c
+@@ -67,6 +67,10 @@ static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+ #include <net-snmp/library/snmpSocketBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #include "inet_ntop.h"
+ #include "inet_pton.h"
+
+@@ -190,6 +194,8 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+ {
+ netsnmp_transport *t = NULL;
+ int rc = 0;
++ char *str = NULL;
++ int socket_initialized = 0;
+
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+ if (local)
+@@ -217,7 +223,19 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+ t->domain_length =
+ sizeof(netsnmp_UDPIPv6Domain) / sizeof(netsnmp_UDPIPv6Domain[0]);
+
+- t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++ /*
++ * Maybe the socket was already provided by systemd...
++ */
++ if (local) {
++ t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_DGRAM, -1,
++ ntohs(addr->sin6_port));
++ if (t->sock)
++ socket_initialized = 1;
++ }
++#endif
++ if (!socket_initialized)
++ t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
+ if (t->sock < 0) {
+ netsnmp_transport_free(t);
+ return NULL;
+@@ -243,12 +261,14 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+ }
+ #endif
+
+- rc = bind(t->sock, (struct sockaddr *) addr,
+- sizeof(struct sockaddr_in6));
+- if (rc != 0) {
+- netsnmp_socketbase_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = bind(t->sock, (struct sockaddr *) addr,
++ sizeof(struct sockaddr_in6));
++ if (rc != 0) {
++ netsnmp_socketbase_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+ t->local = (unsigned char*)malloc(18);
+ if (t->local == NULL) {
+diff --git a/snmplib/transports/snmpUnixDomain.c b/snmplib/transports/snmpUnixDomain.c
+index 47dffc1..8f34c37 100644
+--- a/snmplib/transports/snmpUnixDomain.c
++++ b/snmplib/transports/snmpUnixDomain.c
+@@ -37,6 +37,10 @@
+ #include <net-snmp/library/system.h> /* mkdirhier */
+ #include <net-snmp/library/tools.h>
+
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ netsnmp_feature_child_of(transport_unix_socket_all, transport_all)
+ netsnmp_feature_child_of(unix_socket_paths, transport_unix_socket_all)
+
+@@ -295,6 +299,8 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+ netsnmp_transport *t = NULL;
+ sockaddr_un_pair *sup = NULL;
+ int rc = 0;
++ char *string = NULL;
++ int socket_initialized = 0;
+
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+ /* SPECIAL CIRCUMSTANCE: We still want AgentX to be able to operate,
+@@ -333,7 +339,18 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+ t->data_length = sizeof(sockaddr_un_pair);
+ sup = (sockaddr_un_pair *) t->data;
+
+- t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++ /*
++ * Maybe the socket was already provided by systemd...
++ */
++ if (local) {
++ t->sock = netsnmp_sd_find_unix_socket(SOCK_STREAM, 1, addr->sun_path);
++ if (t->sock)
++ socket_initialized = 1;
++ }
++#endif
++ if (!socket_initialized)
++ t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
+ if (t->sock < 0) {
+ netsnmp_transport_free(t);
+ return NULL;
+@@ -357,25 +374,26 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+
+ t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN;
+
+- unlink(addr->sun_path);
+- rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
+-
+- if (rc != 0 && errno == ENOENT && create_path) {
+- rc = mkdirhier(addr->sun_path, create_mode, 1);
++ if (!socket_initialized) {
++ unlink(addr->sun_path);
++ rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
++ if (rc != 0 && errno == ENOENT && create_path) {
++ rc = mkdirhier(addr->sun_path, create_mode, 1);
++ if (rc != 0) {
++ netsnmp_unix_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
++ rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
++ }
+ if (rc != 0) {
++ DEBUGMSGTL(("netsnmp_unix_transport",
++ "couldn't bind \"%s\", errno %d (%s)\n",
++ addr->sun_path, errno, strerror(errno)));
+ netsnmp_unix_close(t);
+ netsnmp_transport_free(t);
+ return NULL;
+ }
+- rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
+- }
+- if (rc != 0) {
+- DEBUGMSGTL(("netsnmp_unix_transport",
+- "couldn't bind \"%s\", errno %d (%s)\n",
+- addr->sun_path, errno, strerror(errno)));
+- netsnmp_unix_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
+ }
+
+ /*
+@@ -391,14 +409,16 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+ * Now sit here and listen for connections to arrive.
+ */
+
+- rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+- if (rc != 0) {
+- DEBUGMSGTL(("netsnmp_unix_transport",
+- "couldn't listen to \"%s\", errno %d (%s)\n",
+- addr->sun_path, errno, strerror(errno)));
+- netsnmp_unix_close(t);
+- netsnmp_transport_free(t);
+- return NULL;
++ if (!socket_initialized) {
++ rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++ if (rc != 0) {
++ DEBUGMSGTL(("netsnmp_unix_transport",
++ "couldn't listen to \"%s\", errno %d (%s)\n",
++ addr->sun_path, errno, strerror(errno)));
++ netsnmp_unix_close(t);
++ netsnmp_transport_free(t);
++ return NULL;
++ }
+ }
+
+ } else {
+diff --git a/win32/libsnmp/Makefile.in b/win32/libsnmp/Makefile.in
+index 98d83c8..b228d20 100644
+--- a/win32/libsnmp/Makefile.in
++++ b/win32/libsnmp/Makefile.in
+@@ -42,6 +42,7 @@ LIB32_OBJS= \
+ "$(INTDIR)\read_config.obj" \
+ "$(INTDIR)\readdir.obj" \
+ "$(INTDIR)\scapi.obj" \
++ "$(INTDIR)\sd-daemon.obj" \
+ "$(INTDIR)\snmp-tc.obj" \
+ "$(INTDIR)\snmp.obj" \
+ "$(INTDIR)\snmpCallbackDomain.obj" \
+@@ -138,6 +139,11 @@ SOURCE=..\..\snmplib\asn1.c
+ "$(INTDIR)\asn1.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
++SOURCE=..\..\snmplib\sd-daemon.c
++
++"$(INTDIR)\sd-daemon.obj" : $(SOURCE) "$(INTDIR)"
++ $(CPP) $(CPP_PROJ) $(SOURCE)
++
+
+ SOURCE=..\..\snmplib\callback.c
+
+diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h
+index 1608563..7aec547 100644
+--- a/win32/net-snmp/net-snmp-config.h
++++ b/win32/net-snmp/net-snmp-config.h
+@@ -1717,6 +1717,8 @@ enum {
+ #define DMALLOC_FUNC_CHECK
+ #endif
+
+++#define NETSNMP_NO_SYSTEMD
+++
+ /* #undef NETSNMP_ENABLE_LOCAL_SMUX */
+
+ /* define if agentx transport is to use domain sockets only */
+diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in
+index 9693730..96ec3d9 100644
+--- a/win32/net-snmp/net-snmp-config.h.in
++++ b/win32/net-snmp/net-snmp-config.h.in
+@@ -1717,6 +1717,8 @@ enum {
+ #define DMALLOC_FUNC_CHECK
+ #endif
+
++#define NETSNMP_NO_SYSTEMD
++
+ /* #undef NETSNMP_ENABLE_LOCAL_SMUX */
+
+ /* define if agentx transport is to use domain sockets only */
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
new file mode 100644
index 000000000..ee8878f9d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -0,0 +1,180 @@
+SUMMARY = "Various tools relating to the Simple Network Management Protocol"
+HOMEPAGE = "http://www.net-snmp.org/"
+SECTION = "net"
+LICENSE = "BSD"
+
+LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5a622ea24634e"
+
+DEPENDS = "openssl libnl pciutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
+ file://init \
+ file://snmpd.conf \
+ file://snmptrapd.conf \
+ file://systemd-support.patch \
+ file://snmpd.service \
+ file://snmptrapd.service \
+ file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
+ file://fix-libtool-finish.patch \
+ file://net-snmp-testing-add-the-output-format-for-ptest.patch \
+ file://run-ptest \
+ file://dont-return-incompletely-parsed-varbinds.patch \
+ file://0001-config_os_headers-Error-Fix.patch \
+ file://0001-config_os_libs2-Error-Fix.patch \
+ file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \
+"
+SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee"
+SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
+
+inherit autotools update-rc.d siteinfo systemd pkgconfig
+
+EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'"
+
+PARALLEL_MAKE = ""
+CCACHE = ""
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
+PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,,"
+
+EXTRA_OECONF = "--disable-embedded-perl \
+ --with-perl-modules=no \
+ --disable-manuals \
+ --with-defaults \
+ --with-install-prefix=${D} \
+ --with-persistent-directory=${localstatedir}/lib/net-snmp \
+ ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+
+# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
+EXTRA_OECONF += "--with-mib-modules=smux"
+
+CACHED_CONFIGUREVARS = " \
+ ac_cv_header_valgrind_valgrind_h=no \
+ ac_cv_header_valgrind_memcheck_h=no \
+ ac_cv_ETC_MNTTAB=/etc/mtab \
+ lt_cv_shlibpath_overrides_runpath=yes \
+"
+
+do_configure_prepend() {
+ export PERLPROG="${bindir}/env perl"
+ sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \
+ "${S}"/configure \
+ "${S}"/configure.d/config_os_libs2
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/snmp
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd
+ install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/
+ install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
+ sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+ -i ${D}${bindir}/net-snmp-create-v3-user
+ sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+ -i ${D}${bindir}/net-snmp-config
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+ for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \
+ ${B}/net-snmp-config ${S}/testing; do
+ if [ -e "$i" ]; then
+ cp -R --no-dereference --preserve=mode,links -v "$i" ${D}${PTEST_PATH}
+ fi
+ done
+ echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version
+
+ rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build"
+ for i in $rmdlist; do
+ if [ -d "$i" ]; then
+ rm -rf "$i"
+ fi
+ done
+}
+
+SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
+
+net_snmp_sysroot_preprocess () {
+ if [ -e ${D}${bindir}/net-snmp-config ]; then
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+ install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+ sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \
+ -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}${prefix}@g" \
+ -e "s@^exec_prefix=.*@exec_prefix=${STAGING_EXECPREFIXDIR}@g" \
+ -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
+ -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
+ -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
+ -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
+ fi
+}
+
+PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
+
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-server = "1"
+
+FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
+FILES_${PN}-mibs = "${datadir}/snmp/mibs"
+FILES_${PN}-server-snmpd = "${sbindir}/snmpd \
+ ${sysconfdir}/snmp/snmpd.conf \
+ ${sysconfdir}/init.d \
+ ${systemd_unitdir}/system/snmpd.service \
+"
+
+FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
+ ${sysconfdir}/snmp/snmptrapd.conf \
+ ${systemd_unitdir}/system/snmptrapd.service \
+"
+
+FILES_${PN} = ""
+FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
+FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
+FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update"
+
+CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
+CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
+
+INITSCRIPT_PACKAGES = "${PN}-server"
+INITSCRIPT_NAME_${PN}-server = "snmpd"
+INITSCRIPT_PARAMS_${PN}-server = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
+
+SYSTEMD_PACKAGES = "${PN}-server-snmpd \
+ ${PN}-server-snmptrapd"
+
+SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
+SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service"
+
+RDEPENDS_${PN} += "net-snmp-client"
+RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
+RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd"
+RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
+RDEPENDS_${PN}-client += "net-snmp-mibs"
+RDEPENDS_${PN}-ptest += "perl \
+ perl-module-test \
+ perl-module-file-basename \
+ perl-module-getopt-long \
+ perl-module-file-temp \
+ perl-module-data-dumper \
+"
+RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
+RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
+
+RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+
+RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+
+LEAD_SONAME = "libnetsnmp.so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
new file mode 100644
index 000000000..5f465cea6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
@@ -0,0 +1,38 @@
+SUMMARY = "OpenFlow communications protocol"
+DESCRIPTION = "\
+Open standard that enables researchers to run experimental protocols in \
+contained networks. OpenFlow is a communications interface between \
+control and forwarding planes of a software-defined networking architecture.\
+"
+HOMEPAGE = "http://www.openflow.org"
+
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2"
+
+SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git"
+
+DEPENDS = "virtual/libc"
+
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl, libssl"
+
+EXTRA_OECONF += " \
+ KARCH=${TARGET_ARCH} \
+ ${@base_contains('PACKAGECONFIG', 'openssl', 'SSL_LIBS="-lssl -lcrypto"', '', d)} \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+do_configure() {
+ ./boot.sh
+ oe_runconf
+}
+
+do_install_append() {
+ # Remove /var/run as it is created on startup
+ rm -rf ${D}${localstatedir}/run
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb
new file mode 100644
index 000000000..a7e254dd8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb
@@ -0,0 +1,4 @@
+include ${BPN}.inc
+
+SRCREV = "5ccca75a69f99791659bcfbcf35353ab1921320a"
+PV = "1.0"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb
new file mode 100644
index 000000000..6403bfb22
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb
@@ -0,0 +1,4 @@
+include ${BPN}.inc
+
+SRCREV = "c84f33f09d5dbcfc9b489f64cb30475bf36f653a"
+PV = "1.0+git${SRCPV}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch
new file mode 100644
index 000000000..96dbc7551
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch
@@ -0,0 +1,106 @@
+From 152486fa3c36c3b99d17d5b553cf87ef412fae8e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Mon, 1 Dec 2014 01:53:41 +0900
+Subject: [PATCH] Makefile:modify CFLAGS to aviod build error.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ Makefile | 22 +++++++++++-----------
+ plugins/Makefile | 6 +++---
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4aaa448..baa7882 100644
+--- a/Makefile
++++ b/Makefile
+@@ -152,10 +152,10 @@ LIBS.dmalloc= -ldmalloc
+ export USE_DMALLOC
+ endif
+
+-CPPFLAGS= $(CPPFLAGS.l2tptest) $(CPPFLAGS-y)
+-CFLAGS= -I. -Iusl -Icli -isystem include \
+- -MMD -Wall -Werror -Wno-strict-aliasing \
+- $(CPPFLAGS) $(CPPFLAGS.dmalloc) \
++ADD_CPPFLAGS= $(CPPFLAGS.l2tptest) $(CPPFLAGS-y)
++ADD_CFLAGS= -I. -Iusl -Icli -isystem include \
++ -MMD -Wall -Wno-strict-aliasing \
++ $(ADD_CPPFLAGS) $(CPPFLAGS.dmalloc) \
+ -DSYS_LIBDIR=$(SYS_LIBDIR)
+ LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
+ LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
+@@ -170,10 +170,10 @@ CFLAGS.optimize= $(OPT_CFLAGS)
+ endif
+ export CFLAGS.optimize
+
+-CFLAGS+= $(CFLAGS.optimize)
++ADD_CFLAGS+= $(CFLAGS.optimize)
+
+ ifeq ($(L2TP_USE_ASYNC_RPC),y)
+-CPPFLAGS+= -DL2TP_ASYNC_RPC
++ADD_CPPFLAGS+= -DL2TP_ASYNC_RPC
+ endif
+
+ ifeq ($(L2TP_FEATURE_RPC_MANAGEMENT),y)
+@@ -220,13 +220,13 @@ endif
+
+ # Compile without -Wall because rpcgen-generated code is full of warnings.
+ %_xdr.o: %_xdr.c
+- $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++ $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+
+ %_client.o: %_client.c
+- $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++ $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+
+ %_server.o: %_server.c
+- $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++ $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+
+ %_xdr.c: %.x
+ -$(RM) $@
+@@ -272,7 +272,7 @@ l2tpconfig: $(L2TPCONFIG_SRCS.o)
+ $(CC) -o $@ $^ $(LDFLAGS.l2tpconfig)
+
+ %.o: %.c
+- $(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CFLAGS) $(ADD_CFLAGS) $< -o $@
+
+ l2tp_options.h: FORCE
+ @rm -f $@.tmp
+@@ -325,7 +325,7 @@ install: install-all
+ install-all: all install-daemon install-app
+
+ install-daemon:
+- @for d in $(filter-out usl,$(SUBDIRS)); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" install; if [ $$? -ne 0 ]; then exit 1; fi; done
++ @for d in $(filter-out usl,$(SUBDIRS)); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS) $(ADD_CPPFLAGS)" install; if [ $$? -ne 0 ]; then exit 1; fi; done
+ $(INSTALL) -d $(DESTDIR)/usr/sbin
+ $(INSTALL) openl2tpd $(DESTDIR)/usr/sbin
+
+diff --git a/plugins/Makefile b/plugins/Makefile
+index 5be996d..6810236 100644
+--- a/plugins/Makefile
++++ b/plugins/Makefile
+@@ -1,7 +1,7 @@
+-CFLAGS := $(CFLAGS.optimize) -MMD -Wall \
++ADD_CFLAGS := $(CFLAGS.optimize) -MMD -Wall \
+ -isystem ../include \
+ -I. -I.. -I../usl -fPIC $(EXTRA_CFLAGS)
+-LDFLAGS := -shared
++ADD_LDFLAGS := -shared
+
+ PLUGINS.c:= ppp_unix.c ppp_null.c ipsec.c event_sock.c
+
+@@ -21,7 +21,7 @@ clean:
+ $(RM) $(PLUGINS.so) $(wildcard *.o) $(wildcard *.d) $(SRC.generated)
+
+ %.so: %.c
+- $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $<
++ $(CC) -o $@ $(LDFLAGS) $(ADD_LDFLAGS) $(CFLAGS) $(ADD_CFLAGS) $<
+
+ install: all
+ $(INSTALL) -d $(DESTDIR)$(SYS_LIBDIR)/openl2tp
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch
new file mode 100644
index 000000000..c11a127b8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch
@@ -0,0 +1,41 @@
+From 460549a3de27f8dd8371b6d6fc1f69d8bffa102b Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 6 Jan 2015 11:23:21 -0500
+Subject: [PATCH] openl2tp: simplify gcc warning hack
+
+The hack to work around the gcc warning causes problems with some modern
+gcc configurations. Since the redef behaviour is essentially correct
+everywhere and since the hack is still required on 32-bit builders, leave
+it in place but remove the #if guard since it is only there to ensure that
+the l2tp_private.h file is updated if the rpc source file is changed and
+the two get out of sync.
+
+Upstream-status: pending
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ l2tp_private.h | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/l2tp_private.h b/l2tp_private.h
+index f3c1af7..cca6806 100644
+--- a/l2tp_private.h
++++ b/l2tp_private.h
+@@ -89,14 +89,8 @@
+ * So we redefine the constant with UL suffix to avoid the gcc warning.
+ * Is there some C preprocessor magic that could avoid having to do this?
+ */
+-#if L2TP_API_TUNNEL_FLAG_MTU != 2147483648
+-#error Constant L2TP_API_TUNNEL_FLAG_MTU changed. Update local definition here.
+-#endif
+ #undef L2TP_API_TUNNEL_FLAG_MTU
+ #define L2TP_API_TUNNEL_FLAG_MTU 2147483648UL
+-#if L2TP_API_SESSION_FLAG_NO_PPP != 2147483648
+-#error Constant L2TP_API_SESSION_FLAG_NO_PPP changed. Update local definition here.
+-#endif
+ #undef L2TP_API_SESSION_FLAG_NO_PPP
+ #define L2TP_API_SESSION_FLAG_NO_PPP 2147483648UL
+
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
new file mode 100644
index 000000000..d043b6389
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -0,0 +1,36 @@
+SUMMARY = "An L2TP client/server, designed for VPN use."
+DESCRIPTION = "OpenL2TP is an open source L2TP client / server, written \
+specifically for Linux. It has been designed for use as an enterprise \
+L2TP VPN server or in commercial, Linux-based, embedded networking \
+products and is able to support hundreds of sessions, each with \
+different configuration. It is used by several ISPs to provide \
+L2TP services and by corporations to implement L2TP VPNs."
+HOMEPAGE = "http://www.openl2tp.org/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585"
+DEPENDS = "popt flex readline"
+
+SRC_URI = "http://ftp.jaist.ac.jp/pub/sourceforge/o/op/${PN}/${PN}/${PV}/${BP}.tar.gz \
+ file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \
+ file://openl2tp-simplify-gcc-warning-hack.patch \
+ "
+SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
+SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
+
+inherit autotools-brokensep pkgconfig
+
+PARALLEL_MAKE = ""
+EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-nused-but-set-variable"'
+
+do_compile_prepend() {
+ sed -i -e "s:SYS_LIBDIR=.*:SYS_LIBDIR=${libdir}:g" \
+ -e 's:$(CROSS_COMPILE)as:${AS}:g' \
+ -e 's:$(CROSS_COMPILE)ld:${LD}:g' \
+ -e 's:$(CROSS_COMPILE)gcc:${CC}:g' \
+ -e 's:$(CROSS_COMPILE)ar:${AR}:g' \
+ -e 's:$(CROSS_COMPILE)nm:${NM}:g' \
+ -e 's:$(CROSS_COMPILE)strip:${STRIP}:g' \
+ -e 's:$(CROSS_COMPILE)install:install:g' \
+ ${S}/Makefile
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp
new file mode 100644
index 000000000..f446e22a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux-1.8.0/options.pptp
@@ -0,0 +1,30 @@
+#
+# Lock the port
+#
+lock
+
+#
+# We don't need the tunnel server to authenticate itself
+#
+noauth
+
+#
+# Turn off transmission protocols we know won't be used
+#
+nobsdcomp
+nodeflate
+
+#
+# We want MPPE
+# (option naming specific to ppp 2.4.0 with unofficial patch)
+#
+#mppe-40
+mppe-128
+#mppe-stateless
+
+#
+# We want a sane mtu/mru
+# (ppp 2.4.0 with unofficial patch)
+#
+#mtu 1000
+#mru 1000
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb
new file mode 100644
index 000000000..bc8b2cb2b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.8.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Client for Microsoft PPTP VPNs"
+DESCRIPTION = "PPTP Client is a Linux, FreeBSD, NetBSD \
+ and OpenBSD client for the proprietary Microsoft Point-to-Point \
+ Tunneling Protocol, PPTP. Allows connection to a PPTP based \
+ Virtual Private Network (VPN) as used by employers and some \
+ cable and ADSL internet service providers."
+HOMEPAGE = "http://pptpclient.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/sourceforge/pptpclient/pptp-${PV}.tar.gz \
+ file://options.pptp \
+"
+
+SRC_URI[md5sum] = "4efce9f263e2c3f38d79d9df222476de"
+SRC_URI[sha256sum] = "e39c42d933242a8a6dd8600a0fa7f0a5ec8f066d10c4149d8e81a5c68fe4bbda"
+
+S = "${WORKDIR}/pptp-${PV}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+ install -d ${D}${sbindir} ${D}${sysconfdir}/ppp ${D}${mandir}/man8
+ install -m 555 pptp ${D}${sbindir}
+ install -m 644 pptp.8 ${D}${mandir}/man8
+ install -m 644 ${WORKDIR}/options.pptp ${D}${sysconfdir}/ppp
+}
+
+RDEPENDS_${PN} = "ppp"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch
new file mode 100644
index 000000000..f08bb572d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Subject: ospf6d: check ospf6 before using it in ospf6_clean
+
+The ospf6 variable might be 'NULL' causing segment fault error.
+Check it before referencing it.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ ospf6d/ospf6d.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
+index 3cdd5c1..e3bf1af 100644
+--- a/ospf6d/ospf6d.c
++++ b/ospf6d/ospf6d.c
+@@ -1892,6 +1892,8 @@ ospf6_init (void)
+ void
+ ospf6_clean (void)
+ {
++ if (ospf6 == NULL)
++ return;
+ if (ospf6->route_table)
+ ospf6_route_remove_all (ospf6->route_table);
+ if (ospf6->brouter_table)
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
new file mode 100644
index 000000000..35f4637d8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
@@ -0,0 +1,48 @@
+sync zebra routing table with the kernel one when interface is down
+
+Add router to kernel main router table with "ip", then you can see
+a router item in kernel main router table. Also can see this router
+item in zebra router table. If down the interface, this router item
+will be deleted from kernel main router table, but it will not be
+deleted from zebra router table, just set as inactive.
+
+This patch is adopted from [1].
+[1] http://www.gossamer-threads.com/lists/quagga/dev/22609
+
+Upstream-Status: Pending
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+Signed-of-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ zebra/zebra_rib.c | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
+index 154e8d5..63434d0 100644
+--- a/zebra/zebra_rib.c
++++ b/zebra/zebra_rib.c
+@@ -765,6 +765,9 @@ rib_match_ipv6 (struct in6_addr *addr)
+ #define RIB_SYSTEM_ROUTE(R) \
+ ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
+
++#define RIB_KERNEL_ROUTE(R) \
++ ((R)->type == ZEBRA_ROUTE_KERNEL)
++
+ /* This function verifies reachability of one given nexthop, which can be
+ * numbered or unnumbered, IPv4 or IPv6. The result is unconditionally stored
+ * in nexthop->flags field. If the 4th parameter, 'set', is non-zero,
+@@ -1135,6 +1138,10 @@ rib_process (struct route_node *rn)
+ redistribute_delete (&rn->p, fib);
+ if (! RIB_SYSTEM_ROUTE (fib))
+ rib_uninstall_kernel (rn, fib);
++#ifdef GNU_LINUX
++ else if(RIB_KERNEL_ROUTE (fib) && !if_is_up(if_lookup_by_index(fib->nexthop->ifindex)))
++ del=fib;
++#endif
+ UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED);
+
+ /* Set real nexthop. */
+--
+1.7.4.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch
new file mode 100644
index 000000000..c2757a2fb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch
@@ -0,0 +1,50 @@
+From ba71f768e6dbb1f2ac72ed3bd880bff75a48d345 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Wed, 19 Feb 2014 14:13:40 +0800
+Subject: [PATCH] babeld: close stdout once the background daemon is created
+
+Upstream-Status: pending
+
+Once babald becomes a background daemon, it should not output information to
+stdout, so need to close stdout.
+
+In fact, other daemons close their stdout when they run into background, like
+ospfd, isisd and bgpd, by calling daemon() which is in lib/daemon.c
+
+Closing the stdout can fix a tee hang issue { #/usr/sbin/babeld -d |tee tmp }
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ babeld/util.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/babeld/util.c b/babeld/util.c
+index 011f382..76203bc 100644
+--- a/babeld/util.c
++++ b/babeld/util.c
+@@ -425,7 +425,7 @@ uchar_to_in6addr(struct in6_addr *dest, const unsigned char *src)
+ int
+ daemonise()
+ {
+- int rc;
++ int rc, fd;
+
+ fflush(stdout);
+ fflush(stderr);
+@@ -441,5 +441,13 @@ daemonise()
+ if(rc < 0)
+ return -1;
+
++ fd = open("/dev/null", O_RDWR, 0);
++ if (fd != -1)
++ {
++ dup2(fd, STDOUT_FILENO);
++ if (fd > 2)
++ close(fd);
++ }
++
+ return 1;
+ }
+--
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babeld.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babeld.service
new file mode 100644
index 000000000..dd344b0b3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/babeld.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Babel routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/babeld.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/babeld -d $babeld_options -f /etc/quagga/babeld.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service
new file mode 100644
index 000000000..76f9f61e7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=BGP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/bgpd.pid
+ExecStart=@SBINDIR@/bgpd -d $bgpd_options -f @SYSCONFDIR@/quagga/bgpd.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/bgpd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service
new file mode 100644
index 000000000..9bfe7b65e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=IS-IS routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/isisd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/isisd -d $isisd_options -f /etc/quagga/isisd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service
new file mode 100644
index 000000000..a2e493b42
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/ospf6d.pid
+ExecStart=@SBINDIR@/ospf6d -d $ospf6d_options -f @SYSCONFDIR@/quagga/ospf6d.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/ospf6d.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service
new file mode 100644
index 000000000..0c62cbce5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/ospfd.pid
+ExecStart=@SBINDIR@/ospfd -d $ospfd_options -f @SYSCONFDIR@/quagga/ospfd.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/ospfd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch
new file mode 100644
index 000000000..a07e33f9f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch
@@ -0,0 +1,54 @@
+quagga: Avoid duplicate connected address adding to the list
+
+commit 27ba970b9("quagga/ripd: Fix two bugs after received SIGHUP signal")
+introduces an regression: ifp->connected list is cleaned up when ripd is
+restarting, however, for interface addresses which are not specified in
+ripd configuration file, they are never to be added into ifp->connected
+again, this will lead to some abnormal behavior for route advertising.
+
+Instead of cleaning up the ifp->connected list to avoid duplicated
+connected address being added into this list, we can check this
+condition during interface address adding process and return early
+when an identical address has already been added.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hu Yadi <Yadi.hu@windriver.com>
+Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
+Signed-off-by: Joe MacDonald <joe@deserted.net>
+---
+--- a/lib/if.c
++++ b/lib/if.c
+@@ -738,6 +738,16 @@ connected_add_by_prefix (struct interfac
+ struct prefix *destination)
+ {
+ struct connected *ifc;
++ struct listnode *cnode;
++ struct connected *c;
++ int ret = 0;
++
++ for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, c))
++ {
++ ret = connected_same_prefix (p, (c->address));
++ if(ret == 1)
++ return NULL;
++ }
+
+ /* Allocate new connected address. */
+ ifc = connected_new ();
+--- a/ripd/rip_interface.c
++++ b/ripd/rip_interface.c
+@@ -516,13 +516,6 @@ rip_interface_clean (void)
+ thread_cancel (ri->t_wakeup);
+ ri->t_wakeup = NULL;
+ }
+-
+- for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
+- {
+- ifc = listgetdata (conn_node);
+- next = conn_node->next;
+- listnode_delete (ifp->connected, ifc);
+- }
+ }
+ }
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default
new file mode 100644
index 000000000..0c1ce6c04
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default
@@ -0,0 +1,13 @@
+# If this option is set the /etc/init.d/quagga script automatically loads
+# the config via "vtysh -b" when the servers are started.
+vtysh_enable=yes
+
+# Bind all daemons to loopback only by default
+zebra_options=" --daemon -A 127.0.0.1"
+babeld_options="--daemon -A 127.0.0.1"
+bgpd_options=" --daemon -A 127.0.0.1"
+ospfd_options=" --daemon -A 127.0.0.1"
+ospf6d_options="--daemon -A ::1"
+ripd_options=" --daemon -A 127.0.0.1"
+ripngd_options="--daemon -A ::1"
+isisd_options=" --daemon -A 127.0.0.1"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init
new file mode 100644
index 000000000..60b5ab01a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init
@@ -0,0 +1,200 @@
+#!/bin/sh
+#
+# /etc/init.d/quagga -- start/stop the Quagga routing daemons
+#
+# Based on debian version by Endre Hirling <endre@mail.elte.hu> and
+# Christian Hammers <ch@debian.org>.
+#
+
+### BEGIN INIT INFO
+# Provides: quagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga routing suite
+# Description: Quagga is a routing suite for IP routing protocols like
+# BGP, OSPF, RIP and others. This script contols the main
+# daemon "quagga" as well as the individual protocol daemons.
+### END INIT INFO
+
+# NOTE: sbin must be before bin so we get the iproute2 ip and not the
+# busybox ip command. The busybox one flushes all routes instead of just
+# the dynamic routes
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
+D_PATH=/usr/sbin
+C_PATH=/etc/quagga
+
+# Keep zebra first and do not list watchquagga!
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld"
+
+# Print the name of the pidfile.
+pidfile()
+{
+ echo "/var/run/quagga/$1.pid"
+}
+
+# Check if daemon is started by using the pidfile.
+started()
+{
+ [ -e `pidfile $1` ] && kill -0 `cat \`pidfile $1\`` 2> /dev/null && return 0
+ return 1
+}
+
+# Loads the config via vtysh -b if configured to do so.
+vtysh_b ()
+{
+ # Rember, that all variables have been incremented by 1 in convert_daemon_prios()
+ if [ "$vtysh_enable" = 2 -a -f $C_PATH/Quagga.conf ]; then
+ /usr/bin/vtysh -b
+ fi
+}
+
+# Check if the daemon is activated and if its executable and config files
+# are in place.
+# params: daemon name
+# returns: 0=ok, 1=error
+check_daemon()
+{
+ # If the integrated config file is used the others are not checked.
+ if [ -r "$C_PATH/Quagga.conf" ]; then
+ return 0
+ fi
+
+ # check for config file
+ if [ ! -r "$C_PATH/$1.conf" ]; then
+ return 1
+ fi
+ return 0
+}
+
+# Starts the server if it's not alrady running according to the pid file.
+# The Quagga daemons creates the pidfile when starting.
+start()
+{
+ if ! check_daemon $1; then echo -n " (!$1)"; return; fi
+ echo -n " $1"
+ start-stop-daemon \
+ --start \
+ --pidfile=`pidfile $1` \
+ --exec "$D_PATH/$1" \
+ -- \
+ `eval echo "$""$1""_options"`
+
+}
+
+# Stop the daemon given in the parameter, printing its name to the terminal.
+stop()
+{
+ if ! started "$1" ; then
+ echo -n " (!$1)"
+ return 0
+ else
+ PIDFILE=`pidfile $1`
+ PID=`cat $PIDFILE 2>/dev/null`
+ start-stop-daemon --stop --quiet --exec "$D_PATH/$1"
+ #
+ # Now we have to wait until $DAEMON has _really_ stopped.
+ #
+ if test -n "$PID" && kill -0 $PID 2>/dev/null; then
+ echo -n " (waiting) ."
+ cnt=0
+ while kill -0 $PID 2>/dev/null; do
+ cnt=`expr $cnt + 1`
+ if [ $cnt -gt 60 ]; then
+ # Waited 120 secs now, fail.
+ echo -n "Failed.. "
+ break
+ fi
+ sleep 2
+ echo -n "."
+ done
+ fi
+ echo -n " $1"
+ rm -f `pidfile $1`
+ fi
+}
+
+stop_all()
+{
+ local daemon_list
+ daemon_list=${1:-$DAEMONS}
+
+ echo -n "Stopping Quagga daemons:"
+ for daemon_name in $daemon_list; do
+ stop "$daemon_name"
+ done
+ echo "."
+}
+
+start_all()
+{
+ local daemon_list
+ daemon_list=${1:-$DAEMONS}
+
+ echo -n "Starting Quagga daemons:"
+ for daemon_name in $daemon_list; do
+ start "$daemon_name"
+ done
+ echo "."
+}
+
+status_all()
+{
+ local daemon_list
+ daemon_list=${1:-$DAEMONS}
+ res=1
+
+ echo -n "quagga: "
+ for daemon_name in $daemon_list; do
+ if started "$daemon_name" ; then
+ id=`cat \`pidfile $daemon_name\``
+ echo -n "$daemon_name (pid $id) "
+ res=0
+ fi
+ done
+ if [ $res -eq 0 ]; then
+ echo "is running..."
+ else
+ echo "is stopped..."
+ fi
+ exit $res
+}
+
+#########################################################
+# Main program #
+#########################################################
+
+# Load configuration
+test -f /etc/default/quagga && . /etc/default/quagga
+
+case "$1" in
+ start)
+ cd $C_PATH/
+ start_all $2
+ vtysh_b
+ ;;
+
+ stop)
+ stop_all $2
+ echo "Removing all routes made by zebra."
+ ip route flush proto zebra
+ ;;
+
+ status)
+ status_all $2
+ ;;
+
+ restart|force-reload)
+ $0 stop $2
+ sleep 1
+ $0 start $2
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/quagga {start|stop|restart|status|force-reload} [daemon]"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam
new file mode 100644
index 000000000..3541a975a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam
@@ -0,0 +1,13 @@
+#
+# The PAM configuration file for the quagga `vtysh' service
+#
+
+# This allows root to change user infomation without being
+# prompted for a password
+auth sufficient pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth include common-auth
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
new file mode 100644
index 000000000..4b8c9a929
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
@@ -0,0 +1,50 @@
+ripd: Fix two bugs after received SIGHUP signal
+
+There are two problems for ripd implementation after received
+SIGHUP signal:
+1). ripd didn't clean up ifp->connected list before reload
+ configuration file.
+2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
+ which lead to the unnecessary route to be advertised.
+
+Upstream-Status: Submitted [http://patchwork.diac24.net/patch/604/]
+
+Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
+Signed-off-by: Joe MacDonald <joe@deserted.net>
+---
+--- a/ripd/rip_interface.c
++++ b/ripd/rip_interface.c
+@@ -500,6 +500,8 @@
+ struct listnode *node;
+ struct interface *ifp;
+ struct rip_interface *ri;
++ struct connected *ifc;
++ struct listnode *conn_node, *next;
+
+ for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp))
+ {
+@@ -514,6 +516,13 @@
+ thread_cancel (ri->t_wakeup);
+ ri->t_wakeup = NULL;
+ }
++
++ for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
++ {
++ ifc = listgetdata (conn_node);
++ next = conn_node->next;
++ listnode_delete (ifp->connected, ifc);
++ }
+ }
+ }
+
+@@ -548,8 +557,8 @@
+ ri->key_chain = NULL;
+ }
+
+- ri->split_horizon = RIP_NO_SPLIT_HORIZON;
+- ri->split_horizon_default = RIP_NO_SPLIT_HORIZON;
++ ri->split_horizon = RIP_SPLIT_HORIZON;
++ ri->split_horizon_default = RIP_SPLIT_HORIZON;
+
+ ri->list[RIP_FILTER_IN] = NULL;
+ ri->list[RIP_FILTER_OUT] = NULL;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service
new file mode 100644
index 000000000..1d20389e8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/ripd.pid
+ExecStart=@SBINDIR@/ripd -d $ripd_options -f @SYSCONFDIR@/quagga/ripd.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/ripd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service
new file mode 100644
index 000000000..0355ad12a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripngd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/ripngd.pid
+ExecStart=@SBINDIR@/ripngd -d $ripngd_options -f @SYSCONFDIR@/quagga/ripngd.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/ripngd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
new file mode 100644
index 000000000..1f28c0b24
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d quagga quagga 0755 /var/run/quagga none
+d quagga quagga 0755 /var/log/quagga none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default
new file mode 100644
index 000000000..2d601ec97
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default
@@ -0,0 +1,12 @@
+# Watchquagga configuration
+#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
+watch_daemons="zebra"
+
+# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
+# the WATCH_DAEMONS line to reflect the daemons you are actually using):
+#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+
+# Since we are using one quagga daemon for now, use the following line. If using
+# multiple daemons, comment the line below and uncoment the line mentioned
+# above.
+watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init
new file mode 100644
index 000000000..5ddd94a3d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: watchquagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga watchdog
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Load configuration
+test -f /etc/default/watchquagga && . /etc/default/watchquagga
+
+# Check that there are daemons to be monitored.
+[ -z "$watch_daemons" ] && exit 0
+
+pidfile="/var/run/quagga/watchquagga.pid"
+
+case "$1" in
+ start)
+ echo -n "Starting quagga watchdog daemon: watchquagga"
+ start-stop-daemon --start \
+ --pidfile $pidfile \
+ --exec /usr/sbin/watchquagga \
+ -- -d $watch_options $watch_daemons
+ echo "."
+ ;;
+
+ stop)
+ echo -n "Stopping quagga watchdog daemon: watchquagga"
+ start-stop-daemon --stop --quiet \
+ --pidfile $pidfile
+ echo "."
+ ;;
+
+ status)
+ echo -n "watchquagga "
+ res=1
+ [ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null
+ if [ $? -eq 0 ]; then
+ echo "(pid `cat $pidfile`) is running..."
+ res=0
+ else
+ echo "is stopped..."
+ fi
+ exit $res
+ ;;
+
+ restart|force-reload)
+ $0 stop $2
+ sleep 1
+ $0 start $2
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service
new file mode 100644
index 000000000..e4fb6c808
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=GNU Zebra routing manager
+Wants=network.target
+Before=network.target
+ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=@localstatedir@/run/quagga/zebra.pid
+ExecStartPre=@BASE_SBINDIR@/ip route flush proto zebra
+ExecStart=@SBINDIR@/zebra -d $zebra_options -f @SYSCONFDIR@/quagga/zebra.conf
+ExecStopPost=@base_bindir@/rm -rf @localstatedir@/run/quagga/zebra.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
new file mode 100644
index 000000000..de78e2679
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -0,0 +1,251 @@
+SUMMARY = "BGP/OSPF/RIP routing daemon"
+DESCRIPTION = "Quagga is a routing software suite, providing \
+implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \
+Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
+Quagga is a fork of GNU Zebra which was developed by Kunihiro \
+Ishiguro. The Quagga tree aims to build a more involved community \
+around Quagga than the current centralised model of GNU Zebra."
+HOMEPAGE = "http://www.nongnu.org/quagga/"
+SECTION = "net"
+LICENSE = "GPL-2.0 & LGPL-2.0"
+DEPENDS = "readline ncurses perl-native"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
+SNMP_CONF="${@base_contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d \
+ file://COPYING.LIB;md5=01ef24401ded36cd8e5d18bfe947240c"
+
+# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
+RDEPENDS_${PN} += "iproute2"
+
+QUAGGASUBDIR = ""
+# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
+# versions and leave it empty for recent versions.
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz; \
+ file://Zebra-sync-zebra-routing-table-with-the-kernel-one.patch \
+ file://quagga.init \
+ file://quagga.default \
+ file://watchquagga.init \
+ file://watchquagga.default \
+ file://volatiles.03_quagga \
+ file://quagga.pam \
+ file://ripd-fix-two-bugs-after-received-SIGHUP.patch \
+ file://quagga-Avoid-duplicate-connected-address.patch \
+ file://babeld.service \
+ file://bgpd.service \
+ file://isisd.service \
+ file://ospf6d.service \
+ file://ospfd.service \
+ file://ripd.service \
+ file://ripngd.service \
+ file://zebra.service \
+"
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
+PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
+
+inherit autotools update-rc.d useradd systemd
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+SYSTEMD_SERVICE_${PN}-babeld = "babeld.service"
+SYSTEMD_SERVICE_${PN}-bgpd = "bgpd.service"
+SYSTEMD_SERVICE_${PN}-isisd = "isisd.service"
+SYSTEMD_SERVICE_${PN}-ospf6d = "ospf6d.service"
+SYSTEMD_SERVICE_${PN}-ospfd = "ospfd.service"
+SYSTEMD_SERVICE_${PN}-ripd = "ripd.service"
+SYSTEMD_SERVICE_${PN}-ripngd = "ripngd.service"
+SYSTEMD_SERVICE_${PN} = "zebra.service"
+
+EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
+ --localstatedir=${localstatedir}/run/quagga \
+ --enable-exampledir=${docdir}/quagga/examples/ \
+ --enable-vtysh \
+ --enable-isisd \
+ ${@base_contains('DISTRO_FEATURES', 'sysvinit', '--enable-watchquagga', '--disable-watchquagga', d)} \
+ --enable-ospf-te \
+ --enable-opaque-lsa \
+ --enable-ospfclient=yes \
+ --enable-multipath=64 \
+ --enable-user=quagga \
+ --enable-group=quagga \
+ --enable-vty-group=quaggavty \
+ --enable-configfile-mask=0640 \
+ --enable-logfile-mask=0640 \
+ --enable-rtadv \
+ --enable-linux24-tcp-md5 \
+ ap_cv_cc_pie=no \
+ ${SNMP_CONF}"
+
+do_install () {
+ # Install init script and default settings
+ install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
+ ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
+ install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
+ install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
+ install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
+ install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+
+ # Install sample configurations for the daemons
+ for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
+ install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
+ done
+
+ for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
+ touch ${D}${sysconfdir}/quagga/$f.conf
+ done
+ chown quagga:quaggavty ${D}${sysconfdir}/quagga
+ chown quagga:quagga ${D}${sysconfdir}/quagga/*.conf
+ chmod 750 ${D}${sysconfdir}/quagga
+ chmod 640 ${D}${sysconfdir}/quagga/*.conf
+
+ # Install quagga
+ oe_runmake install DESTDIR=${D} prefix=${prefix} \
+ sbindir=${sbindir} \
+ sysconfdir=${sysconfdir}/quagga \
+ localstatedir=${localstatedir}/run/quagga
+
+ # Fix hardcoded paths
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
+ sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
+
+ # Remove generated info dir file, it doesn't belong in the generated
+ # package.
+ rm -f ${D}${infodir}/dir
+
+ # For PAM
+ for feature in ${DISTRO_FEATURES}; do
+ if [ "$feature" = "pam" ]; then
+ install -D -m 644 ${WORKDIR}/quagga.pam ${D}/${sysconfdir}/pam.d/quagga
+ break
+ fi
+ done
+
+ if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /var/run/quagga 0755 quagga quagga -" \
+ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+ fi
+
+ # Remove sysinit script if sysvinit is not in DISTRO_FEATURES
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+ rm -rf ${D}${sysconfdir}/init.d/
+ rm -f ${D}${sysconfdir}/default/watchquagga
+ fi
+
+ install -d ${D}${systemd_unitdir}/system
+ for i in babeld bgpd isisd ospf6d ospfd ripd ripngd zebra; do
+ install -m 0644 ${WORKDIR}/$i.service ${D}${systemd_unitdir}/system
+ done
+ sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@base_bindir@,${base_bindir},g' \
+ -e 's,@localstatedir@,${localstatedir},g' \
+ -i ${D}${systemd_unitdir}/system/*.service
+}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask quagga.service
+ fi
+}
+
+# Split into a main package and separate per-protocol packages
+PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-babeld ${PN}-bgpd \
+ ${PN}-ripd ${PN}-ripngd ${PN}-isisd \
+ ${PN}-ospfclient ${@base_contains('DISTRO_FEATURES', 'sysvinit', '${PN}-watchquagga', '', d)}"
+
+RDEPENDS_${PN} += "${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+
+FILES_${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*"
+FILES_${PN}-ospf6d = "${sbindir}/ospf6d"
+FILES_${PN}-babeld = "${sbindir}/babeld"
+FILES_${PN}-bgpd = "${sbindir}/bgpd"
+FILES_${PN}-ripd = "${sbindir}/ripd"
+FILES_${PN}-ripngd = "${sbindir}/ripngd"
+FILES_${PN}-isisd = "${sbindir}/isisd"
+FILES_${PN}-ospfclient = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*"
+FILES_${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
+ ${sysconfdir}/init.d/watchquagga"
+
+# Indicate that the default files are configuration files
+CONFFILES_${PN} = "${sysconfdir}/default/quagga \
+ ${sysconfdir}/quagga/bgpd.conf \
+ ${sysconfdir}/quagga/vtysh.conf \
+ ${sysconfdir}/quagga/babeld.conf \
+ ${sysconfdir}/quagga/isisd.conf \
+ ${sysconfdir}/quagga/ospfd.conf \
+ ${sysconfdir}/quagga/ripngd.conf \
+ ${sysconfdir}/quagga/zebra.conf \
+ ${sysconfdir}/quagga/ripd.conf \
+ ${sysconfdir}/quagga/ospf6d.conf \
+ "
+CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"
+
+# Stop the names being rewritten due to the internal shared libraries
+DEBIAN_NOAUTONAME_${PN}-ospfd = "1"
+DEBIAN_NOAUTONAME_${PN}-ospfclient = "1"
+
+# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
+RDEPENDS_${PN} += "iproute2"
+
+# Main init script starts all deamons
+# Seperate init script for watchquagga
+INITSCRIPT_PACKAGES = "${PN} ${PN}-watchquagga"
+INITSCRIPT_NAME_${PN} = "quagga"
+INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
+INITSCRIPT_NAME_${PN}-watchquagga = "watchquagga"
+INITSCRIPT_PARAMS_${PN}-watchquagga = "defaults 90 10"
+
+# Add quagga's user and group
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system quagga ; --system quaggavty"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga --shell /bin/false quagga"
+
+pkg_postinst_${PN} () {
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+}
+
+# Stop apps before uninstall
+pkg_prerm_${PN} () {
+ ${sysconfdir}/init.d/quagga stop
+}
+
+pkg_prerm_${PN}-ospfd () {
+ ${sysconfdir}/init.d/quagga stop ospfd
+}
+
+pkg_prerm_${PN}-ospf6d () {
+ ${sysconfdir}/init.d/quagga stop ospf6d
+}
+
+pkg_prerm_${PN}-babeld () {
+ ${sysconfdir}/init.d/quagga stop babeld
+}
+
+pkg_prerm_${PN}-bgpd () {
+ ${sysconfdir}/init.d/quagga stop bgpd
+}
+
+pkg_prerm_${PN}-ripd () {
+ ${sysconfdir}/init.d/quagga stop ripd
+}
+
+pkg_prerm_${PN}-ripngd () {
+ ${sysconfdir}/init.d/quagga stop ripngd
+}
+
+pkg_prerm_${PN}-isisd () {
+ ${sysconfdir}/init.d/quagga stop isisd
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb
new file mode 100644
index 000000000..cecf4385c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_0.99.24.1.bb
@@ -0,0 +1,10 @@
+require quagga.inc
+
+SRC_URI += "file://babel-close-the-stdout-stderr-as-in-other-daemons.patch \
+ file://0001-ospf6d-check-ospf6-before-using-it-in-ospf6_clean.patch \
+"
+
+SRC_URI[md5sum] = "7986bdc2fe6027d4c9216f7f5791e718"
+SRC_URI[sha256sum] = "84ae1a47df085119a8fcab6c43ccea9efb9bc3112388b1dece5a9f0a0262754f"
+
+QUAGGASUBDIR = ""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch
new file mode 100644
index 000000000..ecc2d74e7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch
@@ -0,0 +1,84 @@
+From 45b97b474ce2d0ad56828db11edde8562bb47a43 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Tue, 2 Dec 2014 02:33:53 +0900
+Subject: [PATCH] Modify configure.in and etc/Makefile.am
+
+this patch is from Fedora to fix error:
+"conftest.c:26:9: error: unknown type name 'not'"
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.in | 6 +++++-
+ etc/Makefile.am | 9 ++++++---
+ etc/radiusclient.conf.in | 2 +-
+ 3 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 812f640..3a8af99 100644
+--- a/configure.in
++++ b/configure.in
+@@ -29,6 +29,9 @@ AC_SUBST(LIBVERSION)
+ pkgsysconfdir=${sysconfdir}/$PACKAGE
+ AC_SUBST(pkgsysconfdir)
+
++pkgdatadir=${datadir}/$PACKAGE
++AC_SUBST(pkgdatadir)
++
+ AC_PROG_LIBTOOL
+
+ AC_PROG_CC
+@@ -118,7 +121,8 @@ then
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
+- AC_MSG_RESULT(no)
++ AC_MSG_RESULT(no),
++ AC_MSG_RESULT(assume no),
+ )
+ fi
+
+diff --git a/etc/Makefile.am b/etc/Makefile.am
+index 39b6975..a3c403f 100644
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -14,9 +14,11 @@ CLEANFILES = *~ radiusclient.conf
+
+ sbindir = @sbindir@
+ pkgsysconfdir = @pkgsysconfdir@
+-pkgsysconf_DATA = issue port-id-map radiusclient.conf \
+- dictionary dictionary.ascend dictionary.compat dictionary.merit \
+- dictionary.sip
++pkgsysconf_DATA = issue port-id-map radiusclient.conf
++
++pkgdatadir = @pkgdatadir@
++pkgdata_DATA = dictionary dictionary.ascend dictionary.compat \
++ dictionary.merit dictionary.sip
+
+ EXTRA_DIST = issue port-id-map dictionary dictionary.ascend \
+ dictionary.compat dictionary.merit servers radiusclient.conf.in \
+@@ -25,6 +27,7 @@ EXTRA_DIST = issue port-id-map dictionary dictionary.ascend \
+ radiusclient.conf: radiusclient.conf.in
+ sed -e 's|@sbin''dir@|$(sbindir)|g' \
+ -e 's|@pkgsysconf''dir@|$(pkgsysconfdir)|g' \
++ -e 's|@pkgdata''dir@|$(pkgdatadir)|g' \
+ <$(srcdir)/radiusclient.conf.in >radiusclient.conf
+
+ install-data-local: servers
+diff --git a/etc/radiusclient.conf.in b/etc/radiusclient.conf.in
+index 948bc2f..aac9973 100644
+--- a/etc/radiusclient.conf.in
++++ b/etc/radiusclient.conf.in
+@@ -47,7 +47,7 @@ servers @pkgsysconfdir@/servers
+
+ # dictionary of allowed attributes and values
+ # just like in the normal RADIUS distributions
+-dictionary @pkgsysconfdir@/dictionary
++dictionary @pkgdatadir@/dictionary
+
+ # program to call for a RADIUS authenticated login
+ login_radius @sbindir@/login.radius
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6 b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6
new file mode 100644
index 000000000..a30c144b9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6
@@ -0,0 +1 @@
+ac_cv_func_uname=no
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb
new file mode 100644
index 000000000..95faa65b1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb
@@ -0,0 +1,36 @@
+SUMMARY = "RADIUS protocol client library"
+DESCRIPTION = "Portable, easy-to-use and standard compliant library suitable \
+for developing free and commercial software that need support for a RADIUS \
+protocol (RFCs 2128 and 2139)."
+HOMEPAGE = "http://sourceforge.net/projects/radiusclient-ng.berlios/"
+SECTION = "net"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/r/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://Modify-configure.in-and-etc-Makefile.am.patch \
+ file://config-site.radiusclient-ng-${PV}"
+
+SRC_URI[md5sum] = "6fb7d4d0aefafaee7385831ac46a8e9c"
+SRC_URI[sha256sum] = "282a9f1355f190efbb06c0d7c4e062eaa652caf342ed3ad361ac595f72f09f14"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3e47566c9271b786693d8a08792dbf41"
+
+inherit autotools-brokensep
+
+EXTRA_OECONF += "--disable-static"
+
+do_configure_prepend () {
+ export CONFIG_SITE=./config-site.${P}
+}
+
+do_compile_prepend() {
+ for m in `find . -name "Makefile"` ; do
+ sed -i -e 's:^program_transform_name =.*:program_transform_name =:g' ${m}
+ done
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+ rm -f ${D}${libdir}/*.la
+ rm -f ${D}${sbindir}/radexample
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch
new file mode 100644
index 000000000..2661fd3db
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch
@@ -0,0 +1,59 @@
+From 71956de46feef962dc0645af4c81ae074ca3b818 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 13:52:57 +0900
+Subject: [PATCH] configure.in: Error fix.
+
+the error is: conftest.c:9:28: fatal error: ac_nonexistent.h:
+No such file or directory #include <ac_nonexistent.h>
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ src/configure.in | 30 ------------------------------
+ 1 file changed, 30 deletions(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index 0b23df5..31c7fbc 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -193,36 +193,6 @@ if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
+ fi
+
+-dnl Figure out packing order of structures
+-AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
+-if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
+-AC_TRY_RUN([
+-union foo {
+- struct bar {
+- unsigned int ver:4;
+- unsigned int type:4;
+- } bb;
+- unsigned char baz;
+-};
+-
+-int
+-main(void)
+-{
+- union foo x;
+- x.bb.ver = 1;
+- x.bb.type = 2;
+- if (x.baz == 0x21) {
+- return 1;
+- } else if (x.baz == 0x12) {
+- return 0;
+- } else {
+- return 2;
+- }
+-}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+-$ECHO "no defaults for cross-compiling"; exit 1)
+-fi
+-])
+-
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ AC_MSG_RESULT(reversed)
+ AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch
new file mode 100644
index 000000000..1380ba489
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch
@@ -0,0 +1,11 @@
+Index: rp-pppoe-3.8/configure.in
+===================================================================
+--- rp-pppoe-3.8.orig/configure.in 2014-07-16 19:31:33.549991388 +0000
++++ rp-pppoe-3.8/configure.in 2014-07-17 22:01:18.116590827 +0000
+@@ -1,4 +1,4 @@
+-AC_INIT(src/pppoe.c)
+-AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
++AC_INIT([rp-pppoe], [3.8])
++AM_INIT_AUTOMAKE([foreign])
+ AC_CONFIG_SUBDIRS(src)
+ AC_OUTPUT(Makefile)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch
new file mode 100644
index 000000000..88cf7e677
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch
@@ -0,0 +1,156 @@
+From cab02076afb808a43c6ff3d7b1c64e71f5a1b397 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 12:17:03 +0900
+Subject: [PATCH] configure in cross
+
+Update the configure script to cross-compiling with OE. This hard-codes
+a few target paths, reworks a few tests to be more friendly for cross
+and drops other tests.
+
+Upstream-Status: Inappropriate [build system specific changes]
+
+---
+ src/configure.in | 66 ++++++++++++++------------------------------------------
+ 1 file changed, 16 insertions(+), 50 deletions(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index e194295..82d64d6 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -5,6 +5,13 @@ AC_INIT(pppoe.c)
+ dnl pppd directory for kernel-mode PPPoE
+ PPPD_DIR=ppp-2.4.1.pppoe2
+
++dnl hard code some paths
++PPPD=/usr/sbin/pppd
++ID=/usr/bin/id
++ECHO=/bin/echo
++AC_ARG_VAR(PPPD)
++AC_ARG_VAR(ID)
++
+ AC_CONFIG_HEADER(config.h)
+
+ AC_PREFIX_DEFAULT(/usr)
+@@ -45,7 +52,7 @@ ac_cv_struct_sockaddr_ll=no)
+ AC_MSG_RESULT($ac_cv_struct_sockaddr_ll)
+
+ if test "$ac_cv_struct_sockaddr_ll" = yes ; then
+-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL)
++AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [], [Have struct SOCKADDR_LL])
+ fi
+
+ dnl Check for N_HDLC line discipline
+@@ -56,7 +63,7 @@ AC_TRY_COMPILE([#include <linux/termios.h>],
+ ac_cv_n_hdlc=no)
+ AC_MSG_RESULT($ac_cv_n_hdlc)
+ if test "$ac_cv_n_hdlc" = yes ; then
+-AC_DEFINE(HAVE_N_HDLC)
++AC_DEFINE([HAVE_N_HDLC], [], [Have N_HDLC])
+ fi
+
+ AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
+@@ -104,7 +111,7 @@ PPPD_INCDIR=""
+ if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
+ if test "$ac_cv_pluginpath" != no ; then
+ LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
+- AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE)
++ AC_DEFINE([HAVE_LINUX_KERNEL_PPPOE], [], [Have kernel PPPoE])
+ PPPD_INCDIR=$ac_cv_pluginpath
+ fi
+ fi
+@@ -114,7 +121,7 @@ if test "$PPPD_INCDIR" = "" ; then
+ fi
+
+ if test "$ac_cv_debugging" = "yes" ; then
+- AC_DEFINE(DEBUGGING_ENABLED)
++ AC_DEFINE([DEBUGGING_ENABLED], [], [Debugging enabled])
+ fi
+
+ AC_SUBST(LINUX_KERNELMODE_PLUGIN)
+@@ -140,15 +147,8 @@ AC_CHECK_SIZEOF(unsigned short)
+ AC_CHECK_SIZEOF(unsigned int)
+ AC_CHECK_SIZEOF(unsigned long)
+
+-dnl Check for location of pppd
+-AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+-AC_PATH_PROG(ECHO, echo, echo)
+-
+-dnl Check for setsid (probably Linux-specific)
+-AC_PATH_PROG(SETSID, setsid, "", $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+-
+ dnl Check for an "id" which accepts "-u" option -- hack for Solaris.
+-AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
++dnl AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
+
+ dnl Check for Linux-specific kernel support for PPPoE
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+@@ -193,44 +193,8 @@ if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
+ fi
+
+-dnl If we couldn't find pppd, die
+-if test "$PPPD" = "NOTFOUND"; then
+- AC_MSG_WARN([*** Oops! I couldn't find pppd, the PPP daemon anywhere.])
+- AC_MSG_WARN([*** You must install pppd, version 2.3.10 or later.])
+- AC_MSG_WARN([*** I will keep going, but it may not work.])
+- PPPD=pppd
+-fi
+-
+-dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than
+-dnl 2.3.7 -- stop
+-
+-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'`
+-
+-case "$PPPD_VERSION" in
+-1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6)
+- AC_MSG_WARN([*** Oops! Your version of pppd is $PPPD_VERSION, which is too old.])
+- AC_MSG_WARN([*** You need at least 2.3.7 (2.3.10 or newer recommended.])
+- AC_MSG_WARN([*** I will keep going, but it may not work.])
+- ;;
+-
+-2.3.7|2.3.8|2.3.9)
+- AC_MSG_WARN([*** Warning. Your version of pppd is $PPPD_VERSION. You will])
+- AC_MSG_WARN([*** not be able to use connect-on-demand. Upgrade to pppd])
+- AC_MSG_WARN([*** 2.3.10 or newer if you need connect-on-demand.])
+- ;;
+-
+-2*|3*|4*|5*|6*|7*|8*|9*)
+- ;;
+-
+-*)
+- AC_MSG_WARN([*** Oops. I cannot figure out what version of pppd you have.])
+- AC_MSG_WARN([*** All I got back was '$PPPD_VERSION'])
+- AC_MSG_WARN([*** I will keep going, but it may not work.])
+- ;;
+-esac
+-
+ dnl Figure out packing order of structures
+-AC_MSG_CHECKING([packing order of bit fields])
++AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
+ if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
+ AC_TRY_RUN([
+ union foo {
+@@ -257,10 +221,11 @@ main(void)
+ }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+ $ECHO "no defaults for cross-compiling"; exit 0)
+ fi
++])
+
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ AC_MSG_RESULT(reversed)
+- AC_DEFINE(PACK_BITFIELDS_REVERSED)
++ AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
+ else
+ AC_MSG_RESULT(normal)
+ fi
+@@ -324,6 +289,7 @@ AC_SUBST(PPPOE_SERVER_DEPS)
+ AC_SUBST(RDYNAMIC)
+ AC_SUBST(LIBEVENT)
+ AC_SUBST(ECHO)
++AC_SUBST(HAVE_STRUCT_SOCKADDR_LL)
+ AC_SUBST(LDFLAGS)
+
+ datadir_evaluated=`eval echo $datadir`
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch
new file mode 100644
index 000000000..8b7886485
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch
@@ -0,0 +1,27 @@
+From 611c9fe719c5aa264a2ad2eb920cf4522ae2ddec Mon Sep 17 00:00:00 2001
+From: Ting Liu <b28495@freescale.com>
+Date: Tue, 12 Jun 2012 14:26:16 -0400
+Subject: [PATCH] discard use of dnl in Makefile.am
+
+Since Makefile.am is not processed by m4, but by automake, 'dnl' does
+not introduce a comment.
+
+Signed-off-by: Ting Liu <b28495@freescale.com>
+---
+ Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index eff6977..3091c33 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ PACKAGE = rp-pppoe
+ VERSION = 3.8
+
+-dnl AM_CFLAGS = -Wall -DDEBUG
++##dnl AM_CFLAGS = -Wall -DDEBUG
+ SUBDIRS = src
+--
+1.7.6.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch
new file mode 100644
index 000000000..f61337f15
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch
@@ -0,0 +1,28 @@
+From bbdadb803b19f002e76e7bb5ce3faf770dd7c413 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 12:33:41 +0900
+Subject: [PATCH] don't swallow errors
+
+Further fixup to the configure scripts to not swallow errors
+
+Upstream-Status: Pending
+---
+ src/configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index 82d64d6..0b23df5 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -219,7 +219,7 @@ main(void)
+ return 2;
+ }
+ }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+-$ECHO "no defaults for cross-compiling"; exit 0)
++$ECHO "no defaults for cross-compiling"; exit 1)
+ fi
+ ])
+
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.default b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.default
new file mode 100644
index 000000000..996d57f3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.default
@@ -0,0 +1,22 @@
+# PPPoE Server options
+
+# Maximum segment size, not used for in kernel PPPoE
+#MSS=1412
+
+# Device(s) - Space seperated list of devices to listen on
+#DEVICES="eth1"
+
+# Local IP
+#LOCAL_IP=10.0.0.1
+
+# Starting remote IP
+#REMOTE_IP=10.67.15.1
+
+# Service name
+#SERVICE_NAME="acme"
+
+# Maximum number of sessions, default is 16
+#MAX_SESSIONS=64
+
+# Access concentrator name, default is the hostname
+#ACCESS_CONCENTRATOR_NAME="pppoe-rtr-1"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.init
new file mode 100755
index 000000000..21afe0be3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.init
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+test -f /usr/sbin/pppoe-server || exit 0
+test -f /etc/default/pppoe-server && . /etc/default/pppoe-server
+
+case $1 in
+ start)
+ OPTIONS=""
+ if [ -n "$MSS" ]; then
+ OPTIONS="$OPTIONS -m $MSS"
+ fi
+ if [ -n "$DEVICES" ]; then
+ for i in $DEVICES; do
+ OPTIONS="$OPTIONS -I $i"
+ done
+ fi
+ if [ -n "$LOCAL_IP" ]; then
+ OPTIONS="$OPTIONS -L $LOCAL_IP"
+ fi
+ if [ -n "$REMOTE_IP" ]; then
+ OPTIONS="$OPTIONS -R $REMOTE_IP"
+ fi
+ if [ -n "$SERVICE_NAME" ]; then
+ OPTIONS="$OPTIONS -S $SERVICE_NAME"
+ fi
+ if [ -n "$MAX_SESSIONS" ]; then
+ OPTIONS="$OPTIONS -N $MAX_SESSIONS"
+ fi
+ if [ -n "$ACCESS_CONCENTRATOR_NAME" ]; then
+ OPTIONS="$OPTIONS -C $ACCESS_CONCENTRATOR_NAME"
+ fi
+ echo -n "Starting PPPoE server: pppoe-server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping PPPoE server: pppoe-server"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
+ echo "."
+ ;;
+ status)
+ pid=$(pidof pppoe-server)
+ if [ -n "$pid" ] ; then
+ echo "Running with pid $pid"
+ else
+ echo "Not running"
+ fi
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/pppoe-server {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.service
new file mode 100644
index 000000000..41e0b9e85
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-server.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=PPPOE Service
+After=network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/pppoe-server
+ExecStart=@SBINDIR@/pppoe-server
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch
new file mode 100644
index 000000000..bcf4d1164
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch
@@ -0,0 +1,20 @@
+Relax restrictions on the PPPoE src address, as per debian bug
+293811:
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=293811
+
+Upstream-Status: Inappropriate [Backport from Debian]
+
+--- rp-pppoe-3.8.orig/src/discovery.c
++++ rp-pppoe-3.8/src/discovery.c
+@@ -376,8 +376,8 @@
+ if (!packetIsForMe(conn, &packet)) continue;
+
+ if (packet.code == CODE_PADO) {
+- if (NOT_UNICAST(packet.ethHdr.h_source)) {
+- printErr("Ignoring PADO packet from non-unicast MAC address");
++ if (BROADCAST(packet.ethHdr.h_source)) {
++ printErr("Ignoring broadcast PADO packet");
+ continue;
+ }
+ parsePacket(&packet, parsePADOTags, &pc);
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch
new file mode 100644
index 000000000..4fe73d017
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch
@@ -0,0 +1,27 @@
+The autoconf stuff is all in a subdirectory, which is rather annoying
+as OE expects patches to be applied and autoconf stuff to be done in
+S. This adds enough autoconf at the top level to allow it to be
+called there - all it does is run a sub autoconf stuff in the src
+directory.
+
+Upstream-Status: Inappropriate [build system specific change]
+
+Index: rp-pppoe-3.8/Makefile.am
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ rp-pppoe-3.8/Makefile.am 2007-06-08 15:58:16.000000000 +1000
+@@ -0,0 +1,5 @@
++PACKAGE = rp-pppoe
++VERSION = 3.8
++
++dnl AM_CFLAGS = -Wall -DDEBUG
++SUBDIRS = src
+Index: rp-pppoe-3.8/configure.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ rp-pppoe-3.8/configure.in 2007-06-08 15:58:16.000000000 +1000
+@@ -0,0 +1,4 @@
++AC_INIT(src/pppoe.c)
++AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
++AC_CONFIG_SUBDIRS(src)
++AC_OUTPUT(Makefile)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch
new file mode 100644
index 000000000..42a3bc62c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch
@@ -0,0 +1,32 @@
+Set the timeout to 0 since we don't want pppoe to try reconnecting,
+we want whatever is calling it to reconnect. Lots of odd things
+happen when you have pppoe retrying itself.
+
+The path for the plugin is wrong, it's now part of ppp and is in a
+ppp's plugin lib directory. If no path is specified then that's where
+ppp looks, so that's what we do here.
+
+Upstream-Status: Inappropriate [configuration]
+
+Index: rp-pppoe-3.8/configs/pppoe.conf
+===================================================================
+--- rp-pppoe-3.8.orig/configs/pppoe.conf 2006-04-03 00:29:41.000000000 +1000
++++ rp-pppoe-3.8/configs/pppoe.conf 2007-06-08 16:02:47.000000000 +1000
+@@ -66,7 +66,7 @@
+ # to connect forever after pppoe-start is called. Otherwise, it will
+ # give out after CONNECT_TIMEOUT seconds and will not attempt to
+ # connect again, making it impossible to reach.
+-CONNECT_TIMEOUT=30
++CONNECT_TIMEOUT=0
+
+ # How often in seconds pppoe-start polls to check if link is up
+ CONNECT_POLL=2
+@@ -115,7 +115,7 @@
+ FIREWALL=NONE
+
+ # Linux kernel-mode plugin for pppd. If you want to try the kernel-mode
+-# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
++# plugin, use LINUX_PLUGIN=rp-pppoe.so
+ LINUX_PLUGIN=
+
+ # Any extra arguments to pass to pppoe. Normally, use a blank string
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.12.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.12.bb
new file mode 100644
index 000000000..e1ca17fb3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.12.bb
@@ -0,0 +1,74 @@
+SUMMARY = "A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581"
+
+PR = "r10"
+
+SRC_URI = "http://www.roaringpenguin.com/files/download/${BP}.tar.gz \
+ file://top-autoconf.patch \
+ file://configure_in_cross.patch \
+ file://pppoe-src-restrictions.patch \
+ file://update-config.patch \
+ file://dont-swallow-errors.patch \
+ file://discard-use-of-dnl-in-Makefile.am.patch \
+ file://configure.patch \
+ file://pppoe-server.default \
+ file://pppoe-server.init \
+ file://configure.in-Error-fix.patch \
+ file://pppoe-server.service"
+
+SRC_URI[md5sum] = "216eb52b69062b92a64ee37fd71f4b66"
+SRC_URI[sha256sum] = "00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2"
+
+inherit autotools-brokensep update-rc.d systemd
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
+ install -d ${D}${datadir}/doc/${PN}
+ if [ -f ${D}${datadir}/doc/README ]; then
+ mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
+ fi
+}
+
+do_install() {
+ # Install init script and default settings
+ install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server
+ install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server
+ # Install
+ oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install
+ chmod 4755 ${D}${sbindir}/pppoe
+}
+
+SYSTEMD_PACKAGES = "${PN}-server"
+SYSTEMD_SERVICE_${PN}-server = "pppoe-server.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+# Insert server package before main package
+PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc"
+
+FILES_${PN}-server = "${sysconfdir}/default/pppoe-server \
+ ${sysconfdir}/init.d/pppoe-server \
+ ${sbindir}/pppoe-server \
+ ${sysconfdir}/ppp/pppoe-server-options"
+FILES_${PN}-relay = "${sbindir}/pppoe-relay"
+FILES_${PN}-sniff = "${sbindir}/pppoe-sniff"
+
+CONFFILES_${PN} = "${sysconfdir}/ppp/pppoe.conf \
+ ${sysconfdir}/ppp/firewall-standalone \
+ ${sysconfdir}/ppp/firewall-masq"
+CONFFILES_${PN}-server = "${sysconfdir}/ppp/pppoe-server-options \
+ ${sysconfdir}/default/pppoe-server"
+
+INITSCRIPT_PACKAGES = "${PN}-server"
+INITSCRIPT_NAME_${PN}-server = "pppoe-server"
+INITSCRIPT_PARAMS_${PN}-server = "defaults 92 8"
+
+RDEPENDS_${PN} = "ppp"
+RDEPENDS_${PN}-server = "${PN}"
+RRECOMMENDS_${PN} = "ppp-oe"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
new file mode 100644
index 000000000..b3a9620c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Libraries and wrapper for using a SOCKS proxy"
+DESCRIPTION = "The role of tsocks is to allow non SOCKS aware \
+applications (e.g telnet, ssh, ftp etc) to use SOCKS without any \
+modification. It does this by intercepting the calls that applications \
+make to establish network connections and negotating them through a \
+SOCKS server as necessary."
+HOMEPAGE = "http://sourceforge.net/projects/tsocks/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+SRC_URI = "http://downloads.sourceforge.net/tsocks/tsocks-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "51caefd77e5d440d0bbd6443db4fc0f8"
+SRC_URI[sha256sum] = "849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347"
+
+inherit autotools-brokensep
+
+S = "${WORKDIR}/tsocks-1.8"
+
+FILES_${PN} = "${libdir}/* ${bindir}/tsocks"
+FILES_${PN}-dev = ""
+INSANE_SKIP_${PN} = "dev-so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
new file mode 100644
index 000000000..6f7f69330
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
@@ -0,0 +1,44 @@
+SUMMARY = "Xelerance version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE = "http://www.xelerance.com/software/xl2tpd/"
+SECTION = "net"
+DEPENDS = "ppp virtual/kernel"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+INC_PR = "r0"
+
+SRC_URI = "git://github.com/xelerance/xl2tpd.git \
+ file://fix-inline-functions-errors-with-gcc-5.x.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d
+
+do_compile () {
+ oe_runmake CFLAGS="${CFLAGS} -DLINUX" LDFLAGS="${LDFLAGS}" PREFIX="${prefix}" KERNELSRC=${STAGING_KERNEL_DIR} all
+}
+
+do_install () {
+ oe_runmake PREFIX="${D}${prefix}" install
+
+ install -d ${D}${sysconfdir}/init.d
+ touch ${D}${sysconfdir}/xl2tpd.conf
+ install -m 0755 debian/xl2tpd.init ${D}${sysconfdir}/init.d/xl2tpd
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/xl2tpd
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 debian/xl2tpd.default ${D}${sysconfdir}/default/xl2tpd
+}
+
+CONFFILES_${PN} += "${sysconfdir}/xl2tpd.conf ${sysconfdir}/default/xl2tpd"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "xl2tpd"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch
new file mode 100644
index 000000000..b75c9129d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch
@@ -0,0 +1,134 @@
+Upstream-Status: Backport
+
+Backport from https://github.com/xelerance/xl2tpd/commit/9098f64950eb22cf049058d40f647bafdb822174
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From 9098f64950eb22cf049058d40f647bafdb822174 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Wed, 23 Sep 2015 10:41:05 +0800
+Subject: [PATCH] Fix build errors caused by inline function with gcc 5
+
+GCC 5 defaults to -std=gnu11 instead of -std=gnu89. And -std=gnu89
+employs the GNU89 inline semantics, -std=gnu11 uses the C99 inline
+semantics.
+
+For 'inline' fuction, it is NOT exported by C99. So error messages such as:
+
+| control.c:1717: undefined reference to `check_control'
+
+For these functions which is not referred by other compile units, make
+them 'static inline'.
+
+For 'extern inline' function, it fails such as:
+
+| misc.h:68:20: warning: inline function 'swaps' declared but never defined
+| extern inline void swaps (void *, int);
+| ^
+
+Because function swaps() is referred by other compile units, it must be
+exported. The semantics of 'extern inline' are not same between GNU89
+and C99, so remove 'inline' attribute for compatible with GNU89.
+
+Ref:
+https://gcc.gnu.org/gcc-5/porting_to.html
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ control.c | 8 ++++----
+ misc.c | 2 +-
+ misc.h | 2 +-
+ network.c | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/control.c b/control.c
+index b2891a9..c4a39b5 100644
+--- a/control.c
++++ b/control.c
+@@ -1140,7 +1140,7 @@ int control_finish (struct tunnel *t, struct call *c)
+ return 0;
+ }
+
+-inline int check_control (const struct buffer *buf, struct tunnel *t,
++static inline int check_control (const struct buffer *buf, struct tunnel *t,
+ struct call *c)
+ {
+ /*
+@@ -1276,7 +1276,7 @@ inline int check_control (const struct buffer *buf, struct tunnel *t,
+ return 0;
+ }
+
+-inline int check_payload (struct buffer *buf, struct tunnel *t,
++static inline int check_payload (struct buffer *buf, struct tunnel *t,
+ struct call *c)
+ {
+ /*
+@@ -1382,7 +1382,7 @@ inline int check_payload (struct buffer *buf, struct tunnel *t,
+ #endif
+ return 0;
+ }
+-inline int expand_payload (struct buffer *buf, struct tunnel *t,
++static inline int expand_payload (struct buffer *buf, struct tunnel *t,
+ struct call *c)
+ {
+ /*
+@@ -1562,7 +1562,7 @@ void send_zlb (void *data)
+ toss (buf);
+ }
+
+-inline int write_packet (struct buffer *buf, struct tunnel *t, struct call *c,
++static inline int write_packet (struct buffer *buf, struct tunnel *t, struct call *c,
+ int convert)
+ {
+ /*
+diff --git a/misc.c b/misc.c
+index 3092401..af90dbf 100644
+--- a/misc.c
++++ b/misc.c
+@@ -170,7 +170,7 @@ void do_packet_dump (struct buffer *buf)
+ printf ("}\n");
+ }
+
+-inline void swaps (void *buf_v, int len)
++void swaps (void *buf_v, int len)
+ {
+ #ifdef __alpha
+ /* Reverse byte order alpha is little endian so lest save a step.
+diff --git a/misc.h b/misc.h
+index aafdc62..caab7a1 100644
+--- a/misc.h
++++ b/misc.h
+@@ -65,7 +65,7 @@ extern void l2tp_log (int level, const char *fmt, ...);
+ extern struct buffer *new_buf (int);
+ extern void udppush_handler (int);
+ extern int addfcs (struct buffer *buf);
+-extern inline void swaps (void *, int);
++extern void swaps (void *, int);
+ extern void do_packet_dump (struct buffer *);
+ extern void status (const char *fmt, ...);
+ extern void status_handler (int signal);
+diff --git a/network.c b/network.c
+index b1268c6..d324a71 100644
+--- a/network.c
++++ b/network.c
+@@ -135,7 +135,7 @@ int init_network (void)
+ return 0;
+ }
+
+-inline void extract (void *buf, int *tunnel, int *call)
++static inline void extract (void *buf, int *tunnel, int *call)
+ {
+ /*
+ * Extract the tunnel and call #'s, and fix the order of the
+@@ -155,7 +155,7 @@ inline void extract (void *buf, int *tunnel, int *call)
+ }
+ }
+
+-inline void fix_hdr (void *buf)
++static inline void fix_hdr (void *buf)
+ {
+ /*
+ * Fix the byte order of the header
+--
+2.6.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.6.bb
new file mode 100644
index 000000000..df2ec52c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.6.bb
@@ -0,0 +1,7 @@
+require xl2tpd.inc
+
+# The SRCREV corresponds to v1.3.6.
+# Adding tag=v1.3.6 to the SRC_URI will force access to the upstream repo.
+#
+SRCREV = "5619e1771048e74b729804e8602f409af0f3faea"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb
new file mode 100644
index 000000000..42bc398a1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb
@@ -0,0 +1,8 @@
+require xl2tpd.inc
+
+# This is v1.3.6 plus some commits. There is no tag for this commit.
+#
+PV = "1.3.6+git${SRCPV}"
+
+SRCREV = "a96b345962622ea58490924130675df6db062d11"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
new file mode 100644
index 000000000..328e574a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
@@ -0,0 +1,19 @@
+| zeroconf.c: In function 'main':
+| zeroconf.c:145: error: 'PATH_MAX' undeclared (first use in this function)
+
+RP - 4/9/09
+
+Upstream-Status: Pending
+
+Index: zeroconf-0.9/zeroconf.c
+===================================================================
+--- zeroconf-0.9.orig/zeroconf.c 2009-09-04 10:05:25.000000000 +0100
++++ zeroconf-0.9/zeroconf.c 2009-09-04 10:05:42.000000000 +0100
+@@ -33,6 +33,7 @@
+ #include <net/if_arp.h>
+ #include <sys/time.h>
+ #include <signal.h>
++#include <limits.h>
+
+ #include "delay.h"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
new file mode 100644
index 000000000..0c9d15ba1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/zeroconf ]; then
+ exit 0
+fi
+
+# IPv4 link-local addresses (zeroconf) are
+# only applicable on the 'inet' address family
+[ "X$ADDRFAM" != "Xinet" ] && exit 0
+
+# However there are some methods where it doesn't
+# make any sense to configure an IPv4LL address
+
+# not on loopback
+[ "X$METHOD" = "Xloopback" ] && exit 0
+
+# not on ppp or wvdial either
+[ "X$METHOD" = "Xppp" ] && exit 0
+[ "X$METHOD" = "Xwvdial" ] && exit 0
+
+# The administrator may have blacklisted interfaces
+# or only want zeroconf in a fallback situation
+[ -f /etc/default/zeroconf ] &&
+ . /etc/default/zeroconf
+
+[ -n "$DISABLE" ] && exit 0
+
+for BLACK in $IFBLACKLIST; do
+ case $IFACE in
+ $BLACK)
+ exit 0
+ ;;
+ esac
+done
+
+# should we only allocate an address if we do not already have one?
+if [ -n "$FALLBACK" ]; then
+ /sbin/ip addr show $IFACE scope global | grep -q "inet"
+ IP=$?
+ if [ $IP -eq 0 ]; then
+ /sbin/ip route add 169.254.0.0/16 dev $IFACE
+ exit 0
+ fi
+fi
+
+# otherwise, run if we aren't already going
+if [ ! -r /var/run/zeroconf.$IFACE.pid ]; then
+ /usr/sbin/zeroconf -i $IFACE
+fi
+
+exit 0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
new file mode 100644
index 000000000..cc07b275f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
@@ -0,0 +1,17 @@
+# Default for zeroconf
+
+# disable zeroconf
+# If you want to disable zeroconf completely, uncomment the following line
+# this may be useful if you are debugging zeroconf or starting it manually
+#DISABLE=yes
+
+# black-listed interfaces
+# Interfaces which you never wish to have zeroconf run on should
+# be listed here. e.g. "eth2 wlan1" in a space seperated string
+IFBLACKLIST=""
+
+# fallback only
+# If you would only like a link-local address if you were unable to
+# obtain an address via DHCP then uncomment the following line
+#FALLBACK=yes
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
new file mode 100644
index 000000000..9307263c7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
@@ -0,0 +1,34 @@
+SUMMARY = "IPv4 link-local address allocator"
+DESCRIPTION = "Zeroconf is a program that is used to claim IPv4 \
+link-local addresses. IPv4 link-local addresses are useful when setting \
+up ad-hoc networking between devices without the involvement of a either \
+a DHCP server or network administrator. \
+These addresses are allocated from the 169.254.0.0/16 address range and \
+are normally attached to each Ethernet device in your computer. \
+Addresses are assigned randomly by each host and, in case of collision, \
+both hosts (are supposed to) renumber."
+AUTHOR = "Anand Kumria <wildfire@progsoc.uts.edu.au>"
+HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4 \
+ file://zeroconf.c;beginline=1;endline=13;md5=a5bada96e1e34b08eb7446b28e2630b2"
+SECTION = "net"
+
+PR = "r1"
+
+SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${BPN}-${PV}.tar.gz \
+ file://compilefix.patch \
+ file://zeroconf-default \
+ file://debian-zeroconf"
+
+SRC_URI[md5sum] = "bdafb16b008ebb5633e4e581f77821d2"
+SRC_URI[sha256sum] = "a8c74df127753e2310fa1e072f3c9ca44a404bb0bbce9cfec7a84c6dff8bec7b"
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -d ${D}${sysconfdir}/network/if-up.d
+ install -d ${D}${sysconfdir}/default
+ install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
+ install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
+ install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch
new file mode 100644
index 000000000..ec89b7a53
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
new file mode 100644
index 000000000..c382a718f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
@@ -0,0 +1,25 @@
+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 \
+ "
+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/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch
new file mode 100644
index 000000000..0875344fe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/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/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch
new file mode 100644
index 000000000..80e980472
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch
@@ -0,0 +1,61 @@
+Index: arptables-v0.0.3-4/Makefile
+===================================================================
+--- arptables-v0.0.3-4.orig/Makefile 2010-03-08 18:49:28.000000000 +0300
++++ arptables-v0.0.3-4/Makefile 2010-03-22 15:52:56.000000000 +0300
+@@ -6,12 +6,11 @@
+ LIBDIR:=$(PREFIX)/lib
+ BINDIR:=$(PREFIX)/sbin
+ MANDIR:=$(PREFIX)/man
+-INITDIR:=/etc/rc.d/init.d
++INITDIR:=/etc/init.d
+ SYSCONFIGDIR:=/etc/sysconfig
+ DESTDIR:=
+
+-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
+@@ -22,16 +21,16 @@
+ all: arptables
+
+ arptables.o: arptables.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+
+ arptables-standalone.o: arptables-standalone.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+
+ libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+
+ arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
+- $(CC) $(CFLAGS) -o $@ $^
++ $(CC) $(LDFLAGS) $(CFLAGS) $(ARPCFLAGS) -o $@ $^
+
+ $(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8
+ mkdir -p $(@D)
+@@ -50,6 +49,7 @@
+ cat arptables-restore | sed 's/__EXEC_PATH__/$(tmp1)/g' > arptables-restore_
+ install -m 0755 -o root -g root arptables-restore_ $(DESTDIR)$(BINDIR)/arptables-restore
+ cat arptables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > arptables.sysv_
++ install -d $(DESTDIR)$(INITDIR)
+ if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi
+ rm -f arptables-save_ arptables-restore_ arptables.sysv_
+
+Index: arptables-v0.0.3-4/extensions/Makefile
+===================================================================
+--- arptables-v0.0.3-4.orig/extensions/Makefile 2010-03-08 18:49:28.000000000 +0300
++++ arptables-v0.0.3-4/extensions/Makefile 2010-03-22 15:52:38.000000000 +0300
+@@ -4,4 +4,7 @@
+ 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 $@ $<
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch
new file mode 100644
index 000000000..24956c4ca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/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/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch
new file mode 100644
index 000000000..f332658bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables-0.0.3-4/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/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
new file mode 100644
index 000000000..be2ac6659
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Administration tool for arp packet filtering"
+LICENSE = "GPL-2.0"
+SECTION = "net"
+
+PR = "r2"
+
+RDEPENDS_${PN} += "perl"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+SRC_URI = " \
+ ${SOURCEFORGE_MIRROR}/ebtables/arptables-v${PV}.tar.gz;name=arptables \
+ file://arptables-compile-install.patch \
+ file://arptables-init-busybox.patch \
+ file://arptables-arpt-get-target-fix.patch \
+ file://arptables-remove-bashism.patch \
+"
+SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
+SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
+
+S = "${WORKDIR}/arptables-v${PV}"
+
+do_compile () {
+ oe_runmake
+}
+
+# the install target is not multi-job safe, but it doesn't do much
+# so we just install serially
+#
+PARALLEL_MAKEINST = "-j1"
+
+fakeroot do_install () {
+ oe_runmake 'BINDIR=${sbindir}' 'MANDIR=${mandir}/' 'DESTDIR=${D}' install
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
new file mode 100644
index 000000000..0fb18d5d6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
@@ -0,0 +1,28 @@
+SUMMARY = "Tools for ethernet bridging"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
+SECTION = "net"
+LICENSE = "GPLv2"
+
+DEPENDS = "sysfsutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \
+ file://bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch \
+ file://bridge-utils-1.5-fix-error-message-for-incorrect-command.patch \
+ file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \
+"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch
new file mode 100644
index 000000000..d00af9c15
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch
@@ -0,0 +1,87 @@
+Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+From bb9970a9df95837e39d680021b1f73d231e85406 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <shemminger@vyatta.com>
+Date: Tue, 3 May 2011 09:52:43 -0700
+Subject: [PATCH 3/3] Check error returns from write to sysfs
+
+Add helper function to check write to sysfs files.
+
+Signed-off-by: Petr Sabata <contyk@redhat.com>
+---
+ libbridge/libbridge_devif.c | 37 +++++++++++++++++++++++--------------
+ 1 files changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
+index aa8bc36..1e83925 100644
+--- a/libbridge/libbridge_devif.c
++++ b/libbridge/libbridge_devif.c
+@@ -280,25 +280,38 @@ fallback:
+ return old_get_port_info(brname, port, info);
+ }
+
++static int set_sysfs(const char *path, unsigned long value)
++{
++ int fd, ret = 0, cc;
++ char buf[32];
++
++ fd = open(path, O_WRONLY);
++ if (fd < 0)
++ return -1;
++
++ cc = snprintf(buf, sizeof(buf), "%lu\n", value);
++ if (write(fd, buf, cc) < 0)
++ ret = -1;
++ close(fd);
++
++ return ret;
++}
++
+
+ static int br_set(const char *bridge, const char *name,
+ unsigned long value, unsigned long oldcode)
+ {
+ int ret;
+ char path[SYSFS_PATH_MAX];
+- FILE *f;
+
+- snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name);
++ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s",
++ bridge, name);
+
+- f = fopen(path, "w");
+- if (f) {
+- ret = fprintf(f, "%ld\n", value);
+- fclose(f);
+- } else {
++ if ((ret = set_sysfs(path, value)) < 0) {
+ /* fallback to old ioctl */
+ struct ifreq ifr;
+ unsigned long args[4] = { oldcode, value, 0, 0 };
+-
++
+ strncpy(ifr.ifr_name, bridge, IFNAMSIZ);
+ ifr.ifr_data = (char *) &args;
+ ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr);
+@@ -348,14 +361,10 @@ static int port_set(const char *bridge, const char *ifname,
+ {
+ int ret;
+ char path[SYSFS_PATH_MAX];
+- FILE *f;
+
+ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport/%s", ifname, name);
+- f = fopen(path, "w");
+- if (f) {
+- ret = fprintf(f, "%ld\n", value);
+- fclose(f);
+- } else {
++
++ if ((ret = set_sysfs(path, value)) < 0) {
+ int index = get_portno(bridge, ifname);
+
+ if (index < 0)
+--
+1.7.5.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch
new file mode 100644
index 000000000..2d0494e53
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch
@@ -0,0 +1,33 @@
+Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+From c7ed0996ef58b497d3d30be802ab5ae6c37099b5 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <shemminger@vyatta.com>
+Date: Tue, 3 May 2011 09:49:57 -0700
+Subject: [PATCH 2/3] Fix error message for incorrect command
+
+Debian bug 406907
+Error message was refering to incorrect command argument.
+
+Signed-off-by: Petr Sabata <contyk@redhat.com>
+---
+ brctl/brctl.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/brctl/brctl.c b/brctl/brctl.c
+index 454b8dd..46ca352 100644
+--- a/brctl/brctl.c
++++ b/brctl/brctl.c
+@@ -69,7 +69,7 @@ int main(int argc, char *const* argv)
+ argc -= optind;
+ argv += optind;
+ if ((cmd = command_lookup(*argv)) == NULL) {
+- fprintf(stderr, "never heard of command [%s]\n", argv[1]);
++ fprintf(stderr, "never heard of command [%s]\n", *argv);
+ goto help;
+ }
+
+--
+1.7.5.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch
new file mode 100644
index 000000000..6f6d6d423
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch
@@ -0,0 +1,33 @@
+Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-incorrect-command-in-manual.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+From 8ef7b77562b636efcbd8b759eb324d6c069200f2 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <shemminger@vyatta.com>
+Date: Tue, 3 May 2011 09:48:40 -0700
+Subject: [PATCH 1/3] Fix incorrect command in manual
+
+Command is "setageing" not "setageingtime"; fix man page.
+Debian bug report.
+
+Signed-off-by: Petr Sabata <contyk@redhat.com>
+---
+ doc/brctl.8 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/doc/brctl.8 b/doc/brctl.8
+index d904047..771f323 100644
+--- a/doc/brctl.8
++++ b/doc/brctl.8
+@@ -89,7 +89,7 @@ data. Machines can move to other ports, network cards can be replaced
+ .B brctl showmacs <brname>
+ shows a list of learned MAC addresses for this bridge.
+
+-.B brctl setageingtime <brname> <time>
++.B brctl setageing <brname> <time>
+ sets the ethernet (MAC) address ageing time, in seconds. After <time>
+ seconds of not having seen a frame coming from a certain address, the
+ bridge will time out (delete) that address from the Forwarding
+--
+1.7.5.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
new file mode 100644
index 000000000..de36f0598
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
@@ -0,0 +1,22 @@
+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,
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: bridge-utils-1.5/libbridge/libbridge.h
+===================================================================
+--- bridge-utils-1.5.orig/libbridge/libbridge.h 2011-03-28 17:52:54.000000000 -0700
++++ bridge-utils-1.5/libbridge/libbridge.h 2013-03-04 21:16:25.781188309 -0800
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <linux/in6.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb
new file mode 100644
index 000000000..04f863b22
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb
@@ -0,0 +1,11 @@
+require bridge-utils.inc
+
+SRC_URI += "file://kernel-headers.patch"
+
+PARALLEL_MAKE = ""
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
+
+SRC_URI[md5sum] = "ec7b381160b340648dede58c31bb2238"
+SRC_URI[sha256sum] = "42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.11.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.11.0.bb
new file mode 100644
index 000000000..2f72ab495
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.11.0.bb
@@ -0,0 +1,13 @@
+# Copyright (c) 2012-2014 LG Electronics, Inc.
+
+DESCRIPTION = "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://ares_init.c;beginline=1;endline=3;md5=53f5ecf4c22c37cf1ddd1ef8f8eccce0"
+
+SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz"
+SRC_URI[md5sum] = "d5c6d522cfc54bb6f215a0b7912d46be"
+SRC_URI[sha256sum] = "b3612e6617d9682928a1d50c1040de4db6519f977f0b25d40cf1b632900b3efd"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
new file mode 100644
index 000000000..87306a6f2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
@@ -0,0 +1,34 @@
+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"
+
+DEPENDS = "samba"
+PV = "6.4"
+
+SRCREV = "487f46da737291877867cbd3acb40fea087d3863"
+SRC_URI = "git://git.samba.org/cifs-utils.git"
+
+S = "${WORKDIR}/git"
+
+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"
+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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb
new file mode 100644
index 000000000..4b07c0bd0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.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_v2390/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
+ file://LICENSE \
+ "
+SRC_URI[md5sum] = "b82b31c609c6bcc69521829409f58ccc"
+SRC_URI[sha256sum] = "ed2096ef1ea25d189a02bbc6603fed7a48297f2987f254265763a6eecb7fc870"
+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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb
new file mode 100644
index 000000000..567538441
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc
new file mode 100644
index 000000000..b9171e474
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema/files/LICENSE
new file mode 100644
index 000000000..54a28120e
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE
new file mode 100644
index 000000000..54a28120e
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
new file mode 100644
index 000000000..1dd9b93a5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
@@ -0,0 +1,16 @@
+link rep_snprintf from lib/replace/snprintf.o for ltdbtool
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp ctdb-2.5.1.orig/Makefile.in ctdb-2.5.1/Makefile.in
+--- ctdb-2.5.1.orig/Makefile.in 2015-05-07 16:43:39.276000236 +0900
++++ ctdb-2.5.1/Makefile.in 2015-05-07 16:44:09.627000237 +0900
+@@ -170,7 +170,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 $@ $+ $(TDB_LIBS) $(LIB_FLAGS)
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb
new file mode 100644
index 000000000..5d757847a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb
@@ -0,0 +1,54 @@
+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/${PN}/${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] = "d0cd91726ff4ca2229e1b21859c94717"
+SRC_URI[sha256sum] = "d5bf3f674cae986bb6178b1db215a703ac94adc5f75fadfdcff63dcbb5e98ab5"
+
+inherit autotools-brokensep pkgconfig systemd
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libtdb] = "--without-included-tdb,--with-included-tdb,libtdb"
+
+PARALLEL_MAKE = ""
+
+DEPENDS += "popt libtevent libtalloc libldb"
+
+# 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/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
new file mode 100644
index 000000000..dae583d85
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
@@ -0,0 +1,47 @@
+example21.cpp: remove deprecated code
+
+The deprecated code was no longer used, so remove it to avoid
+compiling failure with -Werror=unused-function
+...
+| example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*,
+size_t, size_t)' defined but not used [-Werror=unused-function]
+| size_t readData(char *buffer, size_t size, size_t nitems)
+...
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ examples/example21.cpp | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/examples/example21.cpp b/examples/example21.cpp
+--- a/examples/example21.cpp
++++ b/examples/example21.cpp
+@@ -39,23 +39,6 @@
+ #include <curlpp/Options.hpp>
+ #include <curlpp/Exception.hpp>
+
+-/*
+- anonymous namespace to prevent name clash in case other examples using the same global entities
+- would be compiled in the same project
+-*/
+-namespace
+-{
+-
+-char *data = NULL;
+-
+-size_t readData(char *buffer, size_t size, size_t nitems)
+-{
+- strncpy(buffer, data, size * nitems);
+- return size * nitems;
+-}
+-
+-} // namespace
+-
+ int main(int argc, char *argv[])
+ {
+ if(argc != 3) {
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch
new file mode 100644
index 000000000..ad73c0088
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Inappropriate [packaging]
+
+
+Index: curl-7.20.0/libcurl.pc.in
+===================================================================
+--- curl-7.20.0.orig/libcurl.pc.in 2009-11-17 18:11:07.000000000 +0000
++++ curl-7.20.0/libcurl.pc.in 2010-03-25 12:13:26.814051066 +0000
+@@ -35,6 +35,7 @@
+ URL: http://curl.haxx.se/
+ Description: Library to transfer files with ftp, http, etc.
+ Version: @CURLVERSION@
+-Libs: -L${libdir} -lcurl @LIBS@
+-Libs.private: @LIBCURL_LIBS@ @LIBS@
++Requires.private: @GNUTLS_REQUIRED@
++Libs: -L${libdir} -lcurl
++Libs.private: -ldl -lz
+ Cflags: -I${includedir}
+Index: curl-7.20.0/configure.ac
+===================================================================
+--- curl-7.20.0.orig/configure.ac 2010-02-04 21:41:46.000000000 +0000
++++ curl-7.20.0/configure.ac 2010-03-25 12:12:18.673129001 +0000
+@@ -1668,6 +1668,7 @@
+ AC_SUBST(USE_GNUTLS, [1])
+ GNUTLS_ENABLED=1
+ USE_GNUTLS="yes"
++ GNUTLS_REQUIRED="gnutls"
+ curl_ssl_msg="enabled (GnuTLS)"
+ ],
+ [
+@@ -1696,6 +1697,8 @@
+
+ fi dnl OPENSSL != 1
+
++AC_SUBST(GNUTLS_REQUIRED)
++
+ dnl ----------------------------------------------------
+ dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
+ dnl ----------------------------------------------------
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb
new file mode 100644
index 000000000..5663f0e91
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "C++ library for client-side URL transfers"
+HOMEPAGE = "http://code.google.com/p/curlpp/"
+SECTION = "libdevel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "curl boost"
+DEPENDS_class-native = "curl-native"
+
+SRC_URI = "http://curlpp.googlecode.com/files/curlpp-${PV}.tar.gz \
+ file://example21.cpp-remove-deprecated-code.patch \
+ "
+
+SRC_URI[md5sum] = "ccc3d30d4b3b5d2cdbed635898c29485"
+SRC_URI[sha256sum] = "e3f9427b27c5bddf898d383d45c0d3d5397e2056ff935d9a5cdaef6a9a653bd5"
+
+inherit autotools-brokensep pkgconfig binconfig
+
+PACKAGES =+ "libcurlpp libcurlpp-dev libcurlpp-staticdev"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.* \
+ "
+
+FILES_lib${BPN}-dev = "${includedir} \
+ ${libdir}/lib*.la \
+ ${libdir}/pkgconfig \
+ ${bindir}/*-config"
+
+FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
new file mode 100644
index 000000000..cc7f9e3be
--- /dev/null
+++ b/import-layers/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.15 and prior are moved to the archive folder on the server
+SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}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=${@base_contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \
+ ${@base_contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \
+ ${@base_contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \
+ ${@base_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/wrt
+ 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 [ "${@base_contains('PACKAGECONFIG', 'resolvconf', '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/wrt/dhcp_release ${D}${bindir}
+
+ if [ "${@base_contains('PACKAGECONFIG', 'dbus', '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 [ "${@base_contains('PACKAGECONFIG', 'resolvconf', '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/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
new file mode 100644
index 000000000..918c0b6d5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
@@ -0,0 +1,29 @@
+From 1e5be0a0bcf85913d63408030dec038d360a5fa6 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>
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index fc38393..a79f8bf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -57,8 +57,8 @@ idn_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) -
+ idn_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn`
+ 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.1`
+-lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1`
++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 $(PKG_CONFIG) --copy -lgmp`
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.75.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.75.bb
new file mode 100644
index 000000000..a11aabbd9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.75.bb
@@ -0,0 +1,9 @@
+require dnsmasq.inc
+
+SRC_URI += "\
+ file://lua.patch \
+"
+
+SRC_URI[dnsmasq-2.75.md5sum] = "d99ac126d4fe910c679d88430559669b"
+SRC_URI[dnsmasq-2.75.sha256sum] = "f8252c0a0ba162c2cd45f81140c7c17cc40a5fca2b869d1a420835b74acad294"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
new file mode 100644
index 000000000..f52ce4e8f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
@@ -0,0 +1 @@
+d root root 0755 /run/dnsmasq none
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
new file mode 100644
index 000000000..cde2244c8
--- /dev/null
+++ b/import-layers/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
+ExecStop=/bin/kill $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper
new file mode 100644
index 000000000..db54d467e
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
new file mode 100644
index 000000000..68b175c1f
--- /dev/null
+++ b/import-layers/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
+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/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
new file mode 100755
index 000000000..bd0ee001a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
@@ -0,0 +1,293 @@
+# 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.
+
+# 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/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf
new file mode 100755
index 000000000..06cd25cec
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init b/import-layers/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init
new file mode 100644
index 000000000..51c95dfed
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb
new file mode 100644
index 000000000..ca59bd217
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service
new file mode 100644
index 000000000..ca250ea5d
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket
new file mode 100644
index 000000000..556e1a850
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.21.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.21.bb
new file mode 100644
index 000000000..d7a7cc5e6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.21.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
+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"
+
+SRC_URI[md5sum] = "28c39ab78a20f00701c26960d9190cf0"
+SRC_URI[sha256sum] = "7ab7139e59e1f0353bf9c24251f13c893cf1a6ef4bcc47e2d44de437108d0b20"
+
+DEPENDS = "openssl xz zlib bzip2 libcap icu"
+
+inherit autotools pkgconfig systemd useradd
+
+PACKAGECONFIG ??= " \
+ ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '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/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-don-t-compile-documentation.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-don-t-compile-documentation.patch
new file mode 100644
index 000000000..1de4a86d9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-don-t-compile-documentation.patch
@@ -0,0 +1,38 @@
+From feccf89f08a455460668cf286151662e4c1557b3 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Thu, 20 Aug 2015 15:32:30 +0900
+Subject: [PATCH] Makefile.in: don't compile documentation
+
+The documentation file is not suitable for cross-compile,
+Errors will occur:
+| /bin/sh: ../../user/v9/drbdsetup: /lib/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
+| ../../user/v9/drbdsetup xml-help disk-options > drbdsetup_xml-help_disk-options.xml
+| /bin/sh: ../../user/v9/drbdsetup: /lib/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
+| /bin/sh: ../../user/v9/drbdsetup: /lib/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
+| make[1]: *** [drbdsetup_xml-help_new-resource.xml] Error 126
+
+so we do not compile it.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5365a2c..d5967d8 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -45,7 +45,7 @@ WITH_84_SUPPORT = @WITH_84_SUPPORT@
+ # and not in e.g. dash. I'm too lazy to fix it to be compatible.
+ SHELL=/bin/bash
+
+-SUBDIRS = user/shared user/v9 user/v84 user/v83 scripts documentation/v83 documentation/v84 documentation/v9
++SUBDIRS = user/shared user/v9 user/v84 user/v83 scripts
+
+ REL_VERSION := $(shell $(SED) -ne '/^AC_INIT/{s/^[^,]*, *\([^,]*\) *,.*/\1/;p;q}' configure.ac)
+ ifdef FORCE
+--
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-Makefile.in-fix-permission-bits-for-drbd.service.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.3.bb
new file mode 100644
index 000000000..44459b529
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.3.bb
@@ -0,0 +1,41 @@
+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://oss.linbit.com/drbd/${BP}.tar.gz \
+ file://0001-Makefile.in-don-t-compile-documentation.patch \
+ file://0001-Makefile.in-fix-permission-bits-for-drbd.service.patch \
+ "
+SRC_URI[md5sum] = "09c9c33c041e1f4f85dd359f9e0b0f24"
+SRC_URI[sha256sum] = "011050578c153bf4fef86e03749304ff9f333b7af3512c5c395e0e870a0445bd"
+
+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 \
+ "
+
+RDEPENDS_${PN} += "bash perl"
+
+# 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/import-layers/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
new file mode 100644
index 000000000..163148cee
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
@@ -0,0 +1,40 @@
+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"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
new file mode 100644
index 000000000..909d7cf9e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP"
+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 = "http://download.berlios.de/fetchmail/fetchmail-${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/import-layers/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/fping/fping_3.5.bb
new file mode 100644
index 000000000..b6b17b70c
--- /dev/null
+++ b/import-layers/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 ?= "${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest
new file mode 100644
index 000000000..14e96191f
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest
new file mode 100644
index 000000000..5404c247b
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.45.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.45.bb
new file mode 100644
index 000000000..728ad5843
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.45.bb
@@ -0,0 +1,40 @@
+#
+# 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://README;md5=b0fa745303912bd2d64430f7ae69487d"
+
+# Note that we do not want to use the upstream file name locally.
+#
+SRC_URI = "http://github.com/maxmind/geoip-api-perl/archive/v${PV}.tar.gz;downloadfilename=${BPN}-${PV}.tar.gz \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "0ce57140890bf81958e0cea4fe1885b2"
+SRC_URI[sha256sum] = "c56437b1cc8887736cb1e435d0320c1c1ff3754830249516317b99137005fb23"
+
+S = "${WORKDIR}/geoip-api-perl-${PV}"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.6.bb
new file mode 100644
index 000000000..06051542c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.6.bb
@@ -0,0 +1,93 @@
+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 = "ed3f3e2b87fba05a8f2a5b9b1328e7d55be8bf30"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/GeoIP.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/GeoIP.conf
new file mode 100644
index 000000000..134cfed1f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/geoipupdate.cron b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/geoipupdate.cron
new file mode 100644
index 000000000..40597a856
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.2.1/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/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.1.bb
new file mode 100644
index 000000000..7a3a00252
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.2.1.bb
@@ -0,0 +1,30 @@
+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.2.1/geoipupdate-2.2.1.tar.gz \
+ file://GeoIP.conf \
+ file://geoipupdate.cron \
+ "
+
+SRC_URI[md5sum] = "abfd4bb9dd7fd489c103888dde5f2a57"
+SRC_URI[sha256sum] = "9547c42cc8620b2c3040fd8df95e8ee45c8b6ebcca7737d641f9526104d5f446"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "\
+file://ChangeLog.md;md5=5ca3d911ed549b0756b03410ff77fa62 \
+"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb
new file mode 100644
index 000000000..acc086420
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Configure network interfaces for parallel routing"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
+SECTION = "net"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://ifenslave.c;beginline=8;endline=12;md5=a9f0bd2324cdc1b36d1f44f0e643a62a"
+
+SRC_URI = "http://ftp.debian.org/debian/pool/main/i/${BPN}-2.6/${BPN}-2.6_${PV}.orig.tar.gz"
+SRC_URI[md5sum] = "56126cd1013cefe0ce6f81613e677bdd"
+SRC_URI[sha256sum] = "7917bf34de80a2492eb225adf9168c83a4854ac8a008ed0fd5b3fd147ccd3041"
+
+do_compile() {
+ ${CC} ifenslave.c -o ifenslave
+}
+do_install() {
+ install -d "${D}${sbindir}"
+ install -m 755 "${S}/ifenslave" "${D}${sbindir}/"
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb
new file mode 100644
index 000000000..0c8e494c1
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch
new file mode 100644
index 000000000..8d270a62b
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/fix-CVE-2015-4047.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch
new file mode 100644
index 000000000..36efc4917
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf
new file mode 100644
index 000000000..6b507508b
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf.sample
new file mode 100644
index 000000000..2948a4a35
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service
new file mode 100644
index 000000000..a10e77027
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
new file mode 100644
index 000000000..d9f121273
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -0,0 +1,92 @@
+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 = "ftp://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 \
+ "
+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 \
+ ${@base_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/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
new file mode 100644
index 000000000..7302e9d3e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.26.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Linux Virtual Server administration Utility"
+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 \
+"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch
new file mode 100644
index 000000000..90c4ce75e
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
new file mode 100644
index 000000000..7ddf591eb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
@@ -0,0 +1,36 @@
+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"
+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/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch
new file mode 100644
index 000000000..8ab094fa7
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.26.bb
new file mode 100644
index 000000000..5458d4728
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.26.bb
@@ -0,0 +1,49 @@
+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 += "libbsd 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 \
+ "
+
+PACKAGECONFIG[ldap] = ",,openldap"
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+ file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780 \
+ file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
+
+SRC_URI[md5sum] = "31780b702b638ad32aa5d9853d257839"
+SRC_URI[sha256sum] = "8843c7a72b980d9413ba6c494c039bccd10c524b37fda2917afb147745d8b2e6"
+
+inherit waf-samba
+
+S = "${WORKDIR}/ldb-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+ --disable-rpath-install \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --with-modulesdir=${libdir}/ldb/modules \
+ --with-privatelibdir=${libdir}/ldb \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ "
+DISABLE_STATIC = ""
+
+PACKAGES += "pyldb pyldb-dbg pyldb-dev"
+
+FILES_${PN} += "${libdir}/ldb/*"
+FILES_${PN}-dbg += "${libdir}/ldb/.debug/* \
+ ${libdir}/ldb/modules/ldb/.debug/*"
+
+FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+ ${libdir}/libpyldb-util.so.1 \
+ ${libdir}/libpyldb-util.so.1.1.17 \
+ "
+FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+ ${libdir}/.debug/libpyldb-util.so.1.1.17"
+FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch
new file mode 100644
index 000000000..63511bff5
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
new file mode 100644
index 000000000..172443a20
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
@@ -0,0 +1,14 @@
+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"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sasl] = "--enable-sasl,--disable-sasl,cyrus-sasl"
+
+inherit autotools gettext pkgconfig
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb
new file mode 100644
index 000000000..18232b4ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb
@@ -0,0 +1,6 @@
+require libmemcached.inc
+
+SRC_URI += "file://crosscompile.patch"
+
+SRC_URI[md5sum] = "616297a1aedefc52b3f6922eda5d559a"
+SRC_URI[sha256sum] = "dd7e9560029835bddf761a5b4c2339d9e5c7374558659b6c11b2c95e7d3a4325"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb
new file mode 100644
index 000000000..cdf8415ff
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
new file mode 100644
index 000000000..a3ee9ccd9
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.6.bb
new file mode 100644
index 000000000..89373117f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.6.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://talloc.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+DEPENDS += "libbsd"
+
+SRC_URI = "http://samba.org/ftp/talloc/talloc-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+ file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
+
+SRC_URI[md5sum] = "707010c6ede5821fd34397f5d9ec6ab8"
+SRC_URI[sha256sum] = "3b8e1a50bacb359d99942e0dd9941cef779ae4b5eb20f138873bd8270cb1d47b"
+
+
+inherit waf-samba
+
+PACKAGECONFIG[attr] = ",,attr"
+
+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}\
+ "
+DISABLE_STATIC = ""
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/do-not-check-xsltproc-manpages.patch
new file mode 100644
index 000000000..bcc45c9fc
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.8.bb
new file mode 100644
index 000000000..bf6698ae5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.8.bb
@@ -0,0 +1,31 @@
+SUMMARY = "The tdb library"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+ file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
+
+SRC_URI = "http://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
+ file://do-not-check-xsltproc-manpages.patch"
+
+SRC_URI[md5sum] = "fa4c9e2f59fcf41441285bca5f5ab481"
+SRC_URI[sha256sum] = "0605ac0427eac9c23bf61ebfd8206a07d5ece198498eab1769cd0cfb6e7de6b1"
+
+S = "${WORKDIR}/tdb-${PV}"
+
+inherit waf-samba
+
+EXTRA_OECONF += "--disable-rpath \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+ "
+DISABLE_STATIC = ""
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
new file mode 100644
index 000000000..2fc55239c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
@@ -0,0 +1,20 @@
+--- a/lib/replace/wscript 2015-11-18 15:40:19.000000000 +0100
++++ b/lib/replace/wscript 2015-11-18 15:48:09.000000000 +0100
+@@ -618,8 +618,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,
+@@ -630,7 +628,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/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch
new file mode 100644
index 000000000..1ce4dda1c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/do-not-check-xsltproc-manpages.patch
@@ -0,0 +1,16 @@
+Don't check manpages for xsltproc.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp tevent-0.9.21.orig/lib/talloc/wscript tevent-0.9.21/lib/talloc/wscript
+--- tevent-0.9.21.orig/lib/talloc/wscript 2013-09-08 21:24:14.000000000 +0900
++++ tevent-0.9.21/lib/talloc/wscript 2015-04-24 16:28:04.085000230 +0900
+@@ -55,7 +55,7 @@ def configure(conf):
+ if conf.env.standalone_talloc:
+ conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
+
+- 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/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb
new file mode 100644
index 000000000..d0ad748f5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://tevent.samba.org"
+SECTION = "libs"
+LICENSE = "LGPLv3+"
+
+DEPENDS += "libbsd libtalloc"
+RDEPENDS_python-tevent = "python"
+
+SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b"
+
+SRC_URI[md5sum] = "945845817918f5cfbe0202d80a7db118"
+SRC_URI[sha256sum] = "04d953379025b1560af5c4ffcce58a3ee84db7aaa09c9f1e3eff5b2945a13529"
+
+inherit waf-samba
+
+PACKAGECONFIG[attr] = ",,attr"
+
+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 \
+ "
+DISABLE_STATIC = ""
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
new file mode 100644
index 000000000..d1380eb2a
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
new file mode 100644
index 000000000..62fad2a54
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
new file mode 100644
index 000000000..edfb045a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
@@ -0,0 +1,27 @@
+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"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest
new file mode 100644
index 000000000..e67f18e55
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh
new file mode 100644
index 000000000..513085699
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh
new file mode 100644
index 000000000..3a667df82
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb
new file mode 100644
index 000000000..d3e6a5dda
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb
@@ -0,0 +1,65 @@
+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 \
+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lksctp/${BP}.tar.gz \
+ file://run-ptest \
+ file://v4test.sh \
+ file://v6test.sh \
+ "
+
+SRC_URI[md5sum] = "708bb0b5a6806ad6e8d13c55b067518e"
+SRC_URI[sha256sum] = "0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26"
+
+#| arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -shared -fPIC -DPIC .libs/bindx.o .libs/connectx.o .libs/peeloff.o .libs/opt_info.o .libs/addrs.o .libs/sendmsg.o .libs/recvmsg.o -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -O2 -Wl,--version-script=/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/lksctp-tools/1.0.16-r0/lksctp-tools-1.0.16/src/lib/Versions.map -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-soname -Wl,libsctp.so.1 -o .libs/libsctp.so.1.0.16
+#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.0/ld: error: symbol sctp_connectx has undefined version
+#| collect2: error: ld returned 1 exit status
+#| make[4]: *** [libsctp.la] Error 1
+PNBLACKLIST[lksctp-tools] ?= "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
+
+S = "${WORKDIR}/${BP}"
+
+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="${PV}"
+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/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch
new file mode 100644
index 000000000..9ecd707b4
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
new file mode 100644
index 000000000..b1bd926bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -0,0 +1,28 @@
+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://git.code.sf.net/p/linux-zigbee/linux-zigbee \
+ file://no-help2man.patch"
+SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"
+
+S = "${WORKDIR}/git"
+
+inherit autotools python-dir pkgconfig
+
+CACHED_CONFIGUREVARS += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}/lowpan-tools"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb
new file mode 100644
index 000000000..a90177f19
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/configure.patch
new file mode 100644
index 000000000..7001a0ed6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/configure.patch
@@ -0,0 +1,13 @@
+Index: memcached-1.4.17/configure.ac
+===================================================================
+--- memcached-1.4.17.orig/configure.ac 2013-12-20 21:44:49.000000000 +0000
++++ memcached-1.4.17/configure.ac 2014-07-18 07:17:00.593499483 +0000
+@@ -4,7 +4,7 @@
+ AC_INIT(memcached, VERSION_NUMBER, memcached@googlegroups.com)
+ AC_CANONICAL_SYSTEM
+ AC_CONFIG_SRCDIR(memcached.c)
+-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
++AM_INIT_AUTOMAKE([foreign])
+ AM_CONFIG_HEADER(config.h)
+
+ AC_PROG_CC
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
new file mode 100644
index 000000000..544b840fe
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.17.bb
new file mode 100644
index 000000000..293f8d4c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.4.17.bb
@@ -0,0 +1,53 @@
+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://configure.patch \
+ file://memcached-add-hugetlbfs-check.patch"
+
+# set the same COMPATIBLE_HOST as libhugetlbfs
+COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
+
+SRC_URI[md5sum] = "46402dfbd7faadf6182283dbbd18b1a6"
+SRC_URI[sha256sum] = "d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458"
+
+python __anonymous () {
+ endianness = d.getVar('SITEINFO_ENDIANNESS', True)
+ 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/import-layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb
new file mode 100644
index 000000000..7b737916b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb
@@ -0,0 +1,19 @@
+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=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
+
+SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "8d63592c9d4579ef20cf491b41843eb2"
+SRC_URI[sha256sum] = "c5d948920b641cc35f8b380fc356ddfe07cce6a9c6474afe242fc58113f28c06"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-gtk"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.11.bb
new file mode 100644
index 000000000..2ad75bda6
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
new file mode 100644
index 000000000..bea5e13f5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
@@ -0,0 +1,58 @@
+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"
+
+# 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"
+
+SRC_URI = "http://www.remlab.net/files/ndisc6/ndisc6-${PV}.tar.bz2 \
+"
+SRC_URI[md5sum] = "50cb4c19606cf6ff2b7388e71832f579"
+SRC_URI[sha256sum] = "6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools gettext
+
+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."
+
+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
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
new file mode 100644
index 000000000..89a646f51
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
@@ -0,0 +1,42 @@
+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"
+
+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"
+
+SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1"
+SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e"
+SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b"
+SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+do_configure[noexec] = "1"
+
+netcat_do_patch() {
+ cd ${S}
+ quilt pop -a || true
+ QUILT_PATCHES=${WORKDIR}/debian/patches QUILT_SERIES=${WORKDIR}/debian/patches/series quilt push -a
+}
+
+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 = "50"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc
new file mode 100644
index 000000000..91a24a106
--- /dev/null
+++ b/import-layers/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
+
+ALTERNATIVE_${PN} = "nc"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 000000000..dd1938a99
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 000000000..5cbcb08e8
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
new file mode 100644
index 000000000..9b0ed58d6
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
new file mode 100644
index 000000000..d961af542
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb
new file mode 100644
index 000000000..8fb69bb27
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb
@@ -0,0 +1,66 @@
+SUMMARY = "netcf"
+DESCRIPTION = "netcf is a cross-platform network configuration library."
+HOMEPAGE = "https://fedorahosted.org/netcf/"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994"
+PV = "0.2.8+git${SRCPV}"
+
+SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
+"
+
+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.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)}"
+PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
+
+do_configure_prepend() {
+ currdir=`pwd`
+ cd ${S}
+
+ # avoid bootstrap cloning gnulib on every configure
+ # the rmdir acts as a sentinel to let us know if the pkg ever changes
+ # the path for GNUlib or populates the dir making it non-empty.
+ rmdir ${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 ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ if [ -d "${D}${libdir}/systemd/system" ]; then
+ mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+ rm -rf ${D}${libdir}/systemd/
+ else
+ 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/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch
new file mode 100644
index 000000000..434b79049
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/init b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/init
new file mode 100644
index 000000000..8ba2a6373
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch
new file mode 100644
index 000000000..eff98bfde
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb
new file mode 100644
index 000000000..760bab0f3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.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"
+
+
+SRC_URI="ftp://ftp.netperf.org/netperf/archive/netperf-${PV}.tar.bz2 \
+ file://cpu_set.patch \
+ file://vfork.patch \
+ file://init"
+SRC_URI[md5sum] = "9654ffdfd4c4f2c93ce3733cd9ed9236"
+SRC_URI[sha256sum] = "cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
+
+inherit update-rc.d autotools
+
+S = "${WORKDIR}/netperf-${PV}"
+
+# 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 = "${@base_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} += "${@base_contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
+
+INITSCRIPT_NAME="netperf"
+INITSCRIPT_PARAMS="defaults"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
new file mode 100644
index 000000000..669c19ca0
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
new file mode 100644
index 000000000..c4aa10e3a
--- /dev/null
+++ b/import-layers/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 = bb.data.getVar("TARGET_OS", d, 1)
+ if os == "linux-uclibc":
+ raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
new file mode 100644
index 000000000..21aa92cb3
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
new file mode 100644
index 000000000..9ef569f15
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
@@ -0,0 +1,110 @@
+From a1ef10d63b0ea34c788d5432e94c72b00ae55e04 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Fri, 27 Feb 2015 12:04:10 -0500
+Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
+
+mapv4v6addr.h isn't always available, depending on your build, but
+nis-hosts.c only needs it for a single, inline function. So drop a copy
+here rather than playing games with the include path that would
+potentially lead to cross-compilation issues.
+
+Upstream-status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ nss_nis6/mapv4v6addr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ nss_nis6/nis-hosts.c | 2 +-
+ 2 files changed, 70 insertions(+), 1 deletion(-)
+ create mode 100644 nss_nis6/mapv4v6addr.h
+
+diff --git a/nss_nis6/mapv4v6addr.h b/nss_nis6/mapv4v6addr.h
+new file mode 100644
+index 0000000..7f85f7d
+--- /dev/null
++++ b/nss_nis6/mapv4v6addr.h
+@@ -0,0 +1,69 @@
++/*
++ * ++Copyright++ 1985, 1988, 1993
++ * -
++ * Copyright (c) 1985, 1988, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ * -
++ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
++ *
++ * 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, and that
++ * the name of Digital Equipment Corporation not be used in advertising or
++ * publicity pertaining to distribution of the document or software without
++ * specific, written prior permission.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
++ * CORPORATION 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.
++ * -
++ * --Copyright--
++ */
++
++#include <string.h>
++#include <arpa/nameser.h>
++
++static void
++map_v4v6_address (const char *src, char *dst)
++{
++ u_char *p = (u_char *) dst;
++ int i;
++
++ /* Move the IPv4 part to the right position. */
++ memcpy (dst + 12, src, INADDRSZ);
++
++ /* Mark this ipv6 addr as a mapped ipv4. */
++ for (i = 0; i < 10; i++)
++ *p++ = 0x00;
++ *p++ = 0xff;
++ *p = 0xff;
++}
+diff --git a/nss_nis6/nis-hosts.c b/nss_nis6/nis-hosts.c
+index af99c74..96d8fa1 100644
+--- a/nss_nis6/nis-hosts.c
++++ b/nss_nis6/nis-hosts.c
+@@ -36,7 +36,7 @@
+ #include "nss-nis6.h"
+
+ /* Get implementation for some internal functions. */
+-#include <resolv/mapv4v6addr.h>
++#include "mapv4v6addr.h"
+
+ #define ENTNAME hostent
+ #define DATABASE "hosts"
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
new file mode 100644
index 000000000..8c6837bac
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
new file mode 100644
index 000000000..b89f0b84a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
@@ -0,0 +1,48 @@
+# 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. \
+"
+
+PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+ file://domainname.service \
+ file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
+"
+SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
+SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
+
+DEPENDS = "libtirpc"
+
+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 \
+ --libdir=${libdir}/yp-nis/ \
+ --includedir=${includedir}/yp-nis/ \
+ "
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
new file mode 100644
index 000000000..1f8df42af
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
new file mode 100644
index 000000000..d113b82e8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
@@ -0,0 +1,58 @@
+# 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 \
+ ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ "
+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 \
+"
+SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
+SRC_URI[sha256sum] = "1930ce19f6ccfe10400f3497b31867f71690d2bcd3f5b575199fa915559b7746"
+
+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"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
new file mode 100644
index 000000000..cee5880f7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
@@ -0,0 +1,53 @@
+# 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. \
+"
+HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
+DEPENDS = "yp-tools ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PROVIDES += "ypbind"
+
+PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
+ file://ypbind.init \
+ file://ypbind.service \
+"
+SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
+SRC_URI[sha256sum] = "dc2f7d97c94dcab0acfdcd115cd8b464eb8c427e4bb0fe68404ae7465f517cd3"
+
+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"
+
+EXTRA_OECONF = "PKG_CONFIG_PATH='${STAGING_LIBDIR}/yp-nis/pkgconfig/'"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch
new file mode 100644
index 000000000..87a7778d9
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
new file mode 100644
index 000000000..dac561754
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
@@ -0,0 +1,41 @@
+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;startline=2;endline=24;md5=eda11d21005319bb76cbb6f911f0f66d"
+
+SRC_URI = "git://github.com/bsdphk/Ntimed \
+ file://use-ldflags.patch"
+
+PV = "0.0+git${SRCPV}"
+SRCREV = "db0abbb4c80f2ecef6bc5d9639bca5bea28532a2"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "\
+ 'CC=${CC}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+"
+
+do_configure () {
+ sh ./configure
+}
+
+do_compile () {
+ oe_runmake
+}
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
new file mode 100644
index 000000000..cb1e2f734
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
@@ -0,0 +1,17 @@
+--- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400
++++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400
+@@ -14,6 +14,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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf
new file mode 100644
index 000000000..676e18645
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd
new file mode 100755
index 000000000..d1b9c4907
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
new file mode 100644
index 000000000..d1fe6b7e2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
@@ -0,0 +1 @@
+ntpd.service
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service
new file mode 100644
index 000000000..0e3d7cd37
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate
new file mode 100755
index 000000000..17b64d133
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default
new file mode 100644
index 000000000..486b6e07d
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service
new file mode 100644
index 000000000..10cbd70f9
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
new file mode 100644
index 000000000..f8c5895b7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
@@ -0,0 +1 @@
+NTPSERVER="ntpserver.example.org"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service
new file mode 100644
index 000000000..4898b8a70
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p7.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p7.bb
new file mode 100644
index 000000000..ff4ba6415
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p7.bb
@@ -0,0 +1,160 @@
+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=f41fedb22dffefcbfafecc85b0f79cfa"
+
+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] = "46dfba933c3e4bc924d8e55068797578"
+SRC_URI[sha256sum] = "81d20c06a0b01abe3b84fac092185bf014252d38fe5e7b2758f604680a0220dc"
+
+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"
+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"
+
+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"
+# 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 ${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
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb
new file mode 100644
index 000000000..a275238a3
--- /dev/null
+++ b/import-layers/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} -o nuttcp nuttcp-${PV}.c
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 nuttcp ${D}${bindir}
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn
new file mode 100755
index 000000000..a3cd6a2f4
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
new file mode 100644
index 000000000..4a3dc4a46
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
@@ -0,0 +1 @@
+d /var/run/openvpn 0755 root root -
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
new file mode 100644
index 000000000..358dcb791
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb
new file mode 100644
index 000000000..f0109069c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.3.8.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=5aac200199fde47501876cba7263cb0c"
+DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
+ file://openvpn \
+ file://openvpn@.service \
+ file://openvpn-volatile.conf"
+
+SRC_URI[md5sum] = "51d996f1f1fc30f501ae251a254effeb"
+SRC_URI[sha256sum] = "532435eff61c14b44a583f27b72f93e7864e96c95fe51134ec0ad4b1b1107c51"
+
+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-password-save --enable-iproute2"
+EXTRA_OECONF += "${@base_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=/sbin/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 ${@base_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 -m 755 ${D}/${localstatedir}/run/
+ install -d -m 755 ${D}/${localstatedir}/run/openvpn
+
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${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 \
+ /run"
+FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+ ${systemd_unitdir}/system/openvpn@loopback-client.service \
+ ${sysconfdir}/openvpn/sample/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb
new file mode 100644
index 000000000..34690437d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.1.8.bb
@@ -0,0 +1,19 @@
+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://troglobit.com/pimd/${BP}.tar.bz2"
+SRC_URI[md5sum] = "a12448bc7c9bfcebf51a13ebf1ffa962"
+SRC_URI[sha256sum] = "01016940543a0a6131d4e6c91b595d47e187012c59a298eec14c3dbc38564b3a"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+CFLAGS += "-I ${S}/include "
+
+do_install() {
+ unset datadir
+ unset mandir
+ oe_runmake 'DESTDIR=${D}' install
+}
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.0.0.bb
new file mode 100644
index 000000000..9b6fc2f38
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch
new file mode 100644
index 000000000..0cb981cf7
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb
new file mode 100644
index 000000000..32caec6bf
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
new file mode 100644
index 000000000..da96983e6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
@@ -0,0 +1,98 @@
+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 ff33824..bd21446 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
+@@ -142,7 +142,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, chunk_t g, chunk_t p)
+ {
+ private_openssl_diffie_hellman_t *this;
+@@ -197,5 +197,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
+
+ 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 53dc59c..eb69eaa 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
+@@ -44,8 +44,10 @@ struct openssl_diffie_hellman_t {
+ * @param p custom prime, 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, chunk_t g, chunk_t p);
++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 ff25086..c76873d 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
++++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
+@@ -388,6 +388,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
+--
+1.8.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/install-strongswan-swanctl-service.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/install-strongswan-swanctl-service.patch
new file mode 100644
index 000000000..86baccf4f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/install-strongswan-swanctl-service.patch
@@ -0,0 +1,22 @@
+commit 44cbabd8a42bc2a436562ed33fb8c89fa6b75b6e
+Author: Chris Patterson <pattersonc@ainfosec.com>
+Date: Fri Dec 18 08:31:48 2015 -0500
+
+ strongswan-swanctl.service.in: match install used by strongswan.service
+
+ Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
+
+Upstream-Status: Submitted
+https://github.com/strongswan/strongswan/pull/25
+
+diff --git a/init/systemd-swanctl/strongswan-swanctl.service.in b/init/systemd-swanctl/strongswan-swanctl.service.in
+index 818d352..944101f 100644
+--- a/init/systemd-swanctl/strongswan-swanctl.service.in
++++ b/init/systemd-swanctl/strongswan-swanctl.service.in
+@@ -7,3 +7,6 @@ Type=notify
+ ExecStart=@SBINDIR@/charon-systemd
+ ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
+ ExecReload=@SBINDIR@/swanctl --reload
++
++[Install]
++WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/support-newer-systemd.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/support-newer-systemd.patch
new file mode 100644
index 000000000..550cf6758
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/support-newer-systemd.patch
@@ -0,0 +1,69 @@
+commit 82498129e0a91dfc3ed2c4ec3b2252f44655b83c
+Author: Chris Patterson <pattersonc@ainfosec.com>
+Date: Fri Dec 18 08:27:57 2015 -0500
+
+ configure: support systemd >= 209
+
+ libsystemd-journal and libsystemd-daemon are now just
+ part of libsystemd.
+
+ Keep original systemd checks as a fallback.
+
+ Updates charon-systemd/Makefile.am accordingly.
+
+ Tested on:
+ - debian wheezy (systemd v44)
+ - ubuntu 15.10 (systemd v255).
+
+ Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
+
+Upstream-Status: Submitted
+https://github.com/strongswan/strongswan/pull/24
+
+diff --git a/configure.ac b/configure.ac
+index 3d71ce0..f6c0426 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -941,13 +941,17 @@ if test x$systemd = xtrue; then
+ AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
+ fi
+
+- PKG_CHECK_MODULES(systemd_daemon, [libsystemd-daemon])
+- AC_SUBST(systemd_daemon_CFLAGS)
+- AC_SUBST(systemd_daemon_LIBS)
+-
+- PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal])
+- AC_SUBST(systemd_journal_CFLAGS)
+- AC_SUBST(systemd_journal_LIBS)
++ PKG_CHECK_MODULES(systemd, [libsystemd >= 209],
++ [AC_SUBST(systemd_CFLAGS)
++ AC_SUBST(systemd_LIBS)],
++ [PKG_CHECK_MODULES(systemd_daemon, [libsystemd-daemon])
++ AC_SUBST(systemd_daemon_CFLAGS)
++ AC_SUBST(systemd_daemon_LIBS)
++
++ PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal])
++ AC_SUBST(systemd_journal_CFLAGS)
++ AC_SUBST(systemd_journal_LIBS)
++ ])
+ fi
+
+ if test x$tss = xtrousers; then
+diff --git a/src/charon-systemd/Makefile.am b/src/charon-systemd/Makefile.am
+index 1b9ac15..ee85d43 100644
+--- a/src/charon-systemd/Makefile.am
++++ b/src/charon-systemd/Makefile.am
+@@ -9,11 +9,11 @@ charon_systemd_CPPFLAGS = \
+ -I$(top_srcdir)/src/libstrongswan \
+ -I$(top_srcdir)/src/libhydra \
+ -I$(top_srcdir)/src/libcharon \
+- $(systemd_daemon_CFLAGS) $(systemd_journal_CFLAGS) \
++ $(systemd_CFLAGS) $(systemd_daemon_CFLAGS) $(systemd_journal_CFLAGS) \
+ -DPLUGINS=\""${charon_plugins}\""
+
+ charon_systemd_LDADD = \
+ $(top_builddir)/src/libstrongswan/libstrongswan.la \
+ $(top_builddir)/src/libhydra/libhydra.la \
+ $(top_builddir)/src/libcharon/libcharon.la \
+- $(systemd_daemon_LIBS) $(systemd_journal_LIBS) -lm $(PTHREADLIB) $(DLLIB)
++ $(systemd_LIBS) $(systemd_daemon_LIBS) $(systemd_journal_LIBS) -lm $(PTHREADLIB) $(DLLIB)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.3.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.3.2.bb
new file mode 100644
index 000000000..7ec1a8ee1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.3.2.bb
@@ -0,0 +1,57 @@
+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://support-newer-systemd.patch \
+ file://install-strongswan-swanctl-service.patch \
+"
+
+SRC_URI[md5sum] = "fab014be1477ef4ebf9a765e10f8802c"
+SRC_URI[sha256sum] = "a4a9bc8c4e42bdc4366a87a05a02bf9f425169a7ab0c6f4482d347e44acbf225"
+
+EXTRA_OECONF = " \
+ --without-lib-prefix \
+"
+
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+
+PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
+ ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-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} ${libdir}/ipsec/plugins/*.so"
+FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libdir}/ipsec/plugins/.debug ${libexecdir}/ipsec/.debug"
+FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/plugins/*.la"
+FILES_${PN}-staticdev += "${libdir}/ipsec/*.a ${libdir}/ipsec/plugins/*.a"
+
+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/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.28.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.28.bb
new file mode 100644
index 000000000..0a8bcd8bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.28.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Program for providing universal TLS/SSL tunneling service"
+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"
+
+SRC_URI[md5sum] = "2c39ae0be771f91bf5b0205beafddca6"
+SRC_URI[sha256sum] = "9a25b87b1ef0c08fa3d796edce07b4408e6a8acece23de2eb7ee9285b78852b5"
+
+inherit autotools
+
+EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips"
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES','systemd','systemd','',d)}"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
new file mode 100644
index 000000000..358f6050f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
@@ -0,0 +1,38 @@
+From 7b259580800e259d232229dc89f97058b56e2fe8 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 8c35a45..4fb8ae6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -428,9 +428,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
++
+ tags: $(TAGFILES)
+ ctags -wtd $(TAGFILES)
+
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest
new file mode 100755
index 000000000..c03a8b8ef
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch
new file mode 100644
index 000000000..50e2d5439
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch
@@ -0,0 +1,31 @@
+[PATCH] tcpdump: cross-compiling not check dlpi.
+
+For cross-compiling on Linux platforms, we do not need to check libdlpi
+since it is only placed on Solaris.
+Also, checking libdlpi in native /lib would cause do_qa_configure fail.
+
+Upstream-Status: Pending.
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ configure.in | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 7f9591c..ca277c0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -716,7 +716,9 @@ don't.])
+ fi
+
+ # libdlpi is needed for Solaris 11 and later.
+-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
++if test "$cross_compiling" != yes; then
++ AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
++fi
+
+ dnl portability macros for getaddrinfo/getnameinfo
+ dnl
+--
+1.7.5.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
new file mode 100644
index 000000000..d7a3ac23b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
@@ -0,0 +1,33 @@
+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 06fade1..9125de7 100644
+--- a/configure.in
++++ b/configure.in
+@@ -567,7 +567,7 @@ AC_SEARCH_LIBS(getrpcbynumber, nsl,
+ dnl AC_CHECK_LIB(z, uncompress)
+ dnl AC_CHECK_HEADERS(zlib.h)
+
+-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
+--
+1.7.9.5
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb
new file mode 100644
index 000000000..150e55fd7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.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://tcpdump-configure-dlpi.patch \
+ file://add-ptest.patch \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "58af728de36f499341918fc4b8e827c3"
+SRC_URI[sha256sum] = "6be520269a89036f99c0b2126713a60965953eab921002b07608ccfc0c47d9af"
+export LIBS=" -lpcap"
+
+inherit autotools-brokensep ptest
+CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
+
+PACKAGECONFIG ??= "openssl ipv6"
+PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
+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/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch
new file mode 100644
index 000000000..386b7f83a
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch
new file mode 100644
index 000000000..0a7359311
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb
new file mode 100644
index 000000000..293760ffc
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch
new file mode 100755
index 000000000..a856b1809
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch
@@ -0,0 +1,92 @@
+Uptream-Status: Pending
+
+Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -402,7 +402,6 @@
+
+ dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
+ dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167
+-libpcap_version_096=no
+ AC_RUN_IFELSE(AC_LANG_PROGRAM([[
+ #include <string.h>
+ #include <stdlib.h>
+@@ -419,11 +418,12 @@
+ exit(0);
+
+ exit(1);
+-]]), [
+- libpcap_version_096=yes
+-])
++]]),
++ [libpcap_version_096=yes],
++ [libpcap_version_096=no],
++ [libpcap_version_096=yes]
++)
+
+-libpcap_ver8=no
+ AC_RUN_IFELSE(AC_LANG_PROGRAM([[
+ #include <string.h>
+ #include <stdlib.h>
+@@ -444,13 +444,12 @@
+ exit(0);
+
+ exit(1);
+-]]), [
+- libpcap_ver8=yes
+-], [
+- libpcap_ver8=no
+-])
++]]),
++ [libpcap_ver8=yes],
++ [libpcap_ver8=no],
++ [libpcap_ver8=yes]
++)
+
+-libpcap_ver7=no
+ AC_RUN_IFELSE(AC_LANG_PROGRAM([[
+ #include <string.h>
+ #include <stdlib.h>
+@@ -469,11 +468,11 @@
+ exit(0);
+
+ exit(1);
+-]]), [
+- libpcap_ver7=yes
+-], [
+- libpcap_ver7=no
+-])
++]]),
++ [libpcap_ver7=yes],
++ [libpcap_ver7=no],
++ [libpcap_ver7=yes]
++)
+
+ if test x$libpcap_ver8 = xyes ; then
+ AC_MSG_RESULT(>= 0.8.0)
+@@ -761,8 +760,8 @@
+
+ have_bpf=no
+ dnl Check for BSD's BPF
+-AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf,
++[AC_TRY_RUN([
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+@@ -796,8 +795,11 @@
+ [Do we have BPF device support?])
+ AC_MSG_RESULT(yes)
+ have_bpf=yes
+-],[
+- AC_MSG_RESULT(no)
++],
++[AC_MSG_RESULT(no)],
++[AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_have_bpf=(yes|no) will help])]
++)
+ ])
+
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch
new file mode 100644
index 000000000..5f36c68c9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch
@@ -0,0 +1,17 @@
+Uptream-Status: Pending
+
+Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
+
+Index: tcpreplay-3.4.4/configure.ac
+===================================================================
+--- tcpreplay-3.4.4.orig/configure.ac
++++ tcpreplay-3.4.4/configure.ac
+@@ -389,7 +389,7 @@ CFLAGS="$CFLAGS -I$LPCAPINCDIR"
+ AC_SEARCH_LIBS([pcap_close], [pcap],
+ LPCAPLIB="$LIBS",
+ AC_ERROR([Unable to link libpcap in ${foundpcap}]),
+- -lnl)
++ -lnl-3)
+
+ AC_SUBST(LPCAPINC)
+ AC_SUBST(LPCAPLIB)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
new file mode 100644
index 000000000..50f024c67
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
@@ -0,0 +1,33 @@
+tcpreplay: improve search for libpcap
+
+Add a test which will find libpcap if $testdir/.. is a sysroot.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -350,14 +350,20 @@ for testdir in $trypcapdir /usr/local /o
+ if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
+ LPCAPINC="${testdir}/include/pcap.h"
+ LPCAPINCDIR="${testdir}/include"
++ # If testdir/.. is a sysroot, then sDir should point to where the libraries are.
++ sDir=$(readlink -m ${testdir}/../${libdir})
+ if test $dynamic_link = yes; then
+- if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
++ if test -f "${sDir}/libpcap${shrext_cmds}" ; then
++ LPCAPLIB="-L${sDir} -lpcap"
++ elif test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib64 -lpcap"
+ elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib -lpcap"
+ else
+ AC_ERROR([Unable to find libpcap in ${testdir}])
+ fi
++ elif test -f "${sDir}/libpcap.${libext}" ; then
++ LPCAPLIB="${sDir}/libpcap.${libext}"
+ elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
+ elif test -f "${testdir}/lib/libpcap.${libext}" ; then
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch
new file mode 100644
index 000000000..3c11c922b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch
@@ -0,0 +1,15 @@
+Uptream-Status: Pending
+
+Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -758,6 +758,8 @@
+ AC_MSG_RESULT(no)
+ ])
+
++ac_cv_have_bpf=no
++
+ have_bpf=no
+ dnl Check for BSD's BPF
+ AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf,
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
new file mode 100644
index 000000000..ccbab9f08
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
@@ -0,0 +1,23 @@
+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=c33cccf72cc1603e8a72a84811ae3ac8"
+
+SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.tar.gz \
+ file://tcpreplay-3.4.4-cross-compile.patch \
+ file://tcpreplay-3.4.4-no-bfp-support.patch \
+ file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \
+ file://tcpreplay-3.4.4-improve-search-for-libpcap.patch \
+ "
+SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180"
+SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f"
+
+DEPENDS = "libpcap"
+
+EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
+
+inherit siteinfo autotools-brokensep
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch
new file mode 100644
index 000000000..1bda576bc
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20130505.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20130505.bb
new file mode 100644
index 000000000..7d1c5152b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20130505.bb
@@ -0,0 +1,36 @@
+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] = "66e218d02ec7d9fc39ab70ba2900305a"
+SRC_URI[sha256sum] = "6f650e25f6fd51538f677b789b49379f367ae9f1dee74c94cfe24d92abc2cffb"
+
+PACKAGECONFIG ?= "openssl"
+PACKAGECONFIG[openssl] = "--enable-ssl, --disable-ssl --with-ssl=no, openssl"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch b/import-layers/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/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.0.21.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.0.21.bb
new file mode 100644
index 000000000..09da1ef57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.0.21.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] = "79289adabd6f3ebf9160fc0815ab3150"
+SRC_URI[sha256sum] = "f7ac93ef30b13a587292b8d6a7e2538a65bc978a3a576eab238c392b884e96e0"
+
+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}
+ install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir}
+ ln -s ${BPN}.8 ${D}${mandir}/${BPN}6.8
+ ln -s ${BPN}.8 ${D}${mandir}/tcptraceroute.8
+
+}
+
+ALTERNATIVE_PRIORITY = "60"
+ALTERNATIVE_${PN} = "traceroute"
+ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
new file mode 100644
index 000000000..e95cfa523
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
@@ -0,0 +1,15 @@
+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"
+
+do_compile() {
+ oe_runmake tunctl
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install -m 755 tunctl ${D}/${sbindir}
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb
new file mode 100644
index 000000000..dd265612f
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/README b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/README
new file mode 100644
index 000000000..63b5b7263
--- /dev/null
+++ b/import-layers/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/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch
new file mode 100644
index 000000000..64a08add7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch
@@ -0,0 +1,46 @@
+[PATCH] Do not set CC_FOR_BUILD flags
+
+Upstream-status: Pending
+
+AC_WIRESHARK_COMPILER_FLAGS_CHECK() is checking which options CC is supported,
+and put the supported options into CFLAGS, but it should not put them into
+CFLAGS_FOR_BUILD. since CC and BUILD_CC can be different, CFLAGS_FOR_BUILD is
+used by BUILD_CC
+
+BUILD_CC is used to generated host tools, do not use the gcc's optimised options,
+do not effect the running of host tools. so do not set CC_FOR_BUILD flags.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ acinclude.m4 | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 136fc27..8d3d360 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1755,10 +1755,6 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
+ # just the new option.
+ #
+ CFLAGS="$CFLAGS_saved $GCC_OPTION"
+- #
+- # Add it to the flags we use when building build tools.
+- #
+- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ ],
+ [
+ AC_MSG_RESULT(yes)
+@@ -1771,10 +1767,6 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
+ # just the new option.
+ #
+ CFLAGS="$CFLAGS_saved $GCC_OPTION"
+- #
+- # Add it to the flags we use when building build tools.
+- #
+- CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION"
+ fi
+ ],
+ [
+--
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.0.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.0.2.bb
new file mode 100644
index 000000000..f3061727f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.0.2.bb
@@ -0,0 +1,60 @@
+DESCRIPTION = "wireshark - a popular network protocol analyzer"
+HOMEPAGE = "http://www.wireshark.org"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://README.linux;md5=631e077455b7972172eb149195e065b0"
+
+DEPENDS = "perl-native pcre expat glib-2.0 sbc"
+
+SRC_URI = "https://2.na.dl.wireshark.org/src/all-versions/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "204d053e0796c7da09292e0b54bc8503"
+SRC_URI[sha256sum] = "e921fb072085a5654d899949bb561d0687f4819f7b63ba35777bb949a9b6b9c1"
+
+PE = "1"
+
+inherit autotools pkgconfig
+
+ARM_INSTRUCTION_SET = "arm"
+
+# Works with either gtk+ or gtk3.
+WHICH_GTK = "gtk+"
+
+PACKAGECONFIG ?= "libpcap gnutls libnl libcap"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
+#PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gtk3", "", d)}"
+
+PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_LIBDIR}, --with-libcap=no --enable-pcap-ng-default , libcap"
+PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_LIBDIR} --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-gtk2=yes, --with-gtk2=no, gtk+"
+PACKAGECONFIG[gtk3] = "--with-gtk3=yes, --with-gtk3=no, gtk+3"
+PACKAGECONFIG[graphics] = "--enable-wireshark, --disable-wireshark,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
+PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt=yes, --with-gcrypt=no, libgcrypt"
+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"
+
+# these next two options require addional layers
+PACKAGECONFIG[adns] = "--with-adns=yes, --with-adns=no, adns"
+PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
+
+EXTRA_OECONF += "--with-qt=no --enable-usr-local=no --enable-tshark --enable-rawshark"
+
+do_configure_prepend() {
+ # force to use fallback
+ sed -i -e '/^glib_prefix/s/=.*$/=""/' ${S}/aclocal-flags
+}
+
+ALLOW_EMPTY_${PN} = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+FILES_${PN} += "${datadir}*"
OpenPOWER on IntegriCloud