[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch
new file mode 100644
index 0000000..269174b
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch
@@ -0,0 +1,31 @@
+From 77db892cdee265e971270c06ca1ffbaeea6449a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 26 Jun 2018 00:27:40 +0200
+Subject: [PATCH] Search for cython3
+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>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 727089d1..6b565cdc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,7 +58,7 @@ AC_SUBST([PYGOBJECT_LIBS])
+ 
+ AC_ARG_VAR([CYTHONEXEC], [Cython compiler])
+ if test "x$CYTHONEXEC" = "x"; then
+-   AC_PATH_PROG([CYTHONEXEC],[cython])
++   AC_PATH_PROG([CYTHONEXEC],[cython3])
+ fi
+ AC_SUBST([CYTHONEXEC])
+ AC_MSG_CHECKING([for cython executable])
+-- 
+2.14.3
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb
new file mode 100644
index 0000000..947db78
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "bluez5 python3-pygobject python3-cython-native python3-setuptools-native intltool-native"
+
+inherit autotools systemd gsettings python3native gtk-icon-cache
+
+SRC_URI = " \
+    git://github.com/blueman-project/blueman.git \
+    file://0001-Search-for-cython3.patch \
+"
+SRCREV = "c4a03417e81e21543d4568e8e7f7de307582eb50"
+PV = "2.0.5+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+    --disable-runtime-deps-check \
+    --disable-schemas-compile \
+"
+
+SYSTEMD_SERVICE_${PN} = "${BPN}-mechanism.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+RRECOMENDS_${PN} += "adwaita-icon-theme"
+RDEPENDS_${PN} += " \
+    python3-dbus \
+    packagegroup-tools-bluetooth \
+"
+
+PACKAGECONFIG[thunar] = "--enable-thunar-sendto,--disable-thunar-sendto,,thunar"
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/Thunar \
+    ${systemd_user_unitdir} \
+    ${exec_prefix}${systemd_system_unitdir} \
+    ${PYTHON_SITEPACKAGES_DIR} \
+"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_blueman.a"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch
new file mode 100644
index 0000000..eecbc14
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch
@@ -0,0 +1,40 @@
+From 21e9a4bb214648ffd43c66b535fbf096bfcc9f4f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 24 Jun 2018 00:04:37 -0700
+Subject: [PATCH] Unittest: Link librt and libm using -l option
+
+cmake'ry forces full path to .so files when found using
+find_package and since we have proper sysrooted toolchain
+-lm and -lrt is all we need
+
+Upstream-Status: Inappropriate [Cross compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ unittest/CMakeLists.txt | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
+index c4cdf229..e1b63caf 100644
+--- a/unittest/CMakeLists.txt
++++ b/unittest/CMakeLists.txt
+@@ -57,14 +57,8 @@ elseif (WIN32)
+ else()
+   set(CHECK_LIBRARIES "${CHECK_INSTALL_DIR}/lib/libcheck.a")
+ endif()
+-find_package(LibM)
+-if (LIBM_FOUND)
+-  set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBM::LIBM")
+-endif()
+-find_package(LibRt)
+-if (LIBRT_FOUND)
+-  set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBRT::LIBRT")
+-endif()
++set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lm")
++set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lrt")
+ 
+ # Build the C unit tests
+ add_library(shared-c-unit-tests STATIC shared.c)
+-- 
+2.18.0
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch
new file mode 100644
index 0000000..8653302
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch
@@ -0,0 +1,26 @@
+From 59f65235a7a690f50d1686e9977908c053697d8c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Aug 2018 22:59:13 -0700
+Subject: [PATCH] undefine macro before redefining
+
+Fixes
+src/main.c:89:9: error: 'printf' macro redefined [-Werror,-Wmacro-redefined]
+
+Upstream-Stats: Submitted [https://github.com/civetweb/civetweb/pull/649]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.c b/src/main.c
+index bbcb0aec..01191a3c 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -86,6 +86,7 @@
+ 
+ #include "civetweb.h"
+ 
++#undef printf
+ #define printf                                                                 \
+ 	DO_NOT_USE_THIS_FUNCTION__USE_fprintf /* Required for unit testing */
+ 
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
new file mode 100644
index 0000000..d681f7f
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Civetweb embedded web server"
+HOMEPAGE = "https://github.com/civetweb/civetweb"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f28fdcba0dda735eed62bac6a397562"
+
+SRCREV = "19f31ba8dd8443e86c7028a4b4c37f4b299aa68c"
+PV = "1.10+git${SRCPV}"
+SRC_URI = "git://github.com/civetweb/civetweb.git \
+           file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \
+           file://0001-undefine-macro-before-redefining.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+# civetweb supports building with make or cmake (although cmake lacks few features)
+inherit cmake
+
+# Disable Lua and Duktape because they do not compile from CMake (as of v1.8, v1.9 and v1.10).
+# Disable ASAN as it is included only in Debug build.
+EXTRA_OECMAKE = " \
+    -DBUILD_SHARED_LIBS=ON \
+    -DCIVETWEB_ENABLE_DUKTAPE=OFF \
+    -DCIVETWEB_ENABLE_LUA=OFF \
+    -DCIVETWEB_ENABLE_ASAN=OFF \
+    -DCIVETWEB_BUILD_TESTING=OFF \
+"
+
+# Building with ninja fails on missing third_party/lib/libcheck.a (which
+# should come from external CMake project)
+OECMAKE_GENERATOR = "Unix Makefiles"
+
+PACKAGECONFIG ??= "caching ipv6 server ssl websockets"
+PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON,"
+PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON,"
+PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF,"
+PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF,"
+PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF,"
+PACKAGECONFIG[server] = "-DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_INSTALL_EXECUTABLE=OFF,"
+PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF,-DCIVETWEB_ENABLE_SSL=OFF,openssl (=1.0.2%),"
+PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF,"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch
new file mode 100644
index 0000000..16800d5
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
new file mode 100644
index 0000000..3ef35ee
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
new file mode 100644
index 0000000..747804d
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
new file mode 100644
index 0000000..1bb5c63
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
new file mode 100644
index 0000000..812e983
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
new file mode 100644
index 0000000..0b73785
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch
new file mode 100644
index 0000000..100b765
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
new file mode 100644
index 0000000..d5d2ab6
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -0,0 +1,44 @@
+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 libnl \
+           ${@oe.utils.conditional("DEFAULT_CRYPT", "gcrypt", "libgcrypt", "", d)} \
+           ${@oe.utils.conditional("DEFAULT_CRYPT", "openssl", "openssl10", "", d)} \
+          "
+
+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 siteinfo
+
+# "gcrypt" or "openssl"
+DEFAULT_CRYPT ??= "gcrypt"
+
+# Recursive make problem
+EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \
+                UDEV_RULE_DIR=${nonarch_libdir}/udev/rules.d/"
+EXTRA_OEMAKE_append = " ${@oe.utils.conditional("DEFAULT_CRYPT", "openssl", "USE_OPENSSL=1", "", d)}"
+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/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
new file mode 100644
index 0000000..42ffb17
--- /dev/null
+++ b/meta/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 bison-native"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
new file mode 100644
index 0000000..4798a77
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch
new file mode 100644
index 0000000..a100b7c
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb
new file mode 100644
index 0000000..885c6c0
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch
new file mode 100644
index 0000000..42d2627
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
new file mode 100644
index 0000000..8890e14
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb
new file mode 100644
index 0000000..51e220c
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch
new file mode 100644
index 0000000..d80ed3e
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch
new file mode 100644
index 0000000..de5eb3a
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch
new file mode 100644
index 0000000..02218a3
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch
new file mode 100644
index 0000000..1de267f
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch
new file mode 100644
index 0000000..9e1f5b2
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch
@@ -0,0 +1,44 @@
+From fecf974b63f72eeb12d3b43522e948ca2bc704d4 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 11 Oct 2018 09:45:52 +0800
+Subject: [PATCH] freeradius: correct version number of libssl defect
+
+Upstream-Status: Backport [https://github.com/FreeRADIUS/freeradius-server
+                 /commit/ad039347beca4ded297813a1da6eabb61fcf2ddd]
+
+upstream have refactored this part code into
+src/lib/tls/base.c, and problem also have fixed
+by commit ad039347beca
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/main/tls.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/main/tls.c b/src/main/tls.c
+index acbfe79..d9c91f1 100644
+--- a/src/main/tls.c
++++ b/src/main/tls.c
+@@ -72,15 +72,15 @@ typedef struct libssl_defect {
+ static libssl_defect_t libssl_defects[] =
+ {
+ 	{
+-		.low		= 0x01010101f,		/* 1.1.0a */
+-		.high		= 0x01010101f,		/* 1.1.0a */
++		.low		= 0x01010001f,		/* 1.1.0a */
++		.high		= 0x01010001f,		/* 1.1.0a */
+ 		.id		= "CVE-2016-6309",
+ 		.name		= "OCSP status request extension",
+ 		.comment	= "For more information see https://www.openssl.org/news/secadv/20160926.txt"
+ 	},
+ 	{
+-		.low		= 0x01010100f,		/* 1.1.0  */
+-		.high		= 0x01010100f,		/* 1.1.0  */
++		.low		= 0x010100000f,		/* 1.1.0  */
++		.high		= 0x01010000f,		/* 1.1.0  */
+ 		.id		= "CVE-2016-6304",
+ 		.name		= "OCSP status request extension",
+ 		.comment	= "For more information see https://www.openssl.org/news/secadv/20160922.txt"
+-- 
+2.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch
new file mode 100644
index 0000000..db8caab
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
new file mode 100644
index 0000000..fa412e2
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
new file mode 100644
index 0000000..9c99766
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
new file mode 100644
index 0000000..71b7809
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
new file mode 100644
index 0000000..38e7c36
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
@@ -0,0 +1,37 @@
+From 0780b7053fb0d33d721aa70ab2ecd75299e5ba31 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 15:03:39 +0800
+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>
+
+update to new version 3.0.17 to fix patch warning
+Signed-off-by: Changqing Li <changqing.li@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 efc9f29..98a97e4 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.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
new file mode 100644
index 0000000..4a62bf1
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
new file mode 100644
index 0000000..af1bff0
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
new file mode 100644
index 0000000..638d950
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
@@ -0,0 +1,186 @@
+From 69cb6d4bb5dd56a48695c0581a7d853e427b0ea3 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 14:54:41 +0800
+Subject: [PATCH] freeradius: 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>
+
+Update to version 3.0.17
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/modules/rlm_example/config.h.in | 35 +++--------------------------------
+ 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.ac   |  8 ++++----
+ src/modules/rlm_smsotp/config.h.in  |  3 +++
+ src/modules/rlm_unix/config.h.in    |  3 +++
+ 8 files changed, 23 insertions(+), 37 deletions(-)
+
+diff --git a/src/modules/rlm_example/config.h.in b/src/modules/rlm_example/config.h.in
+index 2a81ef5..4dbb8f4 100644
+--- a/src/modules/rlm_example/config.h.in
++++ b/src/modules/rlm_example/config.h.in
+@@ -1,37 +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,6 +13,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_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 4b3ff42..69c79cb 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.ac b/src/modules/rlm_ruby/configure.ac
+index 9306382..ae86a14 100644
+--- a/src/modules/rlm_ruby/configure.ac
++++ b/src/modules/rlm_ruby/configure.ac
+@@ -3,15 +3,15 @@ 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_unix/config.h.in b/src/modules/rlm_unix/config.h.in
+index dcb9aa2..16107b8 100644
+--- a/src/modules/rlm_unix/config.h.in
++++ b/src/modules/rlm_unix/config.h.in
+@@ -54,6 +54,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.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
new file mode 100644
index 0000000..b0929c4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
new file mode 100644
index 0000000..4eb61ff
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
new file mode 100644
index 0000000..1954586
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
new file mode 100644
index 0000000..675940d
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
new file mode 100644
index 0000000..fa62962
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
new file mode 100644
index 0000000..899c4e4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
new file mode 100644
index 0000000..8cbdae8
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.17.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.17.bb
new file mode 100644
index 0000000..c17d56d
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.17.bb
@@ -0,0 +1,223 @@
+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 \
+    file://0001-freeradius-correct-version-number-of-libssl-defect.patch \
+"
+SRC_URI[md5sum] = "1f4ad38f32101a7d50d818afa6f17339"
+SRC_URI[sha256sum] = "3f03404b6e4a4f410e1f15ea2ababfec7f8a7ae8a49836d8a0c137436d913b96"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch
new file mode 100644
index 0000000..d4764f5
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
new file mode 100644
index 0000000..24c134f
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/meta/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 0000000..3da4e9f
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch
new file mode 100644
index 0000000..b13bb92
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch
new file mode 100644
index 0000000..2592989
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
new file mode 100644
index 0000000..ff3abd8
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils
new file mode 100644
index 0000000..30e81ef
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils
new file mode 100644
index 0000000..21b55da
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils
new file mode 100644
index 0000000..2b894a7
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils
new file mode 100644
index 0000000..2d9a040
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils
new file mode 100644
index 0000000..67b44c4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch
new file mode 100644
index 0000000..532a0e5
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
new file mode 100644
index 0000000..a27dbae
--- /dev/null
+++ b/meta/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 virtual/crypt"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch
new file mode 100644
index 0000000..fb16ecb
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch
@@ -0,0 +1,89 @@
+From 8ea2ee451a1af7c5b5c8f4b36c1f77d44442064d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Sep 2018 13:02:35 -0700
+Subject: [PATCH] Fix error: call of overloaded distance is ambiguous
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The boost::iterators::distance function template is an adapted version
+of std::distance for the Boost iterator traversal in 2.68 it has started
+to fail with argument dependent lookup and compiler is erroring out
+
+with
+
+error: call of overloaded ‘distance'
+
+boost implementation of distance is protected against being found by ADL
+
+The way function is called in libdhcp means it will be found via ADL and
+all namespaces will be considered which is providing problematic since
+its getting it from both std:: and boost:: namespaces
+
+so let it not rely on ADL by qualifying then calls with std:: namespace
+
+Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/103]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/lib/dhcp/libdhcp++.cc | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc
+index 330c02b..ced705d 100644
+--- a/src/lib/dhcp/libdhcp++.cc
++++ b/src/lib/dhcp/libdhcp++.cc
+@@ -419,14 +419,14 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf,
+         // We previously did the lookup only for dhcp6 option space, but with the
+         // addition of S46 options, we now do it for every space.
+         range = idx.equal_range(opt_type);
+-        num_defs = distance(range.first, range.second);
++        num_defs = std::distance(range.first, range.second);
+ 
+         // Standard option definitions do not include the definition for
+         // our option or we're searching for non-standard option. Try to
+         // find the definition among runtime option definitions.
+         if (num_defs == 0) {
+             range = runtime_idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         OptionPtr opt;
+@@ -538,14 +538,14 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
+         // may be standard options in other spaces (e.g. radius). So we now do
+         // the lookup for every space.
+         range = idx.equal_range(opt_type);
+-        num_defs = distance(range.first, range.second);
++        num_defs = std::distance(range.first, range.second);
+ 
+         // Standard option definitions do not include the definition for
+         // our option or we're searching for non-standard option. Try to
+         // find the definition among runtime option definitions.
+         if (num_defs == 0) {
+             range = runtime_idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         // Check if option unpacking must be deferred
+@@ -638,7 +638,7 @@ size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id,
+                 idx->equal_range(opt_type);
+             // Get the number of returned option definitions for the
+             // option code.
+-            size_t num_defs = distance(range.first, range.second);
++            size_t num_defs = std::distance(range.first, range.second);
+ 
+             if (num_defs > 1) {
+                 // Multiple options of the same code are not supported
+@@ -746,7 +746,7 @@ size_t LibDHCP::unpackVendorOptions4(const uint32_t vendor_id, const OptionBuffe
+                     idx->equal_range(opt_type);
+                 // Get the number of returned option definitions for
+                 // the option code.
+-                size_t num_defs = distance(range.first, range.second);
++                size_t num_defs = std::distance(range.first, range.second);
+ 
+                 if (num_defs > 1) {
+                     // Multiple options of the same code are not
+-- 
+2.18.0
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch
new file mode 100644
index 0000000..381a3a7
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch
@@ -0,0 +1,31 @@
+From cd902b8b588681a27d5321f1ee078a1c8f6e6935 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Wed, 21 Mar 2018 06:01:38 +0000
+Subject: [PATCH 3/3] Makefile.am: update hooksdir for lease_cmds
+
+update hooksdir for lease_cmds
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+
+---
+ src/hooks/dhcp/lease_cmds/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hooks/dhcp/lease_cmds/Makefile.am b/src/hooks/dhcp/lease_cmds/Makefile.am
+index cfd6779..22cc4a9 100644
+--- a/src/hooks/dhcp/lease_cmds/Makefile.am
++++ b/src/hooks/dhcp/lease_cmds/Makefile.am
+@@ -37,7 +37,7 @@ liblease_cmds_la_CXXFLAGS = $(AM_CXXFLAGS)
+ liblease_cmds_la_CPPFLAGS = $(AM_CPPFLAGS)
+ 
+ # install the shared object into $(libdir)/hooks
+-lib_hooksdir = $(libdir)/hooks
++lib_hooksdir = $(libdir)/kea/hooks
+ lib_hooks_LTLIBRARIES = libdhcp_lease_cmds.la
+ 
+ libdhcp_lease_cmds_la_SOURCES  =
+-- 
+2.18.0
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service
new file mode 100644
index 0000000..91aa2eb
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Kea DHCP-DDNS Server
+Wants=network-online.target
+After=network-online.target
+After=time-sync.target
+
+[Service]
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea
+ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service
new file mode 100644
index 0000000..f32edcb
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Kea DHCPv4 Server
+Wants=network-online.target
+After=network-online.target
+After=time-sync.target
+
+[Service]
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea
+ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service
new file mode 100644
index 0000000..26d2205
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Kea DHCPv6 Server
+Wants=network-online.target
+After=network-online.target
+After=time-sync.target
+
+[Service]
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
+ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea
+ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb
new file mode 100644
index 0000000..67de07b
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb
@@ -0,0 +1,52 @@
+SUMMARY = "ISC Kea DHCP Server"
+DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS."
+HOMEPAGE = "http://kea.isc.org"
+SECTION = "connectivity"
+LICENSE = "MPL-2.0 & Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1666a9c4bb55adbc8939d85643096bd3"
+
+DEPENDS += "kea-native"
+
+SRC_URI = "\
+    http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
+    file://0003-Makefile.am-update-hooksdir-for-lease_cmds.patch \
+    file://0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch \
+    file://kea-dhcp4.service \
+    file://kea-dhcp6.service \
+    file://kea-dhcp-ddns.service \
+"
+SRC_URI[md5sum] = "26eedd749101642757d788431605aaa5"
+SRC_URI[sha256sum] = "c0f8ecb93657adfc5ab970c91706754e601084828493f053f159661d21b31128"
+
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_configure_prepend_class-target() {
+    mkdir -p ${B}/src/lib/log/compiler/
+    ln -sf ${STAGING_BINDIR_NATIVE}/kea-msg-compiler ${B}/src/lib/log/compiler/kea-msg-compiler
+}
+
+do_install_append_class-target() {
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
+    sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
+           -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+           ${D}${systemd_system_unitdir}/kea-dhcp*service
+}
+
+do_install_append() {
+    rm -rf "${D}${localstatedir}"
+}
+
+PACKAGECONFIG ??= "openssl log4cplus boost"
+
+PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_TARGET}${prefix},,openssl,openssl"
+PACKAGECONFIG[log4cplus] = "--with-log4cplus=${STAGING_DIR_TARGET}${prefix},,log4cplus,log4cplus"
+PACKAGECONFIG[boost] = "--with-boost-include=${STAGING_INCDIR} --with-boost-lib-dir=${STAGING_LIBDIR} --with-boost-libs=-lboost_system,,boost,boost"
+
+FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
+FILES_${PN} += "${libdir}/hooks/*.so"
+
+BBCLASSEXTEND += "native"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch
new file mode 100644
index 0000000..952232b
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb
new file mode 100644
index 0000000..bf793d9
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb
@@ -0,0 +1,33 @@
+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] = "a56b5047dbfda052df4c1dfd197aa092"
+SRC_URI[sha256sum] = "a853edbd075b008c315679c7882b6dcc6821ed2365d2ed843a412acd3d40da0e"
+
+inherit autotools gettext pkgconfig
+
+acpaths = "-I ./m4"
+
+EXTRA_OECONF += "--with-modules --disable-rpath"
+
+PACKAGECONFIG ??= "openssl zlib gnutls readline expat"
+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} += "${datadir}/icons/hicolor"
+FILES_${PN}-dbg += "${libdir}/lftp/${PV}/.debug"
+RDEPENDS_${PN} = "perl bash readline"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
new file mode 100644
index 0000000..53ba25e
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -0,0 +1,18 @@
+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"
+
+UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+acpaths = "-I ./config/"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb
new file mode 100644
index 0000000..ff3f7f0
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.13.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 = "libs"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz"
+
+SRC_URI[md5sum] = "659d96bb03012ca6db414a9137fcdbd6"
+SRC_URI[sha256sum] = "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service
new file mode 100644
index 0000000..e7bfad0
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Lightweight UPnP IGD daemon
+Documentation=man:miniupnpd(8)
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/etc/miniupnpd/iptables_init.sh
+ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf
+ExecStopPost=/etc/miniupnpd/iptables_removeall.sh
+PIDFile=/run/miniupnpd.pid
+
+[Install]
+WantedBy=network.target
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb
new file mode 100644
index 0000000..04b5cd5
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb
@@ -0,0 +1,43 @@
+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=91ac00c6b9f5c106e89291e196fe0234"
+
+inherit autotools gettext pkgconfig systemd
+
+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 \
+           file://miniupnpd.service"
+
+SRC_URI[md5sum] = "b4c7c938915edeee6ca4c65dd021f212"
+SRC_URI[sha256sum] = "860c15f2f8340fd69546b01cffe4c7fcff3e63a7bdfe5a2af6b2346f0e074bb6"
+
+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
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/
+}
+
+SYSTEMD_SERVICE_${PN} = "miniupnpd.service"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch
new file mode 100644
index 0000000..c89dfe6
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch
@@ -0,0 +1,975 @@
+From d9aeef8d95a325942cc92f4d72415771d75d904c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Tue, 12 Apr 2016 13:05:10 +0100
+Subject: [PATCH 2/2] uthash: remove in-tree version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We don't need it as we want to use the version provided by
+meta-oe instead.
+
+Upstream-Status: Inappropriate [embedded-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ src/uthash.h | 948 -----------------------------------------------------------
+ 1 file changed, 948 deletions(-)
+ delete mode 100644 src/uthash.h
+
+diff --git a/src/uthash.h b/src/uthash.h
+deleted file mode 100644
+index 915a825..0000000
+--- a/src/uthash.h
++++ /dev/null
+@@ -1,948 +0,0 @@
+-/*
+-Copyright (c) 2003-2013, Troy D. Hanson     http://troydhanson.github.com/uthash/
+-All rights reserved.
+-
+-Redistribution and use in source and binary forms, with or without
+-modification, are permitted provided that the following conditions are met:
+-
+-    * Redistributions of source code must retain the above copyright
+-      notice, this list of conditions and the following disclaimer.
+-
+-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-*/
+-
+-#ifndef UTHASH_H
+-#define UTHASH_H 
+-
+-#include <string.h>   /* memcmp,strlen */
+-#include <stddef.h>   /* ptrdiff_t */
+-#include <stdlib.h>   /* exit() */
+-
+-/* These macros use decltype or the earlier __typeof GNU extension.
+-   As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+-   when compiling c++ source) this code uses whatever method is needed
+-   or, for VS2008 where neither is available, uses casting workarounds. */
+-#ifdef _MSC_VER         /* MS compiler */
+-#if _MSC_VER >= 1600 && defined(__cplusplus)  /* VS2010 or newer in C++ mode */
+-#define DECLTYPE(x) (decltype(x))
+-#else                   /* VS2008 or older (or VS2010 in C mode) */
+-#define NO_DECLTYPE
+-#define DECLTYPE(x)
+-#endif
+-#else                   /* GNU, Sun and other compilers */
+-#define DECLTYPE(x) (__typeof(x))
+-#endif
+-
+-#ifdef NO_DECLTYPE
+-#define DECLTYPE_ASSIGN(dst,src)                                                 \
+-do {                                                                             \
+-  char **_da_dst = (char**)(&(dst));                                             \
+-  *_da_dst = (char*)(src);                                                       \
+-} while(0)
+-#else 
+-#define DECLTYPE_ASSIGN(dst,src)                                                 \
+-do {                                                                             \
+-  (dst) = DECLTYPE(dst)(src);                                                    \
+-} while(0)
+-#endif
+-
+-/* a number of the hash function use uint32_t which isn't defined on win32 */
+-#ifdef _MSC_VER
+-typedef unsigned int uint32_t;
+-typedef unsigned char uint8_t;
+-#else
+-#include <inttypes.h>   /* uint32_t */
+-#endif
+-
+-#define UTHASH_VERSION 1.9.8
+-
+-#ifndef uthash_fatal
+-#define uthash_fatal(msg) exit(-1)        /* fatal error (out of memory,etc) */
+-#endif
+-#ifndef uthash_malloc
+-#define uthash_malloc(sz) malloc(sz)      /* malloc fcn                      */
+-#endif
+-#ifndef uthash_free
+-#define uthash_free(ptr,sz) free(ptr)     /* free fcn                        */
+-#endif
+-
+-#ifndef uthash_noexpand_fyi
+-#define uthash_noexpand_fyi(tbl)          /* can be defined to log noexpand  */
+-#endif
+-#ifndef uthash_expand_fyi
+-#define uthash_expand_fyi(tbl)            /* can be defined to log expands   */
+-#endif
+-
+-/* initial number of buckets */
+-#define HASH_INITIAL_NUM_BUCKETS 32      /* initial number of buckets        */
+-#define HASH_INITIAL_NUM_BUCKETS_LOG2 5  /* lg2 of initial number of buckets */
+-#define HASH_BKT_CAPACITY_THRESH 10      /* expand when bucket count reaches */
+-
+-/* calculate the element whose hash handle address is hhe */
+-#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
+-
+-#define HASH_FIND(hh,head,keyptr,keylen,out)                                     \
+-do {                                                                             \
+-  unsigned _hf_bkt,_hf_hashv;                                                    \
+-  out=NULL;                                                                      \
+-  if (head) {                                                                    \
+-     HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt);   \
+-     if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) {                           \
+-       HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ],  \
+-                        keyptr,keylen,out);                                      \
+-     }                                                                           \
+-  }                                                                              \
+-} while (0)
+-
+-#ifdef HASH_BLOOM
+-#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM)
+-#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0)
+-#define HASH_BLOOM_MAKE(tbl)                                                     \
+-do {                                                                             \
+-  (tbl)->bloom_nbits = HASH_BLOOM;                                               \
+-  (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN);                 \
+-  if (!((tbl)->bloom_bv))  { uthash_fatal( "out of memory"); }                   \
+-  memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN);                                \
+-  (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE;                                       \
+-} while (0) 
+-
+-#define HASH_BLOOM_FREE(tbl)                                                     \
+-do {                                                                             \
+-  uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN);                              \
+-} while (0) 
+-
+-#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8)))
+-#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8)))
+-
+-#define HASH_BLOOM_ADD(tbl,hashv)                                                \
+-  HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+-
+-#define HASH_BLOOM_TEST(tbl,hashv)                                               \
+-  HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+-
+-#else
+-#define HASH_BLOOM_MAKE(tbl) 
+-#define HASH_BLOOM_FREE(tbl) 
+-#define HASH_BLOOM_ADD(tbl,hashv) 
+-#define HASH_BLOOM_TEST(tbl,hashv) (1)
+-#define HASH_BLOOM_BYTELEN 0
+-#endif
+-
+-#define HASH_MAKE_TABLE(hh,head)                                                 \
+-do {                                                                             \
+-  (head)->hh.tbl = (UT_hash_table*)uthash_malloc(                                \
+-                  sizeof(UT_hash_table));                                        \
+-  if (!((head)->hh.tbl))  { uthash_fatal( "out of memory"); }                    \
+-  memset((head)->hh.tbl, 0, sizeof(UT_hash_table));                              \
+-  (head)->hh.tbl->tail = &((head)->hh);                                          \
+-  (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS;                        \
+-  (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2;              \
+-  (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head);                    \
+-  (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc(                      \
+-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
+-  if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); }             \
+-  memset((head)->hh.tbl->buckets, 0,                                             \
+-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
+-  HASH_BLOOM_MAKE((head)->hh.tbl);                                               \
+-  (head)->hh.tbl->signature = HASH_SIGNATURE;                                    \
+-} while(0)
+-
+-#define HASH_ADD(hh,head,fieldname,keylen_in,add)                                \
+-        HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add)
+-
+-#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced)                   \
+-do {                                                                             \
+-  replaced=NULL;                                                                 \
+-  HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced);                     \
+-  if (replaced!=NULL) {                                                          \
+-     HASH_DELETE(hh,head,replaced);                                              \
+-  };                                                                             \
+-  HASH_ADD(hh,head,fieldname,keylen_in,add);                                     \
+-} while(0)
+- 
+-#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add)                            \
+-do {                                                                             \
+- unsigned _ha_bkt;                                                               \
+- (add)->hh.next = NULL;                                                          \
+- (add)->hh.key = (char*)keyptr;                                                  \
+- (add)->hh.keylen = (unsigned)keylen_in;                                                   \
+- if (!(head)) {                                                                  \
+-    head = (add);                                                                \
+-    (head)->hh.prev = NULL;                                                      \
+-    HASH_MAKE_TABLE(hh,head);                                                    \
+- } else {                                                                        \
+-    (head)->hh.tbl->tail->next = (add);                                          \
+-    (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail);         \
+-    (head)->hh.tbl->tail = &((add)->hh);                                         \
+- }                                                                               \
+- (head)->hh.tbl->num_items++;                                                    \
+- (add)->hh.tbl = (head)->hh.tbl;                                                 \
+- HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets,                         \
+-         (add)->hh.hashv, _ha_bkt);                                              \
+- HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh);                   \
+- HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv);                                 \
+- HASH_EMIT_KEY(hh,head,keyptr,keylen_in);                                        \
+- HASH_FSCK(hh,head);                                                             \
+-} while(0)
+-
+-#define HASH_TO_BKT( hashv, num_bkts, bkt )                                      \
+-do {                                                                             \
+-  bkt = ((hashv) & ((num_bkts) - 1));                                            \
+-} while(0)
+-
+-/* delete "delptr" from the hash table.
+- * "the usual" patch-up process for the app-order doubly-linked-list.
+- * The use of _hd_hh_del below deserves special explanation.
+- * These used to be expressed using (delptr) but that led to a bug
+- * if someone used the same symbol for the head and deletee, like
+- *  HASH_DELETE(hh,users,users);
+- * We want that to work, but by changing the head (users) below
+- * we were forfeiting our ability to further refer to the deletee (users)
+- * in the patch-up process. Solution: use scratch space to
+- * copy the deletee pointer, then the latter references are via that
+- * scratch pointer rather than through the repointed (users) symbol.
+- */
+-#define HASH_DELETE(hh,head,delptr)                                              \
+-do {                                                                             \
+-    unsigned _hd_bkt;                                                            \
+-    struct UT_hash_handle *_hd_hh_del;                                           \
+-    if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) )  {         \
+-        uthash_free((head)->hh.tbl->buckets,                                     \
+-                    (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+-        HASH_BLOOM_FREE((head)->hh.tbl);                                         \
+-        uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                      \
+-        head = NULL;                                                             \
+-    } else {                                                                     \
+-        _hd_hh_del = &((delptr)->hh);                                            \
+-        if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) {     \
+-            (head)->hh.tbl->tail =                                               \
+-                (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) +               \
+-                (head)->hh.tbl->hho);                                            \
+-        }                                                                        \
+-        if ((delptr)->hh.prev) {                                                 \
+-            ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) +                  \
+-                    (head)->hh.tbl->hho))->next = (delptr)->hh.next;             \
+-        } else {                                                                 \
+-            DECLTYPE_ASSIGN(head,(delptr)->hh.next);                             \
+-        }                                                                        \
+-        if (_hd_hh_del->next) {                                                  \
+-            ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next +                     \
+-                    (head)->hh.tbl->hho))->prev =                                \
+-                    _hd_hh_del->prev;                                            \
+-        }                                                                        \
+-        HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);   \
+-        HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del);        \
+-        (head)->hh.tbl->num_items--;                                             \
+-    }                                                                            \
+-    HASH_FSCK(hh,head);                                                          \
+-} while (0)
+-
+-
+-/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
+-#define HASH_FIND_STR(head,findstr,out)                                          \
+-    HASH_FIND(hh,head,findstr,strlen(findstr),out)
+-#define HASH_ADD_STR(head,strfield,add)                                          \
+-    HASH_ADD(hh,head,strfield,strlen(add->strfield),add)
+-#define HASH_REPLACE_STR(head,strfield,add,replaced)                             \
+-  HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced)
+-#define HASH_FIND_INT(head,findint,out)                                          \
+-    HASH_FIND(hh,head,findint,sizeof(int),out)
+-#define HASH_ADD_INT(head,intfield,add)                                          \
+-    HASH_ADD(hh,head,intfield,sizeof(int),add)
+-#define HASH_REPLACE_INT(head,intfield,add,replaced)                             \
+-    HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced)
+-#define HASH_FIND_PTR(head,findptr,out)                                          \
+-    HASH_FIND(hh,head,findptr,sizeof(void *),out)
+-#define HASH_ADD_PTR(head,ptrfield,add)                                          \
+-    HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
+-#define HASH_REPLACE_PTR(head,ptrfield,add)                                      \
+-    HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced)
+-#define HASH_DEL(head,delptr)                                                    \
+-    HASH_DELETE(hh,head,delptr)
+-
+-/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
+- * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
+- */
+-#ifdef HASH_DEBUG
+-#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
+-#define HASH_FSCK(hh,head)                                                       \
+-do {                                                                             \
+-    unsigned _bkt_i;                                                             \
+-    unsigned _count, _bkt_count;                                                 \
+-    char *_prev;                                                                 \
+-    struct UT_hash_handle *_thh;                                                 \
+-    if (head) {                                                                  \
+-        _count = 0;                                                              \
+-        for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) {       \
+-            _bkt_count = 0;                                                      \
+-            _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head;                      \
+-            _prev = NULL;                                                        \
+-            while (_thh) {                                                       \
+-               if (_prev != (char*)(_thh->hh_prev)) {                            \
+-                   HASH_OOPS("invalid hh_prev %p, actual %p\n",                  \
+-                    _thh->hh_prev, _prev );                                      \
+-               }                                                                 \
+-               _bkt_count++;                                                     \
+-               _prev = (char*)(_thh);                                            \
+-               _thh = _thh->hh_next;                                             \
+-            }                                                                    \
+-            _count += _bkt_count;                                                \
+-            if ((head)->hh.tbl->buckets[_bkt_i].count !=  _bkt_count) {          \
+-               HASH_OOPS("invalid bucket count %d, actual %d\n",                 \
+-                (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count);              \
+-            }                                                                    \
+-        }                                                                        \
+-        if (_count != (head)->hh.tbl->num_items) {                               \
+-            HASH_OOPS("invalid hh item count %d, actual %d\n",                   \
+-                (head)->hh.tbl->num_items, _count );                             \
+-        }                                                                        \
+-        /* traverse hh in app order; check next/prev integrity, count */         \
+-        _count = 0;                                                              \
+-        _prev = NULL;                                                            \
+-        _thh =  &(head)->hh;                                                     \
+-        while (_thh) {                                                           \
+-           _count++;                                                             \
+-           if (_prev !=(char*)(_thh->prev)) {                                    \
+-              HASH_OOPS("invalid prev %p, actual %p\n",                          \
+-                    _thh->prev, _prev );                                         \
+-           }                                                                     \
+-           _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh);                    \
+-           _thh = ( _thh->next ?  (UT_hash_handle*)((char*)(_thh->next) +        \
+-                                  (head)->hh.tbl->hho) : NULL );                 \
+-        }                                                                        \
+-        if (_count != (head)->hh.tbl->num_items) {                               \
+-            HASH_OOPS("invalid app item count %d, actual %d\n",                  \
+-                (head)->hh.tbl->num_items, _count );                             \
+-        }                                                                        \
+-    }                                                                            \
+-} while (0)
+-#else
+-#define HASH_FSCK(hh,head) 
+-#endif
+-
+-/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to 
+- * the descriptor to which this macro is defined for tuning the hash function.
+- * The app can #include <unistd.h> to get the prototype for write(2). */
+-#ifdef HASH_EMIT_KEYS
+-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)                                   \
+-do {                                                                             \
+-    unsigned _klen = fieldlen;                                                   \
+-    write(HASH_EMIT_KEYS, &_klen, sizeof(_klen));                                \
+-    write(HASH_EMIT_KEYS, keyptr, fieldlen);                                     \
+-} while (0)
+-#else 
+-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)                    
+-#endif
+-
+-/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
+-#ifdef HASH_FUNCTION 
+-#define HASH_FCN HASH_FUNCTION
+-#else
+-#define HASH_FCN HASH_JEN
+-#endif
+-
+-/* The Bernstein hash function, used in Perl prior to v5.6 */
+-#define HASH_BER(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _hb_keylen=keylen;                                                    \
+-  char *_hb_key=(char*)(key);                                                    \
+-  (hashv) = 0;                                                                   \
+-  while (_hb_keylen--)  { (hashv) = ((hashv) * 33) + *_hb_key++; }               \
+-  bkt = (hashv) & (num_bkts-1);                                                  \
+-} while (0)
+-
+-
+-/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at 
+- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
+-#define HASH_SAX(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _sx_i;                                                                \
+-  char *_hs_key=(char*)(key);                                                    \
+-  hashv = 0;                                                                     \
+-  for(_sx_i=0; _sx_i < keylen; _sx_i++)                                          \
+-      hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i];                     \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while (0)
+-
+-#define HASH_FNV(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _fn_i;                                                                \
+-  char *_hf_key=(char*)(key);                                                    \
+-  hashv = 2166136261UL;                                                          \
+-  for(_fn_i=0; _fn_i < keylen; _fn_i++)                                          \
+-      hashv = (hashv * 16777619) ^ _hf_key[_fn_i];                               \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0) 
+- 
+-#define HASH_OAT(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _ho_i;                                                                \
+-  char *_ho_key=(char*)(key);                                                    \
+-  hashv = 0;                                                                     \
+-  for(_ho_i=0; _ho_i < keylen; _ho_i++) {                                        \
+-      hashv += _ho_key[_ho_i];                                                   \
+-      hashv += (hashv << 10);                                                    \
+-      hashv ^= (hashv >> 6);                                                     \
+-  }                                                                              \
+-  hashv += (hashv << 3);                                                         \
+-  hashv ^= (hashv >> 11);                                                        \
+-  hashv += (hashv << 15);                                                        \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0)
+-
+-#define HASH_JEN_MIX(a,b,c)                                                      \
+-do {                                                                             \
+-  a -= b; a -= c; a ^= ( c >> 13 );                                              \
+-  b -= c; b -= a; b ^= ( a << 8 );                                               \
+-  c -= a; c -= b; c ^= ( b >> 13 );                                              \
+-  a -= b; a -= c; a ^= ( c >> 12 );                                              \
+-  b -= c; b -= a; b ^= ( a << 16 );                                              \
+-  c -= a; c -= b; c ^= ( b >> 5 );                                               \
+-  a -= b; a -= c; a ^= ( c >> 3 );                                               \
+-  b -= c; b -= a; b ^= ( a << 10 );                                              \
+-  c -= a; c -= b; c ^= ( b >> 15 );                                              \
+-} while (0)
+-
+-#define HASH_JEN(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _hj_i,_hj_j,_hj_k;                                                    \
+-  unsigned char *_hj_key=(unsigned char*)(key);                                  \
+-  hashv = 0xfeedbeef;                                                            \
+-  _hj_i = _hj_j = 0x9e3779b9;                                                    \
+-  _hj_k = (unsigned)keylen;                                                      \
+-  while (_hj_k >= 12) {                                                          \
+-    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
+-        + ( (unsigned)_hj_key[2] << 16 )                                         \
+-        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
+-    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
+-        + ( (unsigned)_hj_key[6] << 16 )                                         \
+-        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
+-    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
+-        + ( (unsigned)_hj_key[10] << 16 )                                        \
+-        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
+-                                                                                 \
+-     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
+-                                                                                 \
+-     _hj_key += 12;                                                              \
+-     _hj_k -= 12;                                                                \
+-  }                                                                              \
+-  hashv += keylen;                                                               \
+-  switch ( _hj_k ) {                                                             \
+-     case 11: hashv += ( (unsigned)_hj_key[10] << 24 );                          \
+-     case 10: hashv += ( (unsigned)_hj_key[9] << 16 );                           \
+-     case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );                            \
+-     case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );                           \
+-     case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );                           \
+-     case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );                            \
+-     case 5:  _hj_j += _hj_key[4];                                               \
+-     case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );                           \
+-     case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );                           \
+-     case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );                            \
+-     case 1:  _hj_i += _hj_key[0];                                               \
+-  }                                                                              \
+-  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0)
+-
+-/* The Paul Hsieh hash function */
+-#undef get16bits
+-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__)             \
+-  || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+-#define get16bits(d) (*((const uint16_t *) (d)))
+-#endif
+-
+-#if !defined (get16bits)
+-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)             \
+-                       +(uint32_t)(((const uint8_t *)(d))[0]) )
+-#endif
+-#define HASH_SFH(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned char *_sfh_key=(unsigned char*)(key);                                 \
+-  uint32_t _sfh_tmp, _sfh_len = keylen;                                          \
+-                                                                                 \
+-  int _sfh_rem = _sfh_len & 3;                                                   \
+-  _sfh_len >>= 2;                                                                \
+-  hashv = 0xcafebabe;                                                            \
+-                                                                                 \
+-  /* Main loop */                                                                \
+-  for (;_sfh_len > 0; _sfh_len--) {                                              \
+-    hashv    += get16bits (_sfh_key);                                            \
+-    _sfh_tmp       = (uint32_t)(get16bits (_sfh_key+2)) << 11  ^ hashv;          \
+-    hashv     = (hashv << 16) ^ _sfh_tmp;                                        \
+-    _sfh_key += 2*sizeof (uint16_t);                                             \
+-    hashv    += hashv >> 11;                                                     \
+-  }                                                                              \
+-                                                                                 \
+-  /* Handle end cases */                                                         \
+-  switch (_sfh_rem) {                                                            \
+-    case 3: hashv += get16bits (_sfh_key);                                       \
+-            hashv ^= hashv << 16;                                                \
+-            hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18);              \
+-            hashv += hashv >> 11;                                                \
+-            break;                                                               \
+-    case 2: hashv += get16bits (_sfh_key);                                       \
+-            hashv ^= hashv << 11;                                                \
+-            hashv += hashv >> 17;                                                \
+-            break;                                                               \
+-    case 1: hashv += *_sfh_key;                                                  \
+-            hashv ^= hashv << 10;                                                \
+-            hashv += hashv >> 1;                                                 \
+-  }                                                                              \
+-                                                                                 \
+-    /* Force "avalanching" of final 127 bits */                                  \
+-    hashv ^= hashv << 3;                                                         \
+-    hashv += hashv >> 5;                                                         \
+-    hashv ^= hashv << 4;                                                         \
+-    hashv += hashv >> 17;                                                        \
+-    hashv ^= hashv << 25;                                                        \
+-    hashv += hashv >> 6;                                                         \
+-    bkt = hashv & (num_bkts-1);                                                  \
+-} while(0) 
+-
+-#ifdef HASH_USING_NO_STRICT_ALIASING
+-/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads.
+- * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
+- * MurmurHash uses the faster approach only on CPU's where we know it's safe. 
+- *
+- * Note the preprocessor built-in defines can be emitted using:
+- *
+- *   gcc -m64 -dM -E - < /dev/null                  (on gcc)
+- *   cc -## a.c (where a.c is a simple test file)   (Sun Studio)
+- */
+-#if (defined(__i386__) || defined(__x86_64__)  || defined(_M_IX86))
+-#define MUR_GETBLOCK(p,i) p[i]
+-#else /* non intel */
+-#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0)
+-#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1)
+-#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2)
+-#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3)
+-#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
+-#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
+-#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
+-#define MUR_TWO_TWO(p)   ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
+-#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >>  8))
+-#else /* assume little endian non-intel */
+-#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24))
+-#define MUR_TWO_TWO(p)   ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16))
+-#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) <<  8))
+-#endif
+-#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) :           \
+-                            (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \
+-                             (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) :  \
+-                                                      MUR_ONE_THREE(p))))
+-#endif
+-#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
+-#define MUR_FMIX(_h) \
+-do {                 \
+-  _h ^= _h >> 16;    \
+-  _h *= 0x85ebca6b;  \
+-  _h ^= _h >> 13;    \
+-  _h *= 0xc2b2ae35l; \
+-  _h ^= _h >> 16;    \
+-} while(0)
+-
+-#define HASH_MUR(key,keylen,num_bkts,hashv,bkt)                        \
+-do {                                                                   \
+-  const uint8_t *_mur_data = (const uint8_t*)(key);                    \
+-  const int _mur_nblocks = (keylen) / 4;                               \
+-  uint32_t _mur_h1 = 0xf88D5353;                                       \
+-  uint32_t _mur_c1 = 0xcc9e2d51;                                       \
+-  uint32_t _mur_c2 = 0x1b873593;                                       \
+-  uint32_t _mur_k1 = 0;                                                \
+-  const uint8_t *_mur_tail;                                            \
+-  const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \
+-  int _mur_i;                                                          \
+-  for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) {                      \
+-    _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i);                        \
+-    _mur_k1 *= _mur_c1;                                                \
+-    _mur_k1 = MUR_ROTL32(_mur_k1,15);                                  \
+-    _mur_k1 *= _mur_c2;                                                \
+-                                                                       \
+-    _mur_h1 ^= _mur_k1;                                                \
+-    _mur_h1 = MUR_ROTL32(_mur_h1,13);                                  \
+-    _mur_h1 = _mur_h1*5+0xe6546b64;                                    \
+-  }                                                                    \
+-  _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4);            \
+-  _mur_k1=0;                                                           \
+-  switch((keylen) & 3) {                                               \
+-    case 3: _mur_k1 ^= _mur_tail[2] << 16;                             \
+-    case 2: _mur_k1 ^= _mur_tail[1] << 8;                              \
+-    case 1: _mur_k1 ^= _mur_tail[0];                                   \
+-    _mur_k1 *= _mur_c1;                                                \
+-    _mur_k1 = MUR_ROTL32(_mur_k1,15);                                  \
+-    _mur_k1 *= _mur_c2;                                                \
+-    _mur_h1 ^= _mur_k1;                                                \
+-  }                                                                    \
+-  _mur_h1 ^= (keylen);                                                 \
+-  MUR_FMIX(_mur_h1);                                                   \
+-  hashv = _mur_h1;                                                     \
+-  bkt = hashv & (num_bkts-1);                                          \
+-} while(0)
+-#endif  /* HASH_USING_NO_STRICT_ALIASING */
+-
+-/* key comparison function; return 0 if keys equal */
+-#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) 
+-
+-/* iterate over items in a known bucket to find desired item */
+-#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out)                       \
+-do {                                                                             \
+- if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head));          \
+- else out=NULL;                                                                  \
+- while (out) {                                                                   \
+-    if ((out)->hh.keylen == keylen_in) {                                           \
+-        if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break;             \
+-    }                                                                            \
+-    if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \
+-    else out = NULL;                                                             \
+- }                                                                               \
+-} while(0)
+-
+-/* add an item to a bucket  */
+-#define HASH_ADD_TO_BKT(head,addhh)                                              \
+-do {                                                                             \
+- head.count++;                                                                   \
+- (addhh)->hh_next = head.hh_head;                                                \
+- (addhh)->hh_prev = NULL;                                                        \
+- if (head.hh_head) { (head).hh_head->hh_prev = (addhh); }                        \
+- (head).hh_head=addhh;                                                           \
+- if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH)             \
+-     && (addhh)->tbl->noexpand != 1) {                                           \
+-       HASH_EXPAND_BUCKETS((addhh)->tbl);                                        \
+- }                                                                               \
+-} while(0)
+-
+-/* remove an item from a given bucket */
+-#define HASH_DEL_IN_BKT(hh,head,hh_del)                                          \
+-    (head).count--;                                                              \
+-    if ((head).hh_head == hh_del) {                                              \
+-      (head).hh_head = hh_del->hh_next;                                          \
+-    }                                                                            \
+-    if (hh_del->hh_prev) {                                                       \
+-        hh_del->hh_prev->hh_next = hh_del->hh_next;                              \
+-    }                                                                            \
+-    if (hh_del->hh_next) {                                                       \
+-        hh_del->hh_next->hh_prev = hh_del->hh_prev;                              \
+-    }                                                                
+-
+-/* Bucket expansion has the effect of doubling the number of buckets
+- * and redistributing the items into the new buckets. Ideally the
+- * items will distribute more or less evenly into the new buckets
+- * (the extent to which this is true is a measure of the quality of
+- * the hash function as it applies to the key domain). 
+- * 
+- * With the items distributed into more buckets, the chain length
+- * (item count) in each bucket is reduced. Thus by expanding buckets
+- * the hash keeps a bound on the chain length. This bounded chain 
+- * length is the essence of how a hash provides constant time lookup.
+- * 
+- * The calculation of tbl->ideal_chain_maxlen below deserves some
+- * explanation. First, keep in mind that we're calculating the ideal
+- * maximum chain length based on the *new* (doubled) bucket count.
+- * In fractions this is just n/b (n=number of items,b=new num buckets).
+- * Since the ideal chain length is an integer, we want to calculate 
+- * ceil(n/b). We don't depend on floating point arithmetic in this
+- * hash, so to calculate ceil(n/b) with integers we could write
+- * 
+- *      ceil(n/b) = (n/b) + ((n%b)?1:0)
+- * 
+- * and in fact a previous version of this hash did just that.
+- * But now we have improved things a bit by recognizing that b is
+- * always a power of two. We keep its base 2 log handy (call it lb),
+- * so now we can write this with a bit shift and logical AND:
+- * 
+- *      ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
+- * 
+- */
+-#define HASH_EXPAND_BUCKETS(tbl)                                                 \
+-do {                                                                             \
+-    unsigned _he_bkt;                                                            \
+-    unsigned _he_bkt_i;                                                          \
+-    struct UT_hash_handle *_he_thh, *_he_hh_nxt;                                 \
+-    UT_hash_bucket *_he_new_buckets, *_he_newbkt;                                \
+-    _he_new_buckets = (UT_hash_bucket*)uthash_malloc(                            \
+-             2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));              \
+-    if (!_he_new_buckets) { uthash_fatal( "out of memory"); }                    \
+-    memset(_he_new_buckets, 0,                                                   \
+-            2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));               \
+-    tbl->ideal_chain_maxlen =                                                    \
+-       (tbl->num_items >> (tbl->log2_num_buckets+1)) +                           \
+-       ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0);                    \
+-    tbl->nonideal_items = 0;                                                     \
+-    for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++)                \
+-    {                                                                            \
+-        _he_thh = tbl->buckets[ _he_bkt_i ].hh_head;                             \
+-        while (_he_thh) {                                                        \
+-           _he_hh_nxt = _he_thh->hh_next;                                        \
+-           HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt);            \
+-           _he_newbkt = &(_he_new_buckets[ _he_bkt ]);                           \
+-           if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) {                \
+-             tbl->nonideal_items++;                                              \
+-             _he_newbkt->expand_mult = _he_newbkt->count /                       \
+-                                        tbl->ideal_chain_maxlen;                 \
+-           }                                                                     \
+-           _he_thh->hh_prev = NULL;                                              \
+-           _he_thh->hh_next = _he_newbkt->hh_head;                               \
+-           if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev =               \
+-                _he_thh;                                                         \
+-           _he_newbkt->hh_head = _he_thh;                                        \
+-           _he_thh = _he_hh_nxt;                                                 \
+-        }                                                                        \
+-    }                                                                            \
+-    uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+-    tbl->num_buckets *= 2;                                                       \
+-    tbl->log2_num_buckets++;                                                     \
+-    tbl->buckets = _he_new_buckets;                                              \
+-    tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ?         \
+-        (tbl->ineff_expands+1) : 0;                                              \
+-    if (tbl->ineff_expands > 1) {                                                \
+-        tbl->noexpand=1;                                                         \
+-        uthash_noexpand_fyi(tbl);                                                \
+-    }                                                                            \
+-    uthash_expand_fyi(tbl);                                                      \
+-} while(0)
+-
+-
+-/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
+-/* Note that HASH_SORT assumes the hash handle name to be hh. 
+- * HASH_SRT was added to allow the hash handle name to be passed in. */
+-#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
+-#define HASH_SRT(hh,head,cmpfcn)                                                 \
+-do {                                                                             \
+-  unsigned _hs_i;                                                                \
+-  unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize;               \
+-  struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail;            \
+-  if (head) {                                                                    \
+-      _hs_insize = 1;                                                            \
+-      _hs_looping = 1;                                                           \
+-      _hs_list = &((head)->hh);                                                  \
+-      while (_hs_looping) {                                                      \
+-          _hs_p = _hs_list;                                                      \
+-          _hs_list = NULL;                                                       \
+-          _hs_tail = NULL;                                                       \
+-          _hs_nmerges = 0;                                                       \
+-          while (_hs_p) {                                                        \
+-              _hs_nmerges++;                                                     \
+-              _hs_q = _hs_p;                                                     \
+-              _hs_psize = 0;                                                     \
+-              for ( _hs_i = 0; _hs_i  < _hs_insize; _hs_i++ ) {                  \
+-                  _hs_psize++;                                                   \
+-                  _hs_q = (UT_hash_handle*)((_hs_q->next) ?                      \
+-                          ((void*)((char*)(_hs_q->next) +                        \
+-                          (head)->hh.tbl->hho)) : NULL);                         \
+-                  if (! (_hs_q) ) break;                                         \
+-              }                                                                  \
+-              _hs_qsize = _hs_insize;                                            \
+-              while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) {           \
+-                  if (_hs_psize == 0) {                                          \
+-                      _hs_e = _hs_q;                                             \
+-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
+-                              ((void*)((char*)(_hs_q->next) +                    \
+-                              (head)->hh.tbl->hho)) : NULL);                     \
+-                      _hs_qsize--;                                               \
+-                  } else if ( (_hs_qsize == 0) || !(_hs_q) ) {                   \
+-                      _hs_e = _hs_p;                                             \
+-                      if (_hs_p){                                                \
+-                        _hs_p = (UT_hash_handle*)((_hs_p->next) ?                \
+-                                ((void*)((char*)(_hs_p->next) +                  \
+-                                (head)->hh.tbl->hho)) : NULL);                   \
+-                       }                                                         \
+-                      _hs_psize--;                                               \
+-                  } else if ((                                                   \
+-                      cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
+-                             DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
+-                             ) <= 0) {                                           \
+-                      _hs_e = _hs_p;                                             \
+-                      if (_hs_p){                                                \
+-                        _hs_p = (UT_hash_handle*)((_hs_p->next) ?                \
+-                               ((void*)((char*)(_hs_p->next) +                   \
+-                               (head)->hh.tbl->hho)) : NULL);                    \
+-                       }                                                         \
+-                      _hs_psize--;                                               \
+-                  } else {                                                       \
+-                      _hs_e = _hs_q;                                             \
+-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
+-                              ((void*)((char*)(_hs_q->next) +                    \
+-                              (head)->hh.tbl->hho)) : NULL);                     \
+-                      _hs_qsize--;                                               \
+-                  }                                                              \
+-                  if ( _hs_tail ) {                                              \
+-                      _hs_tail->next = ((_hs_e) ?                                \
+-                            ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL);          \
+-                  } else {                                                       \
+-                      _hs_list = _hs_e;                                          \
+-                  }                                                              \
+-                  if (_hs_e) {                                                   \
+-                  _hs_e->prev = ((_hs_tail) ?                                    \
+-                     ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL);              \
+-                  }                                                              \
+-                  _hs_tail = _hs_e;                                              \
+-              }                                                                  \
+-              _hs_p = _hs_q;                                                     \
+-          }                                                                      \
+-          if (_hs_tail){                                                         \
+-            _hs_tail->next = NULL;                                               \
+-          }                                                                      \
+-          if ( _hs_nmerges <= 1 ) {                                              \
+-              _hs_looping=0;                                                     \
+-              (head)->hh.tbl->tail = _hs_tail;                                   \
+-              DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list));      \
+-          }                                                                      \
+-          _hs_insize *= 2;                                                       \
+-      }                                                                          \
+-      HASH_FSCK(hh,head);                                                        \
+- }                                                                               \
+-} while (0)
+-
+-/* This function selects items from one hash into another hash. 
+- * The end result is that the selected items have dual presence 
+- * in both hashes. There is no copy of the items made; rather 
+- * they are added into the new hash through a secondary hash 
+- * hash handle that must be present in the structure. */
+-#define HASH_SELECT(hh_dst, dst, hh_src, src, cond)                              \
+-do {                                                                             \
+-  unsigned _src_bkt, _dst_bkt;                                                   \
+-  void *_last_elt=NULL, *_elt;                                                   \
+-  UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL;                         \
+-  ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst));                 \
+-  if (src) {                                                                     \
+-    for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) {     \
+-      for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head;                \
+-          _src_hh;                                                               \
+-          _src_hh = _src_hh->hh_next) {                                          \
+-          _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh);                       \
+-          if (cond(_elt)) {                                                      \
+-            _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho);               \
+-            _dst_hh->key = _src_hh->key;                                         \
+-            _dst_hh->keylen = _src_hh->keylen;                                   \
+-            _dst_hh->hashv = _src_hh->hashv;                                     \
+-            _dst_hh->prev = _last_elt;                                           \
+-            _dst_hh->next = NULL;                                                \
+-            if (_last_elt_hh) { _last_elt_hh->next = _elt; }                     \
+-            if (!dst) {                                                          \
+-              DECLTYPE_ASSIGN(dst,_elt);                                         \
+-              HASH_MAKE_TABLE(hh_dst,dst);                                       \
+-            } else {                                                             \
+-              _dst_hh->tbl = (dst)->hh_dst.tbl;                                  \
+-            }                                                                    \
+-            HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt);    \
+-            HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh);            \
+-            (dst)->hh_dst.tbl->num_items++;                                      \
+-            _last_elt = _elt;                                                    \
+-            _last_elt_hh = _dst_hh;                                              \
+-          }                                                                      \
+-      }                                                                          \
+-    }                                                                            \
+-  }                                                                              \
+-  HASH_FSCK(hh_dst,dst);                                                         \
+-} while (0)
+-
+-#define HASH_CLEAR(hh,head)                                                      \
+-do {                                                                             \
+-  if (head) {                                                                    \
+-    uthash_free((head)->hh.tbl->buckets,                                         \
+-                (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket));      \
+-    HASH_BLOOM_FREE((head)->hh.tbl);                                             \
+-    uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                          \
+-    (head)=NULL;                                                                 \
+-  }                                                                              \
+-} while(0)
+-
+-#define HASH_OVERHEAD(hh,head)                                                   \
+- (size_t)((((head)->hh.tbl->num_items   * sizeof(UT_hash_handle))   +            \
+-           ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket))   +            \
+-            (sizeof(UT_hash_table))                                 +            \
+-            (HASH_BLOOM_BYTELEN)))
+-
+-#ifdef NO_DECLTYPE
+-#define HASH_ITER(hh,head,el,tmp)                                                \
+-for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL);       \
+-  el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) 
+-#else
+-#define HASH_ITER(hh,head,el,tmp)                                                \
+-for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL);                 \
+-  el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL))
+-#endif
+-
+-/* obtain a count of items in the hash */
+-#define HASH_COUNT(head) HASH_CNT(hh,head) 
+-#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)
+-
+-typedef struct UT_hash_bucket {
+-   struct UT_hash_handle *hh_head;
+-   unsigned count;
+-
+-   /* expand_mult is normally set to 0. In this situation, the max chain length
+-    * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
+-    * the bucket's chain exceeds this length, bucket expansion is triggered). 
+-    * However, setting expand_mult to a non-zero value delays bucket expansion
+-    * (that would be triggered by additions to this particular bucket)
+-    * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
+-    * (The multiplier is simply expand_mult+1). The whole idea of this
+-    * multiplier is to reduce bucket expansions, since they are expensive, in
+-    * situations where we know that a particular bucket tends to be overused.
+-    * It is better to let its chain length grow to a longer yet-still-bounded
+-    * value, than to do an O(n) bucket expansion too often. 
+-    */
+-   unsigned expand_mult;
+-
+-} UT_hash_bucket;
+-
+-/* random signature used only to find hash tables in external analysis */
+-#define HASH_SIGNATURE 0xa0111fe1
+-#define HASH_BLOOM_SIGNATURE 0xb12220f2
+-
+-typedef struct UT_hash_table {
+-   UT_hash_bucket *buckets;
+-   unsigned num_buckets, log2_num_buckets;
+-   unsigned num_items;
+-   struct UT_hash_handle *tail; /* tail hh in app order, for fast append    */
+-   ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
+-
+-   /* in an ideal situation (all buckets used equally), no bucket would have
+-    * more than ceil(#items/#buckets) items. that's the ideal chain length. */
+-   unsigned ideal_chain_maxlen;
+-
+-   /* nonideal_items is the number of items in the hash whose chain position
+-    * exceeds the ideal chain maxlen. these items pay the penalty for an uneven
+-    * hash distribution; reaching them in a chain traversal takes >ideal steps */
+-   unsigned nonideal_items;
+-
+-   /* ineffective expands occur when a bucket doubling was performed, but 
+-    * afterward, more than half the items in the hash had nonideal chain
+-    * positions. If this happens on two consecutive expansions we inhibit any
+-    * further expansion, as it's not helping; this happens when the hash
+-    * function isn't a good fit for the key domain. When expansion is inhibited
+-    * the hash will still work, albeit no longer in constant time. */
+-   unsigned ineff_expands, noexpand;
+-
+-   uint32_t signature; /* used only to find hash tables in external analysis */
+-#ifdef HASH_BLOOM
+-   uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
+-   uint8_t *bloom_bv;
+-   char bloom_nbits;
+-#endif
+-
+-} UT_hash_table;
+-
+-typedef struct UT_hash_handle {
+-   struct UT_hash_table *tbl;
+-   void *prev;                       /* prev element in app order      */
+-   void *next;                       /* next element in app order      */
+-   struct UT_hash_handle *hh_prev;   /* previous hh in bucket order    */
+-   struct UT_hash_handle *hh_next;   /* next hh in bucket order        */
+-   void *key;                        /* ptr to enclosing struct's key  */
+-   unsigned keylen;                  /* enclosing struct's key len     */
+-   unsigned hashv;                   /* result of hash-fcn(key)        */
+-} UT_hash_handle;
+-
+-#endif /* UTHASH_H */
+-- 
+2.15.1
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init
new file mode 100644
index 0000000..6a0c127
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init
@@ -0,0 +1,89 @@
+#! /bin/sh
+
+# Based on the Debian initscript for mosquitto
+
+### BEGIN INIT INFO
+# Provides:         mosquitto
+# Required-Start:   $remote_fs $syslog
+# Required-Stop:    $remote_fs $syslog
+# Default-Start:    2 3 4 5
+# Default-Stop:     0 1 6
+# Short-Description:    mosquitto MQTT message broker
+# Description: 
+#  This is a message broker that supports version 3.1/3.1.1 of the MQ Telemetry
+#  Transport (MQTT) protocol.
+#  
+#  MQTT provides a method of carrying out messaging using a publish/subscribe
+#  model. It is lightweight, both in terms of bandwidth usage and ease of
+#  implementation. This makes it particularly useful at the edge of the network
+#  where a sensor or other simple device may be implemented using an arduino for
+#  example.
+### END INIT INFO
+
+set -e
+
+PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid
+DAEMON=@SBINDIR@/mosquitto
+
+# start and stop the mosquitto MQTT message broker
+
+test -x ${DAEMON} || exit 0
+
+umask 022
+
+. @SYSCONFDIR@/init.d/functions
+
+export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@"
+
+case "$1" in
+    start)
+        echo "Starting Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --start --quiet --oknodo --background  --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} ; then
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+    stop)
+        echo "Stopping Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
+            rm -f ${PIDFILE}
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+
+
+    reload|force-reload)
+        if [ -f ${PIDFILE} ] ; then
+            echo "Reloading configuration for mosquitto"
+            pid=`cat ${PIDFILE}`
+            kill -HUP $pid
+        else
+            echo "mosquitto does not seem to be running"
+        fi
+        ;;
+
+    restart)
+        echo "Restarting Mosquitto message broker" "mosquitto"
+        if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
+            rm -f ${PIDFILE}
+        fi
+        if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
+            exit 0
+        else
+            exit 1
+        fi
+        ;;
+
+    status)
+        status ${DAEMON} && exit 0 || exit $?
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop|reload|force-reload|restart|status}"
+        exit 1
+esac
+
+exit 0
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb
new file mode 100644
index 0000000..06c1d67
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb
@@ -0,0 +1,93 @@
+SUMMARY = "Open source MQTT v3.1/3.1.1 implemention"
+DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. "
+HOMEPAGE = "http://mosquitto.org/"
+SECTION = "console/network"
+LICENSE = "EPL-1.0 | EDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \
+                    file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \
+                    file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
+                    file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
+"
+DEPENDS = "uthash"
+
+SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
+           file://0002-uthash-remove-in-tree-version.patch \
+           file://mosquitto.init \
+"
+
+SRC_URI[md5sum] = "f98c99998a36a234f3a9d9b402b991db"
+SRC_URI[sha256sum] = "8557bc7ae34dfaf32a0fb56d2491b7a7f731269c88337227233013502df4d5b0"
+
+inherit systemd update-rc.d useradd
+
+PACKAGECONFIG ??= "ssl uuid \
+                  ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \
+                  "
+
+PACKAGECONFIG[dns-srv] = "WITH_SRV=yes,WITH_SRV=no,c-ares"
+PACKAGECONFIG[ssl] = "WITH_TLS=yes WITH_TLS_PSK=yes,WITH_TLS=no WITH_TLS_PSK=no,openssl"
+PACKAGECONFIG[uuid] = "WITH_UUID=yes,WITH_UUID=no,util-linux"
+PACKAGECONFIG[systemd] = "WITH_SYSTEMD=yes,WITH_SYSTEMD=no,systemd"
+PACKAGECONFIG[websockets] = "WITH_WEBSOCKETS=yes,WITH_WEBSOCKETS=no,libwebsockets"
+
+EXTRA_OEMAKE = " \
+    prefix=${prefix} \
+    mandir=${mandir} \
+    localedir=${localedir} \
+    ${PACKAGECONFIG_CONFARGS} \
+    STRIP=/bin/true \
+    WITH_DOCS=no \
+"
+
+export LIB_SUFFIX = "${@d.getVar('baselib', True).replace('lib', '')}"
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service
+
+    install -d ${D}${sysconfdir}/mosquitto
+    install -m 0644 ${D}${sysconfdir}/mosquitto/mosquitto.conf.example \
+                    ${D}${sysconfdir}/mosquitto/mosquitto.conf
+
+    install -d ${D}${sysconfdir}/init.d/
+    install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto
+    sed -i -e 's,@SBINDIR@,${sbindir},g' \
+        -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+        -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        ${D}${sysconfdir}/init.d/mosquitto
+}
+
+PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients"
+
+PACKAGE_BEFORE_PN = "${PN}-examples"
+
+FILES_${PN} = "${sbindir}/mosquitto \
+               ${bindir}/mosquitto_passwd \
+               ${sysconfdir}/mosquitto \
+               ${sysconfdir}/init.d \
+               ${systemd_unitdir}/system/mosquitto.service \
+"
+
+CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf"
+
+FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1"
+
+FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1"
+
+FILES_${PN}-clients = "${bindir}/mosquitto_pub \
+                       ${bindir}/mosquitto_sub \
+"
+
+FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example"
+
+SYSTEMD_SERVICE_${PN} = "mosquitto.service"
+
+INITSCRIPT_NAME = "mosquitto"
+INITSCRIPT_PARAMS = "defaults 30"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \
+                       --user-group mosquitto"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.4.bb
new file mode 100644
index 0000000..fa6b43a
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.4.bb
@@ -0,0 +1,28 @@
+SUMMARY = "nanomsg socket library"
+DESCRIPTION = "nanomsg is a socket library that provides several common \
+communication patterns. It aims to make the networking layer fast, scalable, \
+and easy to use. Implemented in C, it works on a wide range of operating \
+systems with no further dependencies."
+HOMEPAGE = "https://nanomsg.org/"
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755"
+
+SECTION = "libs/networking"
+
+SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https"
+SRCREV = "e7f8a751316b942d8962cd0232c2d606c1d9a9db"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+# nanomsg documentation generation requires asciidoctor,
+# not asciidoc, and currently there's no asciidoctor-native
+# recipe anywhere in openembedded-core or meta-openembedded
+EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF "
+
+# we don't want nanomsg-tools to be renamed to libnanomsg-tools
+DEBIAN_NOAUTONAME_${PN}-tools = "1"
+
+PACKAGES =+ "${PN}-tools"
+FILES_${PN}-tools = "${bindir}/*"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.10.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.10.bb
new file mode 100644
index 0000000..9159fcb
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.10.bb
@@ -0,0 +1,40 @@
+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] = "f118226ed2bfbacfd64ac4d1e0bd0383"
+SRC_URI[sha256sum] = "ac86a7a539d78df90095676e9183f2d422fb93dbfe4b3afef22f81825d303d61"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch
new file mode 100644
index 0000000..0c415bc
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch
@@ -0,0 +1,53 @@
+From 3f4b6319701834182304c4079119780f4ae5b49b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 7 Nov 2018 11:30:44 -0800
+Subject: [PATCH] Do not include net/ethernet.h and linux/if_ether.h
+
+They conflict when used together especially with musl
+removing them still keeps it working so it seems they are redundant
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ shared/n-acd/src/n-acd.c              | 1 -
+ src/platform/wpan/nm-wpan-utils.h     | 2 --
+ src/settings/nm-settings-connection.h | 2 --
+ 3 files changed, 5 deletions(-)
+
+diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c
+index 9164f95..9538e50 100644
+--- a/shared/n-acd/src/n-acd.c
++++ b/shared/n-acd/src/n-acd.c
+@@ -23,7 +23,6 @@
+ #include <errno.h>
+ #include <limits.h>
+ #include <linux/filter.h>
+-#include <linux/if_ether.h>
+ #include <linux/if_packet.h>
+ #include <net/ethernet.h>
+ #include <netinet/if_ether.h>
+diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h
+index f7d0c03..e1c81f5 100644
+--- a/src/platform/wpan/nm-wpan-utils.h
++++ b/src/platform/wpan/nm-wpan-utils.h
+@@ -20,8 +20,6 @@
+ #ifndef __WPAN_UTILS_H__
+ #define __WPAN_UTILS_H__
+ 
+-#include <net/ethernet.h>
+-
+ #include "nm-dbus-interface.h"
+ #include "platform/nm-netlink.h"
+ 
+diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
+index e796b71..c01fef6 100644
+--- a/src/settings/nm-settings-connection.h
++++ b/src/settings/nm-settings-connection.h
+@@ -22,8 +22,6 @@
+ #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__
+ #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__
+ 
+-#include <net/ethernet.h>
+-
+ #include "nm-dbus-object.h"
+ #include "nm-connection.h"
+ 
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta/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 0000000..49a0735
--- /dev/null
+++ b/meta/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,39 @@
+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] 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
+@@ -3,6 +3,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
+@@ -18,7 +18,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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
new file mode 100644
index 0000000..351f264
--- /dev/null
+++ b/meta/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] 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
+@@ -572,7 +572,7 @@ if test "$have_jansson" = "yes"; then
+ 	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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
new file mode 100644
index 0000000..c50293c
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
@@ -0,0 +1,80 @@
+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  | 20 --------------------
+ configure.ac |  5 -----
+ 2 files changed, 25 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1e100f6..d31e3c1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1115,9 +1115,7 @@ EXTRA_DIST += \
+ 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
+ 
+@@ -3692,27 +3690,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums)
+ $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp
+ 
+ clients_common_settings_doc_h = clients/common/settings-docs.h
+-if HAVE_INTROSPECTION
+-$(clients_common_settings_doc_h): 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_h)
+-check-local-settings-docs: $(clients_common_settings_doc_h)
+-	@if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \
+-		if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)" ; then \
+-			if test "$$NM_TEST_REGENERATE" == 1 ; then \
+-				cp -f "$(builddir)/$(clients_common_settings_doc_h)" "$(srcdir)/$(clients_common_settings_doc_h).in"; \
+-			else \
+-				echo "The generated file \"$(builddir)/$(clients_common_settings_doc_h)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_h).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". You can also automatically copy the file by rerunning the test with \$$NM_TEST_REGENERATE=1 ; \
+-				false; \
+-			fi; \
+-		fi;\
+-	fi
+-check_local += check-local-settings-docs
+-else
+ $(clients_common_settings_doc_h): $(clients_common_settings_doc_h).in clients/common/.dirstamp
+ 	$(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)"
+ check-local-settings-docs:
+-endif
+ EXTRA_DIST += \
+ 	$(clients_common_settings_doc_h) \
+ 	$(clients_common_settings_doc_h).in
+diff --git a/configure.ac b/configure.ac
+index 79dc3b9..23d14a6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1195,11 +1195,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
+ 		AC_MSG_ERROR([--enable-introspection requires perl])
+-- 
+2.14.5
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
new file mode 100644
index 0000000..00dda5b
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
@@ -0,0 +1,54 @@
+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] 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 73c0327..e1ce64f 100644
+--- a/src/systemd/src/basic/stdio-util.h
++++ b/src/systemd/src/basic/stdio-util.h
+@@ -1,7 +1,9 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+ #pragma once
+ 
++#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
+@@ -28,6 +28,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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch
new file mode 100644
index 0000000..c162c1d
--- /dev/null
+++ b/meta/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] 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
+@@ -235,6 +235,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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch
new file mode 100644
index 0000000..9a58c0e
--- /dev/null
+++ b/meta/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] 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/nm-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/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
+index 705717b..da3edc4 100644
+--- a/src/platform/wifi/nm-wifi-utils.h
++++ b/src/platform/wifi/nm-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"
+ #include "nm-setting-wireless.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
+@@ -11,6 +11,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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
new file mode 100644
index 0000000..9e5c943
--- /dev/null
+++ b/meta/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, 25 Oct 2018 09:57:07 +0200
+Subject: [PATCH] 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 1412f03..45f5049 100644
+--- a/src/systemd/src/basic/process-util.c
++++ b/src/systemd/src/basic/process-util.c
+@@ -21,6 +21,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>
+@@ -1153,11 +1156,13 @@ 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) {
+         static bool installed = false;
+@@ -1186,7 +1191,11 @@ pid_t getpid_cached(void) {
+                          * only half-documented (glibc doesn't document it but LSB does — though only superficially)
+                          * we'll check for errors only in the most generic fashion possible. */
+ 
++#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.5
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch
new file mode 100644
index 0000000..6bca95e
--- /dev/null
+++ b/meta/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 e388552..9c4dde8 100644
+--- a/src/systemd/src/systemd/sd-dhcp-client.h
++++ b/src/systemd/src/systemd/sd-dhcp-client.h
+@@ -20,7 +20,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 2a60145..19d1814 100644
+--- a/src/systemd/src/systemd/sd-dhcp-lease.h
++++ b/src/systemd/src/systemd/sd-dhcp-lease.h
+@@ -19,7 +19,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 fa36dca..2d25010 100644
+--- a/src/systemd/src/systemd/sd-dhcp6-client.h
++++ b/src/systemd/src/systemd/sd-dhcp6-client.h
+@@ -20,7 +20,9 @@
+ ***/
+ 
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <stdbool.h>
+ #include <sys/types.h>
+ 
+diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h
+index 71bd4cf..1c667ba 100644
+--- a/src/systemd/src/systemd/sd-ipv4ll.h
++++ b/src/systemd/src/systemd/sd-ipv4ll.h
+@@ -19,7 +19,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.5
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch
new file mode 100644
index 0000000..023a4d9
--- /dev/null
+++ b/meta/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
+@@ -13,6 +13,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
+@@ -26,6 +26,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/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb
new file mode 100644
index 0000000..f21600e
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb
@@ -0,0 +1,144 @@
+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=2d56a1b0c42e388aa86aef59b154e8c3 \
+"
+
+DEPENDS = " \
+    intltool-native \
+    libxslt-native \
+    libnl \
+    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://0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.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] = "54ce62f0aa18ef6c5e754eaac47494ac"
+SRC_URI[sha256sum] = "35a3ede4c7d12d6212033c9e44cb82b7692f38063b53a067567f02f5937c8c18"
+
+UPSTREAM_CHECK_URI = "${GNOME_MIRROR}/NetworkManager/1.10/"
+UPSTREAM_CHECK_REGEX = "NetworkManager\-(?P<pver>1\.10(\.\d+)+).tar.xz"
+
+S = "${WORKDIR}/NetworkManager-${PV}"
+
+EXTRA_OECONF = " \
+    --disable-ifcfg-rh \
+    --disable-more-warnings \
+    --with-iptables=${sbindir}/iptables \
+    --with-tests \
+    --with-nmtui=yes \
+    --with-udev-dir=${nonarch_base_libdir}/udev \
+"
+
+# 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 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[glib] = "--with-libnm-glib,,dbus-glib-native dbus-glib"
+PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
+PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant"
+PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
+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}/NetworkManager/${PV}/*.so \
+    ${nonarch_libdir}/NetworkManager/VPN \
+    ${nonarch_libdir}/NetworkManager/conf.d \
+    ${datadir}/polkit-1 \
+    ${datadir}/dbus-1 \
+    ${noarch_base_libdir}/udev/* \
+    ${systemd_unitdir}/system \
+    ${libdir}/pppd \
+"
+
+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 \
+    ${libdir}/NetworkManager/${PV}/*.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/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb
new file mode 100644
index 0000000..c944144
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb
new file mode 100644
index 0000000..4e41aa5
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch
new file mode 100644
index 0000000..08ba2c3
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
new file mode 100644
index 0000000..2f65189
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
new file mode 100644
index 0000000..cd4db12
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch
new file mode 100644
index 0000000..c95eaf8
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch
new file mode 100644
index 0000000..4354912
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch
new file mode 100644
index 0000000..ed3d7f1
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
new file mode 100644
index 0000000..d183d91
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch
new file mode 100644
index 0000000..baf8e30
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch
new file mode 100644
index 0000000..3fa8db8
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch
new file mode 100644
index 0000000..e9994f2
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch
new file mode 100644
index 0000000..b56fd38
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch
new file mode 100644
index 0000000..cc82e16
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch
new file mode 100644
index 0000000..e816394
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch
new file mode 100644
index 0000000..e49e3e4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch
new file mode 100644
index 0000000..493b183
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch
new file mode 100644
index 0000000..d3982cf
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch
new file mode 100644
index 0000000..b20953e
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch
new file mode 100644
index 0000000..bf73b71
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch
new file mode 100644
index 0000000..e6edbc4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
new file mode 100644
index 0000000..4fe6893
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
@@ -0,0 +1,43 @@
+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 \
+"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/rdist/files/rdist/"
+UPSTREAM_CHECK_REGEX = "/rdist/(?P<pver>\d+(\.\d+)+)"
+
+DEPENDS = "bison-native"
+
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644"
+
+# http://errors.yoctoproject.org/Errors/Details/186972/
+EXCLUDE_FROM_WORLD_libc-musl = "1"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
new file mode 100644
index 0000000..eaaf304
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
new file mode 100644
index 0000000..98dc41a
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch
new file mode 100644
index 0000000..4c94831
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch
@@ -0,0 +1,86 @@
+From 0bc8bc4143a58f91f6d7ce228b6763f377fdf45a Mon Sep 17 00:00:00 2001
+From: Andrew Bartlett <abartlet@samba.org>
+Date: Thu, 12 Jul 2018 12:34:56 +1200
+Subject: [PATCH] ldb: Refuse to build Samba against a newer minor version of
+ ldb
+
+Samba is not compatible with new versions of ldb (except release versions)
+
+Other users would not notice the breakages, but Samba makes many
+more assuptions about the LDB internals than any other package.
+
+(Specifically, LDB 1.2 and 1.4 broke builds against released
+Samba versions)
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13519
+
+Signed-off-by: Andrew Bartlett <abartlet@samba.org>
+Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
+(cherry picked from commit 52efa796538ae004ca62ea32fc8c833472991be6)
+---
+ lib/ldb/wscript | 32 ++++++++++++++++++++++----------
+ 1 file changed, 22 insertions(+), 10 deletions(-)
+
+diff --git a/lib/ldb/wscript b/lib/ldb/wscript
+index d94086b..2bb0832 100644
+--- a/lib/ldb/wscript
++++ b/lib/ldb/wscript
+@@ -62,23 +62,33 @@ def configure(conf):
+     conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
+ 
+     if not conf.env.standalone_ldb:
++        max_ldb_version = [int(x) for x in VERSION.split(".")]
++        max_ldb_version[2] = 999
++        max_ldb_version_dots = "%d.%d.%d" % tuple(max_ldb_version)
++
+         if conf.env.disable_python:
+-            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
+-                                         onlyif='talloc tdb tevent',
+-                                         implied_deps='replace talloc tdb tevent'):
++            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
++                                             minversion=VERSION,
++                                             maxversion=max_ldb_version_dots,
++                                             onlyif='talloc tdb tevent',
++                                             implied_deps='replace talloc tdb tevent'):
+                 conf.define('USING_SYSTEM_LDB', 1)
+         else:
+             using_system_pyldb_util = True
+-            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION,
+-                                             onlyif='talloc tdb tevent',
+-                                             implied_deps='replace talloc tdb tevent ldb'):
++            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util',
++                                                 minversion=VERSION,
++                                                 maxversion=max_ldb_version_dots,
++                                                 onlyif='talloc tdb tevent',
++                                                 implied_deps='replace talloc tdb tevent ldb'):
+                 using_system_pyldb_util = False
+ 
+             # We need to get a pyldb-util for all the python versions
+             # we are building for
+             if conf.env['EXTRA_PYTHON']:
+                 name = 'pyldb-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
+-                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name,
++                                                     minversion=VERSION,
++                                                     maxversion=max_ldb_version_dots,
+                                                      onlyif='talloc tdb tevent',
+                                                      implied_deps='replace talloc tdb tevent ldb'):
+                     using_system_pyldb_util = False
+@@ -86,9 +96,11 @@ def configure(conf):
+             if using_system_pyldb_util:
+                 conf.define('USING_SYSTEM_PYLDB_UTIL', 1)
+ 
+-            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
+-                                         onlyif='talloc tdb tevent pyldb-util',
+-                                         implied_deps='replace talloc tdb tevent'):
++            if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
++                                             minversion=VERSION,
++                                             maxversion=max_ldb_version_dots,
++                                             onlyif='talloc tdb tevent pyldb-util',
++                                             implied_deps='replace talloc tdb tevent'):
+                 conf.define('USING_SYSTEM_LDB', 1)
+ 
+     if conf.CONFIG_SET('USING_SYSTEM_LDB'):
+-- 
+2.18.0
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
new file mode 100644
index 0000000..8ca7a52
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 0000000..e112b3b
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
new file mode 100644
index 0000000..6a7f8fa
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
new file mode 100644
index 0000000..5c299d6
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
@@ -0,0 +1,51 @@
+From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 25 Jul 2018 09:55:25 +0800
+Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error
+
+Fix build on qemumips64(el)
+
+taken from:
+[PATCH] libldb: fix musl libc conflicting types error
+
+/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
+            typedef unsigned int uintptr_t;
+                                 ^~~~~~~~~
+use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ third_party/cmocka/cmocka.h | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
+index 4fd82a9..5443a08 100644
+--- a/third_party/cmocka/cmocka.h
++++ b/third_party/cmocka/cmocka.h
+@@ -110,7 +110,7 @@ typedef uintmax_t LargestIntegralType;
+     ((LargestIntegralType)(value))
+ 
+ /* Smallest integral type capable of holding a pointer. */
+-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
++#if !defined(__DEFINED_uintptr_t)
+ # if defined(_WIN32)
+     /* WIN32 is an ILP32 platform */
+     typedef unsigned int uintptr_t;
+@@ -134,9 +134,8 @@ typedef uintmax_t LargestIntegralType;
+ #  endif /* __WORDSIZE */
+ # endif /* _WIN32 */
+ 
+-# define _UINTPTR_T
+-# define _UINTPTR_T_DEFINED
+-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
++# define __DEFINED_uintptr_t
++#endif /* !defined(__DEFINED_uintptr_t) */
+ 
+ /* Perform an unsigned cast to uintptr_t. */
+ #define cast_to_pointer_integral_type(value) \
+-- 
+2.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
new file mode 100644
index 0000000..0c7592f
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
new file mode 100644
index 0000000..894bc8b
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
new file mode 100644
index 0000000..5ae8c59
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
new file mode 100644
index 0000000..eb06866
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
new file mode 100644
index 0000000..a75ac2b
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
@@ -0,0 +1,95 @@
+From 02e0b14d8fa025a5db410d60a7c0dfebd536aaeb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 23:40:54 -0800
+Subject: [PATCH] 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>
+
+---
+ source4/torture/local/nss_tests.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
+index 2cd6122..04f13c6 100644
+--- a/source4/torture/local/nss_tests.c
++++ b/source4/torture/local/nss_tests.c
+@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx,
+ 	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 torture_context *tctx,
+ 	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 torture_context *tctx,
+ 
+ 	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_context *tctx)
+ 	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 torture_context *tctx)
+ 	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 torture_context *tctx,
+ 	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 torture_context *tctx,
+ 
+ 	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_context *tctx)
+ 	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 torture_context *tctx)
+ 	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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
new file mode 100644
index 0000000..27b40f2
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
@@ -0,0 +1,44 @@
+From 54a5279cb33abd23ef7c094d51f16078ece2da0c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 23:40:54 -0800
+Subject: [PATCH] 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>
+
+---
+ source3/wscript | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/source3/wscript b/source3/wscript
+index 5436db2..864f614 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -879,7 +879,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'):
+@@ -956,6 +956,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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf
new file mode 100644
index 0000000..a0b87c3
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf
@@ -0,0 +1,254 @@
+#
+# Sample configuration file for the Samba suite for Debian GNU/Linux.
+#
+#
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options most of which 
+# are not shown in this example
+#
+# Some options that are often worth tuning have been included as
+# commented-out examples in this file.
+#  - When such options are commented with ";", the proposed setting
+#    differs from the default Samba behaviour
+#  - When commented with "#", the proposed setting is the default
+#    behaviour of Samba but the option is considered important
+#    enough to be mentioned here
+#
+# NOTE: Whenever you modify this file you should run the command
+# "testparm" to check that you have not made any basic syntactic 
+# errors. 
+
+#======================= Global Settings =======================
+
+[global]
+
+## Browsing/Identification ###
+
+# Change this to the workgroup/NT-domain name your Samba server will part of
+   workgroup = WORKGROUP
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
+#   wins support = no
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+;   wins server = w.x.y.z
+
+# This will prevent nmbd to search for NetBIOS names through DNS.
+   dns proxy = no
+
+#### Networking ####
+
+# The specific set of interfaces / networks to bind to
+# This can be either the interface name or an IP address/netmask;
+# interface names are normally preferred
+;   interfaces = 127.0.0.0/8 eth0
+
+# Only bind to the named interfaces and/or networks; you must use the
+# 'interfaces' option above to use this.
+# It is recommended that you enable this feature if your Samba machine is
+# not protected by a firewall or is a firewall itself.  However, this
+# option cannot handle dynamic or non-broadcast interfaces correctly.
+;   bind interfaces only = yes
+
+
+
+#### Debugging/Accounting ####
+
+# This tells Samba to use a separate log file for each machine
+# that connects
+   log file = /var/log/samba/log.%m
+
+# Cap the size of the individual log files (in KiB).
+   max log size = 1000
+
+# If you want Samba to only log through syslog then set the following
+# parameter to 'yes'.
+#   syslog only = no
+
+# We want Samba to log a minimum amount of information to syslog. Everything
+# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
+# through syslog you should set the following parameter to something higher.
+   syslog = 0
+
+# Do something sensible when Samba crashes: mail the admin a backtrace
+   panic action = /usr/share/samba/panic-action %d
+
+
+####### Authentication #######
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller". 
+#
+# Most people will want "standalone server" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+   server role = standalone server
+
+# If you are using encrypted passwords, Samba will need to know what
+# password database type you are using.  
+   passdb backend = tdbsam
+
+   obey pam restrictions = yes
+
+# This boolean parameter controls whether Samba attempts to sync the Unix
+# password with the SMB password when the encrypted SMB password in the
+# passdb is changed.
+   unix password sync = yes
+
+# For Unix password sync to work on a Debian GNU/Linux system, the following
+# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
+# sending the correct chat script for the passwd program in Debian Sarge).
+   passwd program = /usr/bin/passwd %u
+   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
+
+# This boolean controls whether PAM will be used for password changes
+# when requested by an SMB client instead of the program listed in
+# 'passwd program'. The default is 'no'.
+   pam password change = yes
+
+# This option controls how unsuccessful authentication attempts are mapped
+# to anonymous connections
+   map to guest = bad user
+
+########## Domains ###########
+
+#
+# The following settings only takes effect if 'server role = primary
+# classic domain controller', 'server role = backup domain controller'
+# or 'domain logons' is set 
+#
+
+# It specifies the location of the user's
+# profile directory from the client point of view) The following
+# required a [profiles] share to be setup on the samba server (see
+# below)
+;   logon path = \\%N\profiles\%U
+# Another common choice is storing the profile in the user's home directory
+# (this is Samba's default)
+#   logon path = \\%N\%U\profile
+
+# The following setting only takes effect if 'domain logons' is set
+# It specifies the location of a user's home directory (from the client
+# point of view)
+;   logon drive = H:
+#   logon home = \\%N\%U
+
+# The following setting only takes effect if 'domain logons' is set
+# It specifies the script to run during logon. The script must be stored
+# in the [netlogon] share
+# NOTE: Must be store in 'DOS' file format convention
+;   logon script = logon.cmd
+
+# This allows Unix users to be created on the domain controller via the SAMR
+# RPC pipe.  The example command creates a user account with a disabled Unix
+# password; please adapt to your needs
+; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
+
+# This allows machine accounts to be created on the domain controller via the 
+# SAMR RPC pipe.  
+# The following assumes a "machines" group exists on the system
+; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
+
+# This allows Unix groups to be created on the domain controller via the SAMR
+# RPC pipe.  
+; add group script = /usr/sbin/addgroup --force-badname %g
+
+############ Misc ############
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting
+;   include = /home/samba/etc/smb.conf.%m
+
+# Some defaults for winbind (make sure you're not using the ranges
+# for something else.)
+;   idmap uid = 10000-20000
+;   idmap gid = 10000-20000
+;   template shell = /bin/bash
+
+# Setup usershare options to enable non-root users to share folders
+# with the net usershare command.
+
+# Maximum number of usershare. 0 (default) means that usershare is disabled.
+;   usershare max shares = 100
+
+# Allow users who've been granted usershare privileges to create
+# public shares, not just authenticated ones
+   usershare allow guests = yes
+
+#======================= Share Definitions =======================
+
+[homes]
+   comment = Home Directories
+   browseable = no
+
+# By default, the home directories are exported read-only. Change the
+# next parameter to 'no' if you want to be able to write to them.
+   read only = yes
+
+# File creation mask is set to 0700 for security reasons. If you want to
+# create files with group=rw permissions, set next parameter to 0775.
+   create mask = 0700
+
+# Directory creation mask is set to 0700 for security reasons. If you want to
+# create dirs. with group=rw permissions, set next parameter to 0775.
+   directory mask = 0700
+
+# By default, \\server\username shares can be connected to by anyone
+# with access to the samba server.
+# The following parameter makes sure that only "username" can connect
+# to \\server\username
+# This might need tweaking when using external authentication schemes
+   valid users = %S
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+# (you need to configure Samba to act as a domain controller too.)
+;[netlogon]
+;   comment = Network Logon Service
+;   path = /home/samba/netlogon
+;   guest ok = yes
+;   read only = yes
+
+# Un-comment the following and create the profiles directory to store
+# users profiles (see the "logon path" option above)
+# (you need to configure Samba to act as a domain controller too.)
+# The path below should be writable by all users so that their
+# profile directory may be created the first time they log on
+;[profiles]
+;   comment = Users profiles
+;   path = /home/samba/profiles
+;   guest ok = no
+;   browseable = no
+;   create mask = 0600
+;   directory mask = 0700
+
+[printers]
+   comment = All Printers
+   browseable = no
+   path = /var/spool/samba
+   printable = yes
+   guest ok = no
+   read only = yes
+   create mask = 0700
+
+# Windows clients look for this share name as a source of downloadable
+# printer drivers
+[print$]
+   comment = Printer Drivers
+   path = /var/lib/samba/printers
+   browseable = yes
+   read only = yes
+   guest ok = no
+# Uncomment to allow remote administration of Windows print drivers.
+# You may need to replace 'lpadmin' with the name of the group your
+# admin users are members of.
+# Please note that you also need to set appropriate Unix permissions
+# to the drivers directory for these users to have write rights in it
+;   write list = root, @lpadmin
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
new file mode 100644
index 0000000..6ae2928
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
@@ -0,0 +1,28 @@
+From f99b6a8617df6a46f41fb68ffafb2608dbb6681e Mon Sep 17 00:00:00 2001
+From: Joe Slater <joe.slater@windriver.com>
+Date: Wed, 8 Nov 2017 11:58:05 -0800
+Subject: [PATCH] samba: correct log files location
+
+We use /var/log/samba.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ examples/smb.conf.default | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/smb.conf.default b/examples/smb.conf.default
+index 2f20720..44c1aa8 100644
+--- a/examples/smb.conf.default
++++ b/examples/smb.conf.default
+@@ -52,7 +52,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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba
new file mode 100644
index 0000000..4bdfa7d
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.8.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.8.4.bb
new file mode 100644
index 0000000..f1aaeb8
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.8.4.bb
@@ -0,0 +1,314 @@
+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://smb.conf \
+           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://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 \
+           file://0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch \
+           "
+SRC_URI_append_libc-musl = " \
+           file://samba-pam.patch \
+           file://samba-4.3.9-remove-getpwent_r.patch \
+           file://cmocka-uintptr_t.patch \
+          "
+
+SRC_URI[md5sum] = "ca5bfbebd8d9eb95506e16594b2bbee2"
+SRC_URI[sha256sum] = "f5044d149e01894a08b1d114b8b69aed78171a7bb19608bd1fd771453b9a5406"
+
+UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.8(\.\d+)+).tar.gz"
+
+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 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"
+
+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}-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,ldb,pyldb-util,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 ${S}/bin/default/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
+    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
+
+    install -d ${D}${sysconfdir}/samba
+    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+    install -m644 ${WORKDIR}/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 "
+PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*"
+
+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 \
+                 ${libdir}/winbind-krb5-localauth.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/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch
new file mode 100644
index 0000000..f25a02c
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb
new file mode 100644
index 0000000..fc304fa
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
new file mode 100644
index 0000000..2e28cd0
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch
new file mode 100644
index 0000000..037962f
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch
@@ -0,0 +1,254 @@
+From dc390837bc7adc205bb955d0922040a7e365d8dd Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Mon, 23 Jul 2018 13:54:07 +0800
+Subject: [PATCH] Disable run test program while cross compiling
+
+fix configure error:
+configure: error: cannot run test program while cross compiling
+
+Upstream-Status:Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ configure.in | 148 +++++------------------------------------------------------
+ 1 file changed, 12 insertions(+), 136 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 4b3a5db..a6c5498 100644
+--- a/configure.in
++++ b/configure.in
+@@ -284,19 +284,7 @@ AC_CHECK_TYPES([boolean])
+ # In case INADDR_NONE is not defined (like on Solaris)
+ have_inaddr_none="no"
+ AC_MSG_CHECKING([for INADDR_NONE])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <netinet/in.h>
+-#include <arpa/inet.h>
+-]],
+-[[
+-	if (inet_addr("10,5,2") == INADDR_NONE);
+-    return 0;
+-]])],
+-[have_inaddr_none="yes"],
+-[have_inaddr_none="no"])
++have_inaddr_none="yes"
+ AC_MSG_RESULT($have_inaddr_none)
+ if test "x$have_inaddr_none" = "xno"; then
+ 	AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
+@@ -429,16 +417,7 @@ if test "x$LPCAP" = "xno"; then
+ 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"])
++have_pcap_lex_destroy="yes"
+ 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])
+@@ -716,17 +695,7 @@ fi
+ AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc])
+ 
+ AC_MSG_CHECKING([for daq real addresses])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_PktHdr_t hdr;
+-   hdr.n_real_dPort = 0;
+-]])],
+-[have_daq_real_addresses="yes"],
+-[have_daq_real_addresses="no"])
++have_daq_real_addresses="no"
+ AC_MSG_RESULT($have_daq_real_addresses)
+ if test "x$have_daq_real_addresses" = "xyes"; then
+     AC_DEFINE([HAVE_DAQ_REAL_ADDRESSES],[1],
+@@ -754,17 +723,7 @@ 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"])
++have_daq_address_space_id="yes"
+ 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],
+@@ -772,17 +731,7 @@ if test "x$have_daq_address_space_id" = "xyes"; then
+ 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"])
++have_daq_flow_id="yes"
+ AC_MSG_RESULT($have_daq_flow_id)
+ if test "x$have_daq_flow_id" = "xyes"; then
+     AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
+@@ -790,19 +739,7 @@ if test "x$have_daq_flow_id" = "xyes"; then
+ fi
+ 
+ AC_MSG_CHECKING([for daq extended flow modifiers])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_ModFlow_t mod;
+-   mod.type = 0;
+-   mod.length = 0;
+-   mod.value = NULL;
+-]])],
+-[have_daq_ext_modflow="yes"],
+-[have_daq_ext_modflow="no"])
++have_daq_ext_modflow="no"
+ AC_MSG_RESULT($have_daq_ext_modflow)
+ if test "x$have_daq_ext_modflow" = "xyes"; then
+     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
+@@ -811,19 +748,7 @@ if test "x$have_daq_ext_modflow" = "xyes"; then
+ fi
+ 
+ AC_MSG_CHECKING([for daq query flow])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_QueryFlow_t mod;
+-   mod.type = 0;
+-   mod.length = 0;
+-   mod.value = NULL;
+-]])],
+-[have_daq_queryflow="yes"],
+-[have_daq_queryflow="no"])
++have_daq_queryflow="no"
+ AC_MSG_RESULT($have_daq_queryflow)
+ if test "x$have_daq_queryflow" = "xyes"; then
+     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_QUERYFLOW"
+@@ -832,16 +757,7 @@ if test "x$have_daq_queryflow" = "xyes"; then
+ fi
+ 
+ AC_MSG_CHECKING([for daq data channel flags])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_Data_Channel_Params_t params;
+-]])],
+-[have_daq_data_channel_flags="yes"],
+-[have_daq_data_channel_flags="no"])
++have_daq_data_channel_flags="no"
+ AC_MSG_RESULT($have_daq_data_channel_flags)
+ if test "x$have_daq_data_channel_flags" = "xyes"; then
+     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
+@@ -850,17 +766,7 @@ if test "x$have_daq_data_channel_flags" = "xyes"; then
+ fi
+ 
+ AC_MSG_CHECKING([for separate IP versions on pinhole endpoints])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_DP_key_t dpKey;
+-   dpKey.src_af = 0;
+-]])],
+-[have_daq_data_channel_separate_ip_versions="yes"],
+-[have_daq_data_channel_separate_ip_versions="no"])
++have_daq_data_channel_separate_ip_versions="no"
+ AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
+ if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
+     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
+@@ -869,17 +775,7 @@ if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
+ 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"])
++have_daq_verdict_retry="yes"
+ AC_MSG_RESULT($have_daq_verdict_retry)
+ if test "x$have_daq_verdict_retry" = "xyes"; then
+     AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1],
+@@ -887,17 +783,7 @@ if test "x$have_daq_verdict_retry" = "xyes"; then
+ fi
+ 
+ AC_MSG_CHECKING([for daq packet trace])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_PktHdr_t hdr;
+-   hdr.flags = DAQ_PKT_FLAG_TRACE_ENABLED;
+-]])],
+-[have_daq_packet_trace="yes"],
+-[have_daq_packet_trace="no"])
++have_daq_packet_trace="yes"
+ AC_MSG_RESULT($have_daq_packet_trace)
+ if test "x$have_daq_packet_trace" = "xyes"; then
+     AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1],
+@@ -907,17 +793,7 @@ else
+ fi
+ 
+ AC_MSG_CHECKING([for daq verdict reason])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+-   DAQ_ModFlow_t fl;
+-   fl.type = DAQ_MODFLOW_TYPE_VER_REASON;
+-]])],
+-[have_daq_verdict_reason="yes"],
+-[have_daq_verdict_reason="no"])
++have_daq_verdict_reason="yes"
+ AC_MSG_RESULT($have_daq_verdict_reason)
+ if test "x$have_daq_verdict_reason" = "xyes"; then
+     AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1],
+-- 
+2.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
new file mode 100644
index 0000000..0404ea0
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
new file mode 100644
index 0000000..d8a00c4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.11.1.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.11.1.bb
new file mode 100644
index 0000000..a99138d
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.11.1.bb
@@ -0,0 +1,103 @@
+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 libtirpc bison-native"
+
+SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \
+    file://snort.init \
+    file://0001-libpcap-search-sysroot-for-headers.patch \
+    file://fix-host-contamination-when-enable-static-daq.patch \
+    file://disable-run-test-program-while-cross-compiling.patch \
+"
+
+SRC_URI[md5sum] = "378e3938b2b5c8e358f942d0ffce18cc"
+SRC_URI[sha256sum] = "9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd"
+
+UPSTREAM_CHECK_URI = "https://www.snort.org/downloads"
+UPSTREAM_CHECK_REGEX = "snort-(?P<pver>\d+(\.\d+)+)\.tar"
+
+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 += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += " -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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
new file mode 100644
index 0000000..a1e56b7
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch
new file mode 100644
index 0000000..804c18b
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch
new file mode 100644
index 0000000..b259fdf
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
new file mode 100644
index 0000000..695b265
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch
new file mode 100644
index 0000000..b760d3f
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch
new file mode 100644
index 0000000..5117423
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
new file mode 100644
index 0000000..ff704b5
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
new file mode 100644
index 0000000..19cfe46
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch
new file mode 100644
index 0000000..8e5f4da
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch
@@ -0,0 +1,26 @@
+From a0ad5128d14b022239445e251cf4a9826e86aa96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:48:31 -0700
+Subject: [PATCH] Add format string to fprintf() call
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/vt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vt.c b/src/vt.c
+index 795d393..a533d3d 100644
+--- a/src/vt.c
++++ b/src/vt.c
+@@ -499,7 +499,7 @@ static int vt_cmd_dump_candidates(const struct vt_handle *vh,
+ 		}
+ 		llen += cmdlen;
+ 
+-		ret = fprintf(vh->vh_stream, e->cmd);
++		ret = fprintf(vh->vh_stream, "%s", e->cmd);
+ 		if (ret < 0)
+ 			return ret;
+ 
+-- 
+2.13.2
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
new file mode 100644
index 0000000..153bced
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
@@ -0,0 +1,38 @@
+From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 22:30:30 -0800
+Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h
+
+Fixes
+main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'?
+   signal(SIGCLD, sig_child);
+          ^~~~~~
+          SIGCHLD
+
+main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
+  umask(0);
+  ^~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+Index: git/src/main.c
+===================================================================
+--- git.orig/src/main.c
++++ git/src/main.c
+@@ -133,9 +133,9 @@ static void daemon_start(int ignsigcld)
+ 
+ 	if (ignsigcld) {
+ #ifdef SIGTSTP
+-		signal(SIGCLD, sig_child);
++		signal(SIGCHLD, sig_child);
+ #else
+-		signal(SIGCLD, SIG_IGN);
++		signal(SIGCHLD, SIG_IGN);
+ #endif
+ 	}
+ }
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch
new file mode 100644
index 0000000..d8355e2
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch
@@ -0,0 +1,88 @@
+From 62784e8b6df8ff3a907c1f816154808bea9d7064 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 25 Sep 2018 14:38:14 +0800
+Subject: [PATCH] support openssl 1.1.x
+
+Long time no maintain from upstream since 2013
+(git://git.umip.org/umip/umip.git), backport a
+fix from openSUSE
+
+Upstream-Status: Backport [openSUSE]
+http://ftp.gwdg.de/pub/opensuse/source/distribution/leap/15.0/repo/oss/src/mipv6d-2.0.2.umip.0.4-lp150.1.2.src.rpm
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/keygen.c | 12 ++++++++++++
+ src/mh.c     | 17 ++++++++++++++++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/src/keygen.c b/src/keygen.c
+index e434a38..b902644 100644
+--- a/src/keygen.c
++++ b/src/keygen.c
+@@ -172,6 +172,7 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce,
+ 	uint8_t tmp[20];
+ #ifdef HAVE_LIBCRYPTO
+ 	unsigned int len = 20;
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
+ 	HMAC_CTX ctx;
+ 
+ 	HMAC_CTX_init(&ctx);
+@@ -182,6 +183,17 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce,
+ 	HMAC_Final(&ctx, tmp, &len);
+ 	HMAC_CTX_cleanup(&ctx);
+ #else
++	HMAC_CTX *ctx;
++	ctx = HMAC_CTX_new();
++	HMAC_Init_ex(ctx, key_cn, sizeof(key_cn), EVP_sha1(), NULL);
++	HMAC_Update(ctx, (unsigned char *)addr, sizeof(*addr));
++	HMAC_Update(ctx, nonce, NONCE_LENGTH);
++	HMAC_Update(ctx, &id, sizeof(id));
++	HMAC_Final(ctx, tmp, &len);
++	HMAC_CTX_free(ctx);
++#endif // End of defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
++
++#else
+ 	HMAC_SHA1_CTX ctx;
+ 
+ 	HMAC_SHA1_init(&ctx, key_cn, sizeof(key_cn));
+diff --git a/src/mh.c b/src/mh.c
+index cba9a33..212eb5a 100644
+--- a/src/mh.c
++++ b/src/mh.c
+@@ -518,9 +518,10 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen,
+ 
+ #ifdef HAVE_LIBCRYPTO
+ 	unsigned int len = HMAC_SHA1_HASH_LEN;
+-	HMAC_CTX ctx;
+ 	const EVP_MD *evp_md = EVP_sha1();
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
++	HMAC_CTX ctx;
+ 	HMAC_CTX_init(&ctx);
+ 	HMAC_Init_ex(&ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL);
+ 
+@@ -532,6 +533,20 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen,
+ 	HMAC_Final(&ctx, buf, &len);
+ 	HMAC_CTX_cleanup(&ctx);
+ #else
++	HMAC_CTX *ctx;
++	ctx = HMAC_CTX_new();
++	HMAC_Init_ex(ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL);
++
++	HMAC_Update(ctx, (uint8_t *)coa, sizeof(*coa));
++	HMAC_Update(ctx, (uint8_t *)cn, sizeof(*coa));
++	for (i = 0; i < iovlen; i++) {
++		HMAC_Update(ctx, (uint8_t *)iov[i].iov_base, iov[i].iov_len);
++	}
++	HMAC_Final(ctx, buf, &len);
++	HMAC_CTX_free(ctx);
++#endif
++
++#else
+ 	HMAC_SHA1_CTX ctx;
+ 
+ 	HMAC_SHA1_init(&ctx, key, HMAC_SHA1_KEY_SIZE);
+-- 
+2.7.4
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
new file mode 100644
index 0000000..90d12da
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
@@ -0,0 +1,143 @@
+From 19b6cf8099e1974b5fc39086fc54103b0cbc2658 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 23:01:25 -0800
+Subject: [PATCH 2/2] replace PTHREAD_MUTEX_FAST_NP with PTHREAD_MUTEX_NORMAL
+
+PTHREAD_MUTEX_FAST_NP is not available on non-posix systems
+e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ha.c        | 2 +-
+ src/icmp6.c     | 2 +-
+ src/mh.c        | 2 +-
+ src/mn.c        | 2 +-
+ src/movement.c  | 2 +-
+ src/mpdisc_ha.c | 2 +-
+ src/mpdisc_mn.c | 2 +-
+ src/tqueue.c    | 2 +-
+ src/tunnelctl.c | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/ha.c b/src/ha.c
+index fbdcff0..b2f811e 100644
+--- a/src/ha.c
++++ b/src/ha.c
+@@ -1246,7 +1246,7 @@ int ha_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&bu_worker_mutex, &mattrs) ||
+ 	    pthread_cond_init(&cond, NULL))
+ 		return -1;
+diff --git a/src/icmp6.c b/src/icmp6.c
+index 3695135..6460634 100644
+--- a/src/icmp6.c
++++ b/src/icmp6.c
+@@ -243,7 +243,7 @@ int icmp6_init(void)
+ 		return -1;
+ 	/* create ICMP listener thread */
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&icmp6_sock.send_mutex, &mattrs) ||
+ 	    pthread_rwlock_init(&handler_lock, NULL) ||
+ 	    pthread_create(&icmp6_listener, NULL, icmp6_listen, NULL))
+diff --git a/src/mh.c b/src/mh.c
+index 60e345e..7928f4c 100644
+--- a/src/mh.c
++++ b/src/mh.c
+@@ -204,7 +204,7 @@ int mh_init(void)
+ 		return -1;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mh_sock.send_mutex, &mattrs) ||
+ 	    pthread_rwlock_init(&handler_lock, NULL) ||
+ 	    pthread_create(&mh_listener, NULL, mh_listen, NULL))
+diff --git a/src/mn.c b/src/mn.c
+index 092cfcb..8f7f448 100644
+--- a/src/mn.c
++++ b/src/mn.c
+@@ -1478,7 +1478,7 @@ static struct home_addr_info *hai_copy(struct home_addr_info *conf_hai)
+ 	if (hai != NULL) {
+ 		pthread_mutexattr_t mattrs;
+ 		pthread_mutexattr_init(&mattrs);
+-		pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++		pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 
+ 		memcpy(hai, conf_hai, sizeof(struct home_addr_info));
+ 
+diff --git a/src/movement.c b/src/movement.c
+index d985937..6400448 100644
+--- a/src/movement.c
++++ b/src/movement.c
+@@ -2013,7 +2013,7 @@ int md_init(void)
+ 	int val;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&iface_lock, &mattrs))
+ 		return -1;
+ 
+diff --git a/src/mpdisc_ha.c b/src/mpdisc_ha.c
+index 40ba05f..fd7a90d 100644
+--- a/src/mpdisc_ha.c
++++ b/src/mpdisc_ha.c
+@@ -559,7 +559,7 @@ int mpd_ha_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mpa_lock, &mattrs) ||
+ 	    pthread_rwlock_init(&prefix_lock, NULL) ||
+ 	    hash_init(&mpa_hash, DOUBLE_ADDR, MPA_BUCKETS) < 0)
+diff --git a/src/mpdisc_mn.c b/src/mpdisc_mn.c
+index 4873bd6..ada02bd 100644
+--- a/src/mpdisc_mn.c
++++ b/src/mpdisc_mn.c
+@@ -267,7 +267,7 @@ int mpd_mn_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mps_lock, &mattrs))
+ 		return -1;
+ 	if (hash_init(&mps_hash, DOUBLE_ADDR, MPS_BUCKETS) < 0)
+diff --git a/src/tqueue.c b/src/tqueue.c
+index 2f7aa0b..9c185b8 100644
+--- a/src/tqueue.c
++++ b/src/tqueue.c
+@@ -65,7 +65,7 @@ int taskqueue_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mutex, &mattrs) ||
+ 	    pthread_cond_init(&cond, NULL) ||
+ 	    pthread_create(&tq_runner, NULL, runner, NULL))
+diff --git a/src/tunnelctl.c b/src/tunnelctl.c
+index 23fc20b..813b8ec 100644
+--- a/src/tunnelctl.c
++++ b/src/tunnelctl.c
+@@ -433,7 +433,7 @@ int tunnelctl_init(void)
+ 		return -1;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&tnl_lock, &mattrs))
+ 		return -1;
+ 
+-- 
+2.16.2
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch
new file mode 100644
index 0000000..dbf0082
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch
@@ -0,0 +1,23 @@
+When "make -j10", the compilation will fail,
+because scan.c has included gram.h, but gram.h was produced
+after scan.c was compiled
+
+So add this dependency to ensure that gram.h is produced
+before scan.c is produced.
+
+Upstream-Status: Inappropriate [upstream is not active]
+
+Signed-off-by: Roy.Li <RongQing.Li@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/Makefile.am |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -81,3 +81,5 @@ CLEANFILES = gram.c gram.h \
+ 
+ DISTCLEANFILES = $(BUILT_SOURCES)
+ MAINTAINERCLEANFILES = Makefile.in
++
++scan.c: gram.h
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d
new file mode 100755
index 0000000..ebd70a6
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# mip6d		Start script for the Mobile IPv6 daemon
+#
+# chkconfig:	- 55 25
+# description:	The mobile IPv6 daemon allows nodes to remain \
+#		reachable while moving around in the IPv6 Internet.
+# processname:	mip6d
+# config:	/etc/mip6d.conf
+# config:	/etc/sysconfig/mip6d
+#
+### BEGIN INIT INFO
+# Provides: mipv6-daemon
+# Required-Start: $local_fs $remote_fs $network $named
+# Required-Stop: $local_fs $remote_fs $network
+# Should-Start: $syslog
+# Should-Stop: $network $syslog
+# Default-Start:
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop Mobile IPV6 daemon
+# Description:	The mobile IPv6 daemon allows nodes to remain
+#		reachable while moving around in the IPv6 Internet.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /etc/sysconfig/mip6d ]; then
+	. /etc/sysconfig/mip6d
+fi
+
+mip6d=/usr/sbin/mip6d
+prog="mip6d"
+lockfile=/var/lock/subsys/$prog
+
+start() {
+	[ -x $mip6d ] || exit 5
+	echo -n $"Starting $prog: "
+	start-stop-daemon -S -x ${mip6d} && success || failure
+	retval=$?
+	echo
+	[ $retval -eq 0 ] && touch ${lockfile}
+	return $retval
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	start-stop-daemon -K -x $mip6d
+	retval=$?
+	echo
+	[ $retval -eq 0 ] && rm -f ${lockfile}
+	return $retval
+}
+
+restart() {
+	stop
+	start
+}
+
+reload()
+{
+	echo -n $"Reloading $prog configuration: "
+	killproc $mip6d -HUP
+	retval=$?
+	echo
+	return $retval
+}
+
+force_reload() {
+	restart
+}
+
+rh_status() {
+	status $prog
+}
+
+rh_status_q() {
+	rh_status > /dev/null 2>&1
+}
+
+case "$1" in
+  start)
+	rh_status_q && exit 0
+	$1
+	;;
+  stop)
+	rh_status_q || exit 0
+	$1
+	;;
+  restart)
+	$1
+	;;
+  reload)
+	rh_status_q || exit 7
+	$1
+	;;
+  force-reload)
+	force_reload
+	;;
+  status)
+	rh_status
+	;;
+  condrestart|try-restart)
+	rh_status_q || exit 0
+	restart
+	;;
+  *)
+	echo $"Usage: $prog {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+	exit 2
+esac
+
+exit $?
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service
new file mode 100644
index 0000000..2b5a5b9
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=MIPL Mobile IPv6
+After=network.target
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/mip6d
+ExecStart=@SBINDIR@/mip6d $ARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb
new file mode 100644
index 0000000..e2abc02
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Mobile IPv6 and NEMO for Linux"
+DESCRIPTION = "UMIP is an open source implementation of Mobile IPv6 and NEMO \
+Basic Support for Linux. It is released under the GPLv2 license. It supports \
+the following IETF RFC: RFC6275 (Mobile IPv6), RFC3963 (NEMO), RFC3776 and \
+RFC4877 (IPsec and IKEv2)."
+HOMEPAGE = "http://umip.org/"
+SECTION = "System Environment/Base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33"
+DEPENDS = "openssl ipsec-tools radvd indent-native bison-native"
+
+SRC_URI = "git://git.umip.org/umip/umip.git \
+           file://add-dependency-to-support-parallel-compilation.patch \
+           file://mip6d \
+           file://mip6d.service \
+           file://0001-Add-format-string-to-fprintf-call.patch \
+           file://0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch \
+           file://0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch \
+           file://0001-support-openssl-1.1.x.patch \
+           "
+SRCREV = "cbd441c5db719db554ff2b4fcb02fef88ae2f791"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--enable-vt"
+
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "mip6d"
+INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "mip6d.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append() {
+	install -D -m 0755 ${WORKDIR}/mip6d ${D}${sysconfdir}/init.d/mip6d
+	install -D -m 0644 ${WORKDIR}/mip6d.service ${D}${systemd_system_unitdir}/mip6d.service
+	sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+	    -e 's,@SBINDIR@,${sbindir},g' \
+	    ${D}${systemd_system_unitdir}/mip6d.service
+}
+
+RRECOMMENDS_${PN} = "kernel-module-mip6 kernel-module-ipv6"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch b/meta/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 0000000..ebcfc7c
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch
new file mode 100644
index 0000000..b7ab7d9
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
new file mode 100644
index 0000000..4c3d95b
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -0,0 +1,41 @@
+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 = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/vlan/1.9-3ubuntu10.6/${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"
+
+UPSTREAM_CHECK_URI = "http://vlan.sourcearchive.com/"
+UPSTREAM_CHECK_REGEX = "/(?P<pver>\d+(\.\d+)+)/"
+
+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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch
new file mode 100644
index 0000000..184c794
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch
new file mode 100644
index 0000000..6f00d3b
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch
new file mode 100644
index 0000000..bb77306
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch
new file mode 100644
index 0000000..f70a138
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch
new file mode 100644
index 0000000..01783f4
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch
new file mode 100644
index 0000000..fa89df2
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch b/meta/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 0000000..de67b47
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch
new file mode 100644
index 0000000..62ffdb7
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
new file mode 100644
index 0000000..2bed550
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf
new file mode 100644
index 0000000..48b15ec
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help
new file mode 100644
index 0000000..fbec254
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
new file mode 100644
index 0000000..ea21799
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb
new file mode 100644
index 0000000..e1aa9a5
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb
@@ -0,0 +1,42 @@
+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] = "b81bd1f6525a4806a707881aa3dda63f"
+SRC_URI[sha256sum] = "0d3e845ac77d21aac9b88642c3dd043a83e3920d706b63d5e5c31dffdbec9116"
+
+inherit bin_package allarch
+
+do_install() {
+    install -d -m0755 ${D}${nonarch_libdir}/crda
+    install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
+    install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
+    install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
+
+    install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
+    install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s
+}
+
+# Install static regulatory DB in /lib/firmware for kernel to load.
+# This requires Linux kernel >= v4.15.
+# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass in kernel's recipe.
+PACKAGES =+ "${PN}-static"
+RCONFLICTS_${PN} = "${PN}-static"
+
+FILES_${PN}-static = " \
+    ${nonarch_base_libdir}/firmware/regulatory.db \
+    ${nonarch_base_libdir}/firmware/regulatory.db.p7s \
+"
+
+# Native users might want to use the source of regulatory DB.
+# This is for example used by Linux kernel <= v4.14 and kernel_wireless_regdb.bbclass.
+do_install_append_class-native() {
+    install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt
+}
+
+RSUGGESTS_${PN} = "crda"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch b/meta/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch
new file mode 100644
index 0000000..f304d93
--- /dev/null
+++ b/meta/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/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb b/meta/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb
new file mode 100644
index 0000000..dc9094d
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.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 = "1196a3b64d9fabffc8273b87f6f69ac0e75d2eb7"
+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,"