summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch29
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch21
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch11
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch58
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch57
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb36
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb35
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch29
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch31
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb24
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch48
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb16
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch14
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch18
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch13
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius110
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch197
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch70
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch31
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch61
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch236
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch55
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch89
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch160
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf2
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service16
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd3
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb222
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch31
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch83
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch29
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch14
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch26
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils20
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils23
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils21
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils13
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils19
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch17
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb206
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch44
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb34
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb16
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb42
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb39
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch77
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch53
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch35
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch72
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch62
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch77
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch47
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb143
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb27
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb13
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb21
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch75
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch147
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch2087
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch142
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch79
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch23
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch16
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch28
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch59
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch14
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch85
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch15
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch16
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb37
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb17
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch57
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch58
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch64
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch15
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch87
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba3
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb318
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch42
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb33
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch33
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch29
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch62
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch60
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch60
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch85
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init109
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb105
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch25
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch118
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch20
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch32
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch107
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch77
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb56
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch22
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb38
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch26
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch49
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch40
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch66
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch36
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch42
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf19
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help168
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb59
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb20
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch27
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb24
139 files changed, 9060 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch
new file mode 100644
index 000000000..16800d506
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch
@@ -0,0 +1,29 @@
+From 1e1a78b7b4fa1662b4447aa19c15b1e839b7e9db Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
+Date: Wed, 24 Aug 2016 10:58:45 +0200
+Subject: [PATCH] Makefile: respect LDFLAGS for libreg
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Stefan MĂĽller-Klieser <s.mueller-klieser@phytec.de>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 2879896..1650db8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(LIBREG): regdb.h reglib.h reglib.c
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
new file mode 100644
index 000000000..747804d34
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
@@ -0,0 +1,11 @@
+--- crda-3.18/utils/key2pub.py.orig 2016-06-18 09:54:23.671326113 -0400
++++ crda-3.18/utils/key2pub.py 2016-06-18 09:54:34.387326300 -0400
+@@ -115,7 +115,7 @@
+ .n = _n, .len_n = sizeof(_n), \
+ }
+
+-static const struct key_params keys[] = {
++static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
new file mode 100644
index 000000000..1bb5c638f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
@@ -0,0 +1,58 @@
+From 8d2164a090f17286ea8291f30a123595cf447dc3 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Wed, 30 Nov 2016 10:27:36 +0800
+Subject: [PATCH] crda: fix issues when 'USE_OPENSSL=1'.
+
+Fxed the below issues if configured with 'USE_OPENSSL=1':
+a. keys-ssl.c uses BN_ULONG but doesn't include the openssl headers leading
+ to build failures:
+ keys-ssl.c:2:8: error: unknown type name 'BN_ULONG'
+ static BN_ULONG e_0[1] = {
+
+b. The large unqualified constants also break building:
+ keys-ssl.c:8:2: warning: overflow in implicit constant conversion [-Woverflow]
+ 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b,
+
+c. keys-ssl.c: error: 'keys' defined but not used [-Werror=unused-variable]
+ static struct pubkey keys[] = {
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ utils/key2pub.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 401d58a..3ae00b8 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -24,7 +24,7 @@ def print_ssl_64(output, name, val):
+ for v1, v2, v3, v4, v5, v6, v7, v8 in vnew:
+ if not idx:
+ output.write('\t')
+- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
++ output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2xULL, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8)))
+ idx += 1
+ if idx == 2:
+ idx = 0
+@@ -60,6 +60,7 @@ def print_ssl_32(output, name, val):
+ def print_ssl(output, name, val):
+ import os
+ output.write('#include <stdint.h>\n')
++ output.write('#include <openssl/bn.h>\n')
+ if os.getenv('TARGET_BITS') == '64':
+ return print_ssl_64(output, name, val)
+ else:
+@@ -78,7 +79,7 @@ struct pubkey {
+
+ #define KEYS(e,n) { KEY(e), KEY(n), }
+
+-static struct pubkey keys[] = {
++static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
new file mode 100644
index 000000000..812e98379
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
@@ -0,0 +1,57 @@
+From 890f5bf2654b695a866262d72bfa9750af921a3b Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 12:26:37 -0700
+Subject: [PATCH] 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>
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a3ead30..da2dcc3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic
+ CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+-LDLIBS += -lm
++LIBREGLDLIBS += -lm
+ LIBREG += libreg.so
+ LDFLAGS += -L ./
+
+@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
+
+ 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`
+
+ $(LIBREG): keys-ssl.c
+
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LIBREGLDLIBS += -lgcrypt
+
+ $(LIBREG): keys-gcrypt.c
+
+@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(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'
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
new file mode 100644
index 000000000..0b737852c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
@@ -0,0 +1,25 @@
+These headers are not related to any Make rule but they do appear in
+compiling of libreg.so, specifying .h files in compiler cmdline is flagged
+as error by clang
+
+| clang-4.0: error: cannot specify -o when generating multiple output files
+| make: *** [libreg.so] Error 1
+
+This is how we see headers in cmdline
+-O2 -fpic -std=gnu
+99 -Wall -Werror -pedantic -Wall -g -DUSE_GCRYPT -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -o libreg.so -shared -Wl,-soname,libreg.so
+regdb.h reglib.h reglib.c keys-gcrypt.c -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -L ./ -lm -lgcrypt
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/Makefile.kk 2016-11-15 04:54:53.338670000 +0000
++++ a/Makefile 2016-11-15 04:55:07.718670000 +0000
+@@ -114,7 +114,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+ $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
+ $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
+
+-$(LIBREG): regdb.h reglib.h reglib.c
++$(LIBREG): reglib.c
+ $(NQ) ' CC ' $@
+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS)
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch
new file mode 100644
index 000000000..100b765f2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch
@@ -0,0 +1,34 @@
+From c1c42513edd27c97341f2033af77c13a4724eb8f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 25 Nov 2016 16:48:01 +0800
+Subject: [PATCH] crda: Use target word size instead of host's.
+
+In key2pub.py, the codes check the wordsize
+of the host machine but not the target's, this fix
+fetches the wordsize of target from the build system.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ utils/key2pub.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 3e84cd2..401d58a 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -58,9 +58,9 @@ def print_ssl_32(output, name, val):
+ output.write('};\n\n')
+
+ def print_ssl(output, name, val):
+- import struct
++ import os
+ output.write('#include <stdint.h>\n')
+- if len(struct.pack('@L', 0)) == 8:
++ if os.getenv('TARGET_BITS') == '64':
+ return print_ssl_64(output, name, val)
+ else:
+ return print_ssl_32(output, name, val)
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
new file mode 100644
index 000000000..82a297b33
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Wireless Central Regulatory Domain Agent"
+HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+SECTION = "net"
+LICENSE = "copyleft-next-0.3.0"
+LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe"
+
+DEPENDS = "python-m2crypto-native python-typing-native python-native libgcrypt libnl openssl"
+
+SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
+ file://do-not-run-ldconfig-if-destdir-is-set.patch \
+ file://fix-linking-of-libraries-used-by-reglib.patch \
+ file://fix-gcc-6-unused-variables.patch \
+ file://0001-Makefile-respect-LDFLAGS-for-libreg.patch \
+ file://make.patch \
+ file://use-target-word-size-instead-of-host-s.patch \
+ file://fix-issues-when-USE_OPENSSL-1.patch \
+"
+SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
+SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
+
+inherit python-dir pythonnative
+# Recursive make problem
+EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'"
+EXTRA_OEMAKE_append = " USE_OPENSSL=1"
+TARGET_BITS = "${SITEINFO_BITS}"
+export TARGET_BITS
+
+do_compile() {
+ oe_runmake all_noverify
+}
+
+do_install() {
+ oe_runmake SBINDIR=${sbindir}/ install
+}
+
+RDEPENDS_${PN} = "udev wireless-regdb"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
new file mode 100644
index 000000000..ec35175a0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
@@ -0,0 +1,35 @@
+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 \
+ file://0001-correct-the-location-of-unistd.h.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}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+SRC_URI[md5sum] = "2cd6da422a72c129c685fc4bb848c24c"
+SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb"
+
+inherit autotools
+
+DISABLE_STATIC = ""
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch b/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
new file mode 100644
index 000000000..4798a77f5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
@@ -0,0 +1,29 @@
+From 10e7d4e4bfcb70344d18f0d4ce36068475747f25 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 15:59:43 -0700
+Subject: [PATCH] correct the location of unistd.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ os-daq-modules/daq_ipfw.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c
+index 016beb0..c2a4175 100644
+--- a/os-daq-modules/daq_ipfw.c
++++ b/os-daq-modules/daq_ipfw.c
+@@ -23,10 +23,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <unistd.h>
+
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb b/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb
new file mode 100644
index 000000000..885c6c0e2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.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] = "2465624b62c1154f0e89dc69c42c849b"
+SRC_URI[sha256sum] = "6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e"
+
+inherit autotools-brokensep
+
+PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', '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/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch
new file mode 100644
index 000000000..42d2627a1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch
@@ -0,0 +1,48 @@
+Index: git/ClntMessages/ClntMsgRequest.cpp
+===================================================================
+--- git.orig/ClntMessages/ClntMsgRequest.cpp
++++ git/ClntMessages/ClntMsgRequest.cpp
+@@ -142,7 +142,10 @@ TClntMsgRequest::TClntMsgRequest(List(TA
+ IsDone=false;
+ SPtr<TOpt> ptr;
+ ptr = new TOptDUID(OPTION_CLIENTID, ClntCfgMgr().getDUID(), this );
+- Options.push_back( ptr );
++
++ if ( ptr ) {
++ Options.push_back( ptr );
++ }
+
+ if (!srvDUID) {
+ Log(Error) << "Unable to send REQUEST: ServerId not specified.\n" << LogEnd;
+@@ -153,7 +156,9 @@ TClntMsgRequest::TClntMsgRequest(List(TA
+ ptr = new TOptDUID(OPTION_SERVERID, srvDUID,this);
+ // all IAs provided by checkSolicit
+ SPtr<TAddrIA> ClntAddrIA;
+- Options.push_back( ptr );
++ if ( ptr ) {
++ Options.push_back( ptr );
++ }
+
+ IAs.first();
+ while (ClntAddrIA = IAs.get())
+Index: git/Messages/Msg.cpp
+===================================================================
+--- git.orig/Messages/Msg.cpp
++++ git/Messages/Msg.cpp
+@@ -69,10 +69,15 @@ int TMsg::getSize()
+ {
+ int pktsize=0;
+ TOptList::iterator opt;
++ int optionCount = 0;
+ for (opt = Options.begin(); opt!=Options.end(); ++opt)
+ {
+- pktsize += (*opt)->getSize();
++ Log(Info) << "### CPE Debug - Option with index " << optionCount++ << LogEnd ;
++ Log(Info) << "### CPE Debug - Option with type " << (*opt)->getOptType() << LogEnd ;
++ pktsize += (*opt)->getSize();
+ }
++ Log(Info) << "### CPE Debug - Packet size of option (Add 4) " << pktsize << LogEnd ;
++
+ return pktsize + 4;
+ }
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
new file mode 100644
index 000000000..8890e1431
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Dibbler DHCPv6 client"
+DESCRIPTION = "Dibbler is a portable DHCPv6 implementation. It supports stateful as well as stateless autoconfiguration for IPv6."
+HOMEPAGE = "http://klub.com.pl/dhcpv6"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3"
+
+SRCREV = "c4b0ed52e751da7823dd9a36e91f93a6310e5525"
+
+SRC_URI = "git://github.com/tomaszmrugalski/dibbler \
+ file://dibbler_fix_getSize_crash.patch \
+ "
+PV = "1.0.1+1.0.2RC1+git${SRCREV}"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= "debug bind-reuse resolvconf dns-update"
+
+PACKAGECONFIG[debug] = "--enable-debug,,,"
+PACKAGECONFIG[efence] = "--enable-efence,,,"
+PACKAGECONFIG[bind-reuse] = "--enable-bind-reuse,,,"
+PACKAGECONFIG[dst-addr-filter] = "--enable-dst-addr-check,,,"
+PACKAGECONFIG[resolvconf] = "--enable-resolvconf,,,"
+PACKAGECONFIG[dns-update] = "--enable-dns-update,,,"
+PACKAGECONFIG[auth] = "--enable-auth,,,"
+PACKAGECONFIG[gtest] = "--enable-gtest-static,,,"
+
+inherit autotools
+
+DEPENDS += "flex-native"
+
+PACKAGES =+ "${PN}-requestor ${PN}-client ${PN}-relay ${PN}-server"
+
+FILES_${PN}-client = "${sbindir}/${PN}-client"
+FILES_${PN}-relay = "${sbindir}/${PN}-relay"
+FILES_${PN}-requestor = "${sbindir}/${PN}-requestor"
+FILES_${PN}-server = "${sbindir}/${PN}-server"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb
new file mode 100644
index 000000000..51e220c9e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb
@@ -0,0 +1,16 @@
+SUMMARY = "daemon that sends updates when your IP changes"
+HOMEPAGE = "http://sourceforge.net/projects/ez-ipupdate/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7783169b4be06b54e86730eb01bc3a31"
+
+SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+ file://Makefile.am.patch \
+ file://cache_file.c.patch \
+ file://conf_file.c.patch \
+ file://wformat.patch \
+ "
+SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020"
+SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20"
+
+inherit autotools pkgconfig
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch
new file mode 100644
index 000000000..d80ed3e29
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch
@@ -0,0 +1,14 @@
+Remove EXTRASRC and EXTRAOBJ from obj list
+
+--- ez-ipupdate-3.0.11b7/Makefile.am.orig 2014-07-02 13:47:50.758034983 -0600
++++ ez-ipupdate-3.0.11b7/Makefile.am 2014-07-02 13:48:38.406034650 -0600
+@@ -1,7 +1,7 @@
+
+ bin_PROGRAMS = ez-ipupdate
+-ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h @EXTRASRC@
+-ez_ipupdate_LDADD = @EXTRAOBJ@
++ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h
++ez_ipupdate_LDADD =
+
+ EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf example-dhs.conf example-dyndns.conf example-ods.conf example-tzo.conf example-gnudip.conf example-easydns.conf example-justlinux.conf example-dyns.conf CHANGELOG mkbinary example-heipv6tb.conf
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch
new file mode 100644
index 000000000..de5eb3a6d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch
@@ -0,0 +1,32 @@
+Dont assume errno type
+
+--- ez-ipupdate-3.0.11b7/cache_file.c.orig 2014-07-02 14:01:07.126029412 -0600
++++ ez-ipupdate-3.0.11b7/cache_file.c 2014-07-02 14:08:27.422026332 -0600
+@@ -43,11 +43,11 @@
+ #include <cache_file.h>
+
+ #if HAVE_STRERROR
+-extern int errno;
++# include <errno.h>
+ # define error_string strerror(errno)
+ #elif HAVE_SYS_ERRLIST
+ extern const char *const sys_errlist[];
+-extern int errno;
++# include <errno.h>
+ # define error_string (sys_errlist[errno])
+ #else
+ # define error_string "error message not found"
+@@ -63,11 +63,11 @@
+ # define dprintf(x)
+ #endif
+ #if HAVE_STRERROR
+-extern int errno;
++# include <errno.h>
+ # define error_string strerror(errno)
+ #elif HAVE_SYS_ERRLIST
+ extern const char *const sys_errlist[];
+-extern int errno;
++# include <errno.h>
+ # define error_string (sys_errlist[errno])
+ #else
+ # define error_string "error message not found"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch
new file mode 100644
index 000000000..02218a39e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch
@@ -0,0 +1,18 @@
+Dont assume errno type
+
+--- ez-ipupdate-3.0.11b7/conf_file.c.orig 2014-07-02 14:01:19.174029328 -0600
++++ ez-ipupdate-3.0.11b7/conf_file.c 2014-07-02 14:08:42.982026223 -0600
+@@ -38,11 +38,11 @@
+ #include <conf_file.h>
+
+ #if HAVE_STRERROR
+-extern int errno;
++# include <errno.h>
+ # define error_string strerror(errno)
+ #elif HAVE_SYS_ERRLIST
+ extern const char *const sys_errlist[];
+-extern int errno;
++# include <errno.h>
+ # define error_string (sys_errlist[errno])
+ #else
+ # define error_string "error message not found"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch
new file mode 100644
index 000000000..1de267f08
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch
@@ -0,0 +1,13 @@
+Index: ez-ipupdate-3.0.11b7/ez-ipupdate.c
+===================================================================
+--- ez-ipupdate-3.0.11b7.orig/ez-ipupdate.c
++++ ez-ipupdate-3.0.11b7/ez-ipupdate.c
+@@ -798,7 +798,7 @@ void show_message(char *fmt, ...)
+ sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt);
+ #endif
+
+- syslog(LOG_NOTICE, buf);
++ syslog(LOG_NOTICE, "%s", buf);
+ }
+ else
+ {
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch
new file mode 100644
index 000000000..db8caab12
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch
@@ -0,0 +1,28 @@
+From 66e8bcdcca8971b5c43c31755d56d7f675d8b5ff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Jun 2017 20:10:49 -0700
+Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include
+
+OE QA flags it correctly as a voilation of cross compilation
+namespace
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/modules/rlm_mschap/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac
+===================================================================
+--- freeradius-server-3.0.14.orig/src/modules/rlm_mschap/configure.ac
++++ freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac
+@@ -72,7 +72,7 @@ if test x$with_[]modname != xno; then
+ mod_ldflags="-framework DirectoryService"
+ fi
+
+- smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
++ smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0"
+ FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
+ #include <stdbool.h>])
+ if test "x$ac_cv_header_wbclient_h" != "xyes"; then
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
new file mode 100644
index 000000000..fa412e2aa
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Start/stop the FreeRADIUS daemon.
+
+### BEGIN INIT INFO
+# Provides: freeradius
+# Required-Start: $remote_fs $network $syslog
+# Should-Start: $time mysql slapd postgresql samba krb5-kdc
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Radius Daemon
+# Description: Extensible, configurable radius daemon
+### END INIT INFO
+
+set -e
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+fi
+
+PROG="radiusd"
+PROGRAM="/usr/sbin/radiusd"
+PIDFILE="/var/run/radiusd/radiusd.pid"
+DESCR="FreeRADIUS daemon"
+
+if [ -r /etc/default/$PROG ]; then
+ . /etc/default/$PROG
+fi
+
+test -f $PROGRAM || exit 0
+
+check_certs() {
+ if [ ! -f /etc/raddb/certs/server.pem ]; then
+ echo -n "Creating certificates for freeradius..."
+ if sudo -u radiusd /etc/raddb/certs/bootstrap 1> /dev/null 2> /dev/null; then
+ echo "done"
+ else
+ echo "failed!"
+ fi
+ fi
+
+}
+
+# /var/run may be a tmpfs
+if [ ! -d /var/run/radiusd ]; then
+ mkdir -p /var/run/radiusd
+ chown radiusd:radiusd /var/run/radiusd
+fi
+
+if [ ! -d /var/log/radius ]; then
+ mkdir -p /var/log/radius
+ touch /var/log/radius/radius.log
+ chown radiusd:radiusd /var/run/radius
+fi
+
+if [ ! -f ${PIDFILE} ]; then
+ touch ${PIDFILE}
+ chown radiusd:radiusd ${PIDFILE}
+fi
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
+
+ret=0
+
+case "$1" in
+ start)
+ check_certs
+ echo -n "Starting $DESCR" "$PROG"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ exit $ret
+ ;;
+ stop)
+ echo -n "Stopping $DESCR" "$PROG"
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$?
+ else
+ echo -n "$PIDFILE not found"
+ ret=1
+ fi
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ ;;
+ status)
+ status $PROGRAM;
+ exit $?
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ reload|force-reload)
+ echo -n "Reloading $DESCR" "$PROG"
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
+ else
+ echo -n "$PIDFILE not found"
+ ret=1
+ fi
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ ;;
+ *)
+ echo "Usage: $0 start|stop|status|restart|force-reload|reload"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
new file mode 100644
index 000000000..9c997661f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
@@ -0,0 +1,197 @@
+From dc41591d5ceb18900ec85894f8f7b7bb44bb3bd9 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 4 Jan 2016 01:44:04 -0500
+Subject: [PATCH] avoid searching host dirs
+
+Don't search the hardcoded host dirs to avoid
+host contamination.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ acinclude.m4 | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++---
+ src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +-
+ src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++--
+ 8 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index da48acc..b513ae1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then
+ FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
+ FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
+
+- for try in $smart_lib_dir /usr/local/lib /opt/lib; do
++ for try in $smart_lib_dir; do
+ AC_MSG_CHECKING([for $2 in -l$1 in $try])
+ LIBS="-l$1 $old_LIBS"
+ CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
+@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
+ old_CPPFLAGS="$CPPFLAGS"
+ smart_include=
+ dnl # The default directories we search in (in addition to the compilers search path)
+-smart_include_dir="/usr/local/include /opt/include"
++smart_include_dir=
+
+ dnl # Our local versions
+ _smart_try_dir=
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+index 75c851a..a262d71 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -ldb2
+- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
++ smart_try_dir="$ibmdb2_lib_dir"
+ FR_SMART_CHECK_LIB(db2, SQLConnect)
+ if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
+ fail="$fail libdb2"
+ fi
+
+ dnl Check for sqlcli.h
+- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
++ smart_try_dir="$ibmdb2_include_dir"
+ FR_SMART_CHECK_INCLUDE(sqlcli.h)
+ if test "x$ac_cv_header_sqlcli_h" != xyes; then
+ fail="$fail sqlcli.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+index 4da57b3..752b043 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for isc_attach_database in -lfbclient
+- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
++ smart_try_dir="$firebird_lib_dir"
+ FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
+ if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
+ fail="$fail libfbclient"
+ fi
+
+ dnl Check for ibase.h
+- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
++ smart_try_dir="$firebird_include_dir"
+ FR_SMART_CHECK_INCLUDE(ibase.h)
+ if test "x$ac_cv_header_ibase_h" != xyes; then
+ fail="$fail ibase.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+index ba6304f..3393557 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -liodbc
+- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
++ smart_try_dir="$iodbc_lib_dir"
+ FR_SMART_CHECK_LIB(iodbc, SQLConnect)
+ if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
+ fail="$fail libiodbc"
+ fi
+
+ dnl Check for isql.h
+- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
++ smart_try_dir="$iodbc_include_dir"
+ FR_SMART_CHECK_INCLUDE(isql.h)
+ if test "x$ac_cv_header_isql_h" != xyes; then
+ fail="$fail isql.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+index 1401677..2e7db44 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then
+
+ dnl # Check for libmysqlclient_r
+ if test "x$have_a_libmysqlclient" != "xyes"; then
+- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++ smart_try_dir="$mysql_lib_dir"
+ FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
+@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then
+
+ dnl # Check for libmysqlclient
+ if test "x$have_a_libmysqlclient" != "xyes"; then
+- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++ smart_try_dir="$mysql_lib_dir"
+ FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
+@@ -189,7 +189,7 @@ if test x$with_[]modname != xno; then
+ fi
+
+ if test "x$have_mysql_h" != "xyes"; then
+- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
++ smart_try_dir="$mysql_include_dir"
+ FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
+ if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
+ AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+index 3178462..5cbc8c2 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+@@ -63,7 +63,7 @@ if test x$with_[]modname != xno; then
+ dnl # Check for header files
+ dnl ############################################################
+
+- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
++ smart_try_dir="$oracle_include_dir"
+
+ if test "x$ORACLE_HOME" != "x"; then
+ smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+index 4f9a890..e1cf811 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then
+ esac ]
+ )
+
+- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
++ smart_try_dir="$rlm_sql_postgresql_include_dir"
+ FR_SMART_CHECK_INCLUDE(libpq-fe.h)
+ if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
+ fail="$fail libpq-fe.h"
+@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then
+ ])
+ fi
+
+- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
++ smart_try_dir="$rlm_sql_postgresql_lib_dir"
+ FR_SMART_CHECK_LIB(pq, PQconnectdb)
+ if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
+ fail="$fail libpq"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+index 3545387..c543ed4 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -lodbc
+- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
++ smart_try_dir="$unixodbc_lib_dir"
+ FR_SMART_CHECK_LIB(odbc, SQLConnect)
+ if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
+ fail="$fail libodbc"
+ fi
+
+ dnl Check for sql.h
+- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
++ smart_try_dir="$unixodbc_include_dir"
+ FR_SMART_CHECK_INCLUDE(sql.h)
+ if test "x$ac_cv_header_sql_h" != xyes; then
+ fail="$fail sql.h"
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
new file mode 100644
index 000000000..71b78090c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
@@ -0,0 +1,70 @@
+From 74eed61dec8702c89f3e121d577ea9db25c961a4 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 11 Jan 2016 02:52:16 -0500
+Subject: [PATCH] configure.ac: add option for libcap
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 066d3d7..6e4266b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -948,6 +948,23 @@ fi
+ dnl Set by FR_SMART_CHECKLIB
+ LIBS="${old_LIBS}"
+
++dnl #
++dnl # extra argument: --with-libcap
++dnl #
++WITH_LIBCAP=yes
++AC_ARG_WITH(libcap,
++[ --with-licap use licap for debugger checks. (default=yes)],
++[ case "$withval" in
++ no)
++ WITH_LIBCAP=no
++ ;;
++ *)
++ WITH_LIBCAP=yes
++ ;;
++ esac ]
++)
++
++
+ dnl Check for cap
+ dnl extra argument: --with-cap-lib-dir=DIR
+ cap_lib_dir=
+@@ -981,15 +998,17 @@ AC_ARG_WITH(cap-include-dir,
+ ;;
+ esac])
+
+-smart_try_dir="$cap_lib_dir"
+-FR_SMART_CHECK_LIB(cap, cap_get_proc)
+-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
+- AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
+-else
+- AC_DEFINE(HAVE_LIBCAP, 1,
+- [Define to 1 if you have the `cap' library (-lcap).]
+- )
+- HAVE_LIBCAP=1
++if test "x$WITH_LIBCAP" = xyes; then
++ smart_try_dir="$cap_lib_dir"
++ FR_SMART_CHECK_LIB(cap, cap_get_proc)
++ if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
++ AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
++ else
++ AC_DEFINE(HAVE_LIBCAP, 1,
++ [Define to 1 if you have the `cap' library (-lcap).]
++ )
++ HAVE_LIBCAP=1
++ fi
+ fi
+
+ VL_LIB_READLINE
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
new file mode 100644
index 000000000..30497a602
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] configure.ac: allow cross-compilation
+
+The checking OpenSSL library and header version consistency will
+always fail in cross compiling, skip the check and give a warning
+instead for cross compiling.
+
+Upstream-Status: Inappropriate[embedded specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_krb5/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
+index eb43534..113a079 100644
+--- a/src/modules/rlm_krb5/configure.ac
++++ b/src/modules/rlm_krb5/configure.ac
+@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then
+ FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" == xyes; then
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
++ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
++ [AC_MSG_WARN(cross compiling: not checking)])
+ fi
+ else
+ krb5threadsafe=""
+--
+2.10.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
new file mode 100644
index 000000000..4a62bf1fa
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
@@ -0,0 +1,28 @@
+Enable and change user and group of freeradius server to radiusd
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ raddb/radiusd.conf.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
+index c62f4ff..0b4a84e 100644
+--- a/raddb/radiusd.conf.in
++++ b/raddb/radiusd.conf.in
+@@ -436,8 +436,8 @@ security {
+ # member. This can allow for some finer-grained access
+ # controls.
+ #
+-# user = radius
+-# group = radius
++ user = radiusd
++ group = radiusd
+
+ # Core dumps are a bad thing. This should only be set to
+ # 'yes' if you're debugging a problem with the server.
+--
+1.9.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
new file mode 100644
index 000000000..af1bff051
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
@@ -0,0 +1,61 @@
+From 5b6d8b14f2696fcf1dca119212f9d0a0fa04defd Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Wed, 18 Jan 2017 14:59:39 +0800
+Subject: [PATCH] fix error for expansion of macro in thread.h
+
+The parameter declaration is missing in expansion of macro
+which cause the build error:
+| In file included from src/freeradius-devel/libradius.h:80:0,
+| from src/lib/log.c:26:
+| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer':
+| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
+| fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */
+| ^
+
+Add the missing declaration in macro.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/include/threads.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/include/threads.h b/src/include/threads.h
+index e36d81d..2bcb6aa 100644
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ # define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+ # include <pthread.h>
+-# define fr_thread_local_setup(_t, _n) \
++# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
+ static pthread_key_t __fr_thread_local_key_##_n;\
+ static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
+ static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
+@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
+ static void __fr_thread_local_key_init_##_n(void)\
+ {\
+ (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
+- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ }\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+ __fr_thread_local_destructor_##_n = func;\
+ if (_n) return _n; \
+ (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ return _n;\
+ }
+-# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
+-# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v)
+-# define fr_thread_local_get(_n) __fr_thread_local_get_##_n()
++# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
++# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++# define fr_thread_local_get(_n) _n
+ #endif
+ #endif
+--
+2.10.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
new file mode 100644
index 000000000..d29b2ac39
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
@@ -0,0 +1,236 @@
+From d8e251ef97869ab2c1c82bd374016f402083997c Mon Sep 17 00:00:00 2001
+From: Jorge Pereira <jpereiran@gmail.com>
+Date: Mon, 7 Dec 2015 16:51:07 -0200
+Subject: [PATCH] Fixing issues related to m4 include path
+
+Upstream-Status: Submitted [1]
+
+[1]: https://github.com/FreeRADIUS/freeradius-server/pull/1428
+
+Submmited by: Jorge Pereira <jpereiran@gmail.com>
+---
+ src/modules/rlm_example/config.h.in | 39 ++--------------------
+ src/modules/rlm_ldap/configure | 2 +-
+ src/modules/rlm_pam/config.h.in | 3 ++
+ src/modules/rlm_perl/config.h.in | 3 ++
+ src/modules/rlm_perl/configure.ac | 2 +-
+ src/modules/rlm_radutmp/config.h.in | 3 ++
+ src/modules/rlm_ruby/configure | 1 +
+ src/modules/rlm_ruby/configure.ac | 9 ++---
+ src/modules/rlm_smsotp/config.h.in | 3 ++
+ .../rlm_sql/drivers/rlm_sql_mysql/config.h.in | 3 ++
+ src/modules/rlm_unix/config.h.in | 6 ++++
+ 11 files changed, 32 insertions(+), 42 deletions(-)
+
+diff --git a/src/modules/rlm_example/config.h.in b/src/modules/rlm_example/config.h.in
+index 2a81ef5..f80de9c 100644
+--- a/src/modules/rlm_example/config.h.in
++++ b/src/modules/rlm_example/config.h.in
+@@ -1,38 +1,5 @@
+ /* config.h.in. Generated from configure.ac by autoheader. */
+
+-/* Define to 1 if you have the <inttypes.h> header file. */
+-#undef HAVE_INTTYPES_H
+-
+-/* Define to 1 if you have the <memory.h> header file. */
+-#undef HAVE_MEMORY_H
+-
+-/* Define to 1 if you have the `printf' function. */
+-#undef HAVE_PRINTF
+-
+-/* Define to 1 if you have the <stdint.h> header file. */
+-#undef HAVE_STDINT_H
+-
+-/* Define to 1 if you have the <stdio.h> header file. */
+-#undef HAVE_STDIO_H
+-
+-/* Define to 1 if you have the <stdlib.h> header file. */
+-#undef HAVE_STDLIB_H
+-
+-/* Define to 1 if you have the <strings.h> header file. */
+-#undef HAVE_STRINGS_H
+-
+-/* Define to 1 if you have the <string.h> header file. */
+-#undef HAVE_STRING_H
+-
+-/* Define to 1 if you have the <sys/stat.h> header file. */
+-#undef HAVE_SYS_STAT_H
+-
+-/* Define to 1 if you have the <sys/types.h> header file. */
+-#undef HAVE_SYS_TYPES_H
+-
+-/* Define to 1 if you have the <unistd.h> header file. */
+-#undef HAVE_UNISTD_H
+-
+ /* Define to the address where bug reports for this package should be sent. */
+ #undef PACKAGE_BUGREPORT
+
+@@ -45,8 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+-
+-/* Define to 1 if you have the ANSI C header files. */
+-#undef STDC_HEADERS
+diff --git a/src/modules/rlm_ldap/configure b/src/modules/rlm_ldap/configure
+index e0c15d9..cdf96d5 100755
+--- a/src/modules/rlm_ldap/configure
++++ b/src/modules/rlm_ldap/configure
+@@ -3992,7 +3992,7 @@ smart_prefix=
+ $as_echo "#define WITH_SASL 1" >>confdefs.h
+
+ SASL=sasl.c
+- fi
++ fi
+ fi
+
+ targetname=rlm_ldap
+diff --git a/src/modules/rlm_pam/config.h.in b/src/modules/rlm_pam/config.h.in
+index 32ef6ff..1ad20c5 100644
+--- a/src/modules/rlm_pam/config.h.in
++++ b/src/modules/rlm_pam/config.h.in
+@@ -45,6 +45,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_perl/config.h.in b/src/modules/rlm_perl/config.h.in
+index 989ed53..f80de9c 100644
+--- a/src/modules/rlm_perl/config.h.in
++++ b/src/modules/rlm_perl/config.h.in
+@@ -12,5 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_perl/configure.ac b/src/modules/rlm_perl/configure.ac
+index 44c5fc9..6b2a043 100644
+--- a/src/modules/rlm_perl/configure.ac
++++ b/src/modules/rlm_perl/configure.ac
+@@ -3,7 +3,7 @@ AC_INIT(rlm_perl.c)
+ AC_REVISION($Revision$)
+ AC_DEFUN(modname,[rlm_perl])
+
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+
+ if test x$with_[]modname != xno; then
+ AC_PROG_CC
+diff --git a/src/modules/rlm_radutmp/config.h.in b/src/modules/rlm_radutmp/config.h.in
+index 9a883cc..750b434 100644
+--- a/src/modules/rlm_radutmp/config.h.in
++++ b/src/modules/rlm_radutmp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_ruby/configure b/src/modules/rlm_ruby/configure
+index 15868ab..c728af2 100755
+--- a/src/modules/rlm_ruby/configure
++++ b/src/modules/rlm_ruby/configure
+@@ -1875,6 +1875,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
++
+ # ===========================================================================
+ # http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
+ # ===========================================================================
+diff --git a/src/modules/rlm_ruby/configure.ac b/src/modules/rlm_ruby/configure.ac
+index 9306382..f1c8118 100644
+--- a/src/modules/rlm_ruby/configure.ac
++++ b/src/modules/rlm_ruby/configure.ac
+@@ -3,15 +3,16 @@ AC_INIT(rlm_ruby.c)
+ AC_REVISION($Revision: 1.9 $)
+ AC_DEFUN(modname,[rlm_ruby])
+
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+
+ AC_DEFUN([AX_WITH_RUBY],[
+ AX_WITH_PROG([RUBY],[ruby],[not-found],[${PATH}:/usr/bin:/usr/local/bin])
+ ])
+
+-m4_include([ax_compare_version.m4])
+-m4_include([ax_prog_ruby_version.m4])
+-m4_include([ax_ruby_devel.m4])
++
++m4_include([m4/ax_compare_version.m4])
++m4_include([m4/ax_prog_ruby_version.m4])
++m4_include([m4/ax_ruby_devel.m4])
+
+ targetname=modname
+ mod_cflags=
+diff --git a/src/modules/rlm_smsotp/config.h.in b/src/modules/rlm_smsotp/config.h.in
+index 5feaf91..9e69f85 100644
+--- a/src/modules/rlm_smsotp/config.h.in
++++ b/src/modules/rlm_smsotp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+index e03d1a9..6262c48 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+@@ -18,5 +18,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_unix/config.h.in b/src/modules/rlm_unix/config.h.in
+index dcb9aa2..70b4680 100644
+--- a/src/modules/rlm_unix/config.h.in
++++ b/src/modules/rlm_unix/config.h.in
+@@ -1,5 +1,8 @@
+ /* config.h.in. Generated from configure.ac by autoheader. */
+
++/* Define to 1 if you have the `getpwnam' function. */
++#undef HAVE_GETPWNAM
++
+ /* Define to 1 if you have the `getspnam' function. */
+ #undef HAVE_GETSPNAM
+
+@@ -54,6 +57,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+--
+2.3.5
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
new file mode 100644
index 000000000..b0929c4b0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
@@ -0,0 +1,55 @@
+Fix quoting for BUILD_WITH
+
+The escaped quotes are to make the -D values produce strings which
+can be used to display these values. However, if the values are more
+than one word, with spaces, they also need shell quoting to make them
+into single words.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/main/libfreeradius-server.mk | 2 +-
+ src/main/unittest.mk | 2 +-
+ src/modules/rlm_eap/radeapclient.mk | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk
+index 4495f72..07c28f1 100644
+--- a/src/main/libfreeradius-server.mk
++++ b/src/main/libfreeradius-server.mk
+@@ -18,5 +18,5 @@ SOURCES := conffile.c \
+ TGT_LDLIBS := $(OPENSSL_LIBS)
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/main/unittest.mk b/src/main/unittest.mk
+index 09f3938..ed33952 100644
+--- a/src/main/unittest.mk
++++ b/src/main/unittest.mk
+@@ -21,5 +21,5 @@ TGT_PREREQS += libfreeradius-eap.a
+ endif
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk
+index 6068f54..7d3c556 100644
+--- a/src/modules/rlm_eap/radeapclient.mk
++++ b/src/modules/rlm_eap/radeapclient.mk
+@@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT
+ SRC_INCDIRS := ${top_srcdir}/src/modules/rlm_eap/libeap
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+
+ endif
+--
+2.10.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
new file mode 100644
index 000000000..4eb61ff2e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
@@ -0,0 +1,89 @@
+From 56ef434e454bcc82c162a83d9bcb076d4fc72b7f Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 9 Jan 2014 14:30:26 +0800
+Subject: [PATCH] Fix libtool detection
+
+Upstream-Status: pending
+
+Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it
+can work with our libtoolize and libtool.
+
+Simplify the detection of ltdl. It will find the ltdl from the sysroot; the
+switch --with-system-libltdl is no longer needed. The code is copied from
+pulseaudio configure.ac, together with the comment paragraph.
+
+Also patch autogen.sh so it uses autoreconf, which handles libtoolize better.
+
+Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ autogen.sh | 5 +----
+ configure.ac | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 3418673..e42c3d5 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -5,10 +5,7 @@ parentdir=`dirname $0`
+ cd $parentdir
+ parentdir=`pwd`
+
+-libtoolize -f -c
+-#aclocal
+-autoheader
+-autoconf
++autoreconf -Wcross --verbose --install --force
+
+ mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
+ mysubdirs=`echo $mysubdirs`
+diff --git a/configure.ac b/configure.ac
+index e73e4ad..066d3d7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -205,6 +205,42 @@ dnl # See if we have Git.
+ dnl #
+ AC_CHECK_PROG(GIT, git, yes, no)
+
++#### libtool stuff ####
++
++dnl set this shit so it doesn't force CFLAGS...
++LTCFLAGS=" "
++
++LT_PREREQ(2.2)
++LT_INIT([dlopen disable-static])
++
++dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
++dnl exactly which version of libltdl is present in the system, so we
++dnl just assume that it's a working version as long as we have the
++dnl library and the header files.
++dnl
++dnl As an extra safety device, check for lt_dladvise_init() which is
++dnl only implemented in libtool 2.x, and refine as we go if we have
++dnl refined requirements.
++dnl
++dnl Check the header files first since the system may have a
++dnl libltdl.so for runtime, but no headers, and we want to bail out as
++dnl soon as possible.
++dnl
++dnl We don't need any special variable for this though, since the user
++dnl can give the proper place to find libltdl through the standard
++dnl variables like LDFLAGS and CPPFLAGS.
++
++AC_CHECK_HEADER([ltdl.h],
++ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
++ [LIBLTDL=])
++
++AS_IF([test "x$LIBLTDL" = "x"],
++ [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
++AC_SUBST([LIBLTDL])
++LTDL_SUBDIRS=
++INCLTDL=-DWITH_SYSTEM_LTDL
++AC_SUBST(LTDL_SUBDIRS)
++
+ dnl Put this in later, when all distributed modules use autoconf.
+ dnl AC_ARG_WITH(disablemodulefoo,
+ dnl [ --without-rlm_foo Disables module compilation. Module list:]
+--
+1.8.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
new file mode 100644
index 000000000..1954586b2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
@@ -0,0 +1,160 @@
+From 16bf899447fc1524ffc3c79e1d35380e5285a552 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 7 Jan 2016 22:37:30 -0800
+Subject: [PATCH] libtool: do not use jlibtool
+
+jlibtool is hardcoded to be used but we need to use
+our libtool, so fix the makfiles to make it compatible
+with our libtool.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ Make.inc.in | 4 ++--
+ scripts/boiler.mk | 2 ++
+ scripts/install.mk | 14 +++++++-------
+ scripts/libtool.mk | 22 ++++++++++++++++------
+ 4 files changed, 27 insertions(+), 15 deletions(-)
+
+diff --git a/Make.inc.in b/Make.inc.in
+index 7a77625..fd8aa3e 100644
+--- a/Make.inc.in
++++ b/Make.inc.in
+@@ -57,7 +57,7 @@ CPPFLAGS = @CPPFLAGS@
+ LIBPREFIX = @LIBPREFIX@
+ EXEEXT = @EXEEXT@
+
+-LIBTOOL = JLIBTOOL
++LIBTOOL = @LIBTOOL@
+ ACLOCAL = @ACLOCAL@
+ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+@@ -163,7 +163,7 @@ ANALYZE.c := @clang_path@
+ #
+ ifeq "$(USE_SHARED_LIBS)" "yes"
+ TESTBINDIR = ./$(BUILD_DIR)/bin/local
+- TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
++ TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(LIBTOOL) --quiet --mode=execute $(TESTBINDIR)
+ else
+ TESTBINDIR = ./$(BUILD_DIR)/bin
+ TESTBIN = ./$(BUILD_DIR)/bin
+diff --git a/scripts/boiler.mk b/scripts/boiler.mk
+index bccec5e..926a13e 100644
+--- a/scripts/boiler.mk
++++ b/scripts/boiler.mk
+@@ -266,6 +266,7 @@ define COMPILE_C_CMDS
+ $(Q)$(ECHO) CC $<
+ $(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
+ $(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
++ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ else
+ #
+@@ -281,6 +282,7 @@ define COMPILE_C_CMDS
+ $(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \
+ $(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \
+ $(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $<
++ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ endif
+
+diff --git a/scripts/install.mk b/scripts/install.mk
+index 9164115..e38c1ed 100644
+--- a/scripts/install.mk
++++ b/scripts/install.mk
+@@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install executable ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+@@ -65,7 +65,7 @@ define ADD_INSTALL_RULE.a
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install static library ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} ${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} ${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+@@ -87,9 +87,9 @@ define ADD_INSTALL_RULE.la
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install libtool library ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+- $(Q)$${PROGRAM_INSTALL} -c -m 755 $${LOCAL_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
++ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+
+ endef
+@@ -107,7 +107,7 @@ define ADD_INSTALL_RULE.man
+ install: ${2}/$(notdir ${1})
+
+ # Install manual page ${1}
+- ${2}/$(notdir ${1}): ${JLIBTOOL} ${1} | ${2}
++ ${2}/$(notdir ${1}): ${LIBTOOL} ${1} | ${2}
+ @$(ECHO) INSTALL $(notdir ${1})
+ $(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
+
+@@ -122,9 +122,9 @@ endef
+ define ADD_INSTALL_RULE.dir
+ # Install directory
+ .PHONY: ${1}
+- ${1}: ${JLIBTOOL}
++ ${1}: ${LIBTOOL}
+ @$(ECHO) INSTALL -d -m 755 ${1}
+- $(Q)$${PROGRAM_INSTALL} -d -m 755 ${1}
++ $(Q)$${INSTALL} -d -m 755 ${1}
+ endef
+
+
+diff --git a/scripts/libtool.mk b/scripts/libtool.mk
+index 57915e1..2cb2f7d 100644
+--- a/scripts/libtool.mk
++++ b/scripts/libtool.mk
+@@ -55,7 +55,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+ # Tell GNU Make to use this value, rather than anything specified
+ # on the command line.
+ override LIBTOOL := ${JLIBTOOL}
+-endif # else we're not using jlibtool
++else # else we're not using jlibtool
++ all install: ${LIBTOOL}
++endif
+
+ # When using libtool, it produces a '.libs' directory. Ensure that it
+ # is removed on "make clean", too.
+@@ -69,11 +71,19 @@ clean: .libs_clean
+ # Re-define compilers and linkers
+ #
+ OBJ_EXT = lo
+-COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
+-COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
+-LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
+-LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
+-PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++ifeq "${LIBTOOL}" "JLIBTOOL"
++ COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
++ COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
++ LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
++ LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
++ PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++else
++ COMPILE.c = ${LIBTOOL} --mode=compile --tag=CC ${CC}
++ COMPILE.cxx = ${LIBTOOL} --mode=compile --tag=CC ${CXX}
++ LINK.c = ${LIBTOOL} --mode=link --tag=CC ${CC} -module -export-dynamic
++ LINK.cxx = ${LIBTOOL} --mode=link --tag=CC ${CXX} -module -export-dynamic
++ PROGRAM_INSTALL = ${LIBTOOL} --mode=install ${INSTALL}
++endif
+
+
+ # LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that
+--
+2.10.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
new file mode 100644
index 000000000..675940dd6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
@@ -0,0 +1,33 @@
+From a0bf65e04d2bbd3271cab94bd5ac93f8e877bfc5 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 27 Jan 2016 05:07:19 -0500
+Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir
+
+Upstream-Status: Pending
+
+configure option --with-rlm-python-include-dir is used to set
+PY_INC_DIR which is never used and it fails to find Python.h,
+so add it into search dir to fix it.
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_python/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac
+index 831a33a..c3792d8 100644
+--- a/src/modules/rlm_python/configure.ac
++++ b/src/modules/rlm_python/configure.ac
+@@ -93,7 +93,7 @@ if test x$with_[]modname != xno; then
+
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PY_CFLAGS"
+- smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION"
++ smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR"
+ FR_SMART_CHECK_INCLUDE(Python.h)
+ CFLAGS=$old_CFLAGS
+
+--
+2.10.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
new file mode 100644
index 000000000..fa6296297
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
@@ -0,0 +1,2 @@
+d /var/log/radius 0755 radiusd radiusd -
+d /var/run/radiusd 0755 radiusd radiusd -
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
new file mode 100644
index 000000000..899c4e495
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/radiusd/radiusd.pid
+ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd @STATEDIR@/run/radiusd
+ExecStartPre=-@BASE_BINDIR@/sh -c "if [ ! -f @SYSCONFDIR@/raddb/certs/server.pem ]; then sudo -u radiusd @SYSCONFDIR@/raddb/certs/bootstrap; fi"
+ExecStartPre=@SBINDIR@/radiusd -C
+ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb
+ExecReload=@SBINDIR@/radiusd -C
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
new file mode 100644
index 000000000..8cbdae8a6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radiusd radiusd 0755 /var/run/radiusd none
+d radiusd radiusd 0755 /var/log/radius none
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb
new file mode 100644
index 000000000..4155a4059
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.15.bb
@@ -0,0 +1,222 @@
+DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
+protocol, as defined in RFC 2865 (and others). It allows Network Access \
+Servers (NAS boxes) to perform authentication for dial-up users. There are \
+also RADIUS clients available for Web servers, firewalls, Unix logins, and \
+more. Using RADIUS allows authentication and authorization for a network to \
+be centralized, and minimizes the amount of re-configuration which has to be \
+done when adding or deleting new users."
+
+SUMMARY = "High-performance and highly configurable RADIUS server"
+HOMEPAGE = "http://www.freeradius.org/"
+SECTION = "System/Servers"
+LICENSE = "GPLv2 & LGPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
+
+SRC_URI = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${PV}.tar.bz2 \
+ file://freeradius \
+ file://volatiles.58_radiusd \
+ file://freeradius-enble-user-in-conf.patch \
+ file://freeradius-configure.ac-allow-cross-compilation.patch \
+ file://freeradius-fix-issues-related-to-m4-include-path.patch \
+ file://freeradius-libtool-detection.patch \
+ file://freeradius-configure.ac-add-option-for-libcap.patch \
+ file://freeradius-avoid-searching-host-dirs.patch \
+ file://freeradius-rlm_python-add-PY_INC_DIR.patch \
+ file://freeradius-libtool-do-not-use-jlibtool.patch \
+ file://freeradius-fix-quoting-for-BUILT_WITH.patch \
+ file://freeradius-fix-error-for-expansion-of-macro.patch \
+ file://0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \
+ file://radiusd.service \
+ file://radiusd-volatiles.conf \
+"
+SRC_URI[md5sum] = "0c81a4464ccf1d04f7ef1218a029d37a"
+SRC_URI[sha256sum] = "23267d8505e7b2909f5bdbf3938ca077c1fe122290dc969304d4f3b594f7e3ba"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/freeradius-server-${PV}"
+
+EXTRA_OECONF = " --enable-strict-dependencies \
+ --with-docdir=${docdir}/freeradius-${PV} \
+ --with-openssl-includes=${STAGING_INCDIR} \
+ --with-openssl-libraries=${STAGING_LIBDIR} \
+ --without-rlm_ippool \
+ --without-rlm_cache_memcached \
+ --without-rlm_counter \
+ --without-rlm_couchbase \
+ --without-rlm_dbm \
+ --without-rlm_eap_tnc \
+ --without-rlm_eap_ikev2 \
+ --without-rlm_opendirectory \
+ --without-rlm_redis \
+ --without-rlm_rediswho \
+ --without-rlm_sql_db2 \
+ --without-rlm_sql_firebird \
+ --without-rlm_sql_freetds \
+ --without-rlm_sql_iodbc \
+ --without-rlm_sql_oracle \
+ --without-rlm_sql_sybase \
+ --without-rlm_sqlhpwippool \
+ ac_cv_path_PERL=${bindir}/perl \
+ ax_cv_cc_builtin_choose_expr=no \
+ ax_cv_cc_builtin_types_compatible_p=no \
+ ax_cv_cc_builtin_bswap64=no \
+ ax_cv_cc_bounded_attribute=no \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ pcre libcap \
+"
+
+PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
+PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
+PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
+PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
+PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
+PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
+PACKAGECONFIG[python] = "--with-rlm_python --with-rlm-python-bin=${STAGING_BINDIR_NATIVE}/python-native/python --with-rlm-python-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python,python-native python"
+PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c"
+PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
+
+inherit useradd autotools-brokensep update-rc.d systemd
+
+# This is not a cpan or python based package, but it needs some definitions
+# from cpan-base and python-dir bbclasses for building rlm_perl and rlm_python
+# correctly.
+inherit cpan-base python-dir
+
+# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
+# in order to handle the subdirs correctly.
+do_configure () {
+ ./autogen.sh
+
+ # the configure of rlm_perl needs this to get correct
+ # mod_cflags and mod_ldflags
+ if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
+ export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+ fi
+
+ oe_runconf
+
+ # we don't need dhcpclient
+ sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
+}
+
+INITSCRIPT_NAME = "radiusd"
+
+SYSTEMD_SERVICE_${PN} = "radiusd.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
+
+do_install() {
+ rm -rf ${D}
+ mkdir -p ${D}/${sysconfdir}/logrotate.d
+ mkdir -p ${D}/${sysconfdir}/pam.d
+ mkdir -p ${D}/${sysconfdir}/init.d
+ mkdir -p ${D}/${localstatedir}/lib/radiusd
+ mkdir -p ${D}${sysconfdir}/default/volatiles
+
+ export LD_LIBRARY_PATH=${D}/${libdir}
+ oe_runmake install R=${D} INSTALLSTRIP=""
+
+ # remove unsupported config files
+ rm -f ${D}/${sysconfdir}/raddb/experimental.conf
+
+ # remove scripts that required Perl(DBI)
+ rm -rf ${D}/${bindir}/radsqlrelay
+
+ cp -f ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd
+ rm -f ${D}/${sbindir}/rc.radiusd
+ chmod +x ${D}/${sysconfdir}/init.d/radiusd
+ rm -rf ${D}/${localstatedir}/run/
+ install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd
+
+ chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/
+ chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
+
+ # For systemd
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@STATEDIR@,${localstatedir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_unitdir}/system/radiusd.service
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d/
+ install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/
+ fi
+}
+
+# This is only needed when we install/update on a running target.
+#
+pkg_postinst_${PN} () {
+ if [ -z "$D" ]; then
+ if command -v systemd-tmpfiles >/dev/null; then
+ # create /var/log/radius, /var/run/radiusd
+ systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd-volatiles.conf
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+
+ # Fix ownership for /etc/raddb/*, /var/lib/radiusd
+ chown -R radiusd:radiusd ${sysconfdir}/raddb
+ chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
+ fi
+}
+
+# We really need the symlink :(
+INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP_${PN}-krb5 = "dev-so"
+INSANE_SKIP_${PN}-ldap = "dev-so"
+INSANE_SKIP_${PN}-mysql = "dev-so"
+INSANE_SKIP_${PN}-perl = "dev-so"
+INSANE_SKIP_${PN}-postgresql = "dev-so"
+INSANE_SKIP_${PN}-python = "dev-so"
+INSANE_SKIP_${PN}-unixodbc = "dev-so"
+
+PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
+ ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
+
+FILES_${PN}-utils = "${bindir}/*"
+
+FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \
+ ${sysconfdir}/raddb/mods-available/ldap \
+"
+
+FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \
+ ${sysconfdir}/raddb/mods-available/krb5 \
+"
+
+FILES_${PN}-perl = "${libdir}/rlm_perl.so* \
+ ${sysconfdir}/raddb/mods-config/perl \
+ ${sysconfdir}/raddb/mods-available/perl \
+"
+
+FILES_${PN}-python = "${libdir}/rlm_python.so* \
+ ${sysconfdir}/raddb/mods-config/python \
+ ${sysconfdir}/raddb/mods-available/python \
+"
+
+FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
+ ${sysconfdir}/raddb/mods-config/sql/*/mysql \
+ ${sysconfdir}/raddb/mods-available/sql \
+"
+
+FILES_${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
+ ${sysconfdir}/raddb/mods-config/sql/*/postgresql \
+"
+
+FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
+
+FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-utils = "${PN}"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
new file mode 100644
index 000000000..24c134fca
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
@@ -0,0 +1,83 @@
+Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ ping/ping_common.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/ping/ping_common.h b/ping/ping_common.h
+index 1dfd1b5..3bfbd12 100644
+--- a/ping/ping_common.h
++++ b/ping/ping_common.h
+@@ -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>
+@@ -62,7 +66,12 @@ struct ping_stat
+ want to follow the traditional behaviour of ping. */
+ #define DEFAULT_PING_COUNT 0
+
++#ifdef HAVE_IPV6
+ #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN)
++#else
++#define PING_HEADER_LEN (ICMP_MINLEN)
++#endif
++
+ #define PING_TIMING(s) ((s) >= sizeof (struct timeval))
+ #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */
+
+@@ -74,13 +83,20 @@ struct ping_stat
+ (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
+ } while (0)
+
++#ifdef HAVE_IPV6
+ /* FIXME: Adjust IPv6 case for options and their consumption. */
+ #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
+ (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN))
+
++#else
++#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)
++#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,
+@@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code,
+ 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;
+--
+2.8.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
new file mode 100644
index 000000000..b13bb9229
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
new file mode 100644
index 000000000..30e81ef45
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
new file mode 100644
index 000000000..21b55da9a
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
new file mode 100644
index 000000000..2b894a74b
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
new file mode 100644
index 000000000..2d9a0408c
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
new file mode 100644
index 000000000..67b44c43e
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch
new file mode 100644
index 000000000..532a0e5c0
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
new file mode 100644
index 000000000..190cd5f14
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
@@ -0,0 +1,206 @@
+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
+
+acpaths = "-I ./m4"
+
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
+
+PACKAGECONFIG ??= "ftp uucpd \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \
+ "
+PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline"
+PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no,"
+PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6,"
+
+EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
+ inetutils_cv_path_login=${base_bindir}/login \
+ --with-libreadline-prefix=${STAGING_LIBDIR} \
+ --enable-rpath=no \
+"
+
+EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin "
+
+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_sbindir}
+ install -m 0755 -d ${D}${sbindir}
+ install -m 0755 -d ${D}${sysconfdir}/xinetd.d
+ if [ "${base_bindir}" != "${bindir}" ] ; then
+ install -m 0755 -d ${D}${base_bindir}
+ mv ${D}${bindir}/ping* ${D}${base_bindir}/
+ mv ${D}${bindir}/hostname ${D}${base_bindir}/
+ fi
+ mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
+ mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
+ mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
+ mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
+ mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
+ if [ -e ${D}${libexecdir}/rlogind ]; then
+ mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
+ fi
+ if [ -e ${D}${libexecdir}/rshd ]; then
+ mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
+ fi
+ if [ -e ${D}${libexecdir}/talkd ]; then
+ mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
+ fi
+ 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/*
+ if [ -e ${D}${libdir}/charset.alias ]; then
+ rm -rf ${D}${libdir}/charset.alias
+ fi
+ 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"
+NOAUTOPACKAGEDEBUG = "1"
+
+ALTERNATIVE_PRIORITY = "79"
+ALTERNATIVE_${PN} = "talk whois"
+ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd"
+ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
+
+ALTERNATIVE_PRIORITY_${PN}-logger = "60"
+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}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8"
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
+ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
+ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
+
+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 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+
+FILES_${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
+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}"
+RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch b/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch
new file mode 100644
index 000000000..952232b7a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch
@@ -0,0 +1,44 @@
+--- lftp-4.6.3a/src/NetAccess.cc.orig 2016-06-18 10:25:51.063358981 -0400
++++ lftp-4.6.3a/src/NetAccess.cc 2016-06-18 10:26:04.143359209 -0400
+@@ -21,7 +21,7 @@
+
+ #include <errno.h>
+ #include <assert.h>
+-#include <math.h>
++#include <cmath>
+ #include <sys/types.h>
+
+ #include "NetAccess.h"
+--- lftp-4.6.3a/src/Speedometer.cc.orig 2016-06-18 10:24:58.895358073 -0400
++++ lftp-4.6.3a/src/Speedometer.cc 2016-06-18 10:25:10.879358281 -0400
+@@ -18,7 +18,7 @@
+ */
+
+ #include <config.h>
+-#include <math.h>
++#include <cmath>
+ #include <stdlib.h>
+ #include "Speedometer.h"
+ #include "misc.h"
+--- lftp-4.6.3a/src/FileCopy.cc.orig 2016-06-18 10:24:15.939357325 -0400
++++ lftp-4.6.3a/src/FileCopy.cc 2016-06-18 10:24:24.583357475 -0400
+@@ -36,7 +36,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#include <math.h>
++#include <cmath>
+ #include <stddef.h>
+ #include "FileCopy.h"
+ #include "url.h"
+--- lftp-4.6.3a/src/ResMgr.cc.orig 2016-06-18 10:23:31.387356549 -0400
++++ lftp-4.6.3a/src/ResMgr.cc 2016-06-18 10:23:41.771356729 -0400
+@@ -23,7 +23,7 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+-#include <math.h>
++#include <cmath>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb b/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb
new file mode 100644
index 000000000..b6b65da73
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb
@@ -0,0 +1,34 @@
+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"
+
+SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2 \
+ file://fix-gcc-6-conflicts-signbit.patch \
+ "
+SRC_URI[md5sum] = "3701e7675baa5619c92622eb141c8301"
+SRC_URI[sha256sum] = "fe441f20a9a317cfb99a8b8e628ba0457df472b6d93964d17374d5b5ebdf9280"
+
+inherit autotools gettext pkgconfig
+
+acpaths = "-I ./m4"
+
+EXTRA_OECONF += "--with-modules"
+
+PACKAGECONFIG ??= "libidn openssl zlib gnutls readline expat"
+PACKAGECONFIG[libidn] = "--with-libidn, --without-libidn, libidn"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_INCDIR}/.., --without-zlib, zlib"
+PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
+PACKAGECONFIG[readline] = "--with-readline=${STAGING_INCDIR}/.. --with-readline-inc=${STAGING_INCDIR} --with-readline-lib=-lreadline, --with-readline=no, readline"
+PACKAGECONFIG[expat] = "--with-expat=${STAGING_INCDIR}/.. --with-expat-inc=${STAGING_INCDIR} --with-expat-lib=-lexpat, , expat"
+
+do_install_append() {
+ rm -rf ${D}${libdir}/charset.alias
+}
+
+FILES_${PN}-dbg += "${libdir}/lftp/${PV}/.debug"
+RDEPENDS_${PN} = "perl bash readline"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
new file mode 100644
index 000000000..e579de507
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -0,0 +1,16 @@
+SUMMARY = "dumb networking library"
+HOMEPAGE = "http://code.google.com/p/libdnet/"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9"
+
+SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1"
+SRCREV = "12fca29a6d4e99d1b923d6820887fe7b24226904"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+acpaths = "-I ./config/"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb b/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb
new file mode 100644
index 000000000..736cce1b0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb
@@ -0,0 +1,42 @@
+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://tls.mbed.org/"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz"
+
+SRC_URI[md5sum] = "2d4b0e2cb844efde1e73d3bcd9731fef"
+SRC_URI[sha256sum] = "ab8b62b995781bcf22e87a265ed06267f87c3041198e996b44441223d19fa9c3"
+
+inherit cmake
+
+PACKAGECONFIG ??= "shared-libs programs"
+PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF"
+PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF"
+
+EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
+
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+
+PACKAGES =+ "${PN}-programs"
+FILES_${PN}-programs = "${bindir}/"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb b/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
new file mode 100644
index 000000000..c6f36e137
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Lightweight UPnP IGD daemon"
+DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \
+which provide NAT traversal services to any UPnP enabled client on \
+the network."
+
+SECTION = "networking"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aa71c78c373ccfe0ff207af0cd966d91"
+
+inherit autotools gettext pkgconfig
+
+DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
+
+SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz;downloadfilename=${P}.tar.gz \
+"
+SRC_URI[md5sum] = "1c07a215dd9b362e75a9efc05e2fb3b4"
+SRC_URI[sha256sum] = "d96aa3a00e0f5490826bba3cb97e68cd27479e5839adac4b9bcb66eae786bfb7"
+
+IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
+
+do_compile() {
+ cd ${S}
+ CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install ${S}/miniupnpd ${D}/${sbindir}
+ install -d ${D}/${sysconfdir}/${BPN}
+ install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN}
+ install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN}
+ install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN}
+ install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN}
+ install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN}
+ install -d ${D}/${sysconfdir}/init.d
+ install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd
+}
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
new file mode 100644
index 000000000..1b604ad52
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
@@ -0,0 +1,39 @@
+SUMMARY = "NetworkManager-openvpn-plugin"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
+
+DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
+
+inherit gnomebase useradd gettext systemd
+
+SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
+SRC_URI[md5sum] = "9f325be386aa906ff9b0b7c0bdf2a59a"
+SRC_URI[sha256sum] = "3e0b4007f248d96df4b8eb5d0f937536044af7053debbbf525e67c9bc5d30654"
+
+S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
+
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+
+do_install_append () {
+ rm -rf ${D}${libdir}/NetworkManager/*.la
+}
+
+# Create user and group nm-openvpn that are needed since version 1.0.6
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system nm-openvpn"
+
+FILES_${PN} += " \
+ ${libdir}/NetworkManager/*.so \
+ ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
+"
+
+FILES_${PN}-staticdev += " \
+ ${libdir}/NetworkManager/*.a \
+"
+
+RDEPENDS_${PN} = " \
+ networkmanager \
+ openvpn \
+"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
new file mode 100644
index 000000000..719442319
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
@@ -0,0 +1,40 @@
+From 18f71c1b48730b8602826517f2b5b088283ae948 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 31 Mar 2017 16:48:00 -0700
+Subject: [PATCH 5/7] sd-lldp.h: Remove net/ethernet.h seems to be over
+ specified
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemd/src/libsystemd-network/sd-lldp.c | 1 +
+ src/systemd/src/systemd/sd-lldp.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c
+index 31e2448..7721cc2 100644
+--- a/src/systemd/src/libsystemd-network/sd-lldp.c
++++ b/src/systemd/src/libsystemd-network/sd-lldp.c
+@@ -21,6 +21,7 @@
+ #include "nm-sd-adapt.h"
+
+ #include <arpa/inet.h>
++#include <net/ethernet.h>
+ #include <linux/sockios.h>
+
+ #include "sd-lldp.h"
+diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h
+index 3f35eeb..61b0e45 100644
+--- a/src/systemd/src/systemd/sd-lldp.h
++++ b/src/systemd/src/systemd/sd-lldp.h
+@@ -22,7 +22,7 @@
+ ***/
+
+ #include <inttypes.h>
+-#include <net/ethernet.h>
++//#include <net/ethernet.h>
+ #include <sys/types.h>
+
+ #include "sd-event.h"
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
new file mode 100644
index 000000000..28848d354
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
@@ -0,0 +1,25 @@
+From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001
+From: Pablo Saavedra <psaavedra@igalia.com>
+Date: Tue, 13 Mar 2018 17:36:20 +0100
+Subject: [PATCH 7/7] Fixed configure.ac: Fix pkgconfig sysroot locations
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51e5eb6..c9d3e56 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -669,7 +669,7 @@ else
+ AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled])
+
+ AC_CHECK_TOOLS(READELF, [eu-readelf readelf])
+- JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson`
++ JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson`
+ JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'`
+
+ if test "$JANSSON_SONAME" = ""; then
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
new file mode 100644
index 000000000..92485f044
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
@@ -0,0 +1,77 @@
+From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 11:08:30 +0100
+Subject: [PATCH] Do not create settings settings/property documentation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It was tried to get this work but gi / GirRepository could not be found by
+python. Anyway it is not necessary for us to have the settings/property docs.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ Makefile.am | 18 ++----------------
+ configure.ac | 4 ----
+ 2 files changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 639921d..314a61d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -961,9 +961,7 @@ endif
+ if HAVE_INTROSPECTION
+
+ libnm_noinst_data = \
+- libnm/nm-property-docs.xml \
+ libnm/nm-settings-docs-overrides.xml \
+- libnm/nm-settings-docs.xml \
+ libnm/nm-settings-keyfile-docs.xml \
+ libnm/nm-settings-ifcfg-rh-docs.xml
+
+@@ -3317,23 +3315,11 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
+ $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp
+
+ clients_common_settings_doc_c = clients/common/settings-docs.c
+-if HAVE_INTROSPECTION
+-$(clients_common_settings_doc_c): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp
+- $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^)
+-DISTCLEANFILES += $(clients_common_settings_doc_c)
+-check-local-settings-docs: $(clients_common_settings_doc_c)
+- @if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \
+- if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)" ; then \
+- echo "The generated file \"$(builddir)/$(clients_common_settings_doc_c)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_c).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes"; \
+- false; \
+- fi;\
+- fi
+-check_local += check-local-settings-docs
+-else
++
+ $(clients_common_settings_doc_c): $(clients_common_settings_doc_c).in clients/common/.dirstamp
+ $(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)"
+ check-local-settings-docs:
+-endif
++
+ EXTRA_DIST += \
+ $(clients_common_settings_doc_c) \
+ $(clients_common_settings_doc_c).in
+diff --git a/configure.ac b/configure.ac
+index c9d3e56..407222e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1286,10 +1286,6 @@ GTK_DOC_CHECK(1.0)
+ # check if we can build setting property documentation
+ build_docs=no
+ if test -n "$INTROSPECTION_MAKEFILE"; then
+- # If g-i is installed we know we have python, but we might not have pygobject
+- if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
+- AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
+- fi
+
+ AC_PATH_PROG(PERL, perl)
+ if test -z "$PERL"; then
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
new file mode 100644
index 000000000..9d208e1fd
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
@@ -0,0 +1,53 @@
+From e92de7409a3e107f90d108a9c5d49bd0418296dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 17:54:10 +0100
+Subject: [PATCH 1/4] Usual fix for musl libc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/stdio-util.h | 2 ++
+ src/systemd/src/basic/util.h | 5 +++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h
+index bd1144b..9eafacb 100644
+--- a/src/systemd/src/basic/stdio-util.h
++++ b/src/systemd/src/basic/stdio-util.h
+@@ -19,7 +19,9 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#if defined(__GLIBC__)
+ #include <printf.h>
++#endif
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h
+index b31dfd1..9b7032c 100644
+--- a/src/systemd/src/basic/util.h
++++ b/src/systemd/src/basic/util.h
+@@ -46,6 +46,11 @@
+ #include "missing.h"
+ #include "time-util.h"
+
++#if !defined(__GLIBC__)
++typedef int (*__compar_fn_t) (const void*, const void*);
++typedef __compar_fn_t comparison_fn_t;
++#endif
++
+ size_t page_size(void) _pure_;
+ #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
+
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch
new file mode 100644
index 000000000..548cccb32
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch
@@ -0,0 +1,35 @@
+From 57239fda56b68a8f3e413f7b6af5290ba0d86636 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:18:06 +0100
+Subject: [PATCH 2/4] musl: dlopen is included so LD_LIBS="" instead of
+ LD_LIBS="none required"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 487a266..96ae4f7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -305,6 +305,7 @@ dnl
+ dnl Checks for libdl - on certain platforms its part of libc
+ dnl
+ AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
++AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""])
+ AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
+
+ PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch
new file mode 100644
index 000000000..5dd17b63b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch
@@ -0,0 +1,72 @@
+From 714b4731a238653e9c7d885c0dee10677b0a4df3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:24:07 +0100
+Subject: [PATCH 3/4] musl: network support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ libnm-core/nm-utils.h | 4 ++++
+ src/platform/wifi/wifi-utils.h | 4 ++++
+ src/systemd/src/basic/socket-util.h | 5 +++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
+index df9284b..2bcf4b8 100644
+--- a/libnm-core/nm-utils.h
++++ b/libnm-core/nm-utils.h
+@@ -30,7 +30,11 @@
+ #include <netinet/in.h>
+
+ /* For ETH_ALEN and INFINIBAND_ALEN */
++#if defined(__GLIBC__)
+ #include <linux/if_ether.h>
++#else
++#define ETH_ALEN 6 /* Octets in one ethernet addr */
++#endif
+ #include <linux/if_infiniband.h>
+
+ #include "nm-core-enum-types.h"
+diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h
+index 705717b..da3edc4 100644
+--- a/src/platform/wifi/wifi-utils.h
++++ b/src/platform/wifi/wifi-utils.h
+@@ -22,7 +22,11 @@
+ #ifndef __WIFI_UTILS_H__
+ #define __WIFI_UTILS_H__
+
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#else /* musl libc */
++#define ETH_ALEN 6 /* Octets in one ethernet addr */
++#endif
+
+ #include "nm-dbus-interface.h"
+
+diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h
+index d7e2d85..d109c84 100644
+--- a/src/systemd/src/basic/socket-util.h
++++ b/src/systemd/src/basic/socket-util.h
+@@ -29,6 +29,11 @@
+ #include <linux/netlink.h>
+ #include <linux/if_infiniband.h>
+ #include <linux/if_packet.h>
++#if !defined(__GLIBC__)
++/* SIOCGSTAMPNS from linux/asm-generic.h
++ * for src/systemd/src/libsystemd-network/sd-lldp.c */
++#include <linux/sockios.h>
++#endif
+
+ #include "macro.h"
+ #include "missing.h"
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
new file mode 100644
index 000000000..fc55ce85f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
@@ -0,0 +1,62 @@
+From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:29:00 +0100
+Subject: [PATCH 4/4] musl: process-util
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/process-util.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c
+index 272030d..485f1db 100644
+--- a/src/systemd/src/basic/process-util.c
++++ b/src/systemd/src/basic/process-util.c
+@@ -36,6 +36,9 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <unistd.h>
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+ #if 0 /* NM_IGNORED */
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+@@ -1015,11 +1018,13 @@ static void reset_cached_pid(void) {
+ cached_pid = CACHED_PID_UNSET;
+ }
+
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+ * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
+ extern void* __dso_handle __attribute__ ((__weak__));
++#endif
+
+ pid_t getpid_cached(void) {
+ pid_t current_value;
+@@ -1042,7 +1047,11 @@ pid_t getpid_cached(void) {
+
+ new_pid = getpid();
+
++#ifdef __GLIBC__
+ if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
++#else
++ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
++#endif
+ /* OOM? Let's try again later */
+ cached_pid = CACHED_PID_UNSET;
+ return new_pid;
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch
new file mode 100644
index 000000000..752fe4f58
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch
@@ -0,0 +1,77 @@
+From b3b4fe35018c98ad176719b2d9ffb867974fc7c3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 16 Apr 2018 14:45:44 +0200
+Subject: [PATCH] musl: avoid further conflicts by including net/ethernet.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/systemd/sd-dhcp-client.h | 2 ++
+ src/systemd/src/systemd/sd-dhcp-lease.h | 2 ++
+ src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++
+ src/systemd/src/systemd/sd-ipv4ll.h | 2 ++
+ 4 files changed, 8 insertions(+)
+
+diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h
+index 5e46d8d..18a613f 100644
+--- a/src/systemd/src/systemd/sd-dhcp-client.h
++++ b/src/systemd/src/systemd/sd-dhcp-client.h
+@@ -21,7 +21,9 @@
+ ***/
+
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+ #include <sys/types.h>
+
+diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h
+index 7ab99cc..85acdf2 100644
+--- a/src/systemd/src/systemd/sd-dhcp-lease.h
++++ b/src/systemd/src/systemd/sd-dhcp-lease.h
+@@ -22,7 +22,9 @@
+ ***/
+
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+ #include <sys/types.h>
+
+diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h
+index 7819f0d..35f30ee 100644
+--- a/src/systemd/src/systemd/sd-dhcp6-client.h
++++ b/src/systemd/src/systemd/sd-dhcp6-client.h
+@@ -21,7 +21,9 @@
+ ***/
+
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <sys/types.h>
+
+ #include "sd-dhcp6-lease.h"
+diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h
+index 5ba9208..c90eca6 100644
+--- a/src/systemd/src/systemd/sd-ipv4ll.h
++++ b/src/systemd/src/systemd/sd-ipv4ll.h
+@@ -20,7 +20,9 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+
+ #include "sd-event.h"
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch
new file mode 100644
index 000000000..8ed7ee64f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch
@@ -0,0 +1,47 @@
+From 6db6596e450062601d18b2ae812a4a58d2e03a53 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 16 Apr 2018 15:07:20 +0200
+Subject: [PATCH] Add a strndupa replacement for musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/in-addr-util.c | 1 +
+ src/systemd/src/basic/string-util.h | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/systemd/src/basic/in-addr-util.c b/src/systemd/src/basic/in-addr-util.c
+index 2a02d90..a57c360 100644
+--- a/src/systemd/src/basic/in-addr-util.c
++++ b/src/systemd/src/basic/in-addr-util.c
+@@ -30,6 +30,7 @@
+ #include "in-addr-util.h"
+ #include "macro.h"
+ #include "parse-util.h"
++#include "string-util.h"
+ #include "util.h"
+
+ bool in4_addr_is_null(const struct in_addr *a) {
+diff --git a/src/systemd/src/basic/string-util.h b/src/systemd/src/basic/string-util.h
+index 4c94b18..a6dc446 100644
+--- a/src/systemd/src/basic/string-util.h
++++ b/src/systemd/src/basic/string-util.h
+@@ -44,6 +44,11 @@
+ #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
+ #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
+
++/* musl does not know strndupa */
++#if !defined(__GLIBC__)
++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
++#endif
++
+ int strcmp_ptr(const char *a, const char *b) _pure_;
+
+ static inline bool streq_ptr(const char *a, const char *b) {
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb
new file mode 100644
index 000000000..09c5dbd18
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb
@@ -0,0 +1,143 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
+ file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \
+ file://docs/api/html/license.html;md5=77b9e362690c149da196aefe7712db30 \
+"
+
+DEPENDS = " \
+ intltool-native \
+ libxslt-native \
+ libnl \
+ dbus \
+ dbus-glib \
+ dbus-glib-native \
+ libgudev \
+ util-linux \
+ libndp \
+ libnewt \
+ polkit \
+ jansson \
+ curl \
+"
+
+inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection gtk-doc
+
+SRC_URI = " \
+ ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
+ file://0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
+ file://0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
+ file://0003-Do-not-create-settings-settings-property-documentati.patch \
+ file://musl/0001-musl-basic.patch \
+ file://musl/0002-musl-dlopen-configure-ac.patch \
+ file://musl/0003-musl-network-support.patch \
+ file://musl/0004-musl-process-util.patch \
+ file://musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch \
+ file://musl/0006-Add-a-strndupa-replacement-for-musl.patch \
+"
+SRC_URI[md5sum] = "de3c7147a693da6f80eb22f126086a14"
+SRC_URI[sha256sum] = "6af0b1e856a3725f88791f55c4fbb04105dc0b20dbf182aaec8aad16481fac76"
+
+S = "${WORKDIR}/NetworkManager-${PV}"
+
+EXTRA_OECONF = " \
+ --disable-ifcfg-rh \
+ --disable-ifnet \
+ --disable-ifcfg-suse \
+ --disable-more-warnings \
+ --with-iptables=${sbindir}/iptables \
+ --with-tests \
+ --with-nmtui=yes \
+"
+
+# gobject-introspection related
+GI_DATA_ENABLED_libc-musl = "False"
+
+# stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template
+CFLAGS_libc-musl_append = " \
+ -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \
+ -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \
+"
+
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs"
+}
+
+PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \
+"
+PACKAGECONFIG[systemd] = " \
+ --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
+ --without-systemdsystemunitdir, \
+ polkit \
+"
+PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
+# consolekit is not picked by shlibs, so add it to RDEPENDS too
+PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
+PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
+# Use full featured dhcp client instead of internal one
+PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
+PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
+PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
+PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
+PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,wireless-tools,wpa-supplicant wireless-tools"
+PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
+PACKAGECONFIG[netconfig] = "--with-netconfig=yes,--with-netconfig=no"
+PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
+
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \
+ ${PN}-nmtui ${PN}-nmtui-doc \
+ ${PN}-adsl \
+"
+
+FILES_libnmutil += "${libdir}/libnm-util.so.*"
+FILES_libnmglib += "${libdir}/libnm-glib.so.*"
+FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*"
+
+FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so"
+
+FILES_${PN} += " \
+ ${libexecdir} \
+ ${libdir}/pppd/*/nm-pppd-plugin.so \
+ ${libdir}/NetworkManager/*.so \
+ ${nonarch_libdir}/NetworkManager/VPN \
+ ${nonarch_libdir}/NetworkManager/conf.d \
+ ${datadir}/polkit-1 \
+ ${datadir}/dbus-1 \
+ ${base_libdir}/udev/* \
+ ${systemd_unitdir}/system \
+"
+
+RRECOMMENDS_${PN} += "iptables \
+ ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
+"
+RCONFLICTS_${PN} = "connman"
+
+FILES_${PN}-dev += " \
+ ${datadir}/NetworkManager/gdb-cmd \
+ ${libdir}/pppd/*/*.la \
+ ${libdir}/NetworkManager/*.la \
+"
+
+FILES_${PN}-nmtui = " \
+ ${bindir}/nmtui \
+ ${bindir}/nmtui-edit \
+ ${bindir}/nmtui-connect \
+ ${bindir}/nmtui-hostname \
+"
+
+FILES_${PN}-nmtui-doc = " \
+ ${mandir}/man1/nmtui* \
+"
+
+SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service"
+
+do_install_append() {
+ rm -rf ${D}/run ${D}${localstatedir}/run
+}
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
new file mode 100644
index 000000000..c944144e2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Open client for Cisco AnyConnect VPN"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad"
+
+DEPENDS = "vpnc libxml2 krb5 gettext-native"
+
+PACKAGECONFIG ??= "gnutls lz4 libproxy"
+
+# config defaults
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy,"
+
+# not config defaults
+PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite,"
+
+PV = "7.08"
+
+SRCREV = "9697bea0e50952cab57063238b43a7099e498cbb"
+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/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb b/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb
new file mode 100644
index 000000000..4e41aa576
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Easy communication with NetworkManager from Python"
+HOMEPAGE = "https://github.com/seveas/python-networkmanager"
+LICENSE = "Zlib"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8d8bac174bf8422b151200e6cc78ebe4"
+
+SRC_URI[md5sum] = "5fc644a65463031295c6b7dd51a0f1bd"
+SRC_URI[sha256sum] = "bc36507506ad29bfdac941b0987ebd1cc9633c9a9291d7378e229e4515a0a517"
+
+PYPI_PACKAGE = "python-networkmanager"
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "networkmanager python-dbus python-six"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch
new file mode 100644
index 000000000..08ba2c31e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch
@@ -0,0 +1,40 @@
+From e0c690acfcddd3c3421f6eb0182c54815fd70f8f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 23:21:08 -0700
+Subject: [PATCH] rdate: define logwtmp on libc != glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/rdate.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/rdate.c b/src/rdate.c
+index 943d481..685b1b8 100644
+--- a/src/rdate.c
++++ b/src/rdate.c
+@@ -41,7 +41,22 @@ static int print_mode = 0; // display the time
+ static int timeout = 10; // timeout for each connection attempt
+ static char *service = DEFAULT_SERVICE;
+
++#ifndef __GLIBC__
++static void logwtmp(const char * line, const char * name, const char * host)
++{
++ struct utmp u;
++ memset(&u, 0, sizeof(u));
++
++ u.ut_pid = getpid();
++ u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
++ strncpy(u.ut_line, line, sizeof(u.ut_line));
++ strncpy(u.ut_name, name, sizeof(u.ut_name));
++ strncpy(u.ut_host, host, sizeof(u.ut_host));
++ gettimeofday(&(u.ut_tv), NULL);
+
++ updwtmp(_PATH_WTMP, &u);
++}
++#endif /* __GLIBC__ */
+
+ // Returns string from address info pointer
+ static char*
+--
+2.13.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
new file mode 100644
index 000000000..2f6518984
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
@@ -0,0 +1,33 @@
+From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 26 Jun 2017 22:50:56 -0700
+Subject: [PATCH] src/rdate: Fix printf format errors
+
+Fixes
+
+rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
+| syslog(is_error?LOG_WARNING:LOG_INFO, buf);
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/rdate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rdate.c b/src/rdate.c
+index 5c3e829..943d481 100644
+--- a/src/rdate.c
++++ b/src/rdate.c
+@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
+ return; /* Error, which we can't report because this _is_ the error
+ reporting mechanism */
+ if(log_mode)
+- syslog(is_error?LOG_WARNING:LOG_INFO, buf);
++ syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
+ if(is_error || print_mode)
+ fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
+ }
+--
+2.13.2
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
new file mode 100644
index 000000000..cd4db12c0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool for getting the date/time from a remote machine."
+DESCRIPTION = "The rdate utility retrieves the date and time from \
+ another machine on your network, using the protocol described in RFC 868. \
+ If you run rdate as root, it will set your machine local time to the \
+ time of the machine that you queried. \
+"
+
+HOMEPAGE= "https://www.aelius.com/njh/rdate/"
+SECTION = "Applications/System"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
+ file://0001-src-rdate-Fix-printf-format-errors.patch \
+ file://0001-rdate-define-logwtmp-on-libc-glibc.patch \
+ "
+SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
+SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
+
+inherit autotools
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch
new file mode 100644
index 000000000..c95eaf8f5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch
@@ -0,0 +1,75 @@
+From 244861e2c9bb9cc44f4bd246964ba850a7cf1216 Mon Sep 17 00:00:00 2001
+From: Xin Ouyang <Xin.Ouyang@windriver.com>
+Date: Tue, 15 May 2012 15:06:43 +0800
+Subject: [PATCH] rdist: bitbake build
+
+Upstream-Status: Inappropriate [OE specific]
+
+---
+ Makefile.local | 8 ++++----
+ doc/Makefile.real | 4 +++-
+ src/Makefile.real | 1 +
+ 3 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.local b/Makefile.local
+index 26092b2..389cb84 100644
+--- a/Makefile.local
++++ b/Makefile.local
+@@ -14,7 +14,7 @@
+ # BIN_DIR variable, you would uncomment the following line
+ # or add your own line.
+ #
+-#BIN_DIR = /usr/bin
++BIN_DIR = ${DESTDIR}/${bindir}
+
+ #
+ # Add any local definitions you want pass to the compiler to DEFS_LOCAL
+@@ -46,13 +46,13 @@ LIBS_LOCAL =
+ # Set a site specific install program to use. Must support BSD style
+ # install(1) arguments.
+ #
+-#INSTALL = install
++INSTALL = install
+
+ #
+ # Site specific Man Page configuration.
+ #
+-#MAN_1_DIR = /usr/local/man/man1
+-#MAN_8_DIR = /usr/local/man/man8
++MAN_1_DIR = ${DESTDIR}/${mandir}/man1
++MAN_8_DIR = ${DESTDIR}/${mandir}/man8
+ #MAN_OWNER = bin
+ #MAN_GROUP = bin
+ #MAN_MODE = 644
+diff --git a/doc/Makefile.real b/doc/Makefile.real
+index 42cabec..e32c30b 100644
+--- a/doc/Makefile.real
++++ b/doc/Makefile.real
+@@ -16,9 +16,11 @@ all:
+
+ doc:
+
+-install:
++install: install.man
+
+ install.man: rdist.man rdistd.man
++ test -d ${MAN_1_DIR} || ${INSTALL} -d ${MAN_1_DIR}
++ test -d ${MAN_8_DIR} || ${INSTALL} -d ${MAN_8_DIR}
+ ${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST}
+ ${INSTALL} ${INSTALL_ARGS} rdistd.man ${SERVER_DEST}
+
+diff --git a/src/Makefile.real b/src/Makefile.real
+index 02179e4..9ec551d 100644
+--- a/src/Makefile.real
++++ b/src/Makefile.real
+@@ -52,6 +52,7 @@ clean:
+ $(COMMONOBJS) $(MISSINGOBJS)
+
+ install:
++ test -d $(BIN_DIR) || $(INSTALL) -d $(BIN_DIR)
+ $(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \
+ $(CLIENT_BIN) $(BIN_DIR)/$(CLIENT)
+ $(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \
+--
+1.7.5.4
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch
new file mode 100644
index 000000000..435491221
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch
@@ -0,0 +1,147 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/gram.y.bison 1998-11-10 05:10:42.000000000 +0100
++++ rdist-6.1.5/src/gram.y 2003-06-04 16:02:19.000000000 +0200
+@@ -90,10 +90,10 @@
+ struct namelist *namel;
+ }
+
+-%type <optval> OPTION, options
+-%type <string> NAME, STRING
+-%type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd
+-%type <namel> namelist, names, opt_namelist nlist
++%type <optval> OPTION options
++%type <string> NAME STRING
++%type <subcmd> INSTALL NOTIFY EXCEPT PATTERN SPECIAL CMDSPECIAL cmdlist cmd
++%type <namel> namelist names opt_namelist nlist
+
+ %%
+
+@@ -101,19 +101,19 @@
+ | file command
+ ;
+
+-command: NAME '=' namelist = {
++command: NAME '=' namelist {
+ (void) lookup($1, INSERT, $3);
+ }
+- | namelist ARROW namelist cmdlist = {
++ | namelist ARROW namelist cmdlist {
+ insert((char *)NULL, $1, $3, $4);
+ }
+- | NAME COLON namelist ARROW namelist cmdlist = {
++ | NAME COLON namelist ARROW namelist cmdlist {
+ insert($1, $3, $5, $6);
+ }
+- | namelist DCOLON NAME cmdlist = {
++ | namelist DCOLON NAME cmdlist {
+ append((char *)NULL, $1, $3, $4);
+ }
+- | NAME COLON namelist DCOLON NAME cmdlist = {
++ | NAME COLON namelist DCOLON NAME cmdlist {
+ append($1, $3, $5, $6);
+ }
+ | error
+@@ -133,10 +133,10 @@
+ }
+ ;
+
+-nlist: NAME = {
++nlist: NAME {
+ $$ = makenl($1);
+ }
+- | '(' names ')' = {
++ | '(' names ')' {
+ $$ = $2;
+ }
+ ;
+@@ -144,7 +144,7 @@
+ names: /* VOID */ {
+ $$ = last_n = NULL;
+ }
+- | names NAME = {
++ | names NAME {
+ if (last_n == NULL)
+ $$ = last_n = makenl($2);
+ else {
+@@ -158,7 +158,7 @@
+ cmdlist: /* VOID */ {
+ $$ = last_sc = NULL;
+ }
+- | cmdlist cmd = {
++ | cmdlist cmd {
+ if (last_sc == NULL)
+ $$ = last_sc = $2;
+ else {
+@@ -169,7 +169,7 @@
+ }
+ ;
+
+-cmd: INSTALL options opt_namelist ';' = {
++cmd: INSTALL options opt_namelist ';' {
+ register struct namelist *nl;
+
+ $1->sc_options = $2 | options;
+@@ -185,17 +185,17 @@
+ }
+ $$ = $1;
+ }
+- | NOTIFY namelist ';' = {
++ | NOTIFY namelist ';' {
+ if ($2 != NULL)
+ $1->sc_args = expand($2, E_VARS);
+ $$ = $1;
+ }
+- | EXCEPT namelist ';' = {
++ | EXCEPT namelist ';' {
+ if ($2 != NULL)
+ $1->sc_args = expand($2, E_ALL);
+ $$ = $1;
+ }
+- | PATTERN namelist ';' = {
++ | PATTERN namelist ';' {
+ struct namelist *nl;
+ char *cp, *re_comp();
+
+@@ -205,13 +205,13 @@
+ $1->sc_args = expand($2, E_VARS);
+ $$ = $1;
+ }
+- | SPECIAL opt_namelist STRING ';' = {
++ | SPECIAL opt_namelist STRING ';' {
+ if ($2 != NULL)
+ $1->sc_args = expand($2, E_ALL);
+ $1->sc_name = $3;
+ $$ = $1;
+ }
+- | CMDSPECIAL opt_namelist STRING ';' = {
++ | CMDSPECIAL opt_namelist STRING ';' {
+ if ($2 != NULL)
+ $1->sc_args = expand($2, E_ALL);
+ $1->sc_name = $3;
+@@ -219,18 +219,18 @@
+ }
+ ;
+
+-options: /* VOID */ = {
++options: /* VOID */ {
+ $$ = 0;
+ }
+- | options OPTION = {
++ | options OPTION {
+ $$ |= $2;
+ }
+ ;
+
+-opt_namelist: /* VOID */ = {
++opt_namelist: /* VOID */ {
+ $$ = NULL;
+ }
+- | namelist = {
++ | namelist {
+ $$ = $1;
+ }
+ ;
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch
new file mode 100644
index 000000000..ed3d7f1b3
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch
@@ -0,0 +1,2087 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/gram.y.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/gram.y 2003-12-17 11:38:16.000000000 +0100
+@@ -40,7 +40,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: gram.y,v 6.30 1998/11/10 04:10:42 mcooper Exp $";
+
+@@ -170,7 +170,7 @@
+ ;
+
+ cmd: INSTALL options opt_namelist ';' {
+- register struct namelist *nl;
++ struct namelist *nl;
+
+ $1->sc_options = $2 | options;
+ if ($3 != NULL) {
+@@ -240,11 +240,11 @@
+ int yylineno = 1;
+ extern FILE *fin;
+
+-yylex()
++int yylex()
+ {
+ static char yytext[INMAX];
+- register int c;
+- register char *cp1, *cp2;
++ int c;
++ char *cp1, *cp2;
+ static char quotechars[] = "[]{}*?$";
+
+ again:
+@@ -409,8 +409,8 @@
+ * some of the characters we use.
+ */
+ extern int any(c, str)
+- register int c;
+- register char *str;
++ int c;
++ char *str;
+ {
+ while (*str)
+ if (c == *str++)
+@@ -421,13 +421,14 @@
+ /*
+ * Insert or append ARROW command to list of hosts to be updated.
+ */
++void
+ insert(label, files, hosts, subcmds)
+ char *label;
+ struct namelist *files, *hosts;
+ struct subcmd *subcmds;
+ {
+- register struct cmd *c, *prev, *nc;
+- register struct namelist *h, *lasth;
++ struct cmd *c, *prev, *nc;
++ struct namelist *h, *lasth;
+
+ debugmsg(DM_CALL, "insert(%s, %x, %x, %x) start, files = %s",
+ label == NULL ? "(null)" : label,
+@@ -475,13 +476,14 @@
+ * Append DCOLON command to the end of the command list since these are always
+ * executed in the order they appear in the distfile.
+ */
++void
+ append(label, files, stamp, subcmds)
+ char *label;
+ struct namelist *files;
+ char *stamp;
+ struct subcmd *subcmds;
+ {
+- register struct cmd *c;
++ struct cmd *c;
+
+ c = ALLOC(cmd);
+ c->c_type = DCOLON;
+@@ -501,6 +503,7 @@
+ /*
+ * Error printing routine in parser.
+ */
++void
+ yyerror(s)
+ char *s;
+ {
+@@ -530,7 +533,7 @@
+ makenl(name)
+ char *name;
+ {
+- register struct namelist *nl;
++ struct namelist *nl;
+
+ debugmsg(DM_CALL, "makenl(%s)", name == NULL ? "null" : name);
+
+@@ -627,7 +630,7 @@
+ makesubcmd(type)
+ int type;
+ {
+- register struct subcmd *sc;
++ struct subcmd *sc;
+
+ sc = ALLOC(subcmd);
+ sc->sc_type = type;
+--- rdist-6.1.5/src/rdist.c.cleanup 1998-11-10 05:13:50.000000000 +0100
++++ rdist-6.1.5/src/rdist.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: rdist.c,v 6.66 1998/11/10 04:13:49 mcooper Exp $";
+
+@@ -80,7 +80,7 @@
+ char *name;
+ struct namelist **hostlist;
+ {
+- register struct namelist *ptr, *new;
++ struct namelist *ptr, *new;
+
+ if (!name || !hostlist)
+ return;
+@@ -97,14 +97,15 @@
+ *hostlist = new;
+ }
+
++int
+ main(argc, argv, envp)
+ int argc;
+ char *argv[];
+ char **envp;
+ {
+ struct namelist *hostlist = NULL;
+- register int x;
+- register char *cp;
++ int x;
++ char *cp;
+ int cmdargs = 0;
+ int c;
+
+@@ -114,7 +115,7 @@
+ */
+ setprogname(argv);
+
+- if (cp = msgparseopts(localmsglist, TRUE)) {
++ if ((cp = msgparseopts(localmsglist, TRUE))) {
+ error("Bad builtin log option (%s): %s.",
+ localmsglist, cp);
+ usage();
+@@ -158,7 +159,7 @@
+ while ((c = getopt(argc, argv, optchars)) != -1)
+ switch (c) {
+ case 'l':
+- if (cp = msgparseopts(optarg, TRUE)) {
++ if ((cp = msgparseopts(optarg, TRUE))) {
+ error("Bad log option \"%s\": %s.", optarg,cp);
+ usage();
+ }
+@@ -206,7 +207,7 @@
+
+ case 'D':
+ debug = DM_ALL;
+- if (cp = msgparseopts("stdout=all,debug", TRUE)) {
++ if ((cp = msgparseopts("stdout=all,debug", TRUE))) {
+ error("Enable debug messages failed: %s.", cp);
+ usage();
+ }
+@@ -245,7 +246,7 @@
+ error("No path specified to \"-P\".");
+ usage();
+ }
+- if (cp = searchpath(optarg))
++ if ((cp = searchpath(optarg)))
+ path_remsh = strdup(cp);
+ else {
+ error("No component of path \"%s\" exists.",
+@@ -297,7 +298,7 @@
+ else {
+ if (fin == NULL)
+ fin = opendist(distfile);
+- (void) yyparse();
++ yyparse();
+ /*
+ * Need to keep stdin open for child processing later
+ */
+@@ -348,6 +349,7 @@
+ /*
+ * Print usage message and exit.
+ */
++void
+ usage()
+ {
+ char *sopts = "cDFnv";
+@@ -379,12 +381,13 @@
+ /*
+ * rcp like interface for distributing files.
+ */
++void
+ docmdargs(nargs, args)
+ int nargs;
+ char *args[];
+ {
+- register struct namelist *nl, *prev;
+- register char *cp;
++ struct namelist *nl, *prev;
++ char *cp;
+ struct namelist *files, *hosts;
+ struct subcmd *cmds;
+ char *dest;
+@@ -433,10 +436,10 @@
+ * Get a list of NAME blocks (mostly for debugging).
+ */
+ extern char *getnlstr(nl)
+- register struct namelist *nl;
++ struct namelist *nl;
+ {
+ static char buf[16384];
+- register int count = 0, len = 0;
++ int count = 0, len = 0;
+
+ (void) sprintf(buf, "(");
+
+--- rdist-6.1.5/src/client.c.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/client.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: client.c,v 6.82 1998/11/10 04:08:47 mcooper Exp $";
+
+@@ -84,7 +84,7 @@
+ int destdir;
+ {
+ extern struct namelist *filelist;
+- register char *lname, *cp;
++ char *lname, *cp;
+ static char buff[BUFSIZ];
+ int srclen, pathlen;
+ char *p;
+@@ -146,7 +146,7 @@
+ struct namelist *list;
+ char *file;
+ {
+- register struct namelist *nl;
++ struct namelist *nl;
+
+ for (nl = list; nl != NULL; nl = nl->n_next)
+ if (strcmp(file, nl->n_name) == 0)
+@@ -163,7 +163,7 @@
+ char *rname;
+ int destdir;
+ {
+- register struct subcmd *sc;
++ struct subcmd *sc;
+ extern struct subcmd *subcmds;
+ char *rfile;
+
+@@ -200,7 +200,7 @@
+ {
+ char *rfile;
+ struct namelist *new;
+- register struct subcmd *sc;
++ struct subcmd *sc;
+ extern struct subcmd *subcmds;
+ int isokay = 0;
+
+@@ -227,7 +227,7 @@
+ */
+ static void freecmdspecialfiles()
+ {
+- register struct namelist *ptr, *save;
++ struct namelist *ptr, *save;
+
+ for (ptr = updfilelist; ptr; ) {
+ if (ptr->n_name) (void) free(ptr->n_name);
+@@ -249,10 +249,8 @@
+ char **filev;
+ opt_t opts;
+ {
+- register struct subcmd *sc;
+- register struct namelist *f;
+- register char **cpp;
+- char *file;
++ struct subcmd *sc;
++ struct namelist *f;
+ int first = TRUE;
+
+ for (sc = cmd->c_cmds; sc != NULL; sc = sc->sc_next) {
+@@ -294,7 +292,7 @@
+ int checkfilename(name)
+ char *name;
+ {
+- register char *cp;
++ char *cp;
+
+ if (strchr(name, '\n')) {
+ for (cp = name; *cp; cp++)
+@@ -501,7 +499,7 @@
+ static int rmchk(opts)
+ opt_t opts;
+ {
+- register u_char *s;
++ u_char *s;
+ struct stat stb;
+ int didupdate = 0;
+ int n;
+@@ -618,7 +616,7 @@
+
+ optarget = ptarget;
+ len = ptarget - target;
+- while (dp = readdir(d)) {
++ while ((dp = readdir(d))) {
+ if (!strcmp(dp->d_name, ".") ||
+ !strcmp(dp->d_name, ".."))
+ continue;
+@@ -631,7 +629,7 @@
+ if (ptarget[-1] != '/')
+ *ptarget++ = '/';
+ cp = dp->d_name;
+- while (*ptarget++ = *cp++)
++ while ((*ptarget++ = *cp++))
+ ;
+ ptarget--;
+ if (sendit(dp->d_name, opts, destdir) > 0)
+@@ -770,13 +768,13 @@
+ opt_t opts;
+ struct stat *statp;
+ {
+- register off_t size;
+- register time_t mtime;
++ off_t size;
++ time_t mtime;
+ unsigned short lmode;
+ unsigned short rmode;
+ char *owner = NULL, *group = NULL;
+ int done, n;
+- u_char *cp;
++ char *cp;
+
+ debugmsg(DM_CALL, "update(%s, 0x%x, 0x%x)\n", rname, opts, statp);
+
+@@ -1035,7 +1033,6 @@
+ int destdir;
+ {
+ static struct stat stb;
+- extern struct subcmd *subcmds;
+ char *user, *group;
+ int u, len;
+ int didupdate = 0;
+@@ -1157,7 +1154,7 @@
+ (void) unlink(statfile);
+ #endif
+
+- if (file = getnotifyfile())
++ if ((file = getnotifyfile()))
+ (void) unlink(file);
+ }
+
+--- rdist-6.1.5/src/child.c.cleanup 1998-11-10 05:18:57.000000000 +0100
++++ rdist-6.1.5/src/child.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: child.c,v 6.29 1998/11/10 04:18:56 mcooper Exp $";
+
+@@ -90,7 +90,7 @@
+ static void removechild(child)
+ CHILD *child;
+ {
+- register CHILD *pc, *prevpc;
++ CHILD *pc, *prevpc;
+
+ debugmsg(DM_CALL, "removechild(%s, %d, %d) start",
+ child->c_name, child->c_pid, child->c_readfd);
+@@ -148,7 +148,7 @@
+ static CHILD *copychild(child)
+ CHILD *child;
+ {
+- register CHILD *newc;
++ CHILD *newc;
+
+ newc = (CHILD *) xmalloc(sizeof(CHILD));
+
+@@ -167,7 +167,7 @@
+ static void addchild(child)
+ CHILD *child;
+ {
+- register CHILD *pc;
++ CHILD *pc;
+
+ debugmsg(DM_CALL, "addchild() start\n");
+
+@@ -280,7 +280,7 @@
+ */
+ static void reap()
+ {
+- register CHILD *pc;
++ CHILD *pc;
+ int status = 0;
+ pid_t pid;
+
+@@ -336,7 +336,7 @@
+ */
+ static void childscan()
+ {
+- register CHILD *pc, *nextpc;
++ CHILD *pc, *nextpc;
+
+ debugmsg(DM_CALL, "childscan() start");
+
+@@ -366,8 +366,8 @@
+ extern void waitup()
+ {
+ #if defined(HAVE_SELECT)
+- register int count;
+- register CHILD *pc;
++ int count;
++ CHILD *pc;
+ fd_set rchildfds;
+
+ debugmsg(DM_CALL, "waitup() start\n");
+--- rdist-6.1.5/src/docmd.c.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/docmd.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: docmd.c,v 6.87 1998/11/10 04:08:32 mcooper Exp $";
+
+@@ -99,10 +99,10 @@
+ */
+ static void notify(rhost, to, lmod)
+ char *rhost;
+- register struct namelist *to;
++ struct namelist *to;
+ time_t lmod;
+ {
+- register int fd, len;
++ int fd, len;
+ FILE *pf, *popen();
+ struct stat stb;
+ static char buf[BUFSIZ];
+@@ -221,7 +221,7 @@
+ struct cmd *cmd;
+ struct cmd *cmdlist;
+ {
+- register struct cmd *pcmd;
++ struct cmd *pcmd;
+
+ for (pcmd = cmdlist; pcmd; pcmd = pcmd->c_next) {
+ checkcmd(pcmd);
+@@ -238,7 +238,7 @@
+ struct cmd *cmd;
+ struct cmd *cmdlist;
+ {
+- register struct cmd *pc;
++ struct cmd *pc;
+
+ if (!cmd) {
+ debugmsg(DM_MISC, "markfailed() NULL cmd parameter");
+@@ -309,7 +309,7 @@
+ static int makeconn(rhost)
+ char *rhost;
+ {
+- register char *ruser, *cp;
++ char *ruser, *cp;
+ static char *cur_host = NULL;
+ extern char *locuser;
+ extern long min_freefiles, min_freespace;
+@@ -430,9 +430,9 @@
+ struct cmd *cmd;
+ char **filev;
+ {
+- register struct namelist *f;
+- register struct subcmd *sc;
+- register char **cpp;
++ struct namelist *f;
++ struct subcmd *sc;
++ char **cpp;
+ int n, ddir, destdir, opts = options;
+ struct namelist *files;
+ struct subcmd *sbcmds;
+@@ -567,7 +567,6 @@
+ }
+ }
+
+-done:
+ /*
+ * Run any commands for the entire cmd
+ */
+@@ -584,7 +583,7 @@
+ notify(rhost, sc->sc_args, (time_t) 0);
+
+ if (!nflag) {
+- register struct linkbuf *nextl, *l;
++ struct linkbuf *nextl, *l;
+
+ for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) {
+ nextl = l->nextp;
+@@ -601,11 +600,12 @@
+ setjmp_ok = FALSE;
+ }
+
++int
+ okname(name)
+- register char *name;
++ char *name;
+ {
+- register char *cp = name;
+- register int c, isbad;
++ char *cp = name;
++ int c, isbad;
+
+ for (isbad = FALSE; *cp && !isbad; ++cp) {
+ c = *cp;
+@@ -627,9 +627,9 @@
+ struct subcmd *sbcmds;
+ char **env;
+ {
+- register DIR *d;
+- register DIRENTRY *dp;
+- register char *cp;
++ DIR *d;
++ DIRENTRY *dp;
++ char *cp;
+ char *optarget;
+ int len;
+
+@@ -641,7 +641,7 @@
+ }
+ optarget = ptarget;
+ len = ptarget - target;
+- while (dp = readdir(d)) {
++ while ((dp = readdir(d))) {
+ if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
+ continue;
+ if (len + 1 + (int)strlen(dp->d_name) >= BUFSIZ - 1) {
+@@ -651,7 +651,7 @@
+ ptarget = optarget;
+ *ptarget++ = '/';
+ cp = dp->d_name;
+- while (*ptarget++ = *cp++)
++ while ((*ptarget++ = *cp++))
+ ;
+ ptarget--;
+ cmptime(target, sbcmds, env);
+@@ -740,9 +740,9 @@
+ struct cmd *cmd;
+ char **filev;
+ {
+- register struct subcmd *sc;
+- register struct namelist *f;
+- register char *cp, **cpp;
++ struct subcmd *sc;
++ struct namelist *f;
++ char *cp, **cpp;
+ struct stat stb;
+ struct namelist *files = cmd->c_files;
+ struct subcmd *sbcmds = cmd->c_cmds;
+@@ -824,8 +824,8 @@
+ extern int except(file)
+ char *file;
+ {
+- register struct subcmd *sc;
+- register struct namelist *nl;
++ struct subcmd *sc;
++ struct namelist *nl;
+
+ debugmsg(DM_CALL, "except(%s)", file);
+
+@@ -918,8 +918,8 @@
+ int argc;
+ char **argv;
+ {
+- register struct namelist *f;
+- register int i;
++ struct namelist *f;
++ int i;
+
+ if (argc) {
+ for (i = 0; i < argc; i++) {
+@@ -962,9 +962,9 @@
+ int argc;
+ char **argv;
+ {
+- register struct cmd *c;
+- register char *cp;
+- register int i;
++ struct cmd *c;
++ char *cp;
++ int i;
+
+ (void) signal(SIGHUP, sighandler);
+ (void) signal(SIGINT, sighandler);
+@@ -1032,7 +1032,7 @@
+
+ if (hostlist) {
+ /* Do specific hosts as specified on command line */
+- register struct namelist *nlptr;
++ struct namelist *nlptr;
+
+ for (nlptr = hostlist; nlptr; nlptr = nlptr->n_next)
+ /*
+--- rdist-6.1.5/src/distopt.c.cleanup 1998-11-10 05:09:11.000000000 +0100
++++ rdist-6.1.5/src/distopt.c 2003-12-17 11:38:16.000000000 +0100
+@@ -6,7 +6,7 @@
+ * appropriately.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: distopt.c,v 6.12 1998/11/10 04:09:11 mcooper Exp $";
+
+@@ -55,7 +55,7 @@
+ extern DISTOPTINFO *getdistopt(name)
+ char *name;
+ {
+- register int i;
++ int i;
+
+ for (i = 0; distoptinfo[i].do_name; ++i)
+ if (strcasecmp(name, distoptinfo[i].do_name) == 0)
+@@ -74,7 +74,7 @@
+ opt_t *optptr;
+ int doerrs;
+ {
+- register char *string, *optstr;
++ char *string, *optstr;
+ DISTOPTINFO *distopt;
+ int negate;
+
+@@ -93,7 +93,7 @@
+ * and the option starts with "no", strip "no"
+ * from option and retry lookup.
+ */
+- if (distopt = getdistopt(optstr)) {
++ if ((distopt = getdistopt(optstr))) {
+ FLAG_ON(*optptr, distopt->do_value);
+ continue;
+ }
+@@ -116,7 +116,7 @@
+ */
+ extern char *getdistoptlist()
+ {
+- register int i;
++ int i;
+ static char buf[1024];
+
+ for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) {
+@@ -138,7 +138,7 @@
+ extern char *getondistoptlist(opts)
+ opt_t opts;
+ {
+- register int i;
++ int i;
+ static char buf[1024];
+
+ for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) {
+--- rdist-6.1.5/src/expand.c.cleanup 1998-11-10 05:09:31.000000000 +0100
++++ rdist-6.1.5/src/expand.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: expand.c,v 6.19 1998/11/10 04:09:31 mcooper Exp $";
+
+@@ -81,9 +81,9 @@
+ sizeof(*sortbase), argcmp), sortbase = &eargv[eargc]
+
+ static void Cat(s1, s2) /* quote in s1 and s2 */
+- register u_char *s1, *s2;
++ u_char *s1, *s2;
+ {
+- register char *cp;
++ char *cp;
+ int len = strlen((char *)s1) + strlen((char *)s2) + 2;
+
+ if ((eargc + 1) >= MAXEARGS) {
+@@ -97,12 +97,12 @@
+ do {
+ if (*s1 == QUOTECHAR)
+ s1++;
+- } while (*cp++ = *s1++);
++ } while ((*cp++ = *s1++));
+ cp--;
+ do {
+ if (*s2 == QUOTECHAR)
+ s2++;
+- } while (*cp++ = *s2++);
++ } while ((*cp++ = *s2++));
+ }
+
+ static void addpath(c)
+@@ -131,8 +131,8 @@
+ struct namelist *list;
+ int wh;
+ {
+- register struct namelist *nl, *prev;
+- register int n;
++ struct namelist *nl, *prev;
++ int n;
+ char pathbuf[BUFSIZ];
+
+ if (debug)
+@@ -182,7 +182,7 @@
+ u_char *str;
+ int ch;
+ {
+- register u_char *cp;
++ u_char *cp;
+
+ for (cp = str; cp && *cp != CNULL; ++cp)
+ if (ch == *cp)
+@@ -194,8 +194,8 @@
+ void expstr(s)
+ u_char *s;
+ {
+- register u_char *cp, *cp1;
+- register struct namelist *tp;
++ u_char *cp, *cp1;
++ struct namelist *tp;
+ u_char *tail;
+ u_char ebuf[BUFSIZ];
+ u_char varbuff[BUFSIZ];
+@@ -302,7 +302,7 @@
+ cp1 = (u_char *)pw->pw_dir;
+ s = cp;
+ }
+- for (cp = (u_char *)path; *cp++ = *cp1++; )
++ for (cp = (u_char *)path; (*cp++ = *cp1++); )
+ ;
+ tpathp = pathp = (char *)cp - 1;
+ } else {
+@@ -326,7 +326,7 @@
+ sort();
+ }
+
+-static
++static int
+ argcmp(a1, a2)
+ char **a1, **a2;
+ {
+@@ -341,8 +341,8 @@
+ void expsh(s) /* quote in s */
+ u_char *s;
+ {
+- register u_char *cp, *oldcp;
+- register char *spathp;
++ u_char *cp, *oldcp;
++ char *spathp;
+ struct stat stb;
+
+ spathp = pathp;
+@@ -380,7 +380,7 @@
+ char *pattern;
+ {
+ struct stat stb;
+- register DIRENTRY *dp;
++ DIRENTRY *dp;
+ DIR *dirp;
+
+ dirp = opendir(path);
+@@ -417,11 +417,12 @@
+ yyerror(path);
+ }
+
++int
+ execbrc(p, s) /* quote in p */
+ u_char *p, *s;
+ {
+ u_char restbuf[BUFSIZ + 2];
+- register u_char *pe, *pm, *pl;
++ u_char *pe, *pm, *pl;
+ int brclev = 0;
+ u_char *lm, savec;
+ char *spathp;
+@@ -507,11 +508,12 @@
+ return (0);
+ }
+
++int
+ match(s, p) /* quote in p */
+ char *s, *p;
+ {
+- register int c;
+- register char *sentp;
++ int c;
++ char *sentp;
+ char sexpany = expany;
+
+ if (*s == '.' && *p != '.')
+@@ -524,11 +526,12 @@
+ return (c);
+ }
+
++int
+ amatch(s, p) /* quote in p */
+- register char *s;
+- register u_char *p;
++ char *s;
++ u_char *p;
+ {
+- register int scc;
++ int scc;
+ int ok, lc;
+ char *spathp;
+ struct stat stb;
+@@ -545,7 +548,7 @@
+ case '[':
+ ok = 0;
+ lc = 077777;
+- while (cc = *p++) {
++ while ((cc = *p++)) {
+ if (cc == ']') {
+ if (ok)
+ break;
+@@ -599,7 +602,7 @@
+ while (*s)
+ addpath(*s++);
+ addpath('/');
+- if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode))
++ if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode)) {
+ if (*p == CNULL) {
+ if (which & E_TILDE)
+ Cat((u_char *)path,
+@@ -609,6 +612,7 @@
+ (u_char *)tpathp);
+ } else
+ expsh(p);
++ }
+ pathp = spathp;
+ *pathp = CNULL;
+ return (0);
+--- rdist-6.1.5/src/lookup.c.cleanup 1998-11-10 05:12:56.000000000 +0100
++++ rdist-6.1.5/src/lookup.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: lookup.c,v 6.9 1998/11/10 04:12:56 mcooper Exp $";
+
+@@ -68,11 +68,12 @@
+ /*
+ * Define a variable from a command line argument.
+ */
++void
+ define(name)
+ char *name;
+ {
+- register char *cp, *s;
+- register struct namelist *nl;
++ char *cp, *s;
++ struct namelist *nl;
+ struct namelist *value;
+
+ debugmsg(DM_CALL, "define(%s)", name);
+@@ -137,9 +138,9 @@
+ int action;
+ struct namelist *value;
+ {
+- register unsigned n;
+- register char *cp;
+- register struct syment *s;
++ unsigned n;
++ char *cp;
++ struct syment *s;
+ char ebuf[BUFSIZ];
+
+ debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value);
+--- rdist-6.1.5/src/isexec.c.cleanup 1998-11-10 05:11:42.000000000 +0100
++++ rdist-6.1.5/src/isexec.c 2003-12-17 11:38:16.000000000 +0100
+@@ -37,7 +37,7 @@
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: isexec.c,v 6.22 1998/11/10 04:11:42 mcooper Exp $";
+
+--- rdist-6.1.5/src/signal.c.cleanup 1998-11-10 05:16:13.000000000 +0100
++++ rdist-6.1.5/src/signal.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: signal.c,v 6.2 1998/11/10 04:16:13 mcooper Exp $";
+
+--- rdist-6.1.5/src/rshrcmd.c.cleanup 1998-11-10 05:15:07.000000000 +0100
++++ rdist-6.1.5/src/rshrcmd.c 2003-12-17 11:38:16.000000000 +0100
+@@ -10,7 +10,7 @@
+ * Chris Siebenmann <cks@utcc.utoronto.ca>.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: rshrcmd.c,v 1.9 1998/11/10 04:15:07 mcooper Exp $";
+
+@@ -34,6 +34,7 @@
+ * program in place of a direct rcmd() function call so as to
+ * avoid having to be root.
+ */
++int
+ rshrcmd(ahost, port, luser, ruser, cmd, fd2p)
+ char **ahost;
+ u_short port;
+@@ -108,6 +109,7 @@
+ (void) wait(0);
+ return sp[0];
+ }
++ return -1;
+ /*NOTREACHED*/
+ }
+
+--- rdist-6.1.5/src/common.c.cleanup 1998-11-10 05:09:01.000000000 +0100
++++ rdist-6.1.5/src/common.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: common.c,v 6.84 1998/11/10 04:09:01 mcooper Exp $";
+
+@@ -87,14 +87,14 @@
+ /*
+ * Front end to write() that handles partial write() requests.
+ */
+-extern WRITE_RETURN_T xwrite(fd, buf, len)
++WRITE_RETURN_T xwrite(fd, buf, len)
+ int fd;
+ void *buf;
+ WRITE_AMT_T len;
+ {
+ WRITE_AMT_T nleft = len;
+ WRITE_RETURN_T nwritten;
+- register char *ptr = buf;
++ char *ptr = buf;
+
+ while (nleft > 0) {
+ if ((nwritten = write(fd, ptr, nleft)) <= 0) {
+@@ -110,14 +110,14 @@
+ /*
+ * Set program name
+ */
+-extern void setprogname(argv)
++void setprogname(argv)
+ char **argv;
+ {
+- register char *cp;
++ char *cp;
+
+ if (!progname) {
+ progname = strdup(argv[0]);
+- if (cp = strrchr(progname, '/'))
++ if ((cp = strrchr(progname, '/')))
+ progname = cp + 1;
+ }
+ }
+@@ -125,14 +125,14 @@
+ /*
+ * Do run-time initialization
+ */
+-extern int init(argc, argv, envp)
++int init(argc, argv, envp)
+ /*ARGSUSED*/
+ int argc;
+ char **argv;
+ char **envp;
+ {
+- register int i;
+- register char *cp;
++ int i;
++ char *cp;
+
+ if (!isserver)
+ (void) signal(SIGSEGV, sighandler);
+@@ -182,7 +182,7 @@
+ /*
+ * Finish things up before ending.
+ */
+-extern void finish()
++void finish()
+ {
+ extern jmp_buf finish_jmpbuf;
+
+@@ -216,7 +216,7 @@
+ /*
+ * Handle lost connections
+ */
+-extern void lostconn()
++void lostconn()
+ {
+ /* Prevent looping */
+ (void) signal(SIGPIPE, SIG_IGN);
+@@ -232,7 +232,7 @@
+ /*
+ * Do a core dump
+ */
+-extern void coredump()
++void coredump()
+ {
+ error("Segmentation violation - dumping core [PID = %d, %s]",
+ getpid(),
+@@ -245,7 +245,7 @@
+ /*
+ * General signal handler
+ */
+-extern void sighandler(sig)
++void sighandler(sig)
+ int sig;
+ {
+ debugmsg(DM_CALL, "sighandler() received signal %d\n", sig);
+@@ -325,7 +325,7 @@
+ /*
+ * Stdarg frontend to sendcmdmsg()
+ */
+-extern int sendcmd(char cmd, char *fmt, ...)
++int sendcmd(char cmd, char *fmt, ...)
+ {
+ static char buf[BUFSIZ];
+ va_list args;
+@@ -345,7 +345,7 @@
+ /*
+ * Varargs frontend to sendcmdmsg()
+ */
+-extern int sendcmd(va_alist)
++int sendcmd(va_alist)
+ va_dcl
+ {
+ static char buf[BUFSIZ];
+@@ -372,7 +372,7 @@
+ * Stupid frontend to sendcmdmsg()
+ */
+ /*VARARGS2*/
+-extern int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8)
++int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8)
+ char cmd;
+ char *fmt;
+ {
+@@ -433,13 +433,13 @@
+ * errors, call cleanup() or lostconn(). In other words, unless
+ * the third argument is nonzero, this routine never returns failure.
+ */
+-extern int remline(buffer, space, doclean)
+- register u_char *buffer;
++int remline(buffer, space, doclean)
++ u_char *buffer;
+ int space;
+ int doclean;
+ {
+- register int c, left = space;
+- register u_char *p = buffer;
++ int c, left = space;
++ u_char *p = buffer;
+
+ if (rem_r < 0) {
+ error("Cannot read remote input: Remote descriptor not open.");
+@@ -494,9 +494,9 @@
+ /*
+ * Non-line-oriented remote read.
+ */
+-readrem(p, space)
++int readrem(p, space)
+ char *p;
+- register int space;
++ int space;
+ {
+ if (remleft <= 0) {
+ /*
+@@ -527,7 +527,7 @@
+ /*
+ * Get the user name for the uid.
+ */
+-extern char *getusername(uid, file, opts)
++char *getusername(uid, file, opts)
+ UID_T uid;
+ char *file;
+ opt_t opts;
+@@ -566,7 +566,7 @@
+ /*
+ * Get the group name for the gid.
+ */
+-extern char *getgroupname(gid, file, opts)
++char *getgroupname(gid, file, opts)
+ GID_T gid;
+ char *file;
+ opt_t opts;
+@@ -604,7 +604,7 @@
+ /*
+ * Read a response from the remote host.
+ */
+-extern int response()
++int response()
+ {
+ static u_char resp[BUFSIZ];
+ u_char *s;
+@@ -646,6 +646,7 @@
+ message(MT_FERROR, "%s", s);
+ finish();
+ }
++ return -1;
+ /*NOTREACHED*/
+ }
+
+@@ -657,11 +658,11 @@
+ * user's home directory path name. Return a pointer in buf to the
+ * part corresponding to `file'.
+ */
+-extern char *exptilde(ebuf, file)
++char *exptilde(ebuf, file)
+ char *ebuf;
+- register char *file;
++ char *file;
+ {
+- register char *s1, *s2, *s3;
++ char *s1, *s2, *s3;
+ extern char *homedir;
+
+ if (*file != '~') {
+@@ -694,12 +695,12 @@
+ *s3 = '/';
+ s2 = pw->pw_dir;
+ }
+- for (s1 = ebuf; *s1++ = *s2++; )
++ for (s1 = ebuf; (*s1++ = *s2++); )
+ ;
+ s2 = --s1;
+ if (s3 != NULL) {
+ s2++;
+- while (*s1++ = *s3++)
++ while ((*s1++ = *s3++))
+ ;
+ }
+ return(s2);
+@@ -710,7 +711,7 @@
+ * Set our effective user id to the user running us.
+ * This should be the uid we do most of our work as.
+ */
+-extern int becomeuser()
++int becomeuser()
+ {
+ int r = 0;
+
+@@ -732,7 +733,7 @@
+ /*
+ * Set our effective user id to "root" (uid = 0)
+ */
+-extern int becomeroot()
++int becomeroot()
+ {
+ int r = 0;
+
+@@ -753,7 +754,7 @@
+ /*
+ * Set access and modify times of a given file
+ */
+-extern int setfiletime(file, atime, mtime)
++int setfiletime(file, atime, mtime)
+ char *file;
+ time_t atime;
+ time_t mtime;
+@@ -790,7 +791,7 @@
+ /*
+ * Get version info
+ */
+-extern char *getversion()
++char *getversion()
+ {
+ static char buff[BUFSIZ];
+
+@@ -811,7 +812,7 @@
+ {
+ int fd[2], pid, i;
+ int status;
+- register char *cp, *s;
++ char *cp, *s;
+ char sbuf[BUFSIZ], buf[BUFSIZ];
+
+ if (pipe(fd) < 0) {
+@@ -933,12 +934,12 @@
+ /*
+ * Private version of basename()
+ */
+-extern char *xbasename(path)
++char *xbasename(path)
+ char *path;
+ {
+- register char *cp;
++ char *cp;
+
+- if (cp = strrchr(path, '/'))
++ if ((cp = strrchr(path, '/')))
+ return(cp+1);
+ else
+ return(path);
+@@ -949,11 +950,11 @@
+ * search until a component of that path is found and
+ * return the found file name.
+ */
+-extern char *searchpath(path)
++char *searchpath(path)
+ char *path;
+ {
+- register char *cp;
+- register char *file;
++ char *cp;
++ char *file;
+ struct stat statbuf;
+
+ for (; ;) {
+@@ -977,8 +978,7 @@
+ /*
+ * Set line buffering.
+ */
+-extern void
+-mysetlinebuf(fp)
++void mysetlinebuf(fp)
+ FILE *fp;
+ {
+ #if SETBUF_TYPE == SETBUF_SETLINEBUF
+@@ -995,8 +995,7 @@
+ /*
+ * Our interface to system call to get a socket pair.
+ */
+-int
+-getsocketpair(domain, type, protocol, sv)
++int getsocketpair(domain, type, protocol, sv)
+ int domain;
+ int type;
+ int protocol;
+--- rdist-6.1.5/src/message.c.cleanup 1998-11-10 05:13:30.000000000 +0100
++++ rdist-6.1.5/src/message.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: message.c,v 6.25 1998/11/10 04:13:30 mcooper Exp $";
+
+@@ -97,7 +97,7 @@
+ */
+ extern void msgprusage()
+ {
+- register int i, x;
++ int i, x;
+
+ (void) fprintf(stderr, "\nWhere <msgopt> is of form\n");
+ (void) fprintf(stderr,
+@@ -120,7 +120,7 @@
+ */
+ extern void msgprconfig()
+ {
+- register int i, x;
++ int i, x;
+ static char buf[MSGBUFSIZ];
+
+ debugmsg(DM_MISC, "Current message logging config:");
+@@ -145,7 +145,7 @@
+ static MSGFACILITY *getmsgfac(name)
+ char *name;
+ {
+- register int i;
++ int i;
+
+ for (i = 0; msgfacility[i].mf_name; ++i)
+ if (strcasecmp(name, msgfacility[i].mf_name) == 0)
+@@ -160,7 +160,7 @@
+ static MSGTYPE *getmsgtype(name)
+ char *name;
+ {
+- register int i;
++ int i;
+
+ for (i = 0; msgtypes[i].mt_name; ++i)
+ if (strcasecmp(name, msgtypes[i].mt_name) == 0)
+@@ -178,9 +178,9 @@
+ char *str;
+ {
+ static char ebuf[BUFSIZ];
+- register char *cp;
+- register char *strptr, *word;
+- register MSGTYPE *mtp;
++ char *cp;
++ char *strptr, *word;
++ MSGTYPE *mtp;
+
+ /*
+ * MF_SYSLOG is the only supported message facility for the server
+@@ -240,11 +240,11 @@
+ msgfac->mf_msgtypes = 0; /* Start from scratch */
+ while (strptr) {
+ word = strptr;
+- if (cp = strchr(strptr, ','))
++ if ((cp = strchr(strptr, ',')))
+ *cp++ = CNULL;
+ strptr = cp;
+
+- if (mtp = getmsgtype(word)) {
++ if ((mtp = getmsgtype(word))) {
+ msgfac->mf_msgtypes |= mtp->mt_type;
+ /*
+ * XXX This is really a kludge until we add real
+@@ -272,8 +272,8 @@
+ int doset;
+ {
+ static char ebuf[BUFSIZ], msgbuf[MSGBUFSIZ];
+- register char *cp, *optstr;
+- register char *word;
++ char *cp, *optstr;
++ char *word;
+ MSGFACILITY *msgfac;
+
+ if (msgstr == NULL)
+@@ -308,7 +308,7 @@
+ if (doset) {
+ char *mcp;
+
+- if (mcp = setmsgtypes(msgfac, cp))
++ if ((mcp = setmsgtypes(msgfac, cp)))
+ return(mcp);
+ }
+ }
+@@ -462,8 +462,9 @@
+ return;
+
+ if (!msgfac->mf_fptr) {
+- register char *cp;
++ char *cp;
+ char *getenv();
++ int fd;
+
+ /*
+ * Create and open a new temporary file
+@@ -475,7 +476,10 @@
+ (void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP);
+
+ msgfac->mf_filename = tempfile;
+- (void) mktemp(msgfac->mf_filename);
++ fd = mkstemp(msgfac->mf_filename);
++ if (fd < 0)
++ fatalerr("Cannot open notify file for writing: %s: %s.", msgfac->mf_filename, SYSERR);
++ close(fd);
+ if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL)
+ fatalerr("Cannot open notify file for writing: %s: %s.",
+ msgfac->mf_filename, SYSERR);
+@@ -515,15 +519,15 @@
+ int flags;
+ char *msgbuf;
+ {
+- register int i, x;
+- register char *cp;
++ int i, x;
++ char *cp;
+ static char mbuf[2048];
+
+ if (msgbuf && *msgbuf) {
+ /*
+ * Ensure no stray newlines are present
+ */
+- if (cp = strchr(msgbuf, '\n'))
++ if ((cp = strchr(msgbuf, '\n')))
+ *cp = CNULL;
+
+ checkhostname();
+@@ -863,7 +867,7 @@
+ */
+ extern char *getnotifyfile()
+ {
+- register int i;
++ int i;
+
+ for (i = 0; msgfacility[i].mf_name; i++)
+ if (msgfacility[i].mf_msgfac == MF_NOTIFY &&
+--- rdist-6.1.5/src/setargs.c.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/setargs.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: setargs.c,v 6.5 1998/11/10 04:15:56 mcooper Exp $";
+
+@@ -66,12 +66,12 @@
+ /*
+ * Settup things for using setproctitle()
+ */
+-setargs_settup(argc, argv, envp)
++void setargs_settup(argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
+ {
+- register int i;
++ int i;
+ extern char **environ;
+
+ /* Remember the User Environment */
+@@ -92,10 +92,10 @@
+ /*
+ * Set process title
+ */
+-extern void _setproctitle(msg)
++void _setproctitle(msg)
+ char *msg;
+ {
+- register int i;
++ int i;
+ char *p;
+
+ p = Argv[0];
+@@ -119,7 +119,7 @@
+ /*
+ * Varargs front-end to _setproctitle()
+ */
+-extern void setproctitle(va_alist)
++void setproctitle(va_alist)
+ va_dcl
+ {
+ static char buf[BUFSIZ];
+@@ -138,7 +138,7 @@
+ /*
+ * Stdarg front-end to _setproctitle()
+ */
+-extern void setproctitle(char *fmt, ...)
++void setproctitle(char *fmt, ...)
+ {
+ static char buf[BUFSIZ];
+ va_list args;
+@@ -155,7 +155,7 @@
+ * Non-Varargs front-end to _setproctitle()
+ */
+ /*VARARGS1*/
+-extern void setproctitle(fmt, a1, a2, a3, a4, a5, a6)
++void setproctitle(fmt, a1, a2, a3, a4, a5, a6)
+ char *fmt;
+ {
+ static char buf[BUFSIZ];
+--- rdist-6.1.5/src/rdistd.c.cleanup 1998-11-10 05:14:06.000000000 +0100
++++ rdist-6.1.5/src/rdistd.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: rdistd.c,v 6.23 1998/11/10 04:14:06 mcooper Exp $";
+
+@@ -53,21 +53,12 @@
+
+ #include "defs.h"
+
+-/*
+- * Print usage message
+- */
+-static void usage()
+-{
+- fprintf(stderr, "usage: %s -S [ -DV ]\n", progname);
+- exit(1);
+-}
+-
+ char localmsglist[] = "syslog=ferror";
+
+ /*
+ * The Beginning
+ */
+-main(argc, argv, envp)
++int main(argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
+@@ -95,7 +86,8 @@
+ case '?':
+ default:
+ error("Bad command line option.");
+- usage();
++ fprintf(stderr, "usage: %s -S [ -DV ]\n", progname);
++ exit(1);
+ }
+
+ if (!isserver) {
+@@ -108,7 +100,7 @@
+ rem_w = fileno(stdout);
+
+ /* Set logging */
+- if (cp = msgparseopts(localmsglist, TRUE))
++ if ((cp = msgparseopts(localmsglist, TRUE)))
+ fatalerr("Bad message logging option (%s): %s",
+ localmsglist, cp);
+
+--- rdist-6.1.5/src/server.c.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/src/server.c 2003-12-17 11:38:16.000000000 +0100
+@@ -37,7 +37,7 @@
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: server.c,v 6.86 1998/11/10 04:15:31 mcooper Exp $";
+
+@@ -197,7 +197,7 @@
+ static UID_T last_uid = (UID_T)-2;
+ static GID_T last_primegid;
+ extern char *locuser;
+- register int i;
++ int i;
+ UID_T uid;
+ GID_T gid;
+ GID_T primegid = (GID_T)-2;
+@@ -252,7 +252,7 @@
+ /*
+ * Invalid cached values so we need to do a new lookup.
+ */
+- if (gr = mygetgroup(group)) {
++ if ((gr = mygetgroup(group))) {
+ last_gid = gid = gr->gr_gid;
+ strcpy(last_group, gr->gr_name);
+ } else {
+@@ -325,7 +325,7 @@
+ {
+ DIR *d;
+ static DIRENTRY *dp;
+- register char *cp;
++ char *cp;
+ struct stat stb;
+ char *optarget;
+ int len, failures = 0;
+@@ -362,7 +362,7 @@
+
+ optarget = ptarget;
+ len = ptarget - target;
+- while (dp = readdir(d)) {
++ while ((dp = readdir(d))) {
+ if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') ||
+ (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' &&
+ dp->d_name[1] == '.'))
+@@ -376,7 +376,7 @@
+ ptarget = optarget;
+ *ptarget++ = '/';
+ cp = dp->d_name;;
+- while (*ptarget++ = *cp++)
++ while ((*ptarget++ = *cp++))
+ ;
+ ptarget--;
+ if (lstat(target, &stb) < 0) {
+@@ -414,10 +414,10 @@
+ * for extraneous files and remove them.
+ */
+ static void doclean(cp)
+- register char *cp;
++ char *cp;
+ {
+ DIR *d;
+- register DIRENTRY *dp;
++ DIRENTRY *dp;
+ struct stat stb;
+ char *optarget, *ep;
+ int len;
+@@ -436,7 +436,7 @@
+
+ optarget = ptarget;
+ len = ptarget - target;
+- while (dp = readdir(d)) {
++ while ((dp = readdir(d))) {
+ if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') ||
+ (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' &&
+ dp->d_name[1] == '.'))
+@@ -450,7 +450,7 @@
+ ptarget = optarget;
+ *ptarget++ = '/';
+ cp = dp->d_name;;
+- while (*ptarget++ = *cp++)
++ while ((*ptarget++ = *cp++))
+ ;
+ ptarget--;
+ if (lstat(target, &stb) < 0) {
+@@ -481,7 +481,7 @@
+ * Frontend to doclean().
+ */
+ static void clean(cp)
+- register char *cp;
++ char *cp;
+ {
+ doclean(cp);
+ (void) sendcmd(CC_END, NULL);
+@@ -509,7 +509,7 @@
+ */
+ static void docmdspecial()
+ {
+- register char *cp;
++ char *cp;
+ char *cmd, *env = NULL;
+ int n;
+ int len;
+@@ -667,7 +667,7 @@
+ char *name;
+ opt_t opts;
+ {
+- register char *cp;
++ char *cp;
+ struct stat stb;
+ int r = -1;
+
+@@ -760,7 +760,7 @@
+ {
+ int f, wrerr, olderrno, lastwashole = 0, wassparse = 0;
+ off_t i;
+- register char *cp;
++ char *cp;
+ char *savefile = NULL;
+ static struct stat statbuff;
+
+@@ -987,7 +987,7 @@
+ char *owner, *group;
+ {
+ static char lowner[100], lgroup[100];
+- register char *cp;
++ char *cp;
+ struct stat stb;
+ int s;
+
+@@ -1044,7 +1044,7 @@
+
+ o = (owner[0] == ':') ? opts & DO_NUMCHKOWNER :
+ opts;
+- if (cp = getusername(stb.st_uid, target, o))
++ if ((cp = getusername(stb.st_uid, target, o)))
+ if (strcmp(owner, cp))
+ (void) strcpy(lowner, cp);
+ }
+@@ -1053,7 +1053,7 @@
+
+ o = (group[0] == ':') ? opts & DO_NUMCHKGROUP :
+ opts;
+- if (cp = getgroupname(stb.st_gid, target, o))
++ if ((cp = getgroupname(stb.st_gid, target, o)))
+ if (strcmp(group, cp))
+ (void) strcpy(lgroup, cp);
+ }
+@@ -1107,8 +1107,8 @@
+ if (s < 0) {
+ if (errno == ENOENT) {
+ if (mkdir(target, mode) == 0 ||
+- chkparent(target, opts) == 0 &&
+- mkdir(target, mode) == 0) {
++ (chkparent(target, opts) == 0 &&
++ mkdir(target, mode) == 0)) {
+ message(MT_NOTICE, "%s: mkdir", target);
+ (void) fchog(-1, target, owner, group, mode);
+ ack();
+@@ -1304,7 +1304,7 @@
+ static void setconfig(cmd)
+ char *cmd;
+ {
+- register char *cp = cmd;
++ char *cp = cmd;
+ char *estr;
+
+ switch (*cp++) {
+@@ -1338,7 +1338,7 @@
+ break;
+
+ case SC_LOGGING: /* Logging options */
+- if (estr = msgparseopts(cp, TRUE)) {
++ if ((estr = msgparseopts(cp, TRUE))) {
+ fatalerr("Bad message option string (%s): %s",
+ cp, estr);
+ return;
+@@ -1455,7 +1455,7 @@
+ sptarget[catname] = ptarget;
+ if (catname++) {
+ *ptarget++ = '/';
+- while (*ptarget++ = *file++)
++ while ((*ptarget++ = *file++))
+ ;
+ ptarget--;
+ }
+@@ -1463,6 +1463,7 @@
+ /*
+ * Create name of temporary file
+ */
++ int fd;
+ if (catname && cattarget(file) < 0) {
+ error("Cannot set file name.");
+ return;
+@@ -1477,7 +1478,12 @@
+ (void) sprintf(new, "%s/%s", target, tempname);
+ *file = '/';
+ }
+- (void) mktemp(new);
++ fd = mkstemp(new);
++ if (fd < 0) {
++ error("Cannot set file name.");
++ return;
++ }
++ close(fd);
+ }
+
+ /*
+@@ -1581,8 +1587,8 @@
+ extern void server()
+ {
+ static char cmdbuf[BUFSIZ];
+- register char *cp;
+- register int n;
++ char *cp;
++ int n;
+ extern jmp_buf finish_jmpbuf;
+
+ if (setjmp(finish_jmpbuf)) {
+--- rdist-6.1.5/src/filesys.c.cleanup 1998-11-10 05:10:18.000000000 +0100
++++ rdist-6.1.5/src/filesys.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: filesys.c,v 6.25 1998/11/10 04:10:17 mcooper Exp $";
+
+@@ -72,7 +72,7 @@
+ static char last_pathname[MAXPATHLEN];
+ static char file[MAXPATHLEN + 3];
+ static struct stat filestat;
+- register char *p;
++ char *p;
+
+ /*
+ * Mark the statbuf as invalid to start with.
+@@ -125,7 +125,7 @@
+ * Normally we want to change /dir1/dir2/file
+ * into "/dir1/dir2/."
+ */
+- if (p = (char *) strrchr(file, '/')) {
++ if ((p = (char *) strrchr(file, '/'))) {
+ *++p = '.';
+ *++p = CNULL;
+ } else {
+@@ -183,7 +183,7 @@
+ struct stat *filest;
+ struct mntinfo *mntinfo;
+ {
+- register struct mntinfo *mi;
++ struct mntinfo *mi;
+
+ for (mi = mntinfo; mi; mi = mi->mi_nxt) {
+ if (mi->mi_mnt->me_flags & MEFLAG_IGNORE)
+@@ -202,7 +202,7 @@
+ mntent_t *mnt;
+ struct mntinfo *mntinfo;
+ {
+- register struct mntinfo *m;
++ struct mntinfo *m;
+
+ for (m = mntinfo; m; m = m->mi_nxt)
+ if (strcmp(m->mi_mnt->me_path, mnt->me_path) == 0)
+@@ -247,7 +247,7 @@
+ }
+
+ mntinfo = mi;
+- while (mnt = getmountent(mfp)) {
++ while ((mnt = getmountent(mfp))) {
+ debugmsg(DM_MISC, "mountent = '%s' (%s)",
+ mnt->me_path, mnt->me_type);
+
+@@ -308,7 +308,7 @@
+ static struct stat filestat;
+ struct stat *pstat;
+ struct mntinfo *tmpmi;
+- register mntent_t *mnt;
++ mntent_t *mnt;
+
+ /*
+ * Use the supplied stat buffer if not NULL or our own.
+@@ -330,16 +330,16 @@
+ /*
+ * Find the mnt that pathname is on.
+ */
+- if (mnt = findmnt(pstat, mntinfo))
++ if ((mnt = findmnt(pstat, mntinfo)))
+ return(mnt);
+
+ /*
+ * We failed to find correct mnt, so maybe it's a newly
+ * mounted filesystem. We rebuild mntinfo and try again.
+ */
+- if (tmpmi = makemntinfo(mntinfo)) {
++ if ((tmpmi = makemntinfo(mntinfo))) {
+ mntinfo = tmpmi;
+- if (mnt = findmnt(pstat, mntinfo))
++ if ((mnt = findmnt(pstat, mntinfo)))
+ return(mnt);
+ }
+
+--- rdist-6.1.5/src/filesys-os.c.cleanup 1998-11-10 05:09:59.000000000 +0100
++++ rdist-6.1.5/src/filesys-os.c 2003-12-17 11:38:16.000000000 +0100
+@@ -38,7 +38,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#ifndef lint
++#if 0
+ static char RCSid[] =
+ "$Id: filesys-os.c,v 6.18 1998/11/10 04:09:58 mcooper Exp $";
+
+@@ -314,7 +314,7 @@
+
+ bzero((char *)&me, sizeof(mntent_t));
+
+- if (mntent = getmntent(fptr)) {
++ if ((mntent = getmntent(fptr))) {
+ me.me_path = mntent->mnt_dir;
+ me.me_type = mntent->mnt_type;
+ if (mntent->mnt_opts && hasmntopt(mntent, MNTOPT_RO))
+--- rdist-6.1.5/src/strcasecmp.c.cleanup 1998-11-10 05:16:52.000000000 +0100
++++ rdist-6.1.5/src/strcasecmp.c 2003-12-17 11:38:16.000000000 +0100
+@@ -51,9 +51,9 @@
+ };
+
+ strcasecmp(s1, s2)
+- register char *s1, *s2;
++ char *s1, *s2;
+ {
+- register char *cm = charmap;
++ char *cm = charmap;
+
+ while (cm[*s1] == cm[*s2++])
+ if (*s1++ == '\0')
+@@ -62,10 +62,10 @@
+ }
+
+ strncasecmp(s1, s2, n)
+- register char *s1, *s2;
+- register int n;
++ char *s1, *s2;
++ int n;
+ {
+- register char *cm = charmap;
++ char *cm = charmap;
+
+ while (--n >= 0 && cm[*s1] == cm[*s2++])
+ if (*s1++ == '\0')
+--- rdist-6.1.5/src/strtol.c.cleanup 1994-03-17 00:25:50.000000000 +0100
++++ rdist-6.1.5/src/strtol.c 2003-12-17 11:38:16.000000000 +0100
+@@ -54,13 +54,13 @@
+ strtol(nptr, endptr, base)
+ char *nptr;
+ char **endptr;
+- register int base;
++ int base;
+ {
+- register char *s = nptr;
+- register unsigned long acc;
+- register int c;
+- register unsigned long cutoff;
+- register int neg = 0, any, cutlim;
++ char *s = nptr;
++ unsigned long acc;
++ int c;
++ unsigned long cutoff;
++ int neg = 0, any, cutlim;
+
+ /*
+ * Skip white space and pick up leading +/- sign if any.
+--- rdist-6.1.5/src/regex.c.cleanup 1998-11-10 05:14:28.000000000 +0100
++++ rdist-6.1.5/src/regex.c 2003-12-17 11:39:14.000000000 +0100
+@@ -142,10 +142,8 @@
+ */
+ char *
+ re_comp(sp)
+- register char *sp;
+ {
+- register int c;
+- register char *ep = expbuf;
++ char *ep = expbuf;
+ int cclcnt, numbra = 0;
+ char *lastep = 0;
+ char bracket[NBRA];
+@@ -266,10 +264,10 @@
+ */
+ int
+ re_exec(p1)
+- register char *p1;
++ char *p1;
+ {
+- register char *p2 = expbuf;
+- register int c;
++ char *p2 = expbuf;
++ int c;
+ int rv;
+
+ for (c = 0; c < NBRA; c++) {
+@@ -306,9 +304,9 @@
+ */
+ static int
+ advance(lp, ep)
+- register char *lp, *ep;
++ char *lp, *ep;
+ {
+- register char *curlp;
++ char *curlp;
+ int ct, i;
+ int rv;
+
+@@ -413,10 +411,10 @@
+ }
+
+ backref(i, lp)
+- register int i;
+- register char *lp;
++ int i;
++ char *lp;
+ {
+- register char *bp;
++ char *bp;
+
+ bp = braslist[i];
+ while (*bp++ == *lp++)
+@@ -427,10 +425,10 @@
+
+ int
+ cclass(set, c, af)
+- register char *set, c;
++ char *set, c;
+ int af;
+ {
+- register int n;
++ int n;
+
+ if (c == 0)
+ return(0);
+--- rdist-6.1.5/include/defs.h.cleanup 2003-12-17 11:38:16.000000000 +0100
++++ rdist-6.1.5/include/defs.h 2003-12-17 11:38:16.000000000 +0100
+@@ -30,11 +30,13 @@
+ #include <grp.h>
+ #include <syslog.h>
+ #include <setjmp.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/file.h>
+-#include <sys/time.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
++#include <sys/socket.h>
+
+ #include "version.h"
+ #include "config-def.h"
+@@ -48,6 +50,9 @@
+ #endif /* yacc */
+
+ #include <signal.h>
++#define _REGEX_RE_COMP
++#include <regex.h>
++
+
+ /*
+ * This belongs in os-svr4.h but many SVR4 OS's
+@@ -321,12 +326,11 @@
+ /*
+ * Our own declarations.
+ */
+-char *exptilde();
+ char *makestr();
+ char *xcalloc();
+ char *xmalloc();
+ char *xrealloc();
+-extern char *xbasename();
++extern char *exptilde();
+ extern char *getdistoptlist();
+ extern char *getgroupname();
+ extern char *getnlstr();
+@@ -336,44 +340,75 @@
+ extern char *getversion();
+ extern char *msgparseopts();
+ extern char *searchpath();
++extern char *xbasename();
++extern int amatch();
+ extern int any();
++extern int becomeroot();
++extern int becomeuser();
++extern int except();
++extern int execbrc();
++extern int getfilesysinfo();
++extern int getsocketpair();
+ extern int init();
+ extern int install();
+ extern int isexec();
++extern int is_nfs_mounted();
++extern int is_ro_mounted();
++extern int is_symlinked();
++extern int match();
++extern int okname();
+ extern int parsedistopts();
++extern int readrem();
+ extern int remline();
++extern int response();
++extern int rshrcmd();
+ extern int setfiletime();
++extern int setnonblocking();
+ extern int spawn();
++extern int yylex();
++extern int yyparse();
+ extern struct subcmd *makesubcmd();
++extern void append();
+ extern void checkhostname();
+ extern void cleanup();
+ extern void complain();
++extern void coredump();
++extern void define();
++extern void docmdargs();
+ extern void docmds();
+ extern void finish();
+-extern void log();
++extern void freelinkinfo();
++extern void insert();
+ extern void logmsg();
+ extern void lostconn();
+ extern void markassigned();
++extern void msgprconfig();
+ extern void msgprusage();
++extern void mysetlinebuf();
+ extern void note();
+ extern void runcmdspecial();
+ extern void runcommand();
+ extern void server();
++extern void setargs_settup();
+ extern void setprogname();
+ extern void sighandler();
++extern void usage();
+ extern void waitup();
++extern void yyerror();
++extern WRITE_RETURN_T xwrite();
+ struct namelist *expand();
+ struct namelist *lookup();
+ struct namelist *makenl();
+-extern WRITE_RETURN_T xwrite();
+
+ #if defined(ARG_TYPE) && ARG_TYPE == ARG_STDARG
++extern int sendcmd(char cmd, char *fmt, ...);
+ extern void debugmsg(int, char *, ...);
+ extern void error(char *, ...);
+ extern void fatalerr(char *, ...);
+ extern void message(int, char *, ...);
+ extern void setproctitle(char *fmt, ...);
+ #else
++extern int sendcmd(va_alist);
+ extern void debugmsg();
+ extern void error();
+ extern void fatalerr();
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
new file mode 100644
index 000000000..d183d9183
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/message.c.thestokes 2006-04-19 17:30:39.000000000 -0400
++++ rdist-6.1.5/src/message.c 2006-04-19 17:36:37.000000000 -0400
+@@ -793,15 +793,20 @@
+ char *msg;
+ {
+ static char buf[MSGBUFSIZ];
+-
+- ++nerrs;
+-
+- if (isserver)
+- (void) sprintf(buf, "REMOTE ERROR: %s", msg);
+- else
+- (void) sprintf(buf, "LOCAL ERROR: %s", msg);
+-
+- _message(MT_FERROR, buf);
++ /* Don't reenter this function. There is a nasty infinite recursion
++ case that pops up when msgsndnotify tries to exit. */
++ static int inside=0;
++
++ if(inside==0){
++ ++nerrs;
++ inside=1;
++
++ if (isserver)
++ (void) sprintf(buf, "REMOTE ERROR: %s", msg);
++ else
++ (void) sprintf(buf, "LOCAL ERROR: %s", msg);
++ _message(MT_FERROR, buf);
++ }
+
+ exit(nerrs);
+ }
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch
new file mode 100644
index 000000000..baf8e3030
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.hardlink Thu Jun 3 13:56:31 1999
++++ rdist-6.1.5/src/client.c Thu Jun 3 14:00:06 1999
+@@ -348,7 +348,7 @@
+ lp->target = strdup(Tdest);
+ else
+ lp->target = NULL;
+- if (!lp->pathname || !lp->src || !(Tdest && lp->target))
++ if (!lp->pathname || !lp->src || (Tdest && !lp->target))
+ fatalerr("Cannot malloc memory in linkinfo.");
+
+ return((struct linkbuf *) NULL);
+@@ -370,7 +370,7 @@
+ "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n",
+ rname, lp->pathname, lp->src, lp->target);
+
+- if (*lp->target == CNULL)
++ if (lp->target == NULL || *lp->target == CNULL)
+ (void) sendcmd(C_RECVHARDLINK, "%o %s %s",
+ opts, lp->pathname, rname);
+ else {
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch
new file mode 100644
index 000000000..3fa8db8cd
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch
@@ -0,0 +1,142 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.lfs 2003-12-16 23:43:56.000000000 +0100
++++ rdist-6.1.5/src/client.c 2003-12-16 23:46:56.000000000 +0100
+@@ -414,9 +414,9 @@
+ /*
+ * Send file info
+ */
+- (void) sendcmd(C_RECVREG, "%o %04o %ld %ld %ld %s %s %s",
++ (void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s",
+ opts, stb->st_mode & 07777,
+- (long) stb->st_size,
++ (off_t) stb->st_size,
+ stb->st_mtime, stb->st_atime,
+ user, group, rname);
+ if (response() < 0) {
+@@ -424,8 +424,8 @@
+ return(-1);
+ }
+
+- debugmsg(DM_MISC, "Send file '%s' %d bytes\n",
+- rname, (long) stb->st_size);
++ debugmsg(DM_MISC, "Send file '%s' %lld bytes\n",
++ rname, (off_t) stb->st_size);
+
+ /*
+ * Set remote time out alarm handler.
+@@ -676,9 +676,9 @@
+ /*
+ * Gather and send basic link info
+ */
+- (void) sendcmd(C_RECVSYMLINK, "%o %04o %ld %ld %ld %s %s %s",
++ (void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s",
+ opts, stb->st_mode & 07777,
+- (long) stb->st_size,
++ (off_t) stb->st_size,
+ stb->st_mtime, stb->st_atime,
+ user, group, rname);
+ if (response() < 0)
+@@ -858,7 +858,7 @@
+ /*
+ * Parse size
+ */
+- size = strtol(cp, &cp, 10);
++ size = strtoll(cp, &cp, 10);
+ if (*cp++ != ' ') {
+ error("update: size not delimited");
+ return(US_NOTHING);
+@@ -910,8 +910,8 @@
+
+ debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n",
+ rname, lmode, rmode);
+- debugmsg(DM_MISC, "update(%s,) size %d mtime %d owner '%s' grp '%s'\n",
+- rname, (int) size, mtime, owner, group);
++ debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'\n",
++ rname, (off_t) size, mtime, owner, group);
+
+ if (statp->st_mtime != mtime) {
+ if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) {
+@@ -937,8 +937,8 @@
+ }
+
+ if (statp->st_size != size) {
+- debugmsg(DM_MISC, "size does not match (%d != %d).\n",
+- (int) statp->st_size, size);
++ debugmsg(DM_MISC, "size does not match (%lld != %lld).\n",
++ statp->st_size, size);
+ return(US_OUTDATE);
+ }
+
+--- rdist-6.1.5/src/server.c.lfs 1998-11-10 05:15:31.000000000 +0100
++++ rdist-6.1.5/src/server.c 2003-12-16 23:50:19.000000000 +0100
+@@ -645,8 +645,8 @@
+ case S_IFLNK:
+ case S_IFDIR:
+ case S_IFREG:
+- (void) sendcmd(QC_YES, "%ld %ld %o %s %s",
+- (long) stb.st_size,
++ (void) sendcmd(QC_YES, "%lld %ld %o %s %s",
++ (off_t) stb.st_size,
+ stb.st_mtime,
+ stb.st_mode & 07777,
+ getusername(stb.st_uid, target, options),
+@@ -1388,7 +1388,7 @@
+ /*
+ * Get file size
+ */
+- size = strtol(cp, &cp, 10);
++ size = strtoll(cp, &cp, 10);
+ if (*cp++ != ' ') {
+ error("recvit: size not delimited");
+ return;
+@@ -1441,7 +1441,7 @@
+ }
+
+ debugmsg(DM_MISC,
+- "recvit: opts = %04o mode = %04o size = %d mtime = %d",
++ "recvit: opts = %04o mode = %04o size = %lld mtime = %d",
+ opts, mode, size, mtime);
+ debugmsg(DM_MISC,
+ "recvit: owner = '%s' group = '%s' file = '%s' catname = %d isdir = %d",
+--- rdist-6.1.5/include/defs.h.lfs 2003-12-16 23:43:56.000000000 +0100
++++ rdist-6.1.5/include/defs.h 2003-12-16 23:43:56.000000000 +0100
+@@ -22,6 +22,8 @@
+ #include <stdlib.h>
+ #endif /* _POSIX_SOURCE */
+ #include <stdio.h>
++#include <string.h>
++#include <mntent.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <pwd.h>
+@@ -317,15 +319,6 @@
+ #endif /* USE_STATDB */
+
+ /*
+- * System function declarations
+- */
+-char *hasmntopt();
+-char *strchr();
+-char *strdup();
+-char *strrchr();
+-char *strtok();
+-
+-/*
+ * Our own declarations.
+ */
+ char *exptilde();
+--- rdist-6.1.5/Makefile.local.lfs 1998-11-10 04:36:31.000000000 +0100
++++ rdist-6.1.5/Makefile.local 2003-12-16 23:43:56.000000000 +0100
+@@ -20,7 +20,7 @@
+ # Add any local definitions you want pass to the compiler to DEFS_LOCAL
+ # below. This includes those items found in "config/config.h".
+ #
+-#DEFS_LOCAL = -DDIRECT_RCMD
++DEFS_LOCAL = -O2 -g -pipe -Wall -D_POSIX_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+ #
+ # Add any local libraries that your system might need to LIBS_LOCAL below.
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch
new file mode 100644
index 000000000..e9994f2c9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/client.c.links Wed Feb 17 17:46:09 1999
++++ rdist-6.1.5/src/client.c Wed Feb 17 17:51:15 1999
+@@ -309,6 +309,18 @@
+ return(0);
+ }
+
++void freelinkinfo(lp)
++ struct linkbuf *lp;
++{
++ if (lp->pathname)
++ free(lp->pathname);
++ if (lp->src)
++ free(lp->src);
++ if (lp->target)
++ free(lp->target);
++ free(lp);
++}
++
+ /*
+ * Save and retrieve hard link info
+ */
+@@ -317,6 +329,7 @@
+ {
+ struct linkbuf *lp;
+
++ /* xxx: linear search doesn't scale with many links */
+ for (lp = ihead; lp != NULL; lp = lp->nextp)
+ if (lp->inum == statp->st_ino && lp->devnum == statp->st_dev) {
+ lp->count--;
+@@ -329,12 +342,14 @@
+ lp->inum = statp->st_ino;
+ lp->devnum = statp->st_dev;
+ lp->count = statp->st_nlink - 1;
+- (void) strcpy(lp->pathname, target);
+- (void) strcpy(lp->src, source);
++ lp->pathname = strdup(target);
++ lp->src = strdup(source);
+ if (Tdest)
+- (void) strcpy(lp->target, Tdest);
++ lp->target = strdup(Tdest);
+ else
+- *lp->target = CNULL;
++ lp->target = NULL;
++ if (!lp->pathname || !lp->src || !(Tdest && lp->target))
++ fatalerr("Cannot malloc memory in linkinfo.");
+
+ return((struct linkbuf *) NULL);
+ }
+--- rdist-6.1.5/src/docmd.c.links Wed Feb 17 17:51:23 1999
++++ rdist-6.1.5/src/docmd.c Wed Feb 17 17:52:44 1999
+@@ -586,7 +586,7 @@
+ if (!nflag) {
+ register struct linkbuf *nextl, *l;
+
+- for (l = ihead; l != NULL; free((char *)l), l = nextl) {
++ for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) {
+ nextl = l->nextp;
+ if (contimedout || IS_ON(opts, DO_IGNLNKS) ||
+ l->count == 0)
+--- rdist-6.1.5/include/defs.h.links Wed Feb 17 17:52:58 1999
++++ rdist-6.1.5/include/defs.h Wed Feb 17 17:53:47 1999
+@@ -276,9 +276,9 @@
+ ino_t inum;
+ dev_t devnum;
+ int count;
+- char pathname[BUFSIZ];
+- char src[BUFSIZ];
+- char target[BUFSIZ];
++ char *pathname;
++ char *src;
++ char *target;
+ struct linkbuf *nextp;
+ };
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch
new file mode 100644
index 000000000..b56fd38b9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+diff: rdist-6.1.5/config/mf: No such file or directory
+--- rdist-6.1.5/config/os-linux.h.linux Mon Nov 9 22:59:59 1998
++++ rdist-6.1.5/config/os-linux.h Thu Nov 12 14:50:35 1998
+@@ -58,7 +58,7 @@
+ /*
+ * Select the type of executable file format.
+ */
+-#define EXE_TYPE EXE_AOUT
++#define EXE_TYPE EXE_ELF
+
+ /*
+ * Select the type of statfs() system call (if any).
+--- rdist-6.1.5/mf/Makefile.var.linux Tue Nov 10 00:02:11 1998
++++ rdist-6.1.5/mf/Makefile.var Thu Nov 12 14:50:35 1998
+@@ -67,7 +67,7 @@
+ #
+ # Name of YACC.
+ #
+-#YACC = bison -y
++YACC = bison -y
+
+ OPT = -g
+ RM = rm
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch
new file mode 100644
index 000000000..cc82e16cc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch
@@ -0,0 +1,23 @@
+Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
+
+Upstream-Status: Inappropriate [no upstream]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/src/Makefile.real b/src/Makefile.real
+index 02179e4..9070974 100644
+--- a/src/Makefile.real
++++ b/src/Makefile.real
+@@ -36,10 +36,10 @@ all: src
+ src: $(CLIENT_BIN) $(SERVER_BIN)
+
+ $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
+- $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
++ $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
+
+ $(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
+- $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
++ $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
+
+ $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch
new file mode 100644
index 000000000..e81639446
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:rdist
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/setargs.c.maxargs 1998-11-10 05:15:56.000000000 +0100
++++ rdist-6.1.5/src/setargs.c 2003-09-04 14:39:03.000000000 +0200
+@@ -58,7 +58,7 @@
+ * Set process argument functions
+ */
+
+-#define MAXUSERENVIRON 40
++#define MAXUSERENVIRON 1024
+ char **Argv = NULL;
+ char *LastArgv = NULL;
+ char *UserEnviron[MAXUSERENVIRON+1];
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
new file mode 100644
index 000000000..e49e3e4d1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/server.c.mkstemp 2004-05-25 14:29:37.279312752 +0200
++++ rdist-6.1.5/src/server.c 2004-05-25 14:31:27.050744340 +0200
+@@ -1479,11 +1479,18 @@
+ *file = '/';
+ }
+ fd = mkstemp(new);
+- if (fd < 0) {
++ /*
++ * Don't consider it a fatal error if mkstemp() fails
++ * because parent directory didn't exist. (Missing
++ * parents are created later (in recvfile())
++ */
++ if ((fd < 0) && (errno != ENOENT)) {
+ error("Cannot set file name.");
+ return;
++ } else if (fd >= 0) {
++ close(fd);
++ unlink(new); /* Or symlink() will fail */
+ }
+- close(fd);
+ }
+
+ /*
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch
new file mode 100644
index 000000000..493b18397
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/config/config.h.oldpath Tue Nov 10 04:59:48 1998
++++ rdist-6.1.5/config/config.h Thu Jan 31 17:33:21 2002
+@@ -39,7 +39,7 @@
+ * don't have the old rdist, then uncomment the "#undef" line.
+ */
+ #ifndef _PATH_OLDRDIST
+-#define _PATH_OLDRDIST "/usr/ucb/oldrdist" /* Enable compat */
++#define _PATH_OLDRDIST "/usr/bin/oldrdist" /* Enable compat */
+ #endif
+ /*#undef _PATH_OLDRDIST*/ /* Disable compat */
+
+--- rdist-6.1.5/doc/rdist.man.oldpath Tue Nov 10 06:38:53 1998
++++ rdist-6.1.5/doc/rdist.man Thu Jan 31 17:36:57 2002
+@@ -170,10 +170,9 @@
+ This option will only work if
+ .I rdist
+ was compiled with the location of the old rdist
+-(usually either
+-.I /usr/ucb/oldrdist
+-or
+-.I /usr/old/rdist)
++(the path
++.I /usr/bin/oldrdist
++is used on Red Hat linux)
+ and that program is available at run time.
+ .PP
+ .I Rdist
+@@ -558,7 +557,7 @@
+ should be of form
+ .sp
+ .RS
+-\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...
++\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...\fR
+ .RE
+ .sp
+ The valid facility names are:
+--- rdist-6.1.5/README.oldpath Fri Jul 19 19:24:09 1996
++++ rdist-6.1.5/README Thu Jan 31 17:33:21 2002
+@@ -65,12 +65,12 @@
+
+ The way the old rdist started a server rdist is to run "rdist
+ -Server". If the new rdist is run with the "-Server" option, then it
+-will exec a copy of the old rdist (usually /usr/old/rdist or
+-/usr/ucb/oldrdist). In this way, you get compatibility with hosts
++will exec a copy of the old rdist (the path /usr/bin/oldrdist in Red
++Hat linux). In this way, you get compatibility with hosts
+ running the old rdist attempting to rdist to a machine running new
+ rdist. If your host running new rdist wants to rdist to a host
+ running the old rdist, then it must run the old rdist program
+-(/usr/old/rdist or /usr/ucb/oldrdist).
++(/usr/bin/oldrdist in Red Hat linux).
+
+ The definition _PATH_OLDRDIST in "config/config.h" controls the
+ location of the old rdist. If this is not defined, or the defined
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch
new file mode 100644
index 000000000..d3982cf41
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/rshrcmd.c.dist Tue Dec 12 08:20:56 1995
++++ rdist-6.1.5/src/rshrcmd.c Wed Dec 11 07:14:13 1996
+@@ -64,5 +64,5 @@
+ sp[0]. */
+ (void) close(sp[0]);
+- if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0 || dup2(0, 2) < 0) {
++ if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0) {
+ error("dup2 failed: %s.", SYSERR);
+ _exit(255);
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch
new file mode 100644
index 000000000..b20953ef3
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch
@@ -0,0 +1,85 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/filesys.c.stat64 2005-05-04 14:11:03.000000000 +0200
++++ rdist-6.1.5/src/filesys.c 2005-05-04 14:11:10.000000000 +0200
+@@ -430,8 +430,8 @@
+ */
+ int getfilesysinfo(file, freespace, freefiles)
+ char *file;
+- long *freespace;
+- long *freefiles;
++ fsblkcnt_t *freespace;
++ fsfilcnt_t *freefiles;
+ {
+ #if defined(STATFS_TYPE)
+ static statfs_t statfsbuf;
+--- rdist-6.1.5/src/server.c.stat64 2005-05-04 14:11:23.000000000 +0200
++++ rdist-6.1.5/src/server.c 2005-05-04 14:20:34.000000000 +0200
+@@ -62,8 +62,8 @@
+ int catname = 0; /* cat name to target name */
+ char *sptarget[32]; /* stack of saved ptarget's for directories */
+ char *fromhost = NULL; /* Client hostname */
+-static long min_freespace = 0; /* Minimium free space on a filesystem */
+-static long min_freefiles = 0; /* Minimium free # files on a filesystem */
++static fsblkcnt_t min_freespace = 0; /* Minimium free space on a filesystem */
++static fsfilcnt_t min_freefiles = 0; /* Minimium free # files on a filesystem */
+ int oumask; /* Old umask */
+
+ /*
+@@ -1326,7 +1326,7 @@
+ fatalerr("Expected digit, got '%s'.", cp);
+ return;
+ }
+- min_freespace = (unsigned long) atoi(cp);
++ min_freespace = (fsblkcnt_t) atoll(cp);
+ break;
+
+ case SC_FREEFILES: /* Minimium free files */
+@@ -1334,7 +1334,7 @@
+ fatalerr("Expected digit, got '%s'.", cp);
+ return;
+ }
+- min_freefiles = (unsigned long) atoi(cp);
++ min_freefiles = (fsfilcnt_t) atoll(cp);
+ break;
+
+ case SC_LOGGING: /* Logging options */
+@@ -1364,7 +1364,8 @@
+ time_t mtime, atime;
+ char *owner, *group, *file;
+ char new[MAXPATHLEN];
+- long freespace = -1, freefiles = -1;
++ fsfilcnt_t freefiles = -1;
++ fsblkcnt_t freespace = -1;
+ char *cp = cmd;
+
+ /*
+@@ -1499,7 +1500,7 @@
+ */
+ if (min_freespace || min_freefiles) {
+ /* Convert file size to kilobytes */
+- long fsize = (long) (size / 1024);
++ fsblkcnt_t fsize = (fsblkcnt_t) (size / 1024);
+
+ if (getfilesysinfo(target, &freespace, &freefiles) != 0)
+ return;
+@@ -1511,14 +1512,14 @@
+ if (min_freespace && (freespace >= 0) &&
+ (freespace - fsize < min_freespace)) {
+ error(
+- "%s: Not enough free space on filesystem: min %d free %d",
++ "%s: Not enough free space on filesystem: min %lld free %lld",
+ target, min_freespace, freespace);
+ return;
+ }
+ if (min_freefiles && (freefiles >= 0) &&
+ (freefiles - 1 < min_freefiles)) {
+ error(
+- "%s: Not enough free files on filesystem: min %d free %d",
++ "%s: Not enough free files on filesystem: min %lld free %lld",
+ target, min_freefiles, freefiles);
+ return;
+ }
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch
new file mode 100644
index 000000000..bf73b71e1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/build/os-type.svr4 2003-12-17 12:44:18.000000000 +0100
++++ rdist-6.1.5/build/os-type 2003-12-17 12:44:29.000000000 +0100
+@@ -83,7 +83,6 @@
+ if [ -z "${OS}" -a ! -z "${uname}" ]; then
+ case "`$uname -a | tr '[A-Z]' '[a-z]'`" in
+ osf1*) OS=break;;
+- *"4.0"*) OS=svr4;; # There has to be a better way
+ *" dcosx "*) OS=dcosx;;
+ *"cx/ux"*) OS=cxux;;
+ *"hp-ux"*) # HP-UX 9.x
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch
new file mode 100644
index 000000000..e6edbc44d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/config/os-linux.h.varargs 2003-06-17 17:52:33.000000000 +0200
++++ rdist-6.1.5/config/os-linux.h 2003-06-17 17:53:07.000000000 +0200
+@@ -68,7 +68,7 @@
+ /*
+ * Type of arg functions we have.
+ */
+-#define ARG_TYPE ARG_VARARGS
++#define ARG_TYPE ARG_STDARG
+
+ /*
+ * Do we have select()?
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
new file mode 100644
index 000000000..cea1f08f9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Remote file distribution client and server"
+DESCRIPTION = "\
+Rdist is a program to maintain identical copies of files over multiple \
+hosts. It preserves the owner, group, mode, and mtime of files if \
+possible and can update programs that are executing. \
+"
+SECTION = "console/network"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://Copyright;md5=3f47ec9f64b11c8192ee05a66b5c2755"
+
+SRC_URI = "http://www.magnicomp.com/download/${BPN}/${BP}.tar.gz"
+SRC_URI[md5sum] = "546779700af70aa5f9103e08782cdcac"
+SRC_URI[sha256sum] = "2bb0d0f5904eadc9e7fe3d60c15389d6897fcf884211070e289a6c710ff37f96"
+
+SRC_URI += "file://rdist-6.1.5-linux.patch \
+ file://rdist-6.1.5-links.patch \
+ file://rdist-6.1.5-oldpath.patch \
+ file://rdist-6.1.5-hardlink.patch \
+ file://rdist-6.1.5-bison.patch \
+ file://rdist-6.1.5-varargs.patch \
+ file://rdist-6.1.5-maxargs.patch \
+ file://rdist-6.1.5-lfs.patch \
+ file://rdist-6.1.5-cleanup.patch \
+ file://rdist-6.1.5-svr4.patch \
+ file://rdist-6.1.5-ssh.patch \
+ file://rdist-6.1.5-mkstemp.patch \
+ file://rdist-6.1.5-stat64.patch \
+ file://rdist-6.1.5-fix-msgsndnotify-loop.patch \
+ file://rdist-6.1.5-bb-build.patch \
+ file://rdist-6.1.5-makefile-add-ldflags.patch \
+"
+
+DEPENDS = "bison-native"
+
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
new file mode 100644
index 000000000..eaaf30460
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
@@ -0,0 +1,34 @@
+From 2fa326b26dc479942367dc4283e2f87372403988 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 09:32:04 -0700
+Subject: [PATCH] rtnl_flush: Error on failed write()
+
+Fixes
+route.c:45:2: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
+| write(fd, "-1", 2);
+| ^~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ route.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/route.c b/route.c
+index c552d1f..fc5c31e 100644
+--- a/route.c
++++ b/route.c
+@@ -42,7 +42,8 @@ static void rtnl_flush(void)
+ if (fd < 0)
+ return;
+
+- write(fd, "-1", 2);
++ if (write(fd, "-1", 2) < 0 )
++ perror("write");
+ close(fd);
+ }
+
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
new file mode 100644
index 000000000..98dc41a09
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -0,0 +1,17 @@
+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://git.openwrt.org/project/relayd.git \
+ file://0001-rtnl_flush-Error-on-failed-write.patch \
+"
+
+SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13"
+PV = "0.0.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
new file mode 100644
index 000000000..0e89a9be0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Submitted [https://github.com/samba-team/samba/pull/70]
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+From 50eac4fd30944e5e1d83060757633fe0ed572723 Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Wed, 30 Nov 2016 16:25:06 +0100
+Subject: [PATCH] packaging: Avoid timeout for nmbd if started offline with
+ systemd
+
+If no network connection appears within DefaultTimeoutStartSec
+(~ 90s) after startup, nmbd fails to notify systemd and will
+therefore get killed.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+---
+ packaging/systemd/nmb.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
+index 71c93d6..f3d2fc2 100644
+--- a/packaging/systemd/nmb.service
++++ b/packaging/systemd/nmb.service
+@@ -10,6 +10,7 @@ EnvironmentFile=-/etc/sysconfig/samba
+ ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS
+ ExecReload=/usr/bin/kill -HUP $MAINPID
+ LimitCORE=infinity
++TimeoutStartSec=0
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch
new file mode 100644
index 000000000..cdf7a38c1
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
new file mode 100644
index 000000000..8ca7a52ed
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
@@ -0,0 +1,57 @@
+From 2214c2d1e455a38c891d17e421b438e3f7c495d8 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm@cn.fujitsu.com>
+Date: Mon, 18 Apr 2016 17:00:53 -0400
+Subject: [PATCH] Don't check xsltproc manpages
+
+Upstream-Status: Pending
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+---
+ lib/ldb/wscript | 2 +-
+ lib/talloc/wscript | 2 +-
+ lib/tdb/wscript | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/ldb/wscript b/lib/ldb/wscript
+index 5ea5231..d94086b 100644
+--- a/lib/ldb/wscript
++++ b/lib/ldb/wscript
+@@ -98,7 +98,7 @@ def configure(conf):
+ conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
+
+ 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'):
+diff --git a/lib/talloc/wscript b/lib/talloc/wscript
+index df7e6be..b3305cf 100644
+--- a/lib/talloc/wscript
++++ b/lib/talloc/wscript
+@@ -49,7 +49,7 @@ def configure(conf):
+ conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+ conf.env.TALLOC_VERSION = VERSION
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ conf.CHECK_HEADERS('sys/auxv.h')
+ conf.CHECK_FUNCS('getauxval')
+diff --git a/lib/tdb/wscript b/lib/tdb/wscript
+index 4782550..6bb3fa1 100644
+--- a/lib/tdb/wscript
++++ b/lib/tdb/wscript
+@@ -89,7 +89,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
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 000000000..e112b3b40
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
new file mode 100644
index 000000000..6a7f8facc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
@@ -0,0 +1,64 @@
+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 @@ def configure(conf):
+ conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+ conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++ if 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')
+diff --git a/source3/wscript b/source3/wscript
+index bac3dd5..a5c51ea 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -1070,7 +1070,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 542a60c..22e6116 100644
+--- a/wscript
++++ b/wscript
+@@ -86,6 +86,10 @@ def set_options(opt):
+ help=("Disable RELRO builds"),
+ action="store_false", dest='enable_relro')
+
++ 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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
new file mode 100644
index 000000000..0c7592f8e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
@@ -0,0 +1,19 @@
+samba: build dnsserver_common code
+
+Just 'install' does not seem to do it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/source4/dns_server/wscript_build
++++ b/source4/dns_server/wscript_build
+@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
+ source='dnsserver_common.c',
+ deps='samba-util samba-errors ldbsamba clidns',
+ private_library=True,
+- install=bld.AD_DC_BUILD_IS_ENABLED()
++ enabled=bld.AD_DC_BUILD_IS_ENABLED()
+ )
+
+ bld.SAMBA_MODULE('service_dns',
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
new file mode 100644
index 000000000..894bc8bb2
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
@@ -0,0 +1,15 @@
+Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
+===================================================================
+--- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c
++++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
+@@ -166,8 +166,10 @@ int main(int argc, const char **argv)
+ if (ret == 0) {
+ pthread_mutex_unlock(mutex);
+ }
++#ifdef __GLIBC__
+ } else if (ret == EBUSY) {
+ printf("pid=%u\n", mutex->__data.__owner);
++#endif
+ } else if (ret == 0) {
+ pthread_mutex_unlock(mutex);
+ }
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
new file mode 100644
index 000000000..5ae8c5978
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
@@ -0,0 +1,25 @@
+samba: defeat iconv test
+
+A test was added when configuring samba which requires target code
+to be executed. In general, this will not work, so we eliminate it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/lib/util/charset/wscript_configure
++++ b/lib/util/charset/wscript_configure
+@@ -17,6 +17,8 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'i
+
+ conf.DEFINE('HAVE_NATIVE_ICONV', 1)
+
++"""
++[added for 4.7.0, but breaks cross-compilation]
+ conf.CHECK_CODE('''
+ uint8_t inbuf[2] = { 0x30, 0xdf };
+ uint8_t outbuf[4] = { 0 };
+@@ -36,3 +38,4 @@ conf.CHECK_CODE('''
+ msg='Checking errno of iconv for illegal multibyte sequence',
+ lib='iconv',
+ headers='errno.h iconv.h')
++"""
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
new file mode 100644
index 000000000..eb06866f4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
@@ -0,0 +1,19 @@
+Index: samba-4.6.2/nsswitch/wins.c
+===================================================================
+--- samba-4.6.2.orig/nsswitch/wins.c
++++ samba-4.6.2/nsswitch/wins.c
+@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex =
+ #define INADDRSZ 4
+ #endif
+
++#ifndef NETDB_INTERNAL
++#define NETDB_INTERNAL (-1)
++#endif
++
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
++#endif
++
+ NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
+ struct hostent *he,
+ char *buffer,
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
new file mode 100644
index 000000000..71db99c5d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
@@ -0,0 +1,87 @@
+Musl does not have _r versions of getent() and getpwent() APIs
+
+Taken from gentoo
+http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: samba-4.4.5/source4/torture/local/nss_tests.c
+===================================================================
+--- samba-4.4.5.orig/source4/torture/local/nss_tests.c
++++ samba-4.4.5/source4/torture/local/nss_tests.c
+@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct tortu
+ return true;
+ }
+
+-
+ static bool test_getgrgid(struct torture_context *tctx,
+ gid_t gid,
+ struct group *grp_p)
+@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct tort
+ return true;
+ }
+
++#if HAVE_GETPWENT_R
+ static bool test_enum_r_passwd(struct torture_context *tctx,
+ struct passwd **pwd_array_p,
+ size_t *num_pwd_p)
+@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct to
+
+ return true;
+ }
++#endif
+
+ static bool torture_assert_passwd_equal(struct torture_context *tctx,
+ const struct passwd *p1,
+@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture
+ struct passwd *pwd, pwd1, pwd2;
+ size_t num_pwd;
+
+- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
+ "failed to enumerate passwd");
+
+ for (i=0; i < num_pwd; i++) {
+@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct t
+ struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
+ size_t num_pwd;
+
+- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
+ "failed to enumerate passwd");
+
+ for (i=0; i < num_pwd; i++) {
+@@ -531,6 +532,7 @@ static bool test_enum_group(struct tortu
+ return true;
+ }
+
++#if HAVE_GETGRENT_R
+ static bool test_enum_r_group(struct torture_context *tctx,
+ struct group **grp_array_p,
+ size_t *num_grp_p)
+@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct tor
+
+ return true;
+ }
++#endif
+
+ static bool torture_assert_group_equal(struct torture_context *tctx,
+ const struct group *g1,
+@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_
+ struct group *grp, grp1, grp2;
+ size_t num_grp;
+
+- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
+ "failed to enumerate group");
+
+ for (i=0; i < num_grp; i++) {
+@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct to
+ struct group *grp, grp1, grp2, grp3, grp4;
+ size_t num_grp;
+
+- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
+ "failed to enumerate group");
+
+ for (i=0; i < num_grp; i++) {
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
new file mode 100644
index 000000000..0cbacb6c0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
@@ -0,0 +1,37 @@
+Lifted from gentoo and ported to 4.4.5
+
+http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: samba-4.7.0/source3/wscript
+===================================================================
+--- samba-4.7.0.orig/source3/wscript
++++ samba-4.7.0/source3/wscript
+@@ -875,7 +875,7 @@ msg.msg_accrightslen = sizeof(fd);
+ if conf.env.with_iconv:
+ conf.DEFINE('HAVE_ICONV', 1)
+
+- if Options.options.with_pam:
++ if Options.options.with_pam != False:
+ use_pam=True
+ conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+ if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+@@ -952,6 +952,17 @@ int i; i = PAM_RADIO_TYPE;
+ "or headers not found. Use --without-pam to disable "
+ "PAM support.");
+
++ else:
++ Logs.warn("PAM disabled")
++ use_pam=False
++ conf.undefine('WITH_PAM')
++ conf.undefine('WITH_PAM_MODULES')
++ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++ conf.undefine('PAM_RHOST')
++ conf.undefine('PAM_TTY')
++ conf.undefine('HAVE_PAM_PAM_APPL_H')
++
++
+ seteuid = False
+
+ #
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
new file mode 100644
index 000000000..77c8b3626
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
@@ -0,0 +1,19 @@
+samba: correct log files location
+
+We use /var/log/samba.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/packaging/RHEL/setup/smb.conf
++++ b/packaging/RHEL/setup/smb.conf
+@@ -63,7 +63,7 @@
+
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+- log file = /usr/local/samba/var/log.%m
++ log file = /var/log/samba/log.%m
+
+ # Put a capping on the size of the log files (in Kb).
+ max log size = 50
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba
new file mode 100644
index 000000000..4bdfa7d2c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
new file mode 100644
index 000000000..a8517c541
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
@@ -0,0 +1,318 @@
+HOMEPAGE = "https://www.samba.org/"
+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://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://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
+ file://0006-avoid-using-colon-in-the-checking-msg.patch \
+ file://netdb_defines.patch \
+ file://glibc_only.patch \
+ file://iconv-4.7.0.patch \
+ file://dnsserver-4.7.0.patch \
+ file://smb_conf-4.7.0.patch \
+ file://volatiles.03_samba \
+ "
+SRC_URI_append_libc-musl = " \
+ file://samba-pam.patch \
+ file://samba-4.3.9-remove-getpwent_r.patch \
+ "
+
+SRC_URI[md5sum] = "0253021a45c479cec1e135b004a0177a"
+SRC_URI[sha256sum] = "1eede30fc8ef6504e24602fb72b00baa0a7b73b59f16d25cb0771dc8c7c57d6e"
+
+inherit systemd waf-samba cpan-base perlnative update-rc.d
+# remove default added RDEPENDS on perl
+RDEPENDS_${PN}_remove = "perl"
+
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+LSB = ""
+LSB_linuxstdbase = "lsb"
+
+INITSCRIPT_NAME = "samba"
+INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
+
+SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind"
+SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
+SYSTEMD_SERVICE_${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}"
+SYSTEMD_SERVICE_winbind = "winbind.service"
+
+# There are prerequisite settings to enable ad-dc, so disable the service by default.
+# Reference:
+# https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
+SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable"
+
+# Use krb5. Build active domain controller.
+#
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
+ acl ad-dc cups gnutls ldap mitkrb5 \
+"
+
+RDEPENDS_${PN}-base += "${LSB}"
+RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
+
+PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+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"
+
+# Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS,
+# And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to:
+# http://samba.2283325.n4.nabble.com/samba-4-6-6-Unknown-dependency-kdc-in-service-kdc-objlist-td4722096.html
+# So the working combination is:
+# 1) ad-dc: enable, gnutls: enable, mitkrb5: disable
+# 2) ad-dc: disable, gnutls: enable/disable, mitkrb5: enable
+#
+# We are now at 4.7.0, so take the above with a grain of salt. We do not need to know where
+# krb5kdc is unless ad-dc is enabled, but we tell configure anyhow.
+#
+PACKAGECONFIG[ad-dc] = ",--without-ad-dc,,"
+PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
+PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
+
+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}"
+
+# These libraries are supposed to replace others supplied by packages, but decorate the names of
+# .so files so there will not be a conflict. This is not done consistantly, so be very careful
+# when adding to this list.
+#
+SAMBA4_LIBS="heimdal,cmocka,NONE"
+
+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-rpath-install \
+ --with-shared-modules=${SAMBA4_MODULES} \
+ --bundled-libraries=${SAMBA4_LIBS} \
+ ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+ --with-cluster-support \
+ --with-profiling-data \
+ --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+ --with-pam --with-pammodulesdir=${base_libdir}/security \
+ "
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+do_install_append() {
+ for section in 1 5 7; do
+ install -d ${D}${mandir}/man$section
+ install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
+ done
+ for section in 1 5 7 8; do
+ install -d ${D}${mandir}/man$section
+ install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
+ done
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 packaging/systemd/*.service ${D}${systemd_system_unitdir}
+ sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
+ -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
+ -i ${D}${systemd_system_unitdir}/*.service
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then
+ rm -f ${D}${systemd_system_unitdir}/samba.service
+ fi
+
+ 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
+ if [ "${LSB}" = "lsb" ]; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
+ else
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
+ 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,g' \
+ -e 's,/usr/bin,${base_bindir},g' \
+ -i ${D}${sysconfdir}/init.d/samba
+ fi
+
+ install -d ${D}${sysconfdir}/samba
+ echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+ install -m644 packaging/RHEL/setup/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}/default
+ install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
+
+ # install ctdb config file and test cases
+ install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
+ # the items are from ctdb/tests/run_tests.sh
+ for d in onnode takeover tool eventscripts cunit simple complex; do
+ testdir=${D}${datadir}/ctdb-tests/$d
+ install -d $testdir
+ cp ${S}/ctdb/tests/$d/*.sh $testdir
+ cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
+ done
+
+ # fix file-rdeps qa warning
+ if [ -f ${D}${bindir}/onnode ]; then
+ sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
+ fi
+
+ chmod 0750 ${D}${sysconfdir}/sudoers.d
+ rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
+}
+
+PACKAGES =+ "${PN}-python ${PN}-pidl \
+ ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
+ winbind \
+ ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \
+ smbclient ${PN}-client ${PN}-server ${PN}-test"
+
+python samba_populate_packages() {
+ def module_hook(file, pkg, pattern, format, basename):
+ pn = d.getVar('PN', True)
+ d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
+
+ mlprefix = d.getVar('MLPREFIX', True) or ''
+ pam_libdir = d.expand('${base_libdir}/security')
+ pam_pkgname = mlprefix + 'pam-plugin%s'
+ do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
+
+ libdir = d.getVar('libdir', True)
+ do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
+ pkglibdir = '%s/samba' % libdir
+ do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
+ moduledir = '%s/samba/auth' % libdir
+ do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
+ moduledir = '%s/samba/pdb' % libdir
+ do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
+}
+
+PACKAGESPLITFUNCS_prepend = "samba_populate_packages "
+
+RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules"
+RDEPENDS_${PN}-python += "pytalloc python-tdb"
+
+FILES_${PN}-base = "${sbindir}/nmbd \
+ ${sbindir}/smbd \
+ ${sysconfdir}/init.d \
+ ${localstatedir}/lib/samba \
+ ${localstatedir}/nmbd \
+ ${localstatedir}/spool/samba \
+ ${systemd_system_unitdir}/nmb.service \
+ ${systemd_system_unitdir}/smb.service"
+
+FILES_${PN}-ad-dc = "${sbindir}/samba \
+ ${systemd_system_unitdir}/samba.service \
+ ${libdir}/krb5/plugins/kdb/samba.so \
+ "
+RDEPENDS_${PN}-ad-dc = "krb5-kdc"
+
+FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+ ${bindir}/ctdb_run_cluster_tests \
+ ${sysconfdir}/ctdb/nodes \
+ ${datadir}/ctdb-tests \
+ ${datadir}/ctdb/tests \
+ "
+
+FILES_${BPN}-common = "${sysconfdir}/default \
+ ${sysconfdir}/samba \
+ ${sysconfdir}/tmpfiles.d \
+"
+
+FILES_${PN} += "${libdir}/vfs/*.so \
+ ${libdir}/charset/*.so \
+ ${libdir}/*.dat \
+ ${libdir}/auth/*.so \
+"
+
+FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb"
+
+FILES_${PN}-testsuite = "${bindir}/gentest \
+ ${bindir}/locktest \
+ ${bindir}/masktest \
+ ${bindir}/ndrdump \
+ ${bindir}/smbtorture"
+
+FILES_registry-tools = "${bindir}/regdiff \
+ ${bindir}/regpatch \
+ ${bindir}/regshell \
+ ${bindir}/regtree"
+
+FILES_winbind = "${sbindir}/winbindd \
+ ${bindir}/wbinfo \
+ ${bindir}/ntlm_auth \
+ ${libdir}/samba/idmap \
+ ${libdir}/samba/nss_info \
+ ${libdir}/winbind_krb5_locator.so \
+ ${sysconfdir}/init.d/winbind \
+ ${systemd_system_unitdir}/winbind.service"
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_smbclient = "${bindir}/cifsdd \
+ ${bindir}/rpcclient \
+ ${bindir}/smbcacls \
+ ${bindir}/smbclient \
+ ${bindir}/smbcquotas \
+ ${bindir}/smbget \
+ ${bindir}/smbspool \
+ ${bindir}/smbtar \
+ ${bindir}/smbtree \
+ ${libdir}/samba/smbspool_krb5_wrapper"
+
+RDEPENDS_${PN}-pidl_append = " perl"
+FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
+
+RDEPENDS_${PN}-client = "\
+ smbclient \
+ winbind \
+ registry-tools \
+ ${PN}-pidl \
+ "
+
+ALLOW_EMPTY_${PN}-client = "1"
+
+RDEPENDS_${PN}-server = "\
+ ${PN} \
+ winbind \
+ registry-tools \
+ "
+
+ALLOW_EMPTY_${PN}-server = "1"
+
+RDEPENDS_${PN}-test = "\
+ ${PN}-ctdb-tests \
+ ${PN}-testsuite \
+ "
+
+ALLOW_EMPTY_${PN}-test = "1"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch b/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch
new file mode 100644
index 000000000..f25a02cd8
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb b/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb
new file mode 100644
index 000000000..fc304fae7
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch b/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..047caec32
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
@@ -0,0 +1,33 @@
+From 4335c4c61877c0b65ff4ec767e8ad3ad8c73c32d 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"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
new file mode 100644
index 000000000..2e28cd048
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
@@ -0,0 +1,29 @@
+From 5875dea90f71350b7205788fbc67e3759077cefe 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 62573a8..fded45b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -69,7 +69,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])
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
new file mode 100644
index 000000000..6aa0b736f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
@@ -0,0 +1,62 @@
+From 5a53260a819e2873f58165e96852529719101c53 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <B40290@freescale.com>
+Date: Mon, 4 Nov 2013 10:39:56 +0800
+Subject: [PATCH] snort: add recipe
+
+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>
+
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 6fe5d68..e7636ce 100644
+--- a/configure.in
++++ b/configure.in
+@@ -698,23 +698,23 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "xyes"; then
+
+ 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
++#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 flow ID])
+ AC_RUN_IFELSE(
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
new file mode 100644
index 000000000..04df37c94
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
@@ -0,0 +1,60 @@
+From 5aa42a3137c657b5eddd4608343aa1854bd7cd27 Mon Sep 17 00:00:00 2001
+From: Zhiquan Li <zhiquan.li@windriver.com>
+Date: Mon, 16 Nov 2015 10:23:00 +0800
+Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5
+
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+checking for daq flow ID... configure:
+configure: error: cannot run test program while cross compiling
+
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e7636ce..2fbd298 100644
+--- a/configure.in
++++ b/configure.in
+@@ -716,23 +716,23 @@ have_daq_address_space_id="yes"
+ # [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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
new file mode 100644
index 000000000..15958a72d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
@@ -0,0 +1,60 @@
+From b916443d43f2e1eeacfbed0033274a0270ef634d Mon Sep 17 00:00:00 2001
+From: Zhiquan Li <zhiquan.li@windriver.com>
+Date: Mon, 16 Nov 2015 10:23:00 +0800
+Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5
+
+Upstream-Status:Inappropriate [embedded specific]
+
+fix the below error:
+checking for DAQ_VERDICT_RETRY... configure:
+configure: error: cannot run test program while cross compiling
+
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 2fbd298..62573a8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -734,23 +734,23 @@ have_daq_flow_id="yes"
+ # [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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
new file mode 100644
index 000000000..79e9f076b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
@@ -0,0 +1,85 @@
+From a1fdbced4166cb0f35d23b63a59312d86860485a Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <B40290@freescale.com>
+Date: Mon, 4 Nov 2013 10:39:56 +0800
+Subject: [PATCH] snort: add recipe
+
+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>
+
+---
+ configure.in | 50 ++++++++++++++++----------------------------------
+ 1 file changed, 16 insertions(+), 34 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 20d15eb..6fe5d68 100644
+--- a/configure.in
++++ b/configure.in
+@@ -274,25 +274,7 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t])
+ 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>
+@@ -421,21 +403,21 @@ if test "x$LPCAP" = "xno"; then
+ 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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
new file mode 100644
index 000000000..0404ea0fa
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
@@ -0,0 +1,30 @@
+From f46d096015d7402a37a59eb66b8f6b7fbf0cdff0 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Wed, 24 May 2017 17:38:53 +0800
+Subject: [PATCH] snort: enable static daq
+
+Upstream-Status: Inappropriate [embedded specific]
+
+When enable static daq for snort, it calls to daq-modules-config to get link
+library and library path. Library path is useless for oe and cause host
+contamination issue. So filter it.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index fded45b..a247bb9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -658,7 +658,7 @@ fi
+
+ if test "x$enable_static_daq" = "xyes"; then
+ LDAQ=""
+- LIBS="${LIBS} `daq-modules-config --static --libs`"
++ LIBS="${LIBS} `daq-modules-config --static --libs | sed 's#-L[^ ]*##g'`"
+ AC_CHECK_LIB([daq_static], [daq_load_modules],
+ [LIBS="-ldaq_static ${LIBS}"], [LDAQ="no"], [ ])
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
new file mode 100644
index 000000000..d8a00c43f
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
new file mode 100644
index 000000000..2034b85fb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
@@ -0,0 +1,105 @@
+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 = "xz libpcap libpcre daq libdnet util-linux daq-native"
+DEPENDS_append_libc-musl = " libtirpc"
+
+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 \
+ file://fix-host-contamination-when-enable-static-daq.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 \
+ --enable-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 lzma"
+PACKAGECONFIG[openssl] = "--with-openssl-includes=${STAGING_INCDIR} --with-openssl-libraries=${STAGING_LIBDIR}, --without-openssl-includes --without-openssl-libraries, openssl,"
+PACKAGECONFIG[lzma] = "--with-lzma-includes=${STAGING_INCDIR} --with-lzma-libraries=${STAGING_LIBDIR}, --without-lzma-includes --without-lzma-libraries, xz,"
+
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+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
+
+ # fix the hardcoded path and lib name
+ # comment out the rules that are not provided
+ sed -i -e 's#/usr/local/lib#${libdir}#' \
+ -e 's#\.\./\(.*rules\)#${sysconfdir}/snort/\1#' \
+ -e 's#\(libsf_engine.so\)#\1.0#' \
+ -e 's/^\(include $RULE_PATH\)/#\1/' \
+ -e 's/^\(dynamicdetection\)/#\1/' \
+ -e '/preprocessor reputation/,/blacklist/ s/^/#/' \
+ ${D}${sysconfdir}/snort/snort.conf
+
+ 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
+
+ sed -i 's/-fdebug-prefix-map[^ ]*//g; s#${STAGING_DIR_TARGET}##g' ${D}${libdir}/pkgconfig/*.pc
+}
+
+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 \
+"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
new file mode 100644
index 000000000..a1e56b7ca
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch
new file mode 100644
index 000000000..804c18bc9
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch
new file mode 100644
index 000000000..b259fdf78
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
new file mode 100644
index 000000000..695b26567
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch
new file mode 100644
index 000000000..b760d3fd3
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/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/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
new file mode 100644
index 000000000..19cfe46b7
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch
new file mode 100644
index 000000000..ebcfc7c2f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch
@@ -0,0 +1,34 @@
+From 400b8f235377f677a7a760f1e3a1cd26d95140bc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Jun 2017 22:58:18 -0700
+Subject: [PATCH] Add printf format and silence format-security warnings
+
+Fix
+
+vconfig.c:66:4: error: format not a string literal and no format arguments [-Werror=format-security]
+ fprintf(stdout,usage);
+ ^~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ vconfig.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vconfig.c b/vconfig.c
+index 5057cfd..83137ba 100644
+--- a/vconfig.c
++++ b/vconfig.c
+@@ -63,7 +63,7 @@ static char* usage =
+ " is OFF.\n";
+
+ void show_usage() {
+- fprintf(stdout,usage);
++ fprintf(stdout, "%s", usage);
+ }
+
+ int hex_to_bytes(char* bytes, int bytes_length, char* hex_str) {
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch
new file mode 100644
index 000000000..b7ab7d97c
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
new file mode 100644
index 000000000..7eea5d135
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -0,0 +1,38 @@
+SUMMARY = "VLAN provides vconfig utility"
+HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html"
+SECTION = "misc"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://vconfig.c;beginline=1;endline=19;md5=094ca47de36c20c598b15b32c270ce0a"
+
+SRC_URI = "http://${BPN}.sourcearchive.com/downloads/${PV}-3ubuntu9/${BPN}_${PV}.orig.tar.gz \
+ file://no-HOME-includes.patch \
+ file://0001-Add-printf-format-and-silence-format-security-warnin.patch \
+"
+
+SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394"
+SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca"
+
+S = "${WORKDIR}/${BPN}"
+
+inherit update-alternatives
+
+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}/
+}
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "vconfig"
+ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch
new file mode 100644
index 000000000..184c7943b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch
@@ -0,0 +1,26 @@
+From 48e16e9ae7d8e4c42282bd82cbbd9a6d346a5c00 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sun, 2 Dec 2012 02:16:54 +0100
+Subject: [PATCH 1/8] search for log-help in build dir
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ makeman.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makeman.pl b/makeman.pl
+index cf241a1..2d73432 100755
+--- a/makeman.pl
++++ b/makeman.pl
+@@ -30,7 +30,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;
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch
new file mode 100644
index 000000000..6f00d3b89
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch
@@ -0,0 +1,49 @@
+From d565b4a5e0045f1e40e0e462920ed5b8faca9eec Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sun, 2 Dec 2012 02:16:54 +0100
+Subject: [PATCH 2/8] Fix vpnc install for cross compile
+
+---
+ Makefile | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 69f5aca..a15782e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -133,21 +133,21 @@ install-common: all
+ 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 \
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch
new file mode 100644
index 000000000..bb7730647
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch
@@ -0,0 +1,30 @@
+From 6b49020893f999df56392b49b1a289cb96a113a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 22:08:17 -0700
+Subject: [PATCH 3/8] error.h is specific to glibc on linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdep.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/sysdep.h b/sysdep.h
+index 137bf6d..6a323f0 100644
+--- a/sysdep.h
++++ b/sysdep.h
+@@ -37,9 +37,10 @@ int tun_read(int fd, unsigned char *buf, int len);
+ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
+
+ /***************************************************************************/
+-#if defined(__linux__) || defined(__GLIBC__)
++#if defined(__linux__)
++#if defined(__GLIBC__)
+ #include <error.h>
+-
++#endif
+ #define HAVE_VASPRINTF 1
+ #define HAVE_ASPRINTF 1
+ #define HAVE_ERROR 1
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch
new file mode 100644
index 000000000..f70a13898
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch
@@ -0,0 +1,30 @@
+From 4d1dd61c04f52a7c796debbdea5fc9139ffa271d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 22:45:05 -0700
+Subject: [PATCH 4/8] Use pkgconfig instead of libgcrypt-config
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a15782e..b537046 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,10 +63,10 @@ RELEASE_VERSION := $(shell cat VERSION)
+ CC ?= gcc
+ CFLAGS ?= -O3 -g
+ CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
+-CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
++CFLAGS += $(shell pkg-config libgcrypt --cflags) $(CRYPTO_CFLAGS)
+ CPPFLAGS += -DVERSION=\"$(VERSION)\"
+ LDFLAGS ?= -g
+-LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
++LIBS += $(shell pkg-config libgcrypt --libs) $(CRYPTO_LDADD)
+
+ ifeq ($(shell uname -s), SunOS)
+ LIBS += -lnsl -lresolv -lsocket
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch
new file mode 100644
index 000000000..01783f45b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch
@@ -0,0 +1,30 @@
+From 1947ea776dc38c3377702dd89bd229670f4d948d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 23:06:52 -0700
+Subject: [PATCH 5/8] include sys/ttydefaults.h for CEOT definition
+
+Fixes
+
+config.c:146:25: error: use of undeclared identifier 'CEOT'
+ if (llen == 0 && c == CEOT)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ config.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config.c b/config.c
+index 804faa7..1883d12 100644
+--- a/config.c
++++ b/config.c
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <sys/utsname.h>
+ #include <sys/wait.h>
++#include <sys/ttydefaults.h>
+
+ #include <gcrypt.h>
+
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch
new file mode 100644
index 000000000..fa89df279
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch
@@ -0,0 +1,40 @@
+From 56768fc0c2cbd6abcf28c9805ab516db8a0548d4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 23:09:47 -0700
+Subject: [PATCH 6/8] sysdep: Add header include sequence to adjust for musl
+
+---
+ sysdep.h | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/sysdep.h b/sysdep.h
+index 6a323f0..0122b95 100644
+--- a/sysdep.h
++++ b/sysdep.h
+@@ -17,16 +17,20 @@
+ * __SKYOS__
+ *
+ */
++/* hack to make sure kernel headers understand that libc (musl)
++ * does define IFF_LOWER_UP et al.
++ */
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include <netinet/in.h>
+
+ #if !defined(__CYGWIN__)
+-#include <net/if.h>
+-#include <net/if_arp.h>
++//#include <linux/if.h>
++//#include <net/if_arp.h>
+ #include <netinet/if_ether.h>
+ #endif
++#include <netinet/in.h>
+
+ #include "config.h"
+
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch
new file mode 100644
index 000000000..de67b47a4
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch
@@ -0,0 +1,66 @@
+From b6a027fe4da6f66552b533f1314e5005b16c5455 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 23:52:36 -0700
+Subject: [PATCH 7/8] add error() API when error.h is not on platform
+
+sign-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdep.c | 24 ++++++++++++++++++++++++
+ sysdep.h | 2 ++
+ 2 files changed, 26 insertions(+)
+
+diff --git a/sysdep.c b/sysdep.c
+index d8f181d..2518ec1 100644
+--- a/sysdep.c
++++ b/sysdep.c
+@@ -17,6 +17,7 @@
+ GNU General Public License for more details.
+ */
+
++#define _GNU_SOURCE
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -794,3 +795,26 @@ int setenv(const char *name, const char *value, int overwrite)
+ return ret;
+ }
+ #endif
++
++#ifndef _ERROR_H_
++#define _ERROR_H_
++#include <stdarg.h>
++#include <stdio.h>
++#include <errno.h>
++
++void error(int status, int errnum, const char* format, ...)
++{
++ va_list ap;
++
++ fflush(stdout);
++ fprintf(stderr, "%s: ", program_invocation_name);
++ va_start(ap, format);
++ vfprintf(stderr, format, ap);
++ va_end(ap);
++ if (errnum)
++ fprintf(stderr, ":%d", errnum);
++ if (status)
++ exit(status);
++}
++#endif /* _ERROR_H_ */
++
+diff --git a/sysdep.h b/sysdep.h
+index 0122b95..4e60064 100644
+--- a/sysdep.h
++++ b/sysdep.h
+@@ -44,6 +44,8 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
+ #if defined(__linux__)
+ #if defined(__GLIBC__)
+ #include <error.h>
++#else
++void error(int status, int errnum, const char* format, ...);
+ #endif
+ #define HAVE_VASPRINTF 1
+ #define HAVE_ASPRINTF 1
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch
new file mode 100644
index 000000000..62ffdb7c9
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch
@@ -0,0 +1,36 @@
+From 7f01847d14a1a3af50f49499743b0551ddef1311 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Mar 2017 23:54:01 -0700
+Subject: [PATCH 8/8] include sysdep.h before net/if_tun.h
+
+Fixes duplicate defines in header errors
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdep.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sysdep.c b/sysdep.c
+index 2518ec1..5624ef1 100644
+--- a/sysdep.c
++++ b/sysdep.c
+@@ -57,6 +57,8 @@
+ #include <sys/cygwin.h>
+ #endif
+
++#include "sysdep.h"
++
+ #if defined(__DragonFly__)
+ #include <net/tun/if_tun.h>
+ #elif defined(__linux__)
+@@ -69,7 +71,6 @@
+ #include <net/if_tun.h>
+ #endif
+
+-#include "sysdep.h"
+
+ #if !defined(HAVE_VASPRINTF) || !defined(HAVE_ASPRINTF) || !defined(HAVE_ERROR)
+ #include <stdarg.h>
+--
+2.12.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
new file mode 100644
index 000000000..2bed55041
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
@@ -0,0 +1,42 @@
+From 39925f090c21ab571ebc6ec250696f7f7093a2a6 Mon Sep 17 00:00:00 2001
+From: Will Page <Will.Page@ni.com>
+Date: Wed, 30 Aug 2017 18:14:00 -0700
+Subject: [PATCH 1/1] Reduce lifetime value to widely-compatible value
+
+Current proposed lifetime value (2147483 seconds, which equates to
+MAXINT ms, or ~25 days) is rejected by Fortigate vpn devices because
+"peer SA proposal does not match local policy". It seems default
+policy for these devices constrains lifetime where similar VPN devices
+don't.
+
+Reducing the lifetime from its current value to 28800 (exactly 8 hours)
+causes it to start working with fortigate devices.
+---
+ vpnc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vpnc.c b/vpnc.c
+index 36dd0f3..3e0fcba 100644
+--- a/vpnc.c
++++ b/vpnc.c
+@@ -1135,7 +1135,7 @@ static struct isakmp_attribute *make_transform_ike(int dh_group, int crypt, int
+ a->af = isakmp_attr_lots;
+ a->u.lots.length = 4;
+ a->u.lots.data = xallocc(a->u.lots.length);
+- *((uint32_t *) a->u.lots.data) = htonl(2147483);
++ *((uint32_t *) a->u.lots.data) = htonl(28800);
+ a = new_isakmp_attribute_16(IKE_ATTRIB_LIFE_TYPE, IKE_LIFE_TYPE_SECONDS, a);
+ a = new_isakmp_attribute_16(IKE_ATTRIB_AUTH_METHOD, auth, a);
+ a = new_isakmp_attribute_16(IKE_ATTRIB_GROUP_DESC, dh_group, a);
+@@ -2561,7 +2561,7 @@ static struct isakmp_attribute *make_transform_ipsec(struct sa_block *s, int dh_
+ a->af = isakmp_attr_lots;
+ a->u.lots.length = 4;
+ a->u.lots.data = xallocc(a->u.lots.length);
+- *((uint32_t *) a->u.lots.data) = htonl(2147483);
++ *((uint32_t *) a->u.lots.data) = htonl(28800);
+ a = new_isakmp_attribute_16(ISAKMP_IPSEC_ATTRIB_SA_LIFE_TYPE, IPSEC_LIFE_SECONDS, a);
+
+ if (dh_group)
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf
new file mode 100644
index 000000000..48b15eca6
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help
new file mode 100644
index 000000000..fbec25414
--- /dev/null
+++ b/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
new file mode 100644
index 000000000..ea2179985
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
@@ -0,0 +1,59 @@
+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"
+
+PV .= "r550-2jnpr1"
+SRCREV = "b1243d29e0c00312ead038b04a2cf5e2fa31d740"
+SRC_URI = "git://github.com/ndpgroup/vpnc \
+ file://long-help \
+ file://default.conf \
+ file://0001-search-for-log-help-in-build-dir.patch \
+ file://0002-Fix-vpnc-install-for-cross-compile.patch \
+ file://0003-error.h-is-specific-to-glibc-on-linux.patch \
+ file://0004-Use-pkgconfig-instead-of-libgcrypt-config.patch \
+ file://0005-include-sys-ttydefaults.h-for-CEOT-definition.patch \
+ file://0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch \
+ file://0007-add-error-API-when-error.h-is-not-on-platform.patch \
+ file://0008-include-sysdep.h-before-net-if_tun.h.patch \
+ file://0009-reduce-lifetime-value.patch \
+ "
+
+PACKAGECONFIG ?= "gnutls"
+
+PACKAGECONFIG[gnutls] = ",,gnutls"
+PACKAGECONFIG[openssl] = ",,openssl"
+
+S = "${WORKDIR}/git"
+
+inherit perlnative pkgconfig
+
+#EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_configure_append () {
+ # Make sure we use our nativeperl wrapper
+ sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl
+ cp ${WORKDIR}/long-help ${S}
+}
+
+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"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb b/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb
new file mode 100644
index 000000000..64e9401e7
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Wireless Central Regulatory Domain Database"
+HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+SECTION = "net"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
+
+SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "d282cce92b6e692e8673e2bd97adf33b"
+SRC_URI[sha256sum] = "cfedf1c3521b3c8f32602f25ed796e96e687c3441a00e7c050fedf7fd4f1b8b7"
+
+inherit bin_package
+
+do_install() {
+ install -d -m0755 ${D}${libdir}/crda
+ install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
+ install -m 0644 regulatory.bin ${D}${libdir}/crda/regulatory.bin
+ install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
+}
+
+RSUGGESTS_${PN} = "crda"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch b/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch
new file mode 100644
index 000000000..f304d933d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch
@@ -0,0 +1,27 @@
+From fb490136cf8f2456cfe13b0b4f796e6c155e75dc Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 30 Aug 2017 03:02:32 -0400
+Subject: [PATCH] fix no rule to make cyassl/options.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 395d75d..d4a3880 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3684,6 +3684,7 @@ AC_CONFIG_FILES([wolfssl/options.h])
+ #fi
+ AC_CONFIG_FILES([support/wolfssl.pc])
+ AC_CONFIG_FILES([rpm/spec])
++AC_CONFIG_FILES([cyassl/options.h])
+
+ AX_CREATE_GENERIC_CONFIG
+ AX_AM_JOBSERVER([yes])
+--
+2.8.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb b/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
new file mode 100644
index 000000000..9290651d0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
@@ -0,0 +1,24 @@
+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"
+
+S = "${WORKDIR}/git"
+SRCREV = "d195009dcb62d8712195661bd1d50f8dd6831044"
+SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https; \
+ file://0001-fix-no-rule-to-make-cyassl-options.h.patch \
+ "
+
+inherit autotools
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
OpenPOWER on IntegriCloud