[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/COPYING.MIT b/cap/zx297520v3/sources/meta-openembedded/meta-networking/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy 
+of this software and associated documentation files (the "Software"), to deal 
+in the Software without restriction, including without limitation the rights 
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+copies of the Software, and to permit persons to whom the Software is 
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in 
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
+THE SOFTWARE.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/MAINTAINERS b/cap/zx297520v3/sources/meta-openembedded/meta-networking/MAINTAINERS
new file mode 100644
index 0000000..3e151b8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/MAINTAINERS
@@ -0,0 +1,13 @@
+This file contains a list of maintainers for the meta-networking layer.
+
+Please submit any patches against meta-networking to the OpenEmbedded
+development mailing list (openembedded-devel@lists.openembedded.org) with
+'[meta-networking][dunfell]' in the subject.
+
+When sending single patches, please use something like:
+
+   git send-email -1 -M \
+        --to openembedded-devel@lists.openembedded.org \
+        --subject-prefix=meta-networking][dunfell][PATCH
+
+dunfell Maintainer:      Armin Kuster <akuster808@gmail.com>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/README b/cap/zx297520v3/sources/meta-openembedded/meta-networking/README
new file mode 100644
index 0000000..52e7c79
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/README
@@ -0,0 +1,40 @@
+meta-networking
+===============
+
+This layer is intended to be a central point for networking-related
+packages and configuration.  It should be useful directly on top of
+oe-core and compliments meta-openembedded.  It should be primarily useful
+to the following groups:
+
+      - Anyone building a small networking device (eg. a home router /
+        bridge / switch).
+
+      - Anyone wanting to add network services to their device (eg.
+        anything that might benefit from a small ftp/tftp server)
+
+Dependencies
+------------
+
+This layer depends on:
+
+URI: git://github.com/openembedded/openembedded-core.git
+branch: dunfell
+revision: HEAD
+
+For some recipes, the meta-oe layer is required:
+
+URI: git://github.com/openembedded/meta-openembedded.git
+subdirectory: meta-oe
+branch: dunfell
+revision: HEAD
+
+URI: git://github.com/openembedded/meta-openembedded.git
+subdirectory: meta-python
+branch: dunfell
+revision: HEAD
+
+Maintenance
+-----------
+
+Please see the MAINTAINERS file for information on contacting the
+maintainers of this layer, as well as instructions for submitting patches. 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/kernel_wireless_regdb.bbclass b/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/kernel_wireless_regdb.bbclass
new file mode 100644
index 0000000..1238172
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/kernel_wireless_regdb.bbclass
@@ -0,0 +1,20 @@
+# Linux kernels before v4.15, allowed to be compiled with static
+# regulatory database if it was put under net/wireless/db.txt.
+#
+# This class copies the regulatory plaintext database to kernel sources before
+# compiling.
+#
+# Usage:
+# 1. The class should be inherited by kernel recipe (e.g. in
+#    linux-yocto_%.bbappend).
+# 2. For Linux kernels up to v4.14, build kernel with CONFIG_EXPERT and
+#    CONFIG_CFG80211_INTERNAL_REGDB.
+
+DEPENDS += "wireless-regdb-native"
+
+SRCTREECOVEREDTASKS += "do_kernel_add_regdb"
+do_kernel_add_regdb() {
+    cp ${STAGING_LIBDIR_NATIVE}/crda/db.txt ${S}/net/wireless/db.txt
+}
+do_kernel_add_regdb[dirs] = "${S}"
+addtask kernel_add_regdb before do_build after do_configure
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/waf-samba.bbclass b/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/waf-samba.bbclass
new file mode 100644
index 0000000..9c32952
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/classes/waf-samba.bbclass
@@ -0,0 +1,119 @@
+# waf is a build system which is used by samba related project.
+# Obtain details from https://wiki.samba.org/index.php/Waf
+#
+inherit qemu python3native
+
+DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python3"
+
+CONFIGUREOPTS = " --prefix=${prefix} \
+                  --bindir=${bindir} \
+                  --sbindir=${sbindir} \
+                  --libexecdir=${libexecdir} \
+                  --datadir=${datadir} \
+                  --sysconfdir=${sysconfdir} \
+                  --sharedstatedir=${sharedstatedir} \
+                  --localstatedir=${localstatedir} \
+                  --libdir=${libdir} \
+                  --includedir=${includedir} \
+                  --oldincludedir=${oldincludedir} \
+                  --infodir=${infodir} \
+                  --mandir=${mandir} \
+                  ${PACKAGECONFIG_CONFARGS} \
+                "
+
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+    pm = d.getVar('PARALLEL_MAKE')
+    if pm:
+        # look for '-j' and throw other options (e.g. '-l') away
+        # because they might have different meaning in bjam
+        pm = pm.split()
+        while pm:
+            opt = pm.pop(0)
+            if opt == '-j':
+                v = pm.pop(0)
+            elif opt.startswith('-j'):
+                v = opt[2:].strip()
+            else:
+                continue
+
+            v = min(64, int(v))
+            return '-j' + str(v)
+
+    return ""
+
+# Three methods for waf cross compile:
+# 1. answers:
+#    Only --cross-answers - try the cross-answers file, and if
+#    there's no corresponding answer, add to the file and mark
+#    the configure process as unfinished.
+# 2. exec:
+#    Only --cross-execute - get the answer from cross-execute,
+#    an emulator (qemu) is used to run cross-compiled binaries.
+# 3. both:
+#    (notes: not supported in lower version of some packages,
+#     please check buildtools/wafsamba/samba_cross.py in the
+#     package source)
+#    Try the cross-answers file first, and if there is no
+#    corresponding answer, use cross-execute to get an answer,
+#    and add that answer to the file.
+#
+# The first one is preferred since it may fail with 2 or 3 if
+# the target board is not suported by qemu, but we can use 2 or 3
+# to help generate the cross answer when adding new board support.
+CROSS_METHOD ?= "answer"
+
+do_configure() {
+
+    # Prepare the cross-answers file
+    WAF_CROSS_ANSWERS_PATH="${THISDIR}/../../files/waf-cross-answers"
+    CROSS_ANSWERS="${B}/cross-answers-${TARGET_ARCH}.txt"
+    if [ -e ${CROSS_ANSWERS} ]; then
+        rm -f ${CROSS_ANSWERS}
+    fi
+    echo 'Checking uname machine type: "${TARGET_ARCH}"' >> ${CROSS_ANSWERS}
+    echo 'Checking uname release type: "${OLDEST_KERNEL}"' >> ${CROSS_ANSWERS}
+    cat ${WAF_CROSS_ANSWERS_PATH}/cross-answers-${TARGET_ARCH}.txt >> ${CROSS_ANSWERS}
+
+    qemu_binary="${@qemu_target_binary(d)}"
+    if [ "${qemu_binary}" = "qemu-allarch" ]; then
+        qemu_binary="qemuwrapper"
+    fi
+
+    libdir_qemu="${STAGING_DIR_HOST}/${libdir}"
+    base_libdir_qemu="${STAGING_DIR_HOST}/${base_libdir}"
+
+    CROSS_EXEC="${qemu_binary} \
+                ${QEMU_OPTIONS} \
+                -L ${STAGING_DIR_HOST} \
+                -E LD_LIBRARY_PATH=${libdir_qemu}:${base_libdir_qemu}"
+
+    export BUILD_ARCH=${BUILD_ARCH}
+    export HOST_ARCH=${HOST_ARCH}
+    export STAGING_LIBDIR=${STAGING_LIBDIR}
+    export STAGING_INCDIR=${STAGING_INCDIR}
+    export PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+
+    CONFIG_CMD="./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} --cross-compile"
+    if [ "${CROSS_METHOD}" = "answer" ]; then
+        ${CONFIG_CMD} --cross-answers="${CROSS_ANSWERS}"
+    elif [ "${CROSS_METHOD}" = "exec" ]; then
+        ${CONFIG_CMD} --cross-exec="${CROSS_EXEC}"
+    elif [ "${CROSS_METHOD}" = "both" ]; then
+        ${CONFIG_CMD} --cross-answers="${CROSS_ANSWERS}" --cross-exec="${CROSS_EXEC}"
+    else
+        echo "ERROR: ${CROSS_METHOD} is not valid for cross-compile!"
+        exit 1
+    fi
+}
+
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
+do_compile () {
+    python3 ./buildtools/bin/waf ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/conf/layer.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/conf/layer.conf
new file mode 100644
index 0000000..7bc0702
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/conf/layer.conf
@@ -0,0 +1,27 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a packages directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+            ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "networking-layer"
+BBFILE_PATTERN_networking-layer := "^${LAYERDIR}/"
+BBFILE_PRIORITY_networking-layer = "5"
+
+# This should only be incremented on significant changes that will
+# cause compatibility issues with other layers
+LAYERVERSION_networking-layer = "1"
+
+LAYERDEPENDS_networking-layer = "core"
+LAYERDEPENDS_networking-layer += "openembedded-layer"
+LAYERDEPENDS_networking-layer += "meta-python"
+
+LAYERSERIES_COMPAT_networking-layer = "thud warrior zeus dunfell"
+
+LICENSE_PATH += "${LAYERDIR}/licenses"
+
+SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
+  wireguard-tools->wireguard-module \
+  wireless-regdb->crda \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/README b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/README
new file mode 100644
index 0000000..dda45c5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/README
@@ -0,0 +1,3 @@
+The files in this directory are cross answers files
+used by waf-samba.bbclass, please see waf-samba.bbclass
+for details about how they are used.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt
new file mode 100644
index 0000000..fc0400d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt
new file mode 100644
index 0000000..fc0400d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt
new file mode 100644
index 0000000..759afe8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-arm.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-armeb.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-armeb.txt
new file mode 100644
index 0000000..759afe8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-armeb.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt
new file mode 100644
index 0000000..759afe8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i586.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt
new file mode 100644
index 0000000..759afe8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-i686.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt
new file mode 100644
index 0000000..c989f27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt
new file mode 100644
index 0000000..215f574
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64el.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64el.txt
new file mode 100644
index 0000000..215f574
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mips64el.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt
new file mode 100644
index 0000000..c989f27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-mipsel.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt
new file mode 100644
index 0000000..f107974
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt
new file mode 100644
index 0000000..7a443cc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-powerpc64.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: (255, "")
+Checking if can we convert from IBM850 to UCS-2LE: (255, "")
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt
new file mode 100644
index 0000000..759afe8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt
new file mode 100644
index 0000000..fc0400d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt
new file mode 100644
index 0000000..fc0400d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-x86_64.txt
@@ -0,0 +1,40 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: OK
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/DMTF b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/DMTF
new file mode 100644
index 0000000..54a2812
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/DMTF
@@ -0,0 +1,34 @@
+// Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF).
+// All rights reserved.
+// DMTF is a not-for-profit association of industry members dedicated
+// to promoting enterprise and systems management and interoperability.
+// DMTF specifications and documents may be reproduced by
+// members and non-members, provided that correct attribution is given.
+// As DMTF specifications may be revised from time to time,
+// the particular version and release date should always be noted.
+// 
+// Implementation of certain elements of this standard or proposed
+// standard may be subject to third party patent rights, including
+// provisional patent rights (herein "patent rights"). DMTF makes
+// no representations to users of the standard as to the existence
+// of such rights, and is not responsible to recognize, disclose, or
+// identify any or all such third party patent right, owners or
+// claimants, nor for any incomplete or inaccurate identification or
+// disclosure of such rights, owners or claimants. DMTF shall have no
+// liability to any party, in any manner or circumstance, under any
+// legal theory whatsoever, for failure to recognize, disclose, or
+// identify any such third party patent rights, or for such party's
+// reliance on the standard or incorporation thereof in its product,
+// protocols or testing procedures. DMTF shall have no liability to
+// any party implementing such standard, whether such implementation
+// is foreseeable or not, nor to any patent owner or claimant, and shall
+// have no liability or responsibility for costs or losses incurred if
+// a standard is withdrawn or modified after publication, and shall be
+// indemnified and held harmless by any party implementing the
+// standard from any and all claims of infringement by a patent owner
+// for such implementations.
+// 
+// For information about patents held by third-parties which have
+// notified the DMTF that, in their opinion, such patent may relate to
+// or impact implementations of DMTF standards, visit
+// http://www.dmtf.org/about/policies/disclosures.php.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0 b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0
new file mode 100644
index 0000000..a66d5bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/copyleft-next-0.3.0
@@ -0,0 +1,219 @@
+                   copyleft-next 0.3.0 ("this License")
+                         Release date: 2013-05-16
+
+1. License Grants; No Trademark License
+
+   Subject to the terms of this License, I grant You:
+
+   a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+      copyright license, to reproduce, Distribute, prepare derivative works
+      of, publicly perform and publicly display My Work.
+
+   b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+      patent license under Licensed Patents to make, have made, use, sell,
+      offer for sale, and import Covered Works.
+
+   This License does not grant any rights in My name, trademarks, service
+   marks, or logos.
+
+2. Distribution: General Conditions
+
+   You may Distribute Covered Works, provided that You (i) inform
+   recipients how they can obtain a copy of this License; (ii) satisfy the
+   applicable conditions of sections 3 through 6; and (iii) preserve all
+   Legal Notices contained in My Work (to the extent they remain
+   pertinent). "Legal Notices" means copyright notices, license notices,
+   license texts, and author attributions, but does not include logos,
+   other graphical images, trademarks or trademark legends.
+
+3. Conditions for Distributing Derived Works; Outbound GPL Compatibility
+
+   If You Distribute a Derived Work, You must license the entire Derived
+   Work as a whole under this License, with prominent notice of such
+   licensing. This condition may not be avoided through such means as
+   separate Distribution of portions of the Derived Work. You may
+   additionally license the Derived Work under the GPL, so that the
+   recipient may further Distribute the Derived Work under either this
+   License or the GPL.
+
+4. Condition Against Further Restrictions; Inbound License Compatibility
+
+   When Distributing a Covered Work, You may not impose further
+   restrictions on the exercise of rights in the Covered Work granted under
+   this License. This condition is not excused merely because such
+   restrictions result from Your compliance with conditions or obligations
+   extrinsic to this License (such as a court order or an agreement with a
+   third party).
+
+   However, You may Distribute a Covered Work incorporating material
+   governed by a license that is both OSI-Approved and FSF-Free as of the
+   release date of this License, provided that Your Distribution complies
+   with such other license.
+
+5. Conditions for Distributing Object Code
+
+   You may Distribute an Object Code form of a Covered Work, provided that
+   you accompany the Object Code with a URL through which the Corresponding
+   Source is made available, at no charge, by some standard or customary
+   means of providing network access to source code.
+
+   If you Distribute the Object Code in a physical product or tangible
+   storage medium ("Product"), the Corresponding Source must be available
+   through such URL for two years from the date of Your most recent
+   Distribution of the Object Code in the Product. However, if the Product
+   itself contains or is accompanied by the Corresponding Source (made
+   available in a customarily accessible manner), You need not also comply
+   with the first paragraph of this section.
+
+   Each recipient of the Covered Work from You is an intended third-party
+   beneficiary of this License solely as to this section 5, with the right
+   to enforce its terms.
+
+6. Symmetrical Licensing Condition for Upstream Contributions
+
+   If You Distribute a work to Me specifically for inclusion in or
+   modification of a Covered Work (a "Patch"), and no explicit licensing
+   terms apply to the Patch, You license the Patch under this License, to
+   the extent of Your copyright in the Patch. This condition does not
+   negate the other conditions of this License, if applicable to the Patch.
+
+7. Nullification of Copyleft/Proprietary Dual Licensing
+
+   If I offer to license, for a fee, a Covered Work under terms other than
+   a license that is OSI-Approved or FSF-Free as of the release date of this
+   License or a numbered version of copyleft-next released by the
+   Copyleft-Next Project, then the license I grant You under section 1 is no
+   longer subject to the conditions in sections 2 through 5.
+
+8. Copyleft Sunset
+
+   The conditions in sections 2 through 5 no longer apply once fifteen
+   years have elapsed from the date of My first Distribution of My Work
+   under this License.
+
+9. Pass-Through
+
+   When You Distribute a Covered Work, the recipient automatically receives
+   a license to My Work from Me, subject to the terms of this License.
+
+10. Termination
+
+    Your license grants under section 1 are automatically terminated if You
+
+    a) fail to comply with the conditions of this License, unless You cure
+       such noncompliance within thirty days after becoming aware of it, or
+
+    b) initiate a patent infringement litigation claim (excluding
+       declaratory judgment actions, counterclaims, and cross-claims)
+       alleging that any part of My Work directly or indirectly infringes
+       any patent.
+
+    Termination of Your license grants extends to all copies of Covered
+    Works You subsequently obtain. Termination does not terminate the
+    rights of those who have received copies or rights from You subject to
+    this License.
+
+    To the extent permission to make copies of a Covered Work is necessary
+    merely for running it, such permission is not terminable.
+
+11. Later License Versions
+
+    The Copyleft-Next Project may release new versions of copyleft-next,
+    designated by a distinguishing version number ("Later Versions").
+    Unless I explicitly remove the option of Distributing Covered Works
+    under Later Versions, You may Distribute Covered Works under any Later
+    Version.
+
+** 12. No Warranty                                                       **
+**                                                                       **
+**     My Work is provided "as-is", without warranty. You bear the risk  **
+**     of using it. To the extent permitted by applicable law, each      **
+**     Distributor of My Work excludes the implied warranties of title,  **
+**     merchantability, fitness for a particular purpose and             **
+**     non-infringement.                                                 **
+
+** 13. Limitation of Liability                                           **
+**                                                                       **
+**     To the extent permitted by applicable law, in no event will any   **
+**     Distributor of My Work be liable to You for any damages           **
+**     whatsoever, whether direct, indirect, special, incidental, or     **
+**     consequential damages, whether arising under contract, tort       **
+**     (including negligence), or otherwise, even where the Distributor  **
+**     knew or should have known about the possibility of such damages.  **
+
+14. Severability
+
+    The invalidity or unenforceability of any provision of this License
+    does not affect the validity or enforceability of the remainder of
+    this License. Such provision is to be reformed to the minimum extent
+    necessary to make it valid and enforceable.
+
+15. Definitions
+
+    "Copyleft-Next Project" means the project that maintains the source
+    code repository at <https://gitorious.org/copyleft-next/> as of the
+    release date of this License.
+
+    "Corresponding Source" of a Covered Work in Object Code form means (i)
+    the Source Code form of the Covered Work; (ii) all scripts,
+    instructions and similar information that are reasonably necessary for
+    a skilled developer to generate such Object Code from the Source Code
+    provided under (i); and (iii) a list clearly identifying all Separate
+    Works (other than those provided in compliance with (ii)) that were
+    specifically used in building and (if applicable) installing the
+    Covered Work (for example, a specified proprietary compiler including
+    its version number). Corresponding Source must be machine-readable.
+
+    "Covered Work" means My Work or a Derived Work.
+
+    "Derived Work" means a work of authorship that copies from, modifies,
+    adapts, is based on, is a derivative work of, transforms, translates or
+    contains all or part of My Work, such that copyright permission is
+    required. The following are not Derived Works: (i) Mere Aggregation;
+    (ii) a mere reproduction of My Work; and (iii) if My Work fails to
+    explicitly state an expectation otherwise, a work that merely makes
+    reference to My Work.
+
+    "Distribute" means to distribute, transfer or make a copy available to
+    someone else, such that copyright permission is required.
+
+    "Distributor" means Me and anyone else who Distributes a Covered Work.
+
+    "FSF-Free" means classified as 'free' by the Free Software Foundation.
+
+    "GPL" means a version of the GNU General Public License or the GNU
+    Affero General Public License.
+
+    "I"/"Me"/"My" refers to the individual or legal entity that places My
+    Work under this License. "You"/"Your" refers to the individual or legal
+    entity exercising rights in My Work under this License. A legal entity
+    includes each entity that controls, is controlled by, or is under
+    common control with such legal entity. "Control" means (a) the power to
+    direct the actions of such legal entity, whether by contract or
+    otherwise, or (b) ownership of more than fifty percent of the
+    outstanding shares or beneficial ownership of such legal entity.
+
+    "Licensed Patents" means all patent claims licensable royalty-free by
+    Me, now or in the future, that are necessarily infringed by making,
+    using, or selling My Work, and excludes claims that would be infringed
+    only as a consequence of further modification of My Work.
+
+    "Mere Aggregation" means an aggregation of a Covered Work with a
+    Separate Work.
+
+    "My Work" means the particular work of authorship I license to You
+    under this License.
+
+    "Object Code" means any form of a work that is not Source Code.
+
+    "OSI-Approved" means approved as 'Open Source' by the Open Source
+    Initiative.
+
+    "Separate Work" means a work that is separate from and independent of a
+    particular Covered Work and is not by its nature an extension or
+    enhancement of the Covered Work, and/or a runtime library, standard
+    library or similar component that is used to generate an Object Code
+    form of a Covered Work.
+
+    "Source Code" means the preferred form of a work for making
+    modifications to it.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/netperf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/netperf
new file mode 100644
index 0000000..3f3ceb2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/netperf
@@ -0,0 +1,43 @@
+
+ 
+              Copyright (C) 1993 Hewlett-Packard Company
+                         ALL RIGHTS RESERVED.
+ 
+  The enclosed software and documentation includes copyrighted works
+  of Hewlett-Packard Co. For as long as you comply with the following
+  limitations, you are hereby authorized to (i) use, reproduce, and
+  modify the software and documentation, and to (ii) distribute the
+  software and documentation, including modifications, for
+  non-commercial purposes only.
+      
+  1.  The enclosed software and documentation is made available at no
+      charge in order to advance the general development of
+      high-performance networking products.
+ 
+  2.  You may not delete any copyright notices contained in the
+      software or documentation. All hard copies, and copies in
+      source code or object code form, of the software or
+      documentation (including modifications) must contain at least
+      one of the copyright notices.
+ 
+  3.  The enclosed software and documentation has not been subjected
+      to testing and quality control and is not a Hewlett-Packard Co.
+      product. At a future time, Hewlett-Packard Co. may or may not
+      offer a version of the software and documentation as a product.
+  
+  4.  THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
+      HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
+      REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
+      DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
+      PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
+      DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
+      EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
+      DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
+      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  
+  5.  HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
+      DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+      (INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
+      MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
+ 
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/radvd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/radvd
new file mode 100644
index 0000000..03db0b6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/licenses/radvd
@@ -0,0 +1,37 @@
+The author(s) grant permission for redistribution and use in source and
+binary forms, with or without modification, of the software and documentation
+provided that the following conditions are met:
+
+0. If you receive a version of the software that is specifically labelled
+   as not being for redistribution (check the version message and/or README),
+   you are not permitted to redistribute that version of the software in any
+   way or form.
+1. All terms of all other applicable copyrights and licenses must be
+   followed.
+2. Redistributions of source code must retain the authors' copyright
+   notice(s), this list of conditions, and the following disclaimer.
+3. Redistributions in binary form must reproduce the authors' copyright
+   notice(s), this list of conditions, and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement with the name(s) of the
+   authors as specified in the copyright notice(s) substituted where
+   indicated:
+
+        This product includes software developed by the authors which are 
+	mentioned at the start of the source files and other contributors.
+
+5. Neither the name(s) of the author(s) nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb
new file mode 100644
index 0000000..75f3030
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Active Directory enrollment"
+DESCRIPTION = "A helper library and tools for Active Directory client operations."
+
+HOMEPAGE = "http://cgit.freedesktop.org/realmd/adcli"
+SECTION = "net"
+
+SRCREV = "cc3ef52884a48863a81acbfc741735fe09cd85f7"
+
+SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;branch=master \
+           file://Fixed-build-error-on-musl.patch \
+	   "
+
+S = "${WORKDIR}/git"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
+
+inherit autotools xmlcatalog 
+
+DEPENDS += "virtual/crypt krb5 openldap gettext libxslt xmlto libxml2-native \
+            cyrus-sasl libxslt-native xmlto-native coreutils-native\
+           "
+
+EXTRA_OECONF += "--disable-static \
+                 --disable-silent-rules \
+                 --disable-doc \
+                "
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch
new file mode 100644
index 0000000..87bcdfe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch
@@ -0,0 +1,26 @@
+From 0e64782a45cba9753d1210ee7d7c9dbd42f74ceb Mon Sep 17 00:00:00 2001
+From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+Date: Fri, 12 Jul 2019 12:46:54 +0800
+Subject: [PATCH] Fixed build error on musl.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+---
+ library/adutil.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/library/adutil.c b/library/adutil.c
+index 9b0c47f..b673edd 100644
+--- a/library/adutil.c
++++ b/library/adutil.c
+@@ -30,6 +30,7 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
++#include <endian.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-- 
+2.20.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch
new file mode 100644
index 0000000..269174b
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch
new file mode 100644
index 0000000..00115cf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch
@@ -0,0 +1,81 @@
+Fix fail to enable bluetooth issue
+
+When launch blueman-manager while bluetooth is disable, it may fails
+with error:
+
+  Failed to enable bluetooth
+
+Because when get bluetooth status right after change its status, the
+status may not be updated that plugin applet/KillSwitch.py sets the
+bluetooth status via method of another dbus service which doesn't return
+immediately.
+
+Provides a new dbus method for PowerManager which checks whether dbus
+method SetBluetoothStatus() has finished. Then it makes sure to get
+right bluetooth status.
+
+Upstream-Status: Inappropriate
+Send to upstream but not accepted:
+https://github.com/blueman-project/blueman/pull/1121
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ blueman/Functions.py                   | 12 +++++++++++-
+ blueman/plugins/applet/PowerManager.py |  4 ++++
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/blueman/Functions.py b/blueman/Functions.py
+index 3b76271..c5eeb27 100644
+--- a/blueman/Functions.py
++++ b/blueman/Functions.py
+@@ -17,7 +17,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ #
+-from time import sleep
++from time import sleep, time
+ import re
+ import os
+ import signal
+@@ -86,6 +86,16 @@ def check_bluetooth_status(message, exitfunc):
+             return
+ 
+     applet.SetBluetoothStatus('(b)', True)
++
++    timeout = time() + 10
++    while applet.GetRequestStatus():
++        sleep(0.1)
++        if time() > timeout:
++            # timeout 5s has been set in applet/PowerManager.py
++            # so it should NOT reach timeout here
++            logging.warning('Should NOT reach timeout.')
++            break
++
+     if not applet.GetBluetoothStatus():
+         print('Failed to enable bluetooth')
+         exitfunc()
+diff --git a/blueman/plugins/applet/PowerManager.py b/blueman/plugins/applet/PowerManager.py
+index 8ec9fc4..29a0fb0 100644
+--- a/blueman/plugins/applet/PowerManager.py
++++ b/blueman/plugins/applet/PowerManager.py
+@@ -48,6 +48,7 @@ class PowerManager(AppletPlugin):
+         self._add_dbus_signal("BluetoothStatusChanged", "b")
+         self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state)
+         self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status)
++        self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status)
+ 
+     def on_unload(self):
+         self.parent.Plugins.Menu.unregister(self)
+@@ -182,6 +183,9 @@ class PowerManager(AppletPlugin):
+     def get_bluetooth_status(self):
+         return self.current_state
+ 
++    def get_request_status(self):
++        return self.request_in_progress
++
+     def on_adapter_property_changed(self, _path, key, value):
+         if key == "Powered":
+             if value and not self.current_state:
+-- 
+2.20.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.3.bb
new file mode 100644
index 0000000..9143a67
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.3.bb
@@ -0,0 +1,59 @@
+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 = " \
+    https://github.com/blueman-project/blueman/releases/download/${PV}/blueman-${PV}.tar.xz \
+    file://0001-Search-for-cython3.patch \
+    file://0002-fix-fail-to-enable-bluetooth.patch \
+"
+SRC_URI[sha256sum] = "3bd02e0cc9e2c1424df1fc2015da710a280ef4c657515727e47eafabf8c2cfde"
+
+EXTRA_OECONF = " \
+    --disable-appindicator \
+    --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-core \
+    python3-dbus \
+    packagegroup-tools-bluetooth \
+"
+
+PACKAGECONFIG ??= "thunar"
+PACKAGECONFIG[thunar] = "--enable-thunar-sendto,--disable-thunar-sendto"
+
+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"
+
+# In code, path to python is a variable that is replaced with path to native version of it
+# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3.
+# Replace it with #!/usr/bin/env python3
+do_install_append() {
+    sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \
+                                              ${D}${prefix}/libexec/blueman-mechanism \
+                                              ${D}${bindir}/blueman-tray \
+                                              ${D}${bindir}/blueman-services \
+                                              ${D}${bindir}/blueman-sendto \
+                                              ${D}${bindir}/blueman-report \
+                                              ${D}${bindir}/blueman-manager \
+                                              ${D}${bindir}/blueman-assistant \
+                                              ${D}${bindir}/blueman-applet \
+                                              ${D}${bindir}/blueman-adapters
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch
new file mode 100644
index 0000000..b78f0b3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch
@@ -0,0 +1,43 @@
+From c74f04dbab4d586287347b1d5517f36e2f0c3d8e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Dec 2019 15:52:34 -0800
+Subject: [PATCH] Use GNUInstallDirs instead of hard-coding paths
+
+Bump minimum cmake version to be >= 3.1
+
+Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/22]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 51b354f..958e0eb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.1)
+ project(cannelloni)
+ 
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+@@ -60,6 +60,8 @@ set_target_properties ( cannelloni-common
+   SOVERSION 0
+ )
+ 
++include(GNUInstallDirs)
++
+ if(SCTP_SUPPORT)
+     add_library(sctpthread STATIC sctpthread.cpp)
+     target_link_libraries(sctpthread addsources sctp)
+@@ -68,5 +70,5 @@ endif(SCTP_SUPPORT)
+ set_target_properties(addsources PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ target_link_libraries(cannelloni addsources cannelloni-common pthread)
+ 
+-install(TARGETS cannelloni DESTINATION bin)
+-install(TARGETS cannelloni-common DESTINATION lib)
++install(TARGETS cannelloni DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(TARGETS cannelloni-common DESTINATION ${CMAKE_INSTALL_LIBDIR})
+-- 
+2.24.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch
new file mode 100644
index 0000000..55f28dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch
@@ -0,0 +1,32 @@
+From 1788762863cd1f657697575f6e73a22e661ccb43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Dec 2019 10:32:54 -0800
+Subject: [PATCH 2/2] include missing <stdexcept> for runtime_error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes
+error: ‘runtime_error’ is not a member of ‘std’
+
+Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/22]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ parser.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/parser.cpp b/parser.cpp
+index 4afb9e0..5bcdbde 100644
+--- a/parser.cpp
++++ b/parser.cpp
+@@ -2,6 +2,7 @@
+ 
+ #include <arpa/inet.h>
+ #include <string.h>
++#include <stdexcept>
+ 
+ void parseFrames(uint16_t len, const uint8_t* buffer, std::function<canfd_frame*()> frameAllocator,
+         std::function<void(canfd_frame*, bool)> frameReceiver)
+-- 
+2.24.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb
new file mode 100644
index 0000000..d4a62bd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "a SocketCAN over Ethernet tunnel"
+HOMEPAGE = "https://github.com/mguentner/cannelloni"
+LICENSE = "GPLv2"
+
+SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https \
+           file://0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch \
+           file://0002-include-missing-stdexcept-for-runtime_error.patch \
+          "
+SRCREV = "82aa49b417b96fe46bb3f017ae1bfea928f20f9a"
+
+PV = "20160414+${SRCPV}"
+
+LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+inherit cmake
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= "lksctp-tools"
+PACKAGECONFIG[lksctp-tools] = "-DSCTP_SUPPORT=true, -DSCTP_SUPPORT=false, lksctp-tools"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
new file mode 100644
index 0000000..2820f9f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Civetweb embedded web server"
+HOMEPAGE = "https://github.com/civetweb/civetweb"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=50bd1d7f135b50d7e218996ba28d0d88"
+
+SRCREV = "4b440a339979852d5a51fb11a822952712231c23"
+PV = "1.12+git${SRCPV}"
+SRC_URI = "git://github.com/civetweb/civetweb.git \
+           file://0001-Unittest-Link-librt-and-libm-using-l-option.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_ENABLE_SERVER_EXECUTABLE=ON -DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
new file mode 100644
index 0000000..9125d0a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
@@ -0,0 +1,101 @@
+Imported from Gentoo
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c50acec16bc7c33d6dc122c007d713e7fbecf9c
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -1,22 +1,22 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ 
+ import sys
+ try:
+        from M2Crypto import RSA
+-except ImportError, e:
++except ImportError as e:
+        sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
+        sys.stderr.write('Please install the "M2Crypto" Python module.\n')
+        sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
+        sys.exit(1)
+ 
+ def print_ssl_64(output, name, val):
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     while len(val) % 8:
+-        val = '\0' + val
++        val = b'\0' + val
+     vnew = []
+     while len(val):
+-        vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
++        vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8]))
+         val = val[8:]
+     vnew.reverse()
+     output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val):
+     output.write('};\n\n')
+ 
+ def print_ssl_32(output, name, val):
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     while len(val) % 4:
+-        val = '\0' + val
++        val = b'\0' + val
+     vnew = []
+     while len(val):
+-        vnew.append((val[0], val[1], val[2], val[3], ))
++        vnew.append((val[0:1], val[1:2], val[2:3], val[3:4]))
+         val = val[4:]
+     vnew.reverse()
+     output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -81,21 +81,21 @@ struct pubkey {
+ 
+ static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+-    for n in xrange(n + 1):
++    for n in range(n + 1):
+         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))
+     output.write('};\n')
+     pass
+ 
+ def print_gcrypt(output, name, val):
+     output.write('#include <stdint.h>\n')
+-    while val[0] == '\0':
++    while val[0:1] == b'\0':
+         val = val[1:]
+     output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
+     idx = 0
+     for v in val:
+         if not idx:
+             output.write('\t')
+-        output.write('0x%.2x, ' % ord(v))
++        output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v)))
+         idx += 1
+         if idx == 8:
+             idx = 0
+@@ -118,7 +118,7 @@ struct key_params {
+ 
+ static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+-    for n in xrange(n + 1):
++    for n in range(n + 1):
+         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))
+     output.write('};\n')
+     
+@@ -136,7 +136,7 @@ except IndexError:
+     mode = None
+ 
+ if not mode in modes:
+-    print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
++    print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())))
+     sys.exit(2)
+ 
+ output = open(outfile, 'w')
+@@ -154,3 +154,5 @@ for f in files:
+     idx += 1
+ 
+ modes[mode][1](output, idx - 1)
++
++output.close()
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch
new file mode 100644
index 0000000..747804d
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/make.patch
new file mode 100644
index 0000000..0b73785
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
new file mode 100644
index 0000000..e59d2f4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -0,0 +1,38 @@
+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 = "python3-m2crypto-native libnl libgcrypt"
+
+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 \
+           file://crda-4.14-python-3.patch \
+"
+SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
+SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
+
+inherit python3-dir python3native siteinfo
+
+# Recursive make problem
+EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \
+                UDEV_RULE_DIR=${nonarch_base_libdir}/udev/rules.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-static"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb
new file mode 100644
index 0000000..42ffb17
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.6.bb
new file mode 100644
index 0000000..1cb2af5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.6.bb
@@ -0,0 +1,27 @@
+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://LICENSE;md5=0531457992a97ecebc6975914a874a9d"
+
+UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/"
+
+SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
+           file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
+
+SRC_URI[md5sum] = "e1eea03388d12c9ad21ecd7c135fdf8b"
+SRC_URI[sha256sum] = "6c2934a3e1e67a5cfd5bb15b1efa71f65c00314ac1ccb5c50da8eae3a0b8147f"
+
+inherit pkgconfig 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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch
new file mode 100644
index 0000000..37d2344
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch
@@ -0,0 +1,45 @@
+From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001
+From: Stefano Cappa <stefano.cappa.ks89@gmail.com>
+Date: Sun, 13 Jan 2019 01:50:52 +0100
+Subject: [PATCH] remove INCLUDEDIR to prevent build issues
+
+Upstream-Status: Pending
+
+Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com>
+---
+ configure | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/configure b/configure
+index 6c81e0db..32dea2b4 100755
+--- a/configure
++++ b/configure
+@@ -20,7 +20,6 @@ BUILD=
+ HOST=
+ HOSTCC=
+ TARGET=
+-INCLUDEDIR=
+ DEBUG=
+ FORK=
+ STATIC=
+@@ -72,7 +71,6 @@ for x do
+ 	--mandir) MANDIR=$var;;
+ 	--datadir) DATADIR=$var;;
+ 	--with-ccopts|CFLAGS) CFLAGS=$var;;
+-	-I|--includedir) INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }-I$var";;
+ 	CC) CC=$var;;
+ 	CPPFLAGS) CPPFLAGS=$var;;
+ 	PKG_CONFIG) PKG_CONFIG=$var;;
+@@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then
+ 	echo "CPPFLAGS=" >>$CONFIG_MK
+ 	echo "CPPFLAGS+=	$CPPFLAGS" >>$CONFIG_MK
+ fi
+-if [ -n "$INCLUDEDIR" ]; then
+-	echo "CPPFLAGS+=	$INCLUDEDIR" >>$CONFIG_MK
+-fi
+ if [ -n "$LDFLAGS" ]; then
+ 	echo "LDFLAGS=" >>$CONFIG_MK
+ 	echo "LDFLAGS+=	$LDFLAGS" >>$CONFIG_MK
+-- 
+2.17.2 (Apple Git-113)
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch
new file mode 100644
index 0000000..346a56a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch
@@ -0,0 +1,74 @@
+From 630086cf1b3fba71822319a268d3711734cd6aa8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Jan 2019 12:56:13 -0800
+Subject: [PATCH] linux-port: Rename pthread_mutex_t variable 'lock'
+
+lock is also used by libc++ in std namespace and using it here causes
+clang to fail e.g.
+
+dibbler-client.cpp:47:25: error: reference to 'lock' is ambiguous
+    pthread_mutex_lock(&lock);
+                        ^
+../../../../../../../workspace/sources/dibbler/Port-linux/dibbler-client.cpp:29:26: note: candidate found by name lookup is 'lock'
+extern ::pthread_mutex_t lock;
+                         ^
+/mnt/a/yoe/build/tmp/work/aarch64-yoe-linux/dibbler/1.0.1+1.0.2RC1+gitc4b0ed52e751da7823dd9a36e91f93a6310e5525-r0/recipe-sysroot/usr/include/c++/v1/mutex:446:1: note: candidate found by name lookup is 'std::__1::lock'
+lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
+
+Upstream-Status: Submitted [https://github.com/tomaszmrugalski/dibbler/pull/37]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Port-linux/dibbler-client.cpp          | 6 +++---
+ Port-linux/lowlevel-linux-link-state.c | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Port-linux/dibbler-client.cpp b/Port-linux/dibbler-client.cpp
+index 78f34241..b5ebb9f0 100644
+--- a/Port-linux/dibbler-client.cpp
++++ b/Port-linux/dibbler-client.cpp
+@@ -26,7 +26,7 @@ using namespace std;
+ 
+ #define IF_RECONNECTED_DETECTED -1
+ 
+-extern pthread_mutex_t lock;
++extern pthread_mutex_t dibbler_lock;
+ 
+ TDHCPClient* ptr = 0;
+ 
+@@ -44,8 +44,8 @@ void signal_handler(int n) {
+ #ifdef MOD_CLNT_CONFIRM
+ void signal_handler_of_linkstate_change(int n) {
+     Log(Notice) << "Network switch off event detected. initiating CONFIRM." << LogEnd;
+-    pthread_mutex_lock(&lock);
+-    pthread_mutex_unlock(&lock);
++    pthread_mutex_lock(&dibbler_lock);
++    pthread_mutex_unlock(&dibbler_lock);
+ }
+ #endif
+ 
+diff --git a/Port-linux/lowlevel-linux-link-state.c b/Port-linux/lowlevel-linux-link-state.c
+index 76293ea1..e6b94063 100644
+--- a/Port-linux/lowlevel-linux-link-state.c
++++ b/Port-linux/lowlevel-linux-link-state.c
+@@ -34,7 +34,7 @@ volatile int * notifier = 0;
+ int isDone = 0;
+ pthread_t parent_id;
+ pthread_t ntid;
+-pthread_mutex_t lock;
++pthread_mutex_t dibbler_lock;
+ 
+ struct state {
+     int id;
+@@ -86,9 +86,9 @@ void link_state_changed(int ifindex)
+     {
+ 	if (changed_links->cnt<16)
+ 	    changed_links->ifindex[changed_links->cnt++] = ifindex;
+-	pthread_mutex_lock(&lock);
++	pthread_mutex_lock(&dibbler_lock);
+ 	*notifier = 1; /* notify that change has occured */
+-	pthread_mutex_unlock(&lock);
++	pthread_mutex_unlock(&dibbler_lock);
+ 	pthread_kill(parent_id,SIGUSR1);
+     } else
+     {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch
new file mode 100644
index 0000000..42d2627
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
new file mode 100644
index 0000000..90051a3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
@@ -0,0 +1,38 @@
+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 \
+           file://0001-linux-port-Rename-pthread_mutex_t-variable-lock.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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb
new file mode 100644
index 0000000..51e220c
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch
new file mode 100644
index 0000000..d80ed3e
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch
new file mode 100644
index 0000000..de5eb3a
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch
new file mode 100644
index 0000000..02218a3
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch
new file mode 100644
index 0000000..1de267f
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init
new file mode 100644
index 0000000..08e8930
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: firewalld
+# Required-Start: $syslog $local_fs messagebus
+# Required-Stop: 
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: 
+# Description: 
+### END INIT INFO
+
+. /etc/init.d/functions
+
+firewalld=/usr/sbin/firewalld
+pidfile=/var/run/firewalld.pid
+
+case "$1" in
+    start)
+        echo -n "Starting firewalld: "
+        start-stop-daemon --start --quiet --exec $firewalld
+        echo "."
+        ;;
+    stop)
+        echo -n "Stopping firewalld: "
+        start-stop-daemon --stop --quiet --pidfile $pidfile
+        echo "."
+        ;;
+    restart)
+        echo -n "Stopping firewalld: "
+        start-stop-daemon --stop --quiet --pidfile $pidfile
+        echo "."
+        echo -n "Starting firewalld: "
+        start-stop-daemon --start --quiet --exec $firewalld
+        echo "."
+        ;;
+    reload)
+        echo -n "Reloading firewalld: "
+        firewall-cmd --reload
+        echo "."
+        ;;
+    status)
+        firewall-cmd --state
+        ;;
+    *)
+        echo "Usage: /etc/init.d/firewalld {start|stop|restart|reload|status}" >&2
+        exit 1
+esac
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb
new file mode 100644
index 0000000..4dea848
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb
@@ -0,0 +1,89 @@
+SUMMARY = "Dynamic firewall daemon with a D-Bus interface"
+HOMEPAGE = "https://firewalld.org/"
+BUGTRACKER = "https://github.com/firewalld/firewalld/issues"
+UPSTREAM_CHECK_URI = "https://github.com/firewalld/firewalld/releases"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+           file://firewalld.init \
+"
+SRC_URI[md5sum] = "05ec772cbdc0a2b3df081e4beca5599d"
+SRC_URI[sha256sum] = "414c46202c12334cd5c986214e5e2575d18e743c5531a97ace1c0cd94341c60d"
+
+# glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4
+DEPENDS = "intltool-native glib-2.0-native libxslt-native docbook-xsl-stylesheets-native"
+
+inherit gettext autotools bash-completion python3native gsettings systemd update-rc.d
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd"
+
+PACKAGES += "${PN}-zsh-completion"
+
+# iptables, ip6tables, ebtables, and ipset *should* be unnecessary
+# when the nftables backend is available, because nftables supersedes all of them.
+# However we still need iptables and ip6tables to be available otherwise any
+# application relying on "direct passthrough" rules (such as docker) will break.
+# /etc/sysconfig/firewalld is a Red Hat-ism, only referenced by
+# the Red Hat-specific init script which we aren't using, so we disable that.
+EXTRA_OECONF = "\
+    --with-nft=${sbindir}/nft \
+    --without-ipset \
+    --with-iptables=${sbindir}/iptables \
+    --with-iptables-restore=${sbindir}/iptables-restore \
+    --with-ip6tables=${sbindir}/ip6tables \
+    --with-ip6tables-restore=${sbindir}/ip6tables-restore \
+    --without-ebtables \
+    --without-ebtables-restore \
+    --disable-sysconfig \
+    --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog \
+"
+
+INITSCRIPT_NAME = "firewalld"
+SYSTEMD_SERVICE_${PN} = "firewalld.service"
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        :
+    else
+        # firewalld ships an init script but it contains Red Hat-isms, replace it with our own
+        rm -rf ${D}${sysconfdir}/rc.d/
+        install -d ${D}${sysconfdir}/init.d
+        install -m0755 ${WORKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld
+    fi
+
+    # We ran ./configure with PYTHON pointed at the binary inside $STAGING_BINDIR_NATIVE
+    # so now we need to fix up any references to point at the proper path in the image.
+    # This hack is also in distutils.bbclass, but firewalld doesn't use distutils/setuptools.
+    if [ ${PN} != "${BPN}-native" ]; then
+        sed -i -e s:${STAGING_BINDIR_NATIVE}/python3-native/python3:${bindir}/python3:g \
+            ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml
+    fi
+    sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g \
+        ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml
+}
+
+FILES_${PN} += "\
+    ${PYTHON_SITEPACKAGES_DIR}/firewall \
+    ${nonarch_libdir}/firewalld \
+    ${datadir}/dbus-1 \
+    ${datadir}/polkit-1 \
+    ${datadir}/metainfo \
+"
+FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+
+RDEPENDS_${PN} = "\
+    nftables \
+    iptables \
+    python3-core \
+    python3-io \
+    python3-fcntl \
+    python3-shell \
+    python3-syslog \
+    python3-xml \
+    python3-dbus \
+    python3-slip-dbus \
+    python3-decorator \
+    python3-pygobject \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-existed-certificate-err.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-existed-certificate-err.patch
new file mode 100644
index 0000000..669f363
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-existed-certificate-err.patch
@@ -0,0 +1,55 @@
+From 084f5467672f2ae37003b77e8f8706772f3da3ec Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 13 Jul 2020 07:01:45 +0000
+Subject: [PATCH] raddb/certs/Makefile: fix the existed certificate error
+
+Fixes:
+ # ./bootstrap
+ [snip]
+openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr  -key 'whatever' -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
+Using configuration from ./client.cnf
+Check that the request matches the signature
+Signature ok
+ERROR:There is already a certificate for /C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
+The matching entry has the following details
+Type          :Valid
+Expires on    :200908024833Z
+Serial Number :02
+File name     :unknown
+Subject Name  :/C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
+make: *** [Makefile:128: client.crt] Error 1
+
+Add the check to fix the above error and it does the same for server.crt.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ raddb/certs/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
+index 5cbfd467ce..77eec9baa1 100644
+--- a/raddb/certs/Makefile
++++ b/raddb/certs/Makefile
+@@ -92,7 +92,7 @@ server.csr server.key: server.cnf
+ 	chmod g+r server.key
+ 
+ server.crt: server.csr ca.key ca.pem
+-	$(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr  -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
++	@[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr  -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
+ 
+ server.p12: server.crt
+ 	$(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12  -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+@@ -117,7 +117,7 @@ client.csr client.key: client.cnf
+ 	chmod g+r client.key
+ 
+ client.crt: client.csr ca.pem ca.key
+-	$(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr  -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
++	@[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr  -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
+ 
+ client.p12: client.crt
+ 	$(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12  -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-occasional-verification.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-occasional-verification.patch
new file mode 100644
index 0000000..dce0427
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-occasional-verification.patch
@@ -0,0 +1,135 @@
+From 3eda5d35fbaf66ed6bdc86ada4320a0a18681b7e Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 5 Aug 2020 07:23:11 +0000
+Subject: [PATCH] raddb/certs/Makefile: fix the occasional verification failure
+
+Fixes:
+  # cd /etc/raddb/certs
+  # ./bootstrap
+[snip]
+chmod g+r ca.key
+openssl pkcs12 -in server.p12 -out server.pem -passin pass:'whatever' -passout pass:'whatever'
+chmod g+r server.pem
+C = FR, ST = Radius, O = Example Inc., CN = Example Server Certificate, emailAddress = admin@example.org
+error 7 at 0 depth lookup: certificate signature failure
+140066667427072:error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:../openssl-1.1.1g/crypto/rsa/rsa_ossl.c:553:
+140066667427072:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:../openssl-1.1.1g/crypto/asn1/a_verify.c:170:
+error server.pem: verification failed
+make: *** [Makefile:107: server.vrfy] Error 2
+
+It seems the ca.pem mismatchs server.pem which results in failing to
+execute "openssl verify -CAfile ca.pem server.pem", so add to check
+the file to avoid inconsistency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ raddb/certs/Makefile | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
+index 77eec9baa1..3dcb63fe71 100644
+--- a/raddb/certs/Makefile
++++ b/raddb/certs/Makefile
+@@ -59,7 +59,7 @@ passwords.mk: server.cnf ca.cnf client.cnf inner-server.cnf
+ #
+ ######################################################################
+ dh:
+-	$(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
++	@[ -f dh ] || $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
+ 
+ ######################################################################
+ #
+@@ -69,17 +69,17 @@ dh:
+ ca.key ca.pem: ca.cnf
+ 	@[ -f index.txt ] || $(MAKE) index.txt
+ 	@[ -f serial ] || $(MAKE) serial
+-	$(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
++	@[ -f ca.pem ] || $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
+ 		-days $(CA_DEFAULT_DAYS) -config ./ca.cnf \
+ 		-passin pass:$(PASSWORD_CA) -passout pass:$(PASSWORD_CA)
+ 	chmod g+r ca.key
+ 
+ ca.der: ca.pem
+-	$(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
++	@[ -f ca.der ] || $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
+ 
+ ca.crl: ca.pem
+-	$(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
+-	$(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
++	@[ -f ca-crl.pem ] || $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
++	@[ -f ca.crl ] || $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
+ 	rm ca-crl.pem
+ 
+ ######################################################################
+@@ -88,18 +88,18 @@ ca.crl: ca.pem
+ #
+ ######################################################################
+ server.csr server.key: server.cnf
+-	$(OPENSSL) req -new  -out server.csr -keyout server.key -config ./server.cnf
++	@[ -f server.csr ] || $(OPENSSL) req -new  -out server.csr -keyout server.key -config ./server.cnf
+ 	chmod g+r server.key
+ 
+ server.crt: server.csr ca.key ca.pem
+ 	@[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr  -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
+ 
+ server.p12: server.crt
+-	$(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12  -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
++	@[ -f server.p12 ] || $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12  -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ 	chmod g+r server.p12
+ 
+ server.pem: server.p12
+-	$(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
++	@[ -f server.pem ] || $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ 	chmod g+r server.pem
+ 
+ .PHONY: server.vrfy
+@@ -113,18 +113,18 @@ server.vrfy: ca.pem
+ #
+ ######################################################################
+ client.csr client.key: client.cnf
+-	$(OPENSSL) req -new  -out client.csr -keyout client.key -config ./client.cnf
++	@[ -f client.csr ] || $(OPENSSL) req -new  -out client.csr -keyout client.key -config ./client.cnf
+ 	chmod g+r client.key
+ 
+ client.crt: client.csr ca.pem ca.key
+ 	@[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr  -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
+ 
+ client.p12: client.crt
+-	$(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12  -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
++	@[ -f client.p12 ] || $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12  -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ 	chmod g+r client.p12
+ 
+ client.pem: client.p12
+-	$(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
++	@[ -f client.pem ] || $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ 	chmod g+r client.pem
+ 	cp client.pem $(USER_NAME).pem
+ 
+@@ -139,18 +139,18 @@ client.vrfy: ca.pem client.pem
+ #
+ ######################################################################
+ inner-server.csr inner-server.key: inner-server.cnf
+-	$(OPENSSL) req -new  -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
++	@[ -f inner-server.csr] || $(OPENSSL) req -new  -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
+ 	chmod g+r inner-server.key
+ 
+ inner-server.crt: inner-server.csr ca.key ca.pem
+-	$(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr  -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
++	@[ -f inner-server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr  -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
+ 
+ inner-server.p12: inner-server.crt
+-	$(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12  -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
++	@[ -f inner-server.p12 ] || $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12  -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ 	chmod g+r inner-server.p12
+ 
+ inner-server.pem: inner-server.p12
+-	$(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
++	@[ -f inner-server.pem ] || $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ 	chmod g+r inner-server.pem
+ 
+ .PHONY: inner-server.vrfy
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch
new file mode 100644
index 0000000..d630231
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch
@@ -0,0 +1,58 @@
+From 733330888fff49e4d2b6c2121a6050fdd9f11a87 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 6 Feb 2020 09:32:04 +0800
+Subject: [PATCH] rlm_python3: add PY_INC_DIR in search dir
+
+The configure option --with-rlm-python3-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.
+
+Also remove SMART_LIBS from mod_flags because it introduces rpath
+to LDFALGS which causes a do_package_qa error:
+
+ERROR: freeradius-3.0.20-r0 do_package_qa: QA Issue: package freeradius-python contains bad RPATH
+/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/recipe-sysroot-native/usr/lib/python3.8/config in file
+/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/packages-split/freeradius-python/usr/lib/rlm_python3.so.0.0.0
+package freeradius-python contains bad RPATH
+/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/recipe-sysroot-native/usr/lib/python3.8/config in file
+/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/packages-split/freeradius-python/usr/lib/rlm_python3.so.0.0.0 [rpaths]
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_python3/configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/modules/rlm_python3/configure.ac b/src/modules/rlm_python3/configure.ac
+index a00320f..adbdf19 100644
+--- a/src/modules/rlm_python3/configure.ac
++++ b/src/modules/rlm_python3/configure.ac
+@@ -95,7 +95,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
+ 
+@@ -114,13 +114,13 @@ if test x$with_[]modname != xno; then
+ 
+ 		eval t=\${ac_cv_lib_${sm_lib_safe}_${sm_func_safe}}
+ 		if test "x$t" = "xyes"; then
+-			mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS $SMART_LIBS -lm"
++			mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS -lm"
+ 			targetname=modname
+ 		else
+ 			FR_SMART_CHECK_LIB(python${PY_SYS_VERSION}m, Py_Initialize)
+ 			eval t=\${ac_cv_lib_${sm_lib_safe}_${sm_func_safe}}
+ 			if test "x$t" = "xyes"; then
+-				mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS $SMART_LIBS -lm"
++				mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS -lm"
+ 				targetname=modname
+ 			else
+ 				targetname=
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius
new file mode 100644
index 0000000..fa412e2
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
new file mode 100644
index 0000000..9c99766
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
new file mode 100644
index 0000000..4719358
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
@@ -0,0 +1,70 @@
+From 98a9eff357959d1113e33a615c2178751d5b2054 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 22 Aug 2019 10:50:21 +0800
+Subject: [PATCH 2/2] configure.ac: add option for libcap
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 36 +++++++++++++++++++++++++++---------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 65db61e..6486aac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -977,6 +977,22 @@ 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=
+@@ -1010,15 +1026,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
+ 
+ dnl #
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
new file mode 100644
index 0000000..4a62bf1
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
new file mode 100644
index 0000000..4265f9d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
@@ -0,0 +1,90 @@
+From bfe4d7ed72edc9d4ae1a0f0d2dd84367d6214886 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 22 Aug 2019 10:45:46 +0800
+Subject: [PATCH 1/2] 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>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ autogen.sh   |  5 +----
+ configure.ac | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index a1d08a6..959182b 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -6,10 +6,7 @@ cd $parentdir
+ parentdir=`pwd`
+ m4include="-I$parentdir -I$parentdir/m4 -Im4"
+ 
+-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 a7abf00..65db61e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -220,6 +220,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:]
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
new file mode 100644
index 0000000..fa62962
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
new file mode 100644
index 0000000..2d76648
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/run/radiusd/radiusd.pid
+ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd /run/radiusd
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
new file mode 100644
index 0000000..8cbdae8
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb
new file mode 100644
index 0000000..2c39c4c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb
@@ -0,0 +1,239 @@
+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 = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0; \
+    file://freeradius \
+    file://volatiles.58_radiusd \
+    file://freeradius-enble-user-in-conf.patch \
+    file://freeradius-configure.ac-allow-cross-compilation.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://0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch \
+    file://0001-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \
+    file://0001-raddb-certs-Makefile-fix-the-occasional-verification.patch \
+    file://radiusd.service \
+    file://radiusd-volatiles.conf \
+"
+
+SRCREV = "d94c953ab9602a238433ba18533111b845fd8e9e"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/git"
+
+LDFLAGS_append_powerpc = " -latomic"
+LDFLAGS_append_mipsarch = " -latomic"
+LDFLAGS_append_armv5 = " -latomic"
+
+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_sql_mongo \
+        --without-rlm_sqlhpwippool \
+        --without-rlm_securid \
+        --without-rlm_unbound \
+        --without-rlm_python \
+        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 \
+                   openssl rlm-eap-fast rlm-eap-pwd \
+"
+
+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[python3] = "--with-rlm_python3 --with-rlm-python3-bin=${STAGING_BINDIR_NATIVE}/python3-native/python3 --with-rlm-python3-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python3,python3-native python3"
+PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c"
+PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl"
+PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast"
+PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd"
+
+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 python3-dir bbclasses for building rlm_perl and rlm_python
+# correctly.
+inherit cpan-base python3-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/
+    rm -rf ${D}/${localstatedir}/log/
+    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
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        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
+
+        install -d ${D}${sysconfdir}/tmpfiles.d/
+        install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf
+    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.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_python3.so* \
+    ${sysconfdir}/raddb/mods-config/python3 \
+    ${sysconfdir}/raddb/mods-available/python3 \
+"
+
+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} perl"
+
+CLEANBROKEN = "1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch
new file mode 100644
index 0000000..d7ca9ff
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch
@@ -0,0 +1,34 @@
+From 9d6b8321c5b46199baca907f3d42bdcaaf1958a8 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 23 May 2019 23:59:42 -0700
+Subject: [PATCH] remove AC_TRY_RUN
+
+AC_TRY_RUN doesn't work in cross compile env,
+use AC_COMPILE_IFELSE instead to fix below configure
+error:
+ | checking for usuable C++11 regex... configure: error: in `/builddir/tmp/work/core2-64-poky-linux/kea/1.5.0-r0/build':
+ | configure: error: cannot run test program while cross compiling
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c880b77..dd40c7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,7 +580,7 @@ AC_TRY_COMPILE([
+         AC_MSG_RESULT(no))
+ 
+ AC_MSG_CHECKING(for usuable C++11 regex)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <regex>
+ #include <iostream>
+ int main() {
+-- 
+2.21.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service
new file mode 100644
index 0000000..91aa2eb
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service
new file mode 100644
index 0000000..b851ea7
--- /dev/null
+++ b/cap/zx297520v3/sources/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@/lib/kea
+ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service
new file mode 100644
index 0000000..0f9f0ef
--- /dev/null
+++ b/cap/zx297520v3/sources/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@/lib/kea
+ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.7.7.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.7.7.bb
new file mode 100644
index 0000000..e25f8e6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.7.7.bb
@@ -0,0 +1,67 @@
+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=68d95543d2096459290a4e6b9ceccffa"
+
+DEPENDS += "kea-native"
+
+SRC_URI = "\
+    http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
+    file://0001-remove-AC_TRY_RUN.patch \
+    file://kea-dhcp4.service \
+    file://kea-dhcp6.service \
+    file://kea-dhcp-ddns.service \
+"
+SRC_URI[md5sum] = "4f8d1251fd41ef2e822a4eb3f0797d46"
+SRC_URI[sha256sum] = "0bba8b045672884a928ff4b2a8575ac5ba420eb6ba47a9338f1932bc38dcf866"
+
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+DEBUG_OPTIMIZATION_remove_mips = " -Og"
+DEBUG_OPTIMIZATION_append_mips = " -O"
+BUILD_OPTIMIZATION_remove_mips = " -Og"
+BUILD_OPTIMIZATION_append_mips = " -O"
+
+DEBUG_OPTIMIZATION_remove_mipsel = " -Og"
+DEBUG_OPTIMIZATION_append_mipsel = " -O"
+BUILD_OPTIMIZATION_remove_mipsel = " -Og"
+BUILD_OPTIMIZATION_append_mipsel = " -O"
+
+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
+    # replace abs_top_builddir to avoid introducing the build path
+    # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
+    find ${S} -type f -name *.sh.in | xargs sed -i  "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
+    sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
+}
+
+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-libs=-lboost_system,,boost,boost"
+
+FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
+FILES_${PN} += "${libdir}/hooks/*.so"
+
+BBCLASSEXTEND += "native"
+
+PARALLEL_MAKEINST = ""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.9.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.9.1.bb
new file mode 100644
index 0000000..79a380a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.9.1.bb
@@ -0,0 +1,31 @@
+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"
+SRC_URI[md5sum] = "19ce64012bc722ad61667372fa262382"
+SRC_URI[sha256sum] = "a692fd081c19e2cc045869ab721a4fb3d7571040849a4406c4042f735232414c"
+
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
new file mode 100644
index 0000000..5b27cfe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -0,0 +1,20 @@
+SUMMARY = "dumb networking library"
+HOMEPAGE = "http://code.google.com/p/libdnet/"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+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 multilib_script
+
+acpaths = "-I ./config/"
+
+BBCLASSEXTEND = "native"
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/dnet-config"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.6.bb
new file mode 100644
index 0000000..12ad397
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.6.bb
@@ -0,0 +1,43 @@
+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] = "1f629a43c166de2eca808f3e30aa961d"
+SRC_URI[sha256sum] = "66455e23a6190a30142cdc1113f7418158839331a9d8e6b0778631d077281770"
+
+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}/"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch
new file mode 100644
index 0000000..e33d8ea
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch
@@ -0,0 +1,38 @@
+From 54698856e5602bbd9d61e855814c854a013b4840 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Dec 2018 18:47:45 -0800
+Subject: [PATCH] Add OpenEmbedded cross compile case
+
+Upstream-Status: Submitted [https://github.com/miniupnp/miniupnp/pull/410]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ genconfig.sh | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/genconfig.sh
++++ b/genconfig.sh
+@@ -103,6 +103,12 @@ if [ -f ../shared/tomato_version ]; then
+ 	OS_VERSION="Tomato $TOMATO_VER"
+ fi
+ 
++# OpenEmbedded special case
++if [ -f ./os.openembedded ]; then
++	OS_NAME=OpenEmbedded
++	OS_VERSION=$(cat ./os.openembedded)
++fi
++
+ ${RM} ${CONFIGFILE}
+ 
+ echo "/* MiniUPnP Project" >> ${CONFIGFILE}
+@@ -346,6 +352,11 @@ case $OS_NAME in
+ 		echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
+ 		FW=iptables
+ 		;;
++	OpenEmbedded)
++		OS_URL=http://www.openembedded.org/
++		echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
++		FW=iptables
++		;;
+ 	AstLinux)
+ 		OS_URL=http://www.astlinux.org/
+ 		echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service
new file mode 100644
index 0000000..e7bfad0
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb
new file mode 100644
index 0000000..a630d27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb
@@ -0,0 +1,50 @@
+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=a1ed15843ce66639bcf9f109cf247870"
+
+inherit autotools gettext pkgconfig systemd
+
+DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
+
+SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz \
+           file://miniupnpd.service \
+           file://0001-Add-OpenEmbedded-cross-compile-case.patch \
+           "
+SRC_URI[md5sum] = "340789edd49c113afe37834cc901a1e8"
+SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00d2206d"
+
+IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
+
+do_configure_prepend() {
+   echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded
+}
+
+do_compile() {
+    cd ${S}
+    CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux config.h
+    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/miniupnpd_functions.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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch
new file mode 100644
index 0000000..93ff6bc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571]
+From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Wed, 22 Jan 2020 12:39:49 +0100
+Subject: [PATCH] Add dynamic symbols linking with cmake too
+
+Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+---
+ lib/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -89,6 +89,8 @@
+ 	OUTPUT_NAME mosquitto
+ 	VERSION ${VERSION}
+ 	SOVERSION 1
++	LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version
++	LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version"
+ )
+ 
+ install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch
new file mode 100644
index 0000000..1397fc6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch
@@ -0,0 +1,14 @@
+Description: Also install mqtt_protocol.h, as is done in Makefile
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+Bug-Debian: https://bugs.debian.org/951116
+Forwarded: https://github.com/eclipse/mosquitto/pull/1599
+Last-Update: 2020-02-15
+
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -114,4 +114,4 @@
+ 	install(TARGETS libmosquitto_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ endif (WITH_STATIC_LIBRARIES)
+ 
+-install(FILES mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++install(FILES mqtt_protocol.h mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init
new file mode 100644
index 0000000..9d5963c
--- /dev/null
+++ b/cap/zx297520v3/sources/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} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; 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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.10.bb
new file mode 100644
index 0000000..31b5f67
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.10.bb
@@ -0,0 +1,87 @@
+SUMMARY = "Open source MQTT implementation"
+DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \
+that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \
+5, providing both an MQTT broker and several command-line clients. 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://mosquitto.init \
+           file://1571.patch \
+           file://install-protocol.patch \
+"
+
+SRC_URI[md5sum] = "960f963b81b7f93982d7511cd28082e5"
+SRC_URI[sha256sum] = "92d1807717f0f6d57d1ac1207ffdb952e8377e916c7b0bb4718f745239774232"
+
+inherit systemd update-rc.d useradd cmake
+
+PACKAGECONFIG ??= "ssl dlt websockets \
+                  ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \
+                  "
+
+PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares"
+PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC_OFF,openssl"
+PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd"
+PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets"
+PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon"
+
+EXTRA_OECMAKE = " \
+    -DWITH_BUNDLED_DEPS=OFF \
+    -DWITH_ADNS=ON \
+"
+
+do_install_append() {
+    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}/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.*"
+
+FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.*"
+
+FILES_${PN}-clients = "${bindir}/mosquitto_pub \
+                       ${bindir}/mosquitto_sub \
+                       ${bindir}/mosquitto_rr \
+"
+
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb
new file mode 100644
index 0000000..8444f0b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.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 = "1749fd7b039165a91b8d556b4df18e3e632ad830"
+
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb
new file mode 100644
index 0000000..77be27f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging"
+DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery."
+HOMEPAGE = "https://github.com/nanomsg/nng"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a19b15be6e844b39a54de2ef665bd6de"
+
+SECTION = "libs/networking"
+
+SRCREV = "53ae1a5ab37fdfc9ad5c236df3eaf4dd63f0fee9"
+
+SRC_URI = "git://github.com/nanomsg/nng.git;branch=v1.2.x"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
new file mode 100644
index 0000000..9f123c7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
@@ -0,0 +1,59 @@
+SUMMARY = "The network configuration abstraction renderer"
+DESCRIPTION = "Netplan is a utility for easily configuring networking on a \
+linux system. You simply create a YAML description of the required network \
+interfaces and what each should be configured to do. From this description \
+Netplan will generate all the necessary configuration for your chosen renderer \
+tool."
+HOMEPAGE = "https://netplan.io"
+SECTION = "net/misc"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+S = "${WORKDIR}/git"
+SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b"
+PV = "0.98+git${SRCPV}"
+
+SRC_URI = " \
+        git://github.com/CanonicalLtd/netplan.git \
+"
+
+DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"
+
+inherit pkgconfig systemd
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+EXTRA_OEMAKE = "generate"
+EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}"
+
+do_install() {
+	install -d ${D}${sbindir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan
+	install -m 755 ${S}/generate ${D}${base_libdir}/netplan/
+	install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan
+	install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli
+	install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands
+	install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/
+	ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan
+
+	install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators
+	install -m 644 ${S}/src/netplan-wpa@.service ${D}${systemd_unitdir}/system/
+	ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services
+		install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan
+		install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d
+		install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services
+	fi
+}
+
+SYSTEMD_SERVICE_${PN} = "netplan-wpa@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGES += "${PN}-dbus"
+
+FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}"
+FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.12.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.12.bb
new file mode 100644
index 0000000..d455a0f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.12.bb
@@ -0,0 +1,52 @@
+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] = "e8b1210011ece18d0278310fbff45af5"
+SRC_URI[sha256sum] = "0efda8878aaf0e6eb5071a053aea5d7f9d42aac097b3ff89e7cbc9233f815318"
+
+S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
+
+# meta-gnome in layers is required using gnome:
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
+
+do_configure_append() {
+    # network-manager-openvpn.metainfo.xml is created in source folder but
+    # compile expects it in build folder. As long as nobody comes up with a
+    # better solution just support build:
+    if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
+        mkdir -p ${B}/appdata
+        cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
+    fi
+}
+
+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} += " \
+    ${datadir}/dbus-1 \
+    ${libdir}/NetworkManager/*.so \
+    ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
+"
+
+FILES_${PN}-staticdev += " \
+    ${libdir}/NetworkManager/*.a \
+"
+
+RDEPENDS_${PN} = " \
+    networkmanager \
+    openvpn \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
new file mode 100644
index 0000000..19c8c74
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
@@ -0,0 +1,22 @@
+From 9bcf4c81a559d1e7deac47b2e510d7f1e5837a02 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 65ceffb..ad4b0fc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -561,7 +561,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
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch
new file mode 100644
index 0000000..446637b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch
@@ -0,0 +1,74 @@
+From 9eab96351a726e9ce6a15d158f743e35d73a8900 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
+
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+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  | 11 -----------
+ configure.ac |  5 -----
+ 2 files changed, 16 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d5cbcf5..2a1819a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1473,9 +1473,7 @@ libnm/libnm.typelib: libnm/libnm.gir
+ INTROSPECTION_GIRS += libnm/NM-1.0.gir
+ 
+ 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
+ 
+@@ -4236,18 +4234,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)
+-	$(srcdir)/tools/check-settings-docs.sh "$(srcdir)" "$(builddir)" "$(clients_common_settings_doc_h)"
+-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 ad4b0fc..0092092 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1201,11 +1201,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])
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
new file mode 100644
index 0000000..c23fc30
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
@@ -0,0 +1,165 @@
+From e7ed91c48e1a07527a860637a7865eb67ce34cf3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 2 Apr 2019 01:34:35 +0200
+Subject: [PATCH] Fix build with musl - systemd specific
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Networkmanager imported some code from systemd. This requires some adjustments
+for musl.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+
+---
+ shared/systemd/src/basic/in-addr-util.c |  1 +
+ shared/systemd/src/basic/process-util.c |  9 +++++++++
+ shared/systemd/src/basic/socket-util.h  |  6 ++++++
+ shared/systemd/src/basic/sort-util.h    | 27 ++++---------------------
+ shared/systemd/src/basic/stdio-util.h   |  2 ++
+ shared/systemd/src/basic/string-util.h  |  5 +++++
+ 6 files changed, 27 insertions(+), 23 deletions(-)
+
+diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c
+index 91d687c..8388304 100644
+--- a/shared/systemd/src/basic/in-addr-util.c
++++ b/shared/systemd/src/basic/in-addr-util.c
+@@ -15,6 +15,7 @@
+ #include "in-addr-util.h"
+ #include "macro.h"
+ #include "parse-util.h"
++#include "string-util.h"
+ #include "random-util.h"
+ #include "strxcpyx.h"
+ #include "util.h"
+diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c
+index 1456167..42f51a0 100644
+--- a/shared/systemd/src/basic/process-util.c
++++ b/shared/systemd/src/basic/process-util.c
+@@ -17,6 +17,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>
+@@ -1123,11 +1126,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 _weak_;
++#endif
+ 
+ pid_t getpid_cached(void) {
+         static bool installed = false;
+@@ -1156,7 +1161,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;
+diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h
+index a0886e0..da47d14 100644
+--- a/shared/systemd/src/basic/socket-util.h
++++ b/shared/systemd/src/basic/socket-util.h
+@@ -14,6 +14,12 @@
+ #include <sys/types.h>
+ #include <sys/un.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_socket.h"
+ #include "sparse-endian.h"
+diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h
+index e029f86..1e8b6e1 100644
+--- a/shared/systemd/src/basic/sort-util.h
++++ b/shared/systemd/src/basic/sort-util.h
+@@ -5,15 +5,10 @@
+ 
+ #include "macro.h"
+ 
+-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+-                 __compar_d_fn_t compar, void *arg);
+-
+-#define typesafe_bsearch_r(k, b, n, func, userdata)                     \
+-        ({                                                              \
+-                const typeof(b[0]) *_k = k;                             \
+-                int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \
+-                xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \
+-        })
++#if !defined(__GLIBC__)
++typedef int (*__compar_fn_t) (const void*, const void*);
++typedef __compar_fn_t comparison_fn_t;
++#endif
+ 
+ /**
+  * Normal bsearch requires base to be nonnull. Here were require
+@@ -54,17 +49,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+                 int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
+                 qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
+         })
+-
+-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
+-        if (nmemb <= 1)
+-                return;
+-
+-        assert(base);
+-        qsort_r(base, nmemb, size, compar, userdata);
+-}
+-
+-#define typesafe_qsort_r(p, n, func, userdata)                          \
+-        ({                                                              \
+-                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
+-                qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
+-        })
+diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
+index c3b9448..e80a938 100644
+--- a/shared/systemd/src/basic/stdio-util.h
++++ b/shared/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/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h
+index 04cc82b..2cf589a 100644
+--- a/shared/systemd/src/basic/string-util.h
++++ b/shared/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) {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch
new file mode 100644
index 0000000..196a335
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch
@@ -0,0 +1,116 @@
+From 877fbb4e848629ff57371b5bdb0d56369abe9d81 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 8 Apr 2019 23:10:43 +0200
+Subject: [PATCH] Fix build with musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The build issues caused by definition conflicts musl vs linux-libc headers
+(error: redefinition of ...) can be reduced to two headers:
+
+1. netinet/if_ether.h <-> linux/if_ether.h: linux-libc header plays well with
+   glibc and musl headers in case libc's variant (netinet/if_ether.h) is
+   included BEFORE linux variant [1]. We add include at two positions:
+   1. shared/nm-default.h: This is a global which used for networkmanager and
+      is included at the very beginning of all c-files.
+   2. libnm-core/nm-utils.h: This file makes it into installation and is used
+      by dependent packages as network-manager-applet
+2. net/if_arp. <-> linux/if_ether.h: linux-libc: Unfortunaly these files do
+   not play together in harmony. Therefore the libc variant is included early in
+   shared/nm-default.h and occurances linux/if_arp.h are removed.
+
+Note:
+Be aware that this is still nasty business: We have to trust that musl headers
+define same signatures as linux would do - just because musl-makers consider
+linux-libc headers 'notoriously broken for userspace' [2] (search for
+'error: redefinition of').
+
+[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280440.html
+[2] https://wiki.musl-libc.org/faq.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+
+---
+ clients/tui/nmt-device-entry.c   | 1 -
+ libnm-core/nm-utils.h            | 4 ++++
+ shared/nm-default.h              | 3 +++
+ src/devices/nm-device.c          | 2 +-
+ src/platform/nm-linux-platform.c | 1 -
+ 5 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c
+index 4ab5932..915248c 100644
+--- a/clients/tui/nmt-device-entry.c
++++ b/clients/tui/nmt-device-entry.c
+@@ -26,7 +26,6 @@
+ #include "nmt-device-entry.h"
+ 
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+ 
+ #include "nmtui.h"
+ 
+diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
+index 5418a1e..f492da6 100644
+--- a/libnm-core/nm-utils.h
++++ b/libnm-core/nm-utils.h
+@@ -10,6 +10,10 @@
+ #error "Only <NetworkManager.h> can be included directly."
+ #endif
+ 
++/* include as early as possible for musl */
++#include <netinet/if_ether.h>
++/* #include <net/if_arp.h> - uncoment for broken dependents?? */
++
+ #include <glib.h>
+ 
+ #include <netinet/in.h>
+diff --git a/shared/nm-default.h b/shared/nm-default.h
+index ace6ede..25357da 100644
+--- a/shared/nm-default.h
++++ b/shared/nm-default.h
+@@ -182,6 +182,9 @@
+ #endif
+ 
+ #include <stdlib.h>
++/* include as early as possible for musl */
++#include <netinet/if_ether.h>
++#include <net/if_arp.h>
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 3bbc975..4e8a3f6 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -9,6 +9,7 @@
+ #include "nm-device.h"
+ 
+ #include <netinet/in.h>
++#include <net/if.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <signal.h>
+@@ -17,7 +18,6 @@
+ #include <arpa/inet.h>
+ #include <fcntl.h>
+ #include <linux/if_addr.h>
+-#include <linux/if_arp.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/pkt_sched.h>
+ 
+diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
+index 7abe4df..9f53147 100644
+--- a/src/platform/nm-linux-platform.c
++++ b/src/platform/nm-linux-platform.c
+@@ -14,7 +14,6 @@
+ #include <libudev.h>
+ #include <linux/fib_rules.h>
+ #include <linux/ip.h>
+-#include <linux/if_arp.h>
+ #include <linux/if_bridge.h>
+ #include <linux/if_link.h>
+ #include <linux/if_tun.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch
new file mode 100644
index 0000000..6225282
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch
@@ -0,0 +1,61 @@
+From aff5cded8847f3eee59f5cec22afb8630d401a85 Mon Sep 17 00:00:00 2001
+From: Adrian Freihofer <adrian.freihofer@siemens.com>
+Date: Sat, 7 Mar 2020 14:22:36 +0100
+Subject: [PATCH 3/4] Fix build with musl for n-dhcp4
+
+---
+ shared/n-dhcp4/src/n-dhcp4-c-probe.c | 8 ++++++++
+ shared/n-dhcp4/src/n-dhcp4-private.h | 4 ++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c
+index e4477a7..75713c8 100644
+--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c
++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c
+@@ -360,8 +360,12 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe
+         seed16v[1] = (u64 >> 16) ^ (u64 >>  0);
+         seed16v[2] = (u64 >> 32) ^ (u64 >> 16);
+ 
++#ifdef __GLIBC__
+         r = seed48_r(seed16v, &config->entropy);
+         c_assert(!r);
++#else
++        memcpy(config->entropy, seed16v, sizeof seed16v);
++#endif
+ }
+ 
+ /**
+@@ -375,10 +379,14 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe
+  */
+ uint32_t n_dhcp4_client_probe_config_get_random(NDhcp4ClientProbeConfig *config) {
+         long int result;
++#ifdef __GLIBC__
+         int r;
+ 
+         r = mrand48_r(&config->entropy, &result);
+         c_assert(!r);
++#else
++        result = jrand48(config->entropy);
++#endif
+ 
+         return result;
+ };
+diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h
+index 436ee80..ffcb4b2 100644
+--- a/shared/n-dhcp4/src/n-dhcp4-private.h
++++ b/shared/n-dhcp4/src/n-dhcp4-private.h
+@@ -267,7 +267,11 @@ struct NDhcp4ClientProbeConfig {
+         bool inform_only;
+         bool init_reboot;
+         struct in_addr requested_ip;
++#ifdef __GLIBC__
+         struct drand48_data entropy;    /* entropy pool */
++#else
++        unsigned short entropy[3];      /* entropy pool */
++#endif
+         uint64_t ms_start_delay;        /* max ms to wait before starting probe */
+         NDhcp4ClientProbeOption *options[UINT8_MAX + 1];
+         int8_t request_parameters[UINT8_MAX + 1];
+-- 
+2.24.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch
new file mode 100644
index 0000000..55aa4d2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch
@@ -0,0 +1,26 @@
+From 80c7d3391510993cba1a7499bf33a5b2b115280d Mon Sep 17 00:00:00 2001
+From: Adrian Freihofer <adrian.freihofer@siemens.com>
+Date: Sat, 7 Mar 2020 14:24:01 +0100
+Subject: [PATCH 4/4] Fix build with musl - systemd specific
+
+---
+ src/systemd/src/libsystemd-network/sd-dhcp6-client.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
+index e1150f9..2c63bac 100644
+--- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
+@@ -7,7 +7,9 @@
+ 
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#ifdef __GLIBC__  /* musl supplies full set of userspace headers */
+ #include <linux/if_arp.h>
++#endif
+ #include <linux/if_infiniband.h>
+ 
+ #include "sd-dhcp6-client.h"
+-- 
+2.24.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd
new file mode 100644
index 0000000..4fdd80d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd
@@ -0,0 +1,110 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          network-manager
+# Required-Start:    $remote_fs dbus udev
+# Required-Stop:     $remote_fs dbus udev
+# Should-Start:      $syslog
+# Should-Stop:       $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: network connection manager
+# Description:       Daemon for automatically switching network
+#            connections to the best available connection.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="network connection manager"
+NAME="NetworkManager"
+
+DAEMON=/usr/sbin/$NAME
+
+PIDFILE=/run/$NAME/$NAME.pid
+
+SCRIPTNAME=/etc/init.d/network-manager
+
+. /etc/init.d/functions || exit 1
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+log_daemon_msg() {
+    echo -n $*
+}
+
+log_end_msg() {
+    if [ $1 -eq 0 ]; then
+        success
+    else
+        failure
+    fi
+    echo
+}
+
+log_progress_msg () {
+    if [ -z "${1:-}" ]; then
+        return 1
+    fi
+    echo -n " $@"
+}
+
+#
+#   Function that starts the daemon/service.
+#
+d_start() {
+    start-stop-daemon --start --quiet --pidfile $PIDFILE \
+        --exec $DAEMON -- $DAEMON_OPTS
+}
+
+#
+#   Function that stops the daemon/service.
+#
+d_stop() {
+    start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
+        --exec $DAEMON
+}
+
+d_reload() {
+    start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \
+        --exec $DAEMON
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC" "$NAME"
+    d_start
+    case "$?" in
+        0) log_end_msg 0 ;;
+        1) log_progress_msg "already started"
+           log_end_msg 0 ;;
+        *) log_end_msg 1 ;;
+    esac
+    ;;
+  stop)
+    log_daemon_msg "Stopping $DESC" "$NAME"
+    d_stop
+    case "$?" in
+        0) log_end_msg 0 ;;
+        1) log_progress_msg "already stopped"
+           log_end_msg 0 ;;
+        *) log_end_msg 1 ;;
+    esac
+    ;;
+  reload|force-reload)
+    log_daemon_msg "Reloading $DESC" "$NAME"
+    d_reload
+    log_end_msg $?
+    ;;
+  restart)
+    $0 stop
+    $0 start
+    ;;
+  status)
+    status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
+    ;;
+  *)
+    echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb
new file mode 100644
index 0000000..33a2b7c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb
@@ -0,0 +1,166 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
+"
+
+DEPENDS = " \
+    intltool-native \
+    libxslt-native \
+    libnl \
+    libgudev \
+    util-linux \
+    libndp \
+    libnewt \
+    jansson \
+    curl \
+"
+
+inherit gnomebase gettext update-rc.d systemd bash-completion vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even
+
+SRC_URI = " \
+    ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
+    file://${BPN}.initd \
+    file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
+    file://0002-Do-not-create-settings-settings-property-documentati.patch \
+"
+SRC_URI_append_libc-musl = " \
+    file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
+    file://musl/0002-Fix-build-with-musl.patch \
+    file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \
+    file://musl/0004-Fix-build-with-musl-systemd-specific.patch \
+"
+SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77"
+
+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 \
+"
+
+# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
+# avoids:
+# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
+CFLAGS_append_libc-musl = " \
+    -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', 'bluez5', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \
+"
+PACKAGECONFIG[systemd] = " \
+    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \
+    --without-systemdsystemunitdir, \
+"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,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[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf"
+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"
+PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no"
+
+PACKAGES =+ " \
+  ${PN}-nmtui ${PN}-nmtui-doc \
+  ${PN}-adsl ${PN}-cloud-setup \
+"
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup"
+
+FILES_${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so"
+
+FILES_${PN}-cloud-setup = " \
+    ${libexecdir}/nm-cloud-setup \
+    ${systemd_system_unitdir}/nm-cloud-setup.service \
+    ${systemd_system_unitdir}/nm-cloud-setup.timer \
+    ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
+    ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
+"
+ALLOW_EMPTY_${PN}-cloud-setup = "1"
+SYSTEMD_SERVICE_${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
+
+FILES_${PN} += " \
+    ${libexecdir} \
+    ${libdir}/NetworkManager/${PV}/*.so \
+    ${libdir}/NetworkManager \
+    ${nonarch_libdir}/NetworkManager/conf.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
+    ${nonarch_libdir}/NetworkManager/VPN \
+    ${nonarch_libdir}/NetworkManager/system-connections \
+    ${datadir}/polkit-1 \
+    ${datadir}/dbus-1 \
+    ${nonarch_base_libdir}/udev/* \
+    ${systemd_system_unitdir} \
+    ${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* \
+"
+
+INITSCRIPT_NAME = "network-manager"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}"
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
+ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
+
+do_install_append() {
+    install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
+
+    rm -rf ${D}/run ${D}${localstatedir}/run
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        # For read-only filesystem, do not create links during bootup
+        ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
+
+        # systemd v210 and newer do not need this rule file
+        rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
+    fi
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch
new file mode 100644
index 0000000..623ec10
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch
@@ -0,0 +1,71 @@
+From de78bcac5e1fd13de0371c8e14b062b8786ade56 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Sun, 2 Feb 2020 15:53:05 +0000
+Subject: [PATCH] trojans/tncc-wrapper.py: convert to python3
+
+Use 2to3 to convert the script to python3.
+
+Upstream-Status: Pending
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ trojans/tncc-wrapper.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/trojans/tncc-wrapper.py b/trojans/tncc-wrapper.py
+index 0d4587bf..1a9a1f4d 100755
+--- a/trojans/tncc-wrapper.py
++++ b/trojans/tncc-wrapper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2
++#!/usr/bin/python3
+ 
+ # Lifted from Russ Dill's juniper-vpn-wrap.py, thus:
+ #
+@@ -18,19 +18,19 @@
+ 
+ import subprocess
+ import mechanize
+-import cookielib
++import http.cookiejar
+ import getpass
+ import sys
+ import os
+ import zipfile
+-import urllib
++import urllib.request, urllib.parse, urllib.error
+ import socket
+ import ssl
+ import errno
+ import argparse
+ import atexit
+ import signal
+-import ConfigParser
++import configparser
+ import time
+ import binascii
+ import hmac
+@@ -39,7 +39,7 @@ import hashlib
+ def mkdir_p(path):
+     try:
+         os.mkdir(path)
+-    except OSError, exc:
++    except OSError as exc:
+         if exc.errno == errno.EEXIST and os.path.isdir(path):
+             pass
+         else:
+@@ -64,9 +64,9 @@ class Tncc:
+             if zipfile.ZipFile(self.tncc_jar, 'r').testzip() is not None:
+                 raise Exception()
+         except:
+-            print 'Downloading tncc.jar...'
++            print('Downloading tncc.jar...')
+             mkdir_p(os.path.expanduser('~/.juniper_networks'))
+-            urllib.urlretrieve('https://' + self.vpn_host
++            urllib.request.urlretrieve('https://' + self.vpn_host
+                                + '/dana-cached/hc/tncc.jar', self.tncc_jar)
+ 
+         with zipfile.ZipFile(self.tncc_jar, 'r') as jar:
+-- 
+2.20.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb
new file mode 100644
index 0000000..597c192
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Open client for Cisco AnyConnect VPN"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad"
+
+SRC_URI = " \
+    git://git.infradead.org/users/dwmw2/openconnect.git \
+    file://0001-trojans-tncc-wrapper.py-convert-to-python3.patch \
+"
+SRCREV = "ea73851969ae7a6ea54fdd2d2b8c94776af24b2a"
+
+DEPENDS = "vpnc libxml2 krb5 gettext-native"
+RDEPENDS_${PN} = "bash python3-core vpnc-script"
+
+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,"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \
+                 --disable-static"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.1.bb
new file mode 100644
index 0000000..91a6edd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.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] = "f638d854a3639fb37c0e06d1092a771e"
+SRC_URI[sha256sum] = "aef1e34d98d7bec7cc368e0ca0f2e97493f9b5ebe6d7103f8f6460cfca3dc6fc"
+
+PYPI_PACKAGE = "python-networkmanager"
+inherit pypi setuptools3
+
+RDEPENDS_${PN} = "networkmanager python3-dbus python3-six"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
new file mode 100644
index 0000000..cd4db12
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch
new file mode 100644
index 0000000..f35e96a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch
@@ -0,0 +1,31 @@
+It fails to produce common.o when system load is high:
+
+| In file included from common.c:57:
+| ../include/defs.h:49:10: fatal error: y.tab.h: No such file or directory
+|    49 | #include "y.tab.h"
+|       |          ^~~~~~~~~
+| compilation terminated.
+
+Make $(COMMONOBJS) which include common.o to depends on related header files
+and y.tab.h to fix the parallel build failure.
+
+Upstream-Status: Inappropriate [no upstream]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/Makefile.real | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.real b/src/Makefile.real
+index e0f0dfc..53d4944 100644
+--- a/src/Makefile.real
++++ b/src/Makefile.real
+@@ -41,7 +41,7 @@ $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
+ $(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
+ 	$(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
+ 
+-$(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
++$(COMMONOBJS) $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
+ 
+ y.tab.h: gram.c
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
new file mode 100644
index 0000000..37b3eeb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb
@@ -0,0 +1,44 @@
+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 \
+            file://rdist-6.1.5-fix-parallel-build.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/
+COMPATIBLE_HOST_libc-musl = 'null'
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
new file mode 100644
index 0000000..e3134e4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -0,0 +1,19 @@
+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}"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch
new file mode 100644
index 0000000..80cdd39
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch
@@ -0,0 +1,103 @@
+From 1e8d31c138395122df4cc2a3e0edd6cd3fad736c Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Tue, 28 Apr 2020 02:05:33 +0200
+Subject: [PATCH] Add options to configure the use of libbsd
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ buildtools/wafsamba/wscript  |  7 +++++++
+ lib/crypto/wscript_configure |  2 +-
+ lib/replace/wscript          | 29 +++++++++++++++--------------
+ lib/texpect/wscript          |  7 ++++++-
+ 4 files changed, 29 insertions(+), 16 deletions(-)
+
+diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
+index 7b8fb01..a8e4b0a 100644
+--- a/buildtools/wafsamba/wscript
++++ b/buildtools/wafsamba/wscript
+@@ -88,6 +88,13 @@ def options(opt):
+                    help=("Disable use of gettext"),
+                    action="store_true", dest='disable_gettext', default=False)
+ 
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
+     gr = opt.option_group('developer options')
+ 
+     gr.add_option('-C',
+diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure
+index 09dfe04..e871718 100644
+--- a/lib/crypto/wscript_configure
++++ b/lib/crypto/wscript_configure
+@@ -2,7 +2,7 @@
+ from waflib import Options
+ from waflib import Errors, Logs
+ 
+-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
++if not Options.options.enable_libbsd or not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
+     checklibc=True):
+     conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
+                         checklibc=True)
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 0020d2a..cd9228f 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -407,20 +407,21 @@ def configure(conf):
+ 
+     strlcpy_in_bsd = False
+ 
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                                   checklibc=True):
++                strlcpy_in_bsd = True
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+diff --git a/lib/texpect/wscript b/lib/texpect/wscript
+index e14c048..a91de59 100644
+--- a/lib/texpect/wscript
++++ b/lib/texpect/wscript
+@@ -1,7 +1,12 @@
+ #!/usr/bin/env python
++from waflib import Options
+ 
+ def configure(conf):
+-    conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h')
++    hdrs = 'pty.h util.h'
++    if Options.options.enable_libbsd:
++        hdrs += ' bsd/libutil.h'
++    hdrs += ' libutil.h'
++    conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers=hdrs)
+ 
+ def build(bld):
+     bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util replace', install=False)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch
new file mode 100644
index 0000000..de7f311
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch
@@ -0,0 +1,30 @@
+From 3a935c638605bfb392ca7780d22c08c1a0a71e71 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 5 Sep 2019 21:37:33 -0700
+Subject: [PATCH 1/2] lib/replace/wscript: Avoid generating nested main
+ function
+
+clang is not happy when it sees another main nested inside the main
+function and fails the test for prctl syscall, therefore avoid adding
+implicit main() here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/replace/wscript | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index a7fd25d..d6767fc 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -137,6 +137,7 @@ def configure(conf):
+                     }
+                     ''',
+                     'HAVE_PRCTL',
++                    addmain=False,
+                     headers='sys/prctl.h',
+                     msg='Checking for prctl syscall')
+ 
+-- 
+2.23.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch
new file mode 100644
index 0000000..2dbabda
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch
@@ -0,0 +1,96 @@
+From 9aba5ac17bb822f91f6b214f5b82dd1eb8c47616 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Jul 2020 22:42:09 -0700
+Subject: [PATCH] nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
+
+glibc 2.32 will define these varibles [1] which results in conflicts
+with these static function names, therefore prefix these function names
+with samba_ to avoid it
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/-/merge_requests/1477]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ nsswitch/nsstest.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/nsswitch/nsstest.c b/nsswitch/nsstest.c
+index 6d92806..46f9679 100644
+--- a/nsswitch/nsstest.c
++++ b/nsswitch/nsstest.c
+@@ -137,7 +137,7 @@ static struct passwd *nss_getpwuid(uid_t uid)
+ 	return &pwd;
+ }
+ 
+-static void nss_setpwent(void)
++static void samba_nss_setpwent(void)
+ {
+ 	NSS_STATUS (*_nss_setpwent)(void) =
+ 		(NSS_STATUS(*)(void))find_fn("setpwent");
+@@ -152,7 +152,7 @@ static void nss_setpwent(void)
+ 	}
+ }
+ 
+-static void nss_endpwent(void)
++static void samba_nss_endpwent(void)
+ {
+ 	NSS_STATUS (*_nss_endpwent)(void) =
+ 		(NSS_STATUS (*)(void))find_fn("endpwent");
+@@ -284,7 +284,7 @@ again:
+ 	return &grp;
+ }
+ 
+-static void nss_setgrent(void)
++static void samba_nss_setgrent(void)
+ {
+ 	NSS_STATUS (*_nss_setgrent)(void) =
+ 		(NSS_STATUS (*)(void))find_fn("setgrent");
+@@ -299,7 +299,7 @@ static void nss_setgrent(void)
+ 	}
+ }
+ 
+-static void nss_endgrent(void)
++static void samba_nss_endgrent(void)
+ {
+ 	NSS_STATUS (*_nss_endgrent)(void) =
+ 		(NSS_STATUS (*)(void))find_fn("endgrent");
+@@ -396,7 +396,7 @@ static void nss_test_users(void)
+ {
+ 	struct passwd *pwd;
+ 
+-	nss_setpwent();
++	samba_nss_setpwent();
+ 	/* loop over all users */
+ 	while ((pwd = nss_getpwent())) {
+ 		printf("Testing user %s\n", pwd->pw_name);
+@@ -418,14 +418,14 @@ static void nss_test_users(void)
+ 		printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
+ 		printf("\n");
+ 	}
+-	nss_endpwent();
++	samba_nss_endpwent();
+ }
+ 
+ static void nss_test_groups(void)
+ {
+ 	struct group *grp;
+ 
+-	nss_setgrent();
++	samba_nss_setgrent();
+ 	/* loop over all groups */
+ 	while ((grp = nss_getgrent())) {
+ 		printf("Testing group %s\n", grp->gr_name);
+@@ -446,7 +446,7 @@ static void nss_test_groups(void)
+ 		printf("getgrgid: "); print_group(grp);
+ 		printf("\n");
+ 	}
+-	nss_endgrent();
++	samba_nss_endgrent();
+ }
+ 
+ static void nss_test_errors(void)
+-- 
+2.27.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch
new file mode 100644
index 0000000..fb12a10
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch
@@ -0,0 +1,42 @@
+From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 27 Jun 2019 11:09:47 +0800
+Subject: [PATCH] samba: fix musl lib without innetgr
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/util/access.c | 2 +-
+ source3/auth/user_util.c | 2 +-
+ 2 file changed, 2 insertion(+), 2 deletion(-)
+
+diff --git a/lib/util/access.c b/lib/util/access.c
+index 7da0573..b94949e 100644
+--- a/lib/util/access.c
++++ b/lib/util/access.c
+@@ -112,7 +112,7 @@ static bool string_match(const char *tok,const char *s)
+ 			return true;
+ 		}
+ 	} else if (tok[0] == '@') { /* netgroup: look it up */
+-#ifdef	HAVE_NETGROUP
++#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
+ 		DATA_BLOB tmp;
+ 		char *mydomain = NULL;
+ 		char *hostname = NULL;
+diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c
+index a76b5d4..30f523d 100644
+--- a/source3/auth/user_util.c
++++ b/source3/auth/user_util.c
+@@ -148,7 +148,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char
+ 
+ bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
+ {
+-#ifdef HAVE_NETGROUP
++#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
+ 	static char *my_yp_domain = NULL;
+ 	char *lowercase_user = NULL;
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch
new file mode 100644
index 0000000..23b35a8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch
@@ -0,0 +1,62 @@
+From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 25 Jan 2019 15:00:59 +0800
+Subject: [PATCH] waf: add support of cross_compile
+
+After upgrade, waf also upgraded 
+
+on 1.5.19, for cross_compile, subprocess.Popen is set to be
+samba_cross.cross_Popen, which will not execute testprog on
+host, but only read result from cross-answers.txt which is
+passed by option --cross-answer
+
+part of old code:
+    args = Utils.to_list(kw.get('exec_args', []))
+    proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE)
+
+but on new version, exec_args is not used and cause do_configure
+failed with Exec format error
+
+fixed by append cross anser related args to cmd
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ third_party/waf/waflib/Tools/c_config.py | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
+index 7608215..767cf33 100644
+--- a/third_party/waf/waflib/Tools/c_config.py
++++ b/third_party/waf/waflib/Tools/c_config.py
+@@ -660,20 +660,21 @@ class test_exec(Task.Task):
+ 	"""
+ 	color = 'PINK'
+ 	def run(self):
++		args = self.generator.bld.kw.get('exec_args', [])
+ 		if getattr(self.generator, 'rpath', None):
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
+-			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args)
++			else: 
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args)
+ 		else:
+ 			env = self.env.env or {}
+ 			env.update(dict(os.environ))
+ 			for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
+ 				env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
+ 			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env)
+ 
+ @feature('test_exec')
+ @after_method('apply_link')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch
new file mode 100644
index 0000000..6fc8493
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch
@@ -0,0 +1,58 @@
+From c62a6f32ab965de2ec77a614f20f04568116835b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 5 Sep 2019 21:39:05 -0700
+Subject: [PATCH 2/2] util_sec.c: Move __thread variable to global scope
+
+Make clang happy otherwise it complains about variable scope
+
+fixes
+
+source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage
+        } __thread cache;
+          ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ source3/lib/util_sec.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
+index 9408269..7390318 100644
+--- a/source3/lib/util_sec.c
++++ b/source3/lib/util_sec.c
+@@ -444,6 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid)
+ 	assert_gid(gid, gid);
+ }
+ 
++#ifdef HAVE___THREAD
++	struct cache_t {
++		bool active;
++		uid_t uid;
++		gid_t gid;
++		size_t setlen;
++		uintptr_t gidset;
++	};
++
++static __thread struct cache_t cache;
++#endif
+ /**********************************************************
+  Function to set thread specific credentials. Leave
+  saved-set uid/gid alone.Must be thread-safe code.
+@@ -461,14 +472,6 @@ int set_thread_credentials(uid_t uid,
+ 	 * available.
+ 	 */
+ #ifdef HAVE___THREAD
+-	static struct {
+-		bool active;
+-		uid_t uid;
+-		gid_t gid;
+-		size_t setlen;
+-		uintptr_t gidset;
+-	} __thread cache;
+-
+ 	if (cache.active &&
+ 	    cache.uid == uid &&
+ 	    cache.gid == gid &&
+-- 
+2.23.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 0000000..3f2921e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
@@ -0,0 +1,67 @@
+From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 25 Jun 2019 14:25:08 +0800
+Subject: [PATCH] do not import target module while cross compile
+
+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>
+
+update to version 4.10.5, and switch to python3
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++--------
+ 1 file changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
+index 60ce7da..5468a36 100644
+--- a/buildtools/wafsamba/samba_bundled.py
++++ b/buildtools/wafsamba/samba_bundled.py
+@@ -4,6 +4,7 @@ import sys
+ from waflib import Build, Options, Logs
+ from waflib.Configure import conf
+ from wafsamba import samba_utils
++import importlib.util, os
+ 
+ def PRIVATE_NAME(bld, name, private_extension, private_library):
+     '''possibly rename a library to include a bundled extension'''
+@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+     # versions
+     minversion = minimum_library_version(conf, libname, minversion)
+ 
+-    try:
+-        m = __import__(modulename)
+-    except ImportError:
+-        found = False
+-    else:
++    # Find module in PYTHONPATH
++    spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]])
++    if spec:
+         try:
+-            version = m.__version__
+-        except AttributeError:
++            module = importlib.util.module_from_spec(spec)
++            spec.loader.load_module(module)
++        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.' % (spec.name))
++                found = True
+         else:
+-            found = tuplize_version(version) >= tuplize_version(minversion)
++            try:
++                version = module.__version__
++            except AttributeError:
++                found = False
++            else:
++                found = tuplize_version(version) >= tuplize_version(minversion)
+     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)
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
new file mode 100644
index 0000000..46a6f06
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
@@ -0,0 +1,50 @@
+From 87bc8e7eafc7d12a1d3a143ebb9e43cf5fbafb72 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 20 Jun 2019 14:11:16 +0800
+Subject: [PATCH] Add config option without-valgrind
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+Update patch to version 4.10.5
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 5 +++--
+ wscript             | 4 ++++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index a7fd25d..a19ae68 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -110,8 +110,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')
+-    conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++    if not Options.options.disable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++        conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.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/wscript b/wscript
+index e38a8e9..38b7230 100644
+--- a/wscript
++++ b/wscript
+@@ -105,6 +105,10 @@ def 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.load('python') # options for disabling pyc or pyo compilation
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14318.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14318.patch
new file mode 100644
index 0000000..ff1225d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14318.patch
@@ -0,0 +1,142 @@
+From ccf53dfdcd39f3526dbc2f20e1245674155380ff Mon Sep 17 00:00:00 2001
+From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+Date: Fri, 11 Dec 2020 11:32:44 +0900
+Subject: [PATCH] s4: torture: Add smb2.notify.handle-permissions test.
+
+s3: smbd: Ensure change notifies can't get set unless the
+ directory handle is open for SEC_DIR_LIST.
+
+CVE-2020-14318
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434
+
+Signed-off-by: Jeremy Allison <jra@samba.org>
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ source3/smbd/notify.c         |  8 ++++
+ source4/torture/smb2/notify.c | 82 ++++++++++++++++++++++++++++++++++-
+ 2 files changed, 89 insertions(+), 1 deletion(-)
+
+diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
+index 44c0b09..d23c03b 100644
+--- a/source3/smbd/notify.c
++++ b/source3/smbd/notify.c
+@@ -283,6 +283,14 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32_t filter,
+ 	char fullpath[len+1];
+ 	NTSTATUS status = NT_STATUS_NOT_IMPLEMENTED;
+ 
++	/*
++	 * Setting a changenotify needs READ/LIST access
++	 * on the directory handle.
++	 */
++	if (!(fsp->access_mask & SEC_DIR_LIST)) {
++		return NT_STATUS_ACCESS_DENIED;
++	}
++
+ 	if (fsp->notify != NULL) {
+ 		DEBUG(1, ("change_notify_create: fsp->notify != NULL, "
+ 			  "fname = %s\n", fsp->fsp_name->base_name));
+diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c
+index ebb4f8a..a5c9b94 100644
+--- a/source4/torture/smb2/notify.c
++++ b/source4/torture/smb2/notify.c
+@@ -2569,6 +2569,83 @@ done:
+ 	return ok;
+ }
+ 
++/*
++  Test asking for a change notify on a handle without permissions.
++*/
++
++#define BASEDIR_HPERM BASEDIR "_HPERM"
++
++static bool torture_smb2_notify_handle_permissions(
++		struct torture_context *torture,
++		struct smb2_tree *tree)
++{
++	bool ret = true;
++	NTSTATUS status;
++	union smb_notify notify;
++	union smb_open io;
++	struct smb2_handle h1 = {{0}};
++	struct smb2_request *req;
++
++	smb2_deltree(tree, BASEDIR_HPERM);
++	smb2_util_rmdir(tree, BASEDIR_HPERM);
++
++	torture_comment(torture,
++		"TESTING CHANGE NOTIFY "
++		"ON A HANDLE WITHOUT PERMISSIONS\n");
++
++	/*
++	  get a handle on the directory
++	*/
++	ZERO_STRUCT(io.smb2);
++	io.generic.level = RAW_OPEN_SMB2;
++	io.smb2.in.create_flags = 0;
++	io.smb2.in.desired_access = SEC_FILE_READ_ATTRIBUTE;
++	io.smb2.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
++	io.smb2.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
++	io.smb2.in.share_access = NTCREATEX_SHARE_ACCESS_READ |
++				NTCREATEX_SHARE_ACCESS_WRITE;
++	io.smb2.in.alloc_size = 0;
++	io.smb2.in.create_disposition = NTCREATEX_DISP_CREATE;
++	io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS;
++	io.smb2.in.security_flags = 0;
++	io.smb2.in.fname = BASEDIR_HPERM;
++
++	status = smb2_create(tree, torture, &io.smb2);
++	CHECK_STATUS(status, NT_STATUS_OK);
++	h1 = io.smb2.out.file.handle;
++
++	/* ask for a change notify,
++	   on file or directory name changes */
++	ZERO_STRUCT(notify.smb2);
++	notify.smb2.level = RAW_NOTIFY_SMB2;
++	notify.smb2.in.buffer_size = 1000;
++	notify.smb2.in.completion_filter = FILE_NOTIFY_CHANGE_NAME;
++	notify.smb2.in.file.handle = h1;
++	notify.smb2.in.recursive = true;
++
++	req = smb2_notify_send(tree, &notify.smb2);
++	torture_assert_goto(torture,
++			req != NULL,
++			ret,
++			done,
++			"smb2_notify_send failed\n");
++
++	/*
++	 * Cancel it, we don't really want to wait.
++	 */
++	smb2_cancel(req);
++	status = smb2_notify_recv(req, torture, &notify.smb2);
++	/* Handle h1 doesn't have permissions for ChangeNotify. */
++	CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
++
++done:
++	if (!smb2_util_handle_empty(h1)) {
++		smb2_util_close(tree, h1);
++	}
++	smb2_deltree(tree, BASEDIR_HPERM);
++	return ret;
++}
++
+ /*
+    basic testing of SMB2 change notify
+ */
+@@ -2602,7 +2679,10 @@ struct torture_suite *torture_smb2_notify_init(TALLOC_CTX *ctx)
+ 				     torture_smb2_notify_rmdir3);
+ 	torture_suite_add_2smb2_test(suite, "rmdir4",
+ 				     torture_smb2_notify_rmdir4);
+-
++	torture_suite_add_1smb2_test(suite,
++				    "handle-permissions",
++				    torture_smb2_notify_handle_permissions);
++ 
+ 	suite->description = talloc_strdup(suite, "SMB2-NOTIFY tests");
+ 
+ 	return suite;
+-- 
+2.25.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch
new file mode 100644
index 0000000..3341b80
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch
@@ -0,0 +1,112 @@
+From ff17443fe761eda864d13957bec45f5bac478fe3 Mon Sep 17 00:00:00 2001
+From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+Date: Fri, 11 Dec 2020 14:34:31 +0900
+Subject: [PATCH] CVE-2020-14383: s4/dns: Ensure variable initialization with 
+ NULL. do not crash when additional data not found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Found by Francis Brosnan Blázquez <francis@aspl.es>.
+Based on patches from Francis Brosnan Blázquez <francis@aspl.es>
+and Jeremy Allison <jra@samba.org>
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=14472
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795
+
+Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+
+Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
+Autobuild-Date(master): Mon Aug 24 00:21:41 UTC 2020 on sn-devel-184
+
+(based on commit df98e7db04c901259dd089e20cd557bdbdeaf379)
+(based on commit 7afe449e7201be92bed8e53cbb37b74af720ef4e
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ .../rpc_server/dnsserver/dcerpc_dnsserver.c   | 31 ++++++++++---------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
+index 910de9a1..618c7096 100644
+--- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
++++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
+@@ -1754,15 +1754,17 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 	TALLOC_CTX *tmp_ctx;
+ 	char *name;
+ 	const char * const attrs[] = { "name", "dnsRecord", NULL };
+-	struct ldb_result *res;
+-	struct DNS_RPC_RECORDS_ARRAY *recs;
++	struct ldb_result *res = NULL;
++	struct DNS_RPC_RECORDS_ARRAY *recs = NULL;
+ 	char **add_names = NULL;
+-	char *rname;
++	char *rname = NULL;
+ 	const char *preference_name = NULL;
+ 	int add_count = 0;
+ 	int i, ret, len;
+ 	WERROR status;
+-	struct dns_tree *tree, *base, *node;
++	struct dns_tree *tree = NULL;
++	struct dns_tree *base = NULL;
++	struct dns_tree *node = NULL;
+ 
+ 	tmp_ctx = talloc_new(mem_ctx);
+ 	W_ERROR_HAVE_NO_MEMORY(tmp_ctx);
+@@ -1845,15 +1847,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 		}
+ 	}
+ 
+-	talloc_free(res);
+-	talloc_free(tree);
+-	talloc_free(name);
++	TALLOC_FREE(res);
++	TALLOC_FREE(tree);
++	TALLOC_FREE(name);
+ 
+ 	/* Add any additional records */
+ 	if (select_flag & DNS_RPC_VIEW_ADDITIONAL_DATA) {
+ 		for (i=0; i<add_count; i++) {
+-			struct dnsserver_zone *z2;
+-
++			struct dnsserver_zone *z2 = NULL;
++			struct ldb_message *msg = NULL;
+ 			/* Search all the available zones for additional name */
+ 			for (z2 = dsstate->zones; z2; z2 = z2->next) {
+ 				char *encoded_name;
+@@ -1865,14 +1867,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 						LDB_SCOPE_ONELEVEL, attrs,
+ 						"(&(objectClass=dnsNode)(name=%s)(!(dNSTombstoned=TRUE)))",
+ 						encoded_name);
+-				talloc_free(name);
++				TALLOC_FREE(name);
+ 				if (ret != LDB_SUCCESS) {
+ 					continue;
+ 				}
+ 				if (res->count == 1) {
++					msg = res->msgs[0];
+ 					break;
+ 				} else {
+-					talloc_free(res);
++					TALLOC_FREE(res);
+ 					continue;
+ 				}
+ 			}
+@@ -1885,10 +1888,10 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 			}
+ 			status = dns_fill_records_array(tmp_ctx, NULL, DNS_TYPE_A,
+ 							select_flag, rname,
+-							res->msgs[0], 0, recs,
++							msg, 0, recs,
+ 							NULL, NULL);
+-			talloc_free(rname);
+-			talloc_free(res);
++			TALLOC_FREE(rname);
++			TALLOC_FREE(res);
+ 		}
+ 	}
+ 
+-- 
+2.25.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
new file mode 100644
index 0000000..5c299d6
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
new file mode 100644
index 0000000..0c7592f
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
new file mode 100644
index 0000000..d07ec0d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
@@ -0,0 +1,28 @@
+From 062cf74b498c1d12fd76f9d9bca926ac806e0b99 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 20 Jun 2019 14:15:18 +0800
+Subject: [PATCH] glibc only fix
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ ctdb/tests/src/test_mutex_raw.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c
+index 926a525..814343f 100644
+--- a/ctdb/tests/src/test_mutex_raw.c
++++ b/ctdb/tests/src/test_mutex_raw.c
+@@ -291,8 +291,10 @@ int main(int argc, const char **argv)
+ 					"failed\n");
+ 				exit (EXIT_FAILURE);
+ 			}
++#ifdef __GLIBC__
+ 		} else if (ret == EBUSY) {
+ 			printf("INFO: pid=%u\n", mutex->__data.__owner);
++#endif
+ 		} else if (ret == 0) {
+ 			pthread_mutex_unlock(mutex);
+ 		}
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
new file mode 100644
index 0000000..5ae8c59
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
new file mode 100644
index 0000000..eb06866
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
new file mode 100644
index 0000000..27b40f2
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf
new file mode 100644
index 0000000..d6bde41
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf
@@ -0,0 +1,258 @@
+#
+# 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 ###
+
+# Prevent anonymous connections. Overriden if the user sets guest ok = yes 
+# on any share
+   restrict anonymous = 1
+
+# 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 = never
+
+########## 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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
new file mode 100644
index 0000000..6ae2928
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/volatiles.03_samba
new file mode 100644
index 0000000..4bdfa7d
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
new file mode 100644
index 0000000..1a98236
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
@@ -0,0 +1,338 @@
+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-waf-add-support-of-cross_compile.patch \
+           file://0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch \
+           file://0002-util_sec.c-Move-__thread-variable-to-global-scope.patch \
+           file://0001-Add-options-to-configure-the-use-of-libbsd.patch \
+           file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \
+           file://CVE-2020-14318.patch \
+           file://CVE-2020-14383.patch \
+           "
+SRC_URI_append_libc-musl = " \
+           file://samba-pam.patch \
+           file://samba-4.3.9-remove-getpwent_r.patch \
+           file://cmocka-uintptr_t.patch \
+           file://0001-samba-fix-musl-lib-without-innetgr.patch \
+          "
+
+SRC_URI[md5sum] = "f006a3d1876113e4a049015969d20fe6"
+SRC_URI[sha256sum] = "7dcfc2aaaac565b959068788e6a43fc79ce2a03e7d523f5843f7a9fddffc7c2c"
+
+UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.10(\.\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 libldb libaio libpam libtasn1 jansson"
+
+inherit 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"
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+# Use krb5.  Build active domain controller.
+#
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
+                   acl cups ad-dc 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"
+PACKAGECONFIG[libunwind] = ", , libunwind"
+PACKAGECONFIG[gpgme] = ",--without-gpgme,,"
+PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb,"
+PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd"
+
+# 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] = "--with-experimental-mit-ad-dc,--without-ad-dc,,"
+PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
+PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
+
+SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
+SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
+SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
+SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
+
+# These libraries are supposed to replace others supplied by packages, but decorate the names of
+# .so files so there will not be a conflict.  This is not done consistantly, so be very careful
+# when adding to this list.
+#
+SAMBA4_LIBS="heimdal,cmocka,NONE"
+
+EXTRA_OECONF += "--enable-fhs \
+                 --with-piddir=/run \
+                 --with-sockets-dir=/run/samba \
+                 --with-modulesdir=${libdir}/samba \
+                 --with-lockdir=${localstatedir}/lib/samba \
+                 --with-cachedir=${localstatedir}/lib/samba \
+                 --disable-rpath-install \
+                 --with-shared-modules=${SAMBA4_MODULES} \
+                 --bundled-libraries=${SAMBA4_LIBS} \
+                 ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+                 --with-cluster-support \
+                 --with-profiling-data \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+                 --with-pam --with-pammodulesdir=${base_libdir}/security \
+                "
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+do_install_append() {
+    for section in 1 5 7; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
+    done
+    for section in 1 5 7 8; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
+    done
+
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${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
+
+    # 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 || true
+    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
+    
+    for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate; do
+        if [ -f "${D}${sbindir}/$f" ]; then
+            sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f
+        fi
+    done
+    if [ -f "${D}${bindir}/samba-tool" ]; then
+        sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool
+    fi
+    
+}
+
+PACKAGES =+ "${PN}-python3 ${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')
+        d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
+
+    mlprefix = d.getVar('MLPREFIX') 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')
+    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}-python3 ${PN}-dsdb-modules python3"
+RDEPENDS_${PN}-python3 += "pytalloc python3-tdb"
+
+FILES_${PN}-base = "${sbindir}/nmbd \
+                    ${sbindir}/smbd \
+                    ${sysconfdir}/init.d \
+                    ${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 \
+                          ${localstatedir}/lib/ctdb \
+                         "
+
+FILES_${BPN}-common = "${sysconfdir}/default \
+                       ${sysconfdir}/samba \
+                       ${sysconfdir}/tmpfiles.d \
+                       ${localstatedir}/lib/samba \
+                       ${localstatedir}/spool/samba \
+"
+
+FILES_${PN} += "${libdir}/vfs/*.so \
+                ${libdir}/charset/*.so \
+                ${libdir}/*.dat \
+                ${libdir}/auth/*.so \
+                ${datadir}/ctdb/events/* \
+"
+
+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}-python3 = "${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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/files/sethdlc-fix-host-contamination.patch
new file mode 100644
index 0000000..f25a02c
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb
new file mode 100644
index 0000000..5c7180b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb
@@ -0,0 +1,31 @@
+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/${BP}.tar.gz \
+           file://sethdlc-fix-host-contamination.patch \
+"
+SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab"
+SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e"
+
+
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch
new file mode 100644
index 0000000..87fd05b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch
@@ -0,0 +1,60 @@
+From 65463a7c5cb2514b1523a81911810effffb75a79 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Fri, 28 Jun 2019 15:05:31 +0800
+Subject: [PATCH] configure.in: disable tirpc checking for fedora
+
+The Fedora 28+ does not have inbuilt SunRPC support in glibc and is
+separately availble in tirpc package. So it enables tirpc checking for
+fedora in configure.
+
+Drop this piece of code since we had specify '-ltirpc' in LDFLAGS
+explicitly. Otherwise it will cause a compile-host-path QA issue if the
+host is Fedora 28+:
+cc1: warning: include location "/usr/include/tirpc" is unsafe for
+cross-compilation [-Wpoison-system-directories]
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ configure.in | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 8662cdd..0ff7e27 100644
+--- a/configure.in
++++ b/configure.in
+@@ -895,30 +895,6 @@ if test "x$enable_dlclose" = "xno"; then
+     AC_DEFINE([DISABLE_DLCLOSE_FOR_VALGRIND_TESTING],[1],[Don't close opened shared objects for valgrind leak testing of dynamic libraries])
+ fi
+ 
+-##################################################
+-# Fedora 28+ does not have inbuilt SunRPC support#
+-# in glibc and is separately availble in tirpc   #
+-# package. Make sure we've got the library and   #
+-# link it                                        #
+-##################################################
+-
+-if test -f /etc/fedora-release ; then
+-    DISTRO_VERSION=$(awk '{ print $3 }' /etc/fedora-release)
+-    if test $DISTRO_VERSION -ge 28 ; then
+-        TIRPC=""
+-        AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no")
+-        echo "$TIRPC"
+-        if test "x$TIRPC" = "xno"; then
+-            echo
+-            echo " ERROR! tirpc not found, get it by running "
+-            echo " yum install libtirpc-devel "
+-            exit
+-        fi
+-        LIBS="${LIBS} -ltirpc"
+-        extra_incl="-I/usr/include/tirpc"
+-    fi
+-fi
+-
+ Z_LIB=""
+ AC_CHECK_HEADERS(zlib.h,, Z_LIB="no")
+ if test "x$Z_LIB" = "xno"; then
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch
new file mode 100644
index 0000000..30ec174
--- /dev/null
+++ b/cap/zx297520v3/sources/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="no"
+ 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="no"
+ 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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
new file mode 100644
index 0000000..0d90c9a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init
@@ -0,0 +1,110 @@
+#!/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 -p $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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort
new file mode 100644
index 0000000..acf5f61
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d root root 0755 /var/log/snort none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.16.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.16.bb
new file mode 100644
index 0000000..d8073d8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.16.bb
@@ -0,0 +1,113 @@
+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://volatiles.99_snort \
+    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 \
+    file://configure.in-disable-tirpc-checking-for-fedora.patch \
+"
+
+SRC_URI[md5sum] = "1cec58babaea3420014d61a93e6e1545"
+SRC_URI[sha256sum] = "9688d8edf1da09dec6574000fb3c0e62f99c56428587616e17c60103c0bcbad7"
+
+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,"
+PACKAGECONFIG[appid] = "--enable-open-appid, --disable-open-appid, luajit, bash"
+
+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
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    install -m 0644 ${WORKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort
+
+    sed -i -e 's|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
+}
+
+pkg_postinst_${PN}() {
+    if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+        ${sysconfdir}/init.d/populate-volatile.sh update
+    fi
+}
+
+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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
new file mode 100644
index 0000000..a1e56b7
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch
new file mode 100644
index 0000000..804c18b
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch
new file mode 100644
index 0000000..b259fdf
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
new file mode 100644
index 0000000..695b265
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch
new file mode 100644
index 0000000..b760d3f
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
new file mode 100644
index 0000000..42fc262
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb
@@ -0,0 +1,59 @@
+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 \
+"
+
+UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
+
+SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5"
+SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8"
+
+inherit setuptools3 features_check
+
+RDEPENDS_${PN} = " \
+                  iptables \
+                  python3 \
+                  python3-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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/0001-Add-printf-format-and-silence-format-security-warnin.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch
new file mode 100644
index 0000000..b7ab7d9
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
new file mode 100644
index 0000000..4c3d95b
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch
new file mode 100644
index 0000000..2bed550
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/default.conf
new file mode 100644
index 0000000..48b15ec
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc/long-help
new file mode 100644
index 0000000..fbec254
--- /dev/null
+++ b/cap/zx297520v3/sources/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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
new file mode 100644
index 0000000..54e855a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
@@ -0,0 +1,63 @@
+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"
+
+PACKAGES =+ "${PN}-script"
+
+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
+}
+
+FILES_${PN}-script = "${sysconfdir}/vpnc/vpnc-script"
+
+CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
+RDEPENDS_${PN} = "perl-module-io-file ${PN}-script"
+RRECOMMENDS_${PN} = "kernel-module-tun"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb
new file mode 100644
index 0000000..db7b0d4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "wolfSSL Lightweight Embedded SSL/TLS 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 client and server, up to TLS 1.3"
+HOMEPAGE = "https://www.wolfssl.com/products/wolfssl"
+BUGTRACKER = "https://github.com/wolfssl/wolfssl/issues"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PROVIDES += "cyassl"
+RPROVIDES_${PN} = "cyassl"
+
+SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https"
+SRCREV = "e116c89a58af750421d82ece13f80516d2bde02e"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-base.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-base.bb
new file mode 100644
index 0000000..eaf1409
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image-base.bb
@@ -0,0 +1,7 @@
+SUMMARY = "meta-networking build test image"
+
+IMAGE_INSTALL = "packagegroup-core-boot"
+
+LICENSE = "MIT"
+
+inherit core-image
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image.bb
new file mode 100644
index 0000000..f4c7401
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/images/meta-networking-image.bb
@@ -0,0 +1,3 @@
+require  meta-networking-image-base.bb
+
+IMAGE_INSTALL += "packagegroup-meta-networking"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
new file mode 100644
index 0000000..1e10c30
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
@@ -0,0 +1,131 @@
+SUMMARY = "Meta-networking packagegroups"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = ' \
+    packagegroup-meta-networking \
+    packagegroup-meta-networking-connectivity \
+    packagegroup-meta-networking-daemons  \
+    packagegroup-meta-networking-devtools \
+    packagegroup-meta-networking-extended \
+    packagegroup-meta-networking-filter \
+    packagegroup-meta-networking-irc \
+    packagegroup-meta-networking-kernel \
+    packagegroup-meta-networking-netkit \
+    packagegroup-meta-networking-protocols \
+    packagegroup-meta-networking-support \
+'
+
+RDEPENDS_packagegroup-meta-networking = "\
+    packagegroup-meta-networking-connectivity \
+    packagegroup-meta-networking-daemons  \
+    packagegroup-meta-networking-devtools \
+    packagegroup-meta-networking-extended \
+    packagegroup-meta-networking-filter \
+    packagegroup-meta-networking-irc \
+    packagegroup-meta-networking-kernel \
+    packagegroup-meta-networking-netkit \
+    packagegroup-meta-networking-protocols \
+    packagegroup-meta-networking-support \
+    "
+
+RDEPENDS_packagegroup-meta-networking-connectivity = "\
+    openconnect ez-ipupdate mosquitto sethdlc crda \
+    dibbler-server dibbler-client dibbler-requestor dibbler-relay \
+    libdnet ufw civetweb freeradius kea daq \
+    mbedtls relayd snort dhcpcd rdate vlan vpnc \
+    inetutils wolfssl lftp miniupnpd networkmanager \
+    networkmanager-openvpn rdist nanomsg python3-networkmanager \
+    ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth x11", "blueman", "", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "pam", "samba", "", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "pam", "samba", "", d)} \
+    "
+
+RDEPENDS_packagegroup-meta-networking-connectivity_remove_libc-musl = "rdist"
+
+RDEPENDS_packagegroup-meta-networking-daemons = "\
+    ippool radvd autofs keepalived proftpd openhpi lldpd \
+    ptpd igmpproxy opensaf squid \
+    atftp postfix iscsi-initiator-utils vsftpd cyrus-sasl \
+    pure-ftpd vblade tftp-hpa ncftp \
+    ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "networkd-dispatcher", "", d)} \
+    "
+
+RDEPENDS_packagegroup-meta-networking-daemons_remove_libc-musl = "opensaf"
+
+RDEPENDS_packagegroup-meta-networking-devtools = "\
+    python3-ldap \
+    "
+
+RDEPENDS_packagegroup-meta-networking-extended = "\
+    corosync \
+    ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "dlm", "", d)} \
+    "
+
+RDEPENDS_packagegroup-meta-networking-filter = "\
+    ebtables conntrack-tools libnetfilter-queue \
+    libnetfilter-conntrack libnetfilter-cthelper libnetfilter-acct \
+    libnetfilter-cttimeout libnetfilter-log nfacct \
+    arno-iptables-firewall libnftnl nftables \
+    libnfnetlink \
+    " 
+
+RDEPENDS_packagegroup-meta-networking-irc = "\
+    znc \
+    "
+
+RDEPENDS_packagegroup-meta-networking-kernel = "\
+    wireguard-module wireguard-tools \
+    "
+
+RDEPENDS_packagegroup-meta-networking-netkit = "\
+    netkit-rwho-client netkit-rwho-server netkit-rsh-client netkit-rsh-server \
+    netkit-telnet netkit-tftp-client netkit-tftp-server \
+    netkit-ftp netkit-rpc \
+    "
+
+RDEPENDS_packagegroup-meta-networking-netkit_remove_libc-musl = " \
+    netkit-rsh-client netkit-rsh-server netkit-telnet"
+
+RDEPENDS_packagegroup-meta-networking-protocols = "\
+    tsocks freediameter xl2tpd babeld mdns net-snmp \
+    quagga pptp-linux zeroconf nopoll openflow rp-pppoe \
+    radiusclient-ng openl2tp usrsctp \
+    ${@bb.utils.contains("DISTRO_FEATURES", "pam", "dante", "", d)} \
+    "
+
+RDEPENDS_packagegroup-meta-networking-protocols_remove_libc-musl = "mdns"
+
+RDEPENDS_packagegroup-meta-networking-support = "\
+    ncp ndisc6 mtr tinyproxy ssmping ntp \
+    wpan-tools bridge-utils ifenslave celt051 pimd \
+    nbd-client nbd-server nbd-trdump \
+    phytool fwknop htpdate tcpreplay \
+    traceroute geoip-perl geoip geoipupdate esmtp \
+    libtdb netcf dnsmasq curlpp openipmi drbd-utils \
+    tunctl dovecot ipvsadm stunnel chrony spice-protocol \
+    usbredir ntop wireshark tnftp lksctp-tools \
+    cim-schema-docs cim-schema-final cim-schema-exper \
+    libmemcached smcroute libtevent ipcalc uftp \
+    ntimed linux-atm ssmtp openvpn rdma-core \
+    iftop aoetools tcpslice tcpdump libtalloc memcached nuttcp netcat \
+    netcat-openbsd fetchmail yp-tools ypbind-mt yp-tools \
+    arptables macchanger nghttp2 strongswan fping \
+    libesmtp cifs-utils open-isns \
+    ${@bb.utils.contains("DISTRO_FEATURES", "pam", "libldb", "", d)} \
+    ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "non-commercial", "netperf", "", d)} \
+    ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "spice", "", d)} \
+    "
+
+
+RDEPENDS_packagegroup-meta-networking-support_remove_mipsarch = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_mips64 = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_mips64el = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_powerpc = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_riscv64 = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_riscv32 = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_armv5 = "spice-protocol"
+RDEPENDS_packagegroup-meta-networking-support_remove_aarch64 = "spice-protocol memcached"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch
new file mode 100644
index 0000000..cfa8a73
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch
@@ -0,0 +1,45 @@
+From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 16 Apr 2015 22:41:57 +0200
+Subject: [PATCH] argz.h: fix musl compile (add missing defines)
+
+Upstream-Status: Pending
+
+Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+---
+ argz.h | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/argz.h b/argz.h
+index 582be55..bdf9f62 100644
+--- a/argz.h
++++ b/argz.h
+@@ -48,6 +48,22 @@
+ # define __const const
+ #endif
+ 
++#ifndef __THROW
++# define __THROW
++#endif
++
++#ifndef __BEGIN_DECLS
++# define __BEGIN_DECLS
++#endif
++
++#ifndef __END_DECLS
++# define __END_DECLS
++#endif
++
++#ifndef __attribute_pure__
++# define __attribute_pure__
++#endif
++
+ #ifndef __error_t_defined
+ typedef int error_t;
+ #endif
+-- 
+2.1.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch
new file mode 100644
index 0000000..093054c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch
@@ -0,0 +1,43 @@
+From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 16 Apr 2015 22:43:49 +0200
+Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include)
+
+Upstream-Status: Pending
+
+Add sys/types.h include for u_char typedef.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+---
+ tftp.h  | 1 +
+ tftpd.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/tftp.h b/tftp.h
+index 12bd6aa..32a3f63 100644
+--- a/tftp.h
++++ b/tftp.h
+@@ -19,6 +19,7 @@
+ 
+ #include <sys/time.h>
+ #include <sys/times.h>
++#include <sys/types.h>
+ #include "tftp_def.h"
+ #include "config.h"
+ 
+diff --git a/tftpd.h b/tftpd.h
+index 945065e..60d3a49 100644
+--- a/tftpd.h
++++ b/tftpd.h
+@@ -20,6 +20,7 @@
+ #include <pthread.h>
+ #include <arpa/tftp.h>
+ #include <arpa/inet.h>
++#include <sys/types.h>
+ #include "tftp_io.h"
+ 
+ /*
+-- 
+2.1.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service
new file mode 100644
index 0000000..480bc70
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp/atftpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Advanced TFTP Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/atftpd --daemon --port 69
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb
new file mode 100644
index 0000000..ff9084d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Advanced TFTP server and client"
+SECTION = "net"
+HOMEPAGE = "http://packages.debian.org/atftp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRCREV = "52b71f0831dcbde508bd3a961d84abb80a62480f"
+
+SRC_URI = "git://git.code.sf.net/p/atftp/code \
+           file://atftpd.init \
+           file://atftpd.service \
+"
+SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \
+                             file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \
+                           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools update-rc.d systemd
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
+
+INITSCRIPT_PACKAGES = "${PN}d"
+INITSCRIPT_NAME_${PN}d = "atftpd"
+INITSCRIPT_PARAMS_${PN}d = "defaults 80"
+
+
+EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
+
+    install -d ${D}/srv/tftp
+
+    rm ${D}${sbindir}/in.tftpd
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
+}
+
+PACKAGES =+ "${PN}d"
+
+FILES_${PN} = "${bindir}/*"
+
+FILES_${PN}d = "${sbindir}/* \
+    ${sysconfdir} \
+    /srv/tftp \
+    ${systemd_unitdir}/system/atftpd.service \
+"
+
+SYSTEMD_PACKAGES = "${PN}d"
+SYSTEMD_SERVICE_${PN}d = "atftpd.service"
+RPROVIDES_${PN}d += "${PN}d-systemd"
+RREPLACES_${PN}d += "${PN}d-systemd"
+RCONFLICTS_${PN}d += "${PN}d-systemd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init
new file mode 100644
index 0000000..161d97a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd.init
@@ -0,0 +1,37 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/atftpd and type
+# > update-rc.d atftpd defaults 60
+#
+
+
+test -f /usr/sbin/atftpd || exit 0
+
+test -d /srv/tftp || mkdir -p /srv/tftp
+
+case "$1" in
+  start)
+    echo -n "Starting tftp daemon: atftpd"
+    start-stop-daemon --start --quiet --exec /usr/sbin/atftpd -- --daemon --port 69
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping tftp daemon: atftpd"
+    start-stop-daemon --stop --quiet --exec /usr/sbin/atftpd
+    echo "."
+    ;;
+  reload|force-reload)
+    start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/atftpd
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+	$0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/atftpd {start|stop|reload|restart|force-reload}"
+    exit 1
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch
new file mode 100644
index 0000000..2a58346
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch
@@ -0,0 +1,30 @@
+From d0d5ac317dab11610a5fc91ca3e7f5ad72ce2236 Mon Sep 17 00:00:00 2001
+From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+Date: Tue, 29 Oct 2019 13:19:37 +0800
+Subject: [PATCH] Bug fix for pid_t not found on musl.
+
+When compiling version 5.1.6 on musl, the following error occurs:
+log.h:49:8: error: unknown type name 'pid_t'
+
+Upstream-Status: Pending
+
+Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+---
+ lib/defaults.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/defaults.c b/lib/defaults.c
+index a6ea116..b3ecfa5 100644
+--- a/lib/defaults.c
++++ b/lib/defaults.c
+@@ -21,6 +21,7 @@
+ #include <string.h>
+ #include <sys/utsname.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ #include <stdarg.h>
+ 
+ #include "config.h"
+-- 
+2.20.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
new file mode 100644
index 0000000..8715971
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
@@ -0,0 +1,48 @@
+From 987c8f4a718cdd6b764592ba7510090a59623959 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 31 Mar 2017 19:10:57 -0700
+Subject: [PATCH] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF
+
+if they are not defined as is in musl then define
+them here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ include/automount.h | 8 ++++++++
+ include/nsswitch.h  | 3 +++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/include/automount.h b/include/automount.h
+index cc336ad..8bdcf12 100644
+--- a/include/automount.h
++++ b/include/automount.h
+@@ -42,6 +42,14 @@
+ 
+ #define ENABLE_CORES	1
+ 
++#ifndef __SWORD_TYPE
++# if __WORDSIZE == 32  /* System word size */
++#  define __SWORD_TYPE int
++# else /* __WORDSIZE == 64 */
++#  define __SWORD_TYPE long int
++# endif
++#endif
++
+ /* We MUST have the paths to mount(8) and umount(8) */
+ #ifndef HAVE_MOUNT
+ #error Failed to locate mount(8)!
+diff --git a/include/nsswitch.h b/include/nsswitch.h
+index d3e4027..7a0c38f 100644
+--- a/include/nsswitch.h
++++ b/include/nsswitch.h
+@@ -24,6 +24,9 @@
+ #include <netdb.h>
+ #include "list.h"
+ 
++#ifndef _PATH_NSSWITCH_CONF
++#define _PATH_NSSWITCH_CONF     "/etc/nsswitch.conf"
++#endif
+ #define NSSWITCH_FILE _PATH_NSSWITCH_CONF
+ 
+ enum nsswitch_status {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch
new file mode 100644
index 0000000..b991aca
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch
@@ -0,0 +1,33 @@
+From a27217a5437da313d251b4a765bf7cb60ffaa62d Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Nov 2018 15:27:47 +0800
+Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17
+ 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 24 Aug 2018
+ 06:24:36 +0000 Subject: [PATCH] Do not hardcode path for pkg.m4
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+update patch to version 5.1.6
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 493b9f1..268d06b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl
+ AC_INIT(.autofs-5.1.6)
+ 
+ # for pkg-config macros
+-m4_include([/usr/share/aclocal/pkg.m4])
++m4_include([pkg.m4])
+ 
+ #
+ # autofs installs by default in /usr
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
new file mode 100644
index 0000000..32293dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
@@ -0,0 +1,27 @@
+From 745e355ac8b595a27e1fcca75bf01d3e244f4a5f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Sep 2017 22:22:31 -0700
+Subject: [PATCH] modules/lookup_multi.c: Replace __S_IEXEC with S_IEXEC
+
+__S_IEXEC is internal to libc and may not be available on
+all libc e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ modules/lookup_multi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
+index 3ecda6d..cf109de 100644
+--- a/modules/lookup_multi.c
++++ b/modules/lookup_multi.c
+@@ -452,7 +452,7 @@ int lookup_reinit(const char *my_mapfmt,
+ 					continue;
+ 				}
+ 
+-				if (st.st_mode & __S_IEXEC)
++				if (st.st_mode & S_IEXEC)
+ 					type = src_prog;
+ 				else
+ 					type = src_file;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
new file mode 100644
index 0000000..e7fdd10
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
@@ -0,0 +1,65 @@
+From 096e33743158e0e8c04d60d01cc66e2945d79777 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Nov 2018 16:52:35 +0800
+Subject: [PATCH] From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17
+ 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 31 Mar 2017
+ 19:12:10 -0700 Subject: [PATCH] Replace __S_IEXEC with S_IEXEC
+
+S_IEXEC is portable
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+update patch to version 5.1.5
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ daemon/lookup.c        | 6 +++---
+ modules/lookup_multi.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/daemon/lookup.c b/daemon/lookup.c
+index 18df935..d35d484 100644
+--- a/daemon/lookup.c
++++ b/daemon/lookup.c
+@@ -382,7 +382,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
+ 	if (!S_ISREG(st.st_mode))
+ 		return NSS_STATUS_NOTFOUND;
+ 
+-	if (st.st_mode & __S_IEXEC)
++	if (st.st_mode & S_IEXEC)
+ 		type = src_prog;
+ 	else
+ 		type = src_file;
+@@ -942,7 +942,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
+ 	if (!S_ISREG(st.st_mode))
+ 		return NSS_STATUS_NOTFOUND;
+ 
+-	if (st.st_mode & __S_IEXEC)
++	if (st.st_mode & S_IEXEC)
+ 		type = src_prog;
+ 	else
+ 		type = src_file;
+@@ -1118,7 +1118,7 @@ static struct map_source *lookup_get_map_source(struct master_mapent *entry)
+ 	if (!S_ISREG(st.st_mode))
+ 		return NULL;
+ 
+-	if (st.st_mode & __S_IEXEC)
++	if (st.st_mode & S_IEXEC)
+ 		type = "program";
+ 	else
+ 		type = "file";
+diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
+index bb9f88c..cf109de 100644
+--- a/modules/lookup_multi.c
++++ b/modules/lookup_multi.c
+@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
+ 				continue;
+ 			}
+ 
+-			if (st.st_mode & __S_IEXEC)
++			if (st.st_mode & S_IEXEC)
+ 				type = src_prog;
+ 			else
+ 				type = src_file;
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
new file mode 100644
index 0000000..816a409
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
@@ -0,0 +1,25 @@
+From df5d45b2d7ad7e7b5f0542a816d08b0409a529a1 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 19 Aug 2014 11:31:35 +0800
+Subject: [PATCH] [PATCH] add the needed stdarg.h
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ lib/defaults.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/defaults.c b/lib/defaults.c
+index 0e48a78..667f35d 100644
+--- a/lib/defaults.c
++++ b/lib/defaults.c
+@@ -16,6 +16,7 @@
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdarg.h>
+ #include <ctype.h>
+ #include <string.h>
+ #include <sys/utsname.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
new file mode 100644
index 0000000..8e06db6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
@@ -0,0 +1,26 @@
+From 080626108c9ab70e2489752ef2a14006d0564b0c Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe.macdonald@windriver.com>
+Date: Tue, 18 Jun 2013 10:05:21 -0400
+Subject: [PATCH] Fix the dependency issue
+
+Upstream-Status: Pending
+
+autofs's lib sources have a dependency on a number of files that are
+generated by rpcgen during buildtime
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
+
+---
+ lib/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 518b483..4798a4b 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -81,3 +81,4 @@ install: all
+ clean:
+ 	rm -f $(LIB) $(RPCS) $(OBJS) $(YACCSRC) *.output *~
+ 
++$(OBJS): $(RPCS)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
new file mode 100644
index 0000000..9b0942e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
@@ -0,0 +1,30 @@
+From 2256b8aa98cff15ddf2a8d36496e6c9125927901 Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Wed, 13 Mar 2013 16:17:08 +0100
+Subject: [PATCH] autofs-5.0.7: include linux/nfs.h directly in rpc_subs.h
+
+Upstream-Status: Pending
+
+Fixes compile error with uclibc. Glibc's nfs/nfs.h contains
+nothing but "#include linux/nfs.h". rpc_subs.h already includes
+other linux/nfs*.h files directly.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+---
+ include/rpc_subs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/rpc_subs.h b/include/rpc_subs.h
+index e744e89..83db47e 100644
+--- a/include/rpc_subs.h
++++ b/include/rpc_subs.h
+@@ -18,7 +18,7 @@
+ 
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+-#include <nfs/nfs.h>
++#include <linux/nfs.h>
+ #include <linux/nfs2.h>
+ #include <linux/nfs3.h>
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
new file mode 100644
index 0000000..b25c43f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
@@ -0,0 +1,53 @@
+From b9b44cd82caceeb638cc6a862b5bb90b93ad6c6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:53:10 -0800
+
+---
+ aclocal.m4   | 2 ++
+ configure.in | 8 ++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 2115204..2a9a802 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -7,6 +7,8 @@ dnl --------------------------------------------------------------------------
+ AC_DEFUN(AF_PATH_INCLUDE,
+ [AC_PATH_PROGS($1,$2,$3,$4)
+ if test -n "$$1"; then
++  AH_TEMPLATE([HAVE_$1], [Have $2])
++  AH_TEMPLATE([PATH_$1], [Have $2])
+   AC_DEFINE(HAVE_$1,1,[define if you have $1])
+   AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1])
+   HAVE_$1=1
+diff --git a/configure.in b/configure.in
+index 25d7c4e..44a1c8b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -324,13 +324,15 @@ AC_PROG_CC
+ cat > pietest.c <<EOF
+ int main(void) { return 0; }
+ EOF
++AF_tmp_ldflags="$LDFLAGS"
++AF_tmp_cflags="$CFLAGS"
+ CFLAGS=-fPIE
+ LDFLAGS=-pie
+ DAEMON_CFLAGS=
+ DAEMON_LDFLAGS=
+ AC_MSG_CHECKING([whether gcc -fPIE works])
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
+-	      [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
++	       [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no])
+ AC_MSG_RESULT([$gcc_supports_pie])
+ if test $gcc_supports_pie = yes ; then
+ 	DAEMON_CFLAGS="-fPIE"
+@@ -339,6 +341,8 @@ fi
+ rm -f pietest.c
+ AC_SUBST(DAEMON_CFLAGS)
+ AC_SUBST(DAEMON_LDFLAGS)
++CFLAGS="${AF_tmp_cflags}"
++LDFLAGS="${AF_tmp_ldflags}"
+ 
+ #
+ # Enable ability to access value in external env variable
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
new file mode 100644
index 0000000..21a97c8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
@@ -0,0 +1,63 @@
+From 971d48a00ef82880c34e89778bf430a01360ebd5 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Mon, 18 May 2015 16:28:36 +0800
+Subject: [PATCH] [PATCH] fix the YACC rule to fix a building failure
+
+Upstream-Statu: Pending
+
+The original rule will create the header file twice, one is that the header
+file as the object file is created, other time is when create the C source file.
+since YACC always has "-d" parameter.
+
+This lead to a race when compile amd_tok.o, the header file maybe rewritten.
+  |----------------------
+  |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function)
+  |  ")" { return RBRACKET; }
+  |          ^
+  |../Makefile.rules:64: recipe for target 'amd_tok.o' failed
+  |----------------------
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ lib/Makefile     | 6 ++++--
+ modules/Makefile | 3 ++-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 4798a4b..c40cf86 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -57,7 +57,8 @@ mount_xdr.o: mount_xdr.c
+ master_tok.c: master_tok.l
+ 	$(LEX) -o$@ -Pmaster_ $?
+ 
+-master_parse.tab.c master_parse.tab.h: master_parse.y
++master_parse.tab.h: master_parse.tab.c
++master_parse.tab.c: master_parse.y
+ 	$(YACC) -v -d -p master_ -b master_parse $?
+ 
+ master_tok.o: master_tok.c master_parse.tab.h
+@@ -67,7 +68,8 @@ master_parse.tab.o: master_parse.tab.c master_parse.tab.h
+ nss_tok.c: nss_tok.l
+ 	$(LEX) -o$@ -Pnss_ $?
+ 
+-nss_parse.tab.c nss_parse.tab.h: nss_parse.y
++nss_parse.tab.h: nss_parse.tab.c
++nss_parse.tab.c: nss_parse.y
+ 	$(YACC) -v -d -p nss_ -b nss_parse $?
+ 
+ nss_tok.o: nss_tok.c nss_parse.tab.h
+diff --git a/modules/Makefile b/modules/Makefile
+index d9ab06c..abc7698 100644
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l
+ 
+ amd_tok.o: amd_tok.c amd_parse.tab.h
+ 
+-amd_parse.tab.c amd_parse.tab.h: amd_parse.y
++amd_parse.tab.h: amd_parse.tab.c
++amd_parse.tab.c: amd_parse.y
+ 	$(YACC) -v -d -p amd_ -b amd_parse $?
+ 
+ amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
new file mode 100644
index 0000000..4143259
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
@@ -0,0 +1,47 @@
+From c500d9906f163bf716c872d37403b9de02ef0a86 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Fri, 18 Jan 2013 12:13:32 -0500
+Subject: [PATCH] autofs: fails to compile with openldap disabled
+
+As of 5.0.6, it appears that changes were introduced so that
+if you compile with openldap disabled and openldap headers are not
+available, then autofs fails to build.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+--
+ lookup_ldap.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+---
+ include/lookup_ldap.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h
+index 3a7aba7..bfdb0b3 100644
+--- a/include/lookup_ldap.h
++++ b/include/lookup_ldap.h
+@@ -1,7 +1,9 @@
+ #ifndef LOOKUP_LDAP_H
+ #define LOOKUP_LDAP_H
+ 
++#ifdef WITH_LDAP
+ #include <ldap.h>
++#endif
+ 
+ #ifdef WITH_SASL
+ #include <openssl/ssl.h>
+@@ -117,10 +119,12 @@ struct lookup_context {
+ 
+ #define LDAP_AUTH_USESIMPLE	0x0008
+ 
++#ifdef WITH_LDAP
+ /* lookup_ldap.c */
+ LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_context *ctxt);
+ int unbind_ldap_connection(unsigned logopt, struct ldap_conn *conn, struct lookup_context *ctxt);
+ int authtype_requires_creds(const char *authtype);
++#endif
+ 
+ #ifdef WITH_SASL
+ /* cyrus-sasl.c */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
new file mode 100644
index 0000000..21396dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
@@ -0,0 +1,26 @@
+From 3cbee00fe5725b87abdae80cfa2ee735e4513ca6 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 19 Aug 2014 11:31:35 +0800
+Subject: [PATCH] [PATCH] force STRIP to emtpy
+
+otherwise the generate file will be stripped
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 709dd04..b1f7e50 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -31,7 +31,7 @@ LDFLAGS   ?= -s
+ endif
+ 
+ ifdef DONTSTRIP
+-STRIP     ?= :
++STRIP     = :
+ else
+ STRIP     ?= strip --strip-debug
+ endif
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
new file mode 100644
index 0000000..c46c0e5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
@@ -0,0 +1,29 @@
+From a3007d7ea930823926611081bb873ddd771325cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:53:10 -0800
+
+---
+ samples/auto.net | 2 +-
+ samples/auto.smb | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/samples/auto.net b/samples/auto.net
+index 0384f61..61215f6 100755
+--- a/samples/auto.net
++++ b/samples/auto.net
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # This file must be executable to work! chmod 755!
+ 
+diff --git a/samples/auto.smb b/samples/auto.smb
+index 6af5d85..d296b81 100755
+--- a/samples/auto.smb
++++ b/samples/auto.smb
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # This file must be executable to work! chmod 755!
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch
new file mode 100644
index 0000000..be750ab
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch
@@ -0,0 +1,37 @@
+From 602f9ca83c2bdbf511bcb178fcb4b9fc54da955f Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Nov 2018 15:20:46 +0800
+Subject: [PATCH] From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17
+ 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 24 Apr 2017
+ 20:41:25 -0700 Subject: [PATCH] autofs: Upgrade to 5.1.2 release
+
+Use pkg-config first to look for external libnsl which is now
+split out from glibc, if it does not exist then see if its provided
+by glibc itself.
+
+-Khem
+
+Upstream-Status: Pending
+
+update patch to version 5.1.5
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 76ecb40..493b9f1 100644
+--- a/configure.in
++++ b/configure.in
+@@ -238,7 +238,7 @@ AC_SUBST(LIBCLOCK_GETTIME)
+ 
+ PKG_CHECK_MODULES([NSL],[libnsl],,
+ [
+-AC_CHECK_LIB(nsl, yp_match, NSL_LIBS="-lnsl")
++PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])])
+ AC_SUBST(NSL_LIBS)
+ NSL_CFLAGS=""
+ ])
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
new file mode 100644
index 0000000..4183069
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
@@ -0,0 +1,118 @@
+From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 13 Sep 2014 20:19:28 -0700
+Subject: [PATCH] autofs.init.in: remove bashism
+
+It can work without the bashism.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ redhat/autofs.init.in | 12 ++++++------
+ samples/rc.autofs.in  | 10 +++++-----
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
+index 9d008ff..4f1c0d8 100644
+--- a/redhat/autofs.init.in
++++ b/redhat/autofs.init.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # rc file for automount using a Sun-style "master map".
+ #
+@@ -42,7 +42,7 @@ if [ -r $confdir/autofs ]; then
+ 	. $confdir/autofs
+ fi
+ 
+-function start() {
++start() {
+ 	# Make sure autofs4 module is loaded
+ 	if ! grep -q autofs /proc/filesystems
+ 	then
+@@ -102,7 +102,7 @@ function start() {
+ 	return $RETVAL
+ }
+ 
+-function stop() {
++stop() {
+ 	echo -n $"Stopping $prog: "
+ 	count=0
+ 	while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
+@@ -125,7 +125,7 @@ function stop() {
+ 	return $RETVAL
+ }
+ 
+-function restart() {
++restart() {
+ 	status autofs > /dev/null 2>&1
+ 	if [ $? -eq 0 ]; then
+ 		stop
+@@ -143,7 +143,7 @@ function restart() {
+ 	start
+ }
+ 
+-function reload() {
++reload() {
+ 	if [ ! -f /var/lock/subsys/autofs ]; then
+ 		echo $"$prog not running"
+ 		RETVAL=1
+@@ -161,7 +161,7 @@ function reload() {
+ 	return $RETVAL
+ }
+ 
+-function usage_message() {
++usage_message() {
+ 	echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}"
+ }
+ 
+diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in
+index 487669f..e96cde1 100644
+--- a/samples/rc.autofs.in
++++ b/samples/rc.autofs.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # rc file for automount using a Sun-style "master map".
+ #
+@@ -36,7 +36,7 @@ if [ -r $confdir/autofs ]; then
+ 	. $confdir/autofs
+ fi
+ 
+-function start() {
++start() {
+ 	echo -n "Starting $prog: "
+ 
+ 	# Make sure autofs4 module is loaded
+@@ -85,7 +85,7 @@ function start() {
+ 	return $RETVAL
+ }
+ 
+-function stop() {
++stop() {
+ 	echo -n $"Stopping $prog: "
+ 	count=0
+ 	while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
+@@ -102,7 +102,7 @@ function stop() {
+ 	return $RETVAL
+ }
+ 
+-function restart() {
++restart() {
+ 	stop
+ 	while [ -n "`pidof $prog`" ] ; do
+ 		sleep 5
+@@ -110,7 +110,7 @@ function restart() {
+ 	start
+ }
+ 
+-function reload() {
++reload() {
+ 	pid=`pidof $prog`
+ 	if [ -z $pid ]; then
+ 		echo $"$prog not running"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
new file mode 100644
index 0000000..d1f9f34
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
@@ -0,0 +1,48 @@
+From dd90a690f95569b999b8ac9ab57e834b3421dcbb Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Nov 2018 15:19:07 +0800
+Subject: [PATCH] From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17
+ 00:00:00 2001 From: Roy Li <rongqing.li@windriver.com> Date: Tue, 19 Aug 2014
+ 11:31:35 +0800 Subject: [PATCH] using pkg-config to detect libxml-2.0 and
+ krb5
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+update patch to 5.1.5
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.in | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index f5fbb35..76ecb40 100644
+--- a/configure.in
++++ b/configure.in
+@@ -211,8 +211,20 @@ fi
+ AC_SUBST(ENABLE_FEDFS)
+ 
+ # LDAP SASL auth needs libxml and Kerberos
+-AF_CHECK_LIBXML()
+-AF_CHECK_KRB5()
++PKG_CHECK_MODULES(XML, [libxml-2.0],HAVE_LIBXML=1,HAVE_LIBXML=0)
++AC_SUBST([HAVE_LIBXML])
++XML_FLAGS=$XML_CFLAGS
++
++PKG_CHECK_MODULES(KRB5, [krb5],HAVE_KRB5=1,HAVE_KRB5=0)
++AC_SUBST([HAVE_KRB5])
++if test "x$HAVE_KRB5" = "x1"; then
++  SAVE_CFLAGS=$CFLAGS
++  SAVE_LIBS=$LIBS
++  CFLAGS="$CFLAGS $KRB5_FLAGS"
++  LIBS="$LIBS $KRB5_LIBS"
++
++  AC_CHECK_FUNCS([krb5_principal_get_realm])
++fi
+ 
+ AC_SEARCH_LIBS([versionsort],[])
+ if test "$ac_cv_search_versionsort" = "no"; then
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.6.bb
new file mode 100644
index 0000000..54f0b99
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.6.bb
@@ -0,0 +1,96 @@
+SUMMARY = "Kernel based automounter for linux"
+SECTION = "utils"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2"
+
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+
+inherit autotools-brokensep systemd update-rc.d pkgconfig
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
+           file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \
+           file://no-bash.patch \
+           file://cross.patch \
+           file://fix_disable_ldap.patch \
+           file://autofs-5.0.7-fix-lib-deps.patch \
+           file://add-the-needed-stdarg.h.patch \
+           file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \
+           file://force-STRIP-to-emtpy.patch \
+           file://remove-bashism.patch \
+           file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
+           file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
+           file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
+           file://pkgconfig-libnsl.patch \
+           file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \
+           file://0001-Do-not-hardcode-path-for-pkg.m4.patch \
+           file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \
+           "
+
+
+SRC_URI[md5sum] = "e6800e0afd6009ecdff148088c564050"
+SRC_URI[sha256sum] = "82094cad44f4e5c4f93eff2789cd66b57d7ab3fa646b7722d97608571001e694"
+
+UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/"
+
+INITSCRIPT_NAME = "autofs"
+INITSCRIPT_PARAMS = "defaults"
+
+# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS
+#CFLAGS += "${LDFLAGS}"
+
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+EXTRA_OEMAKE = "DONTSTRIP=1"
+EXTRA_OECONF += "--disable-mount-locking \
+                --enable-ignore-busy --with-openldap=no \
+                --with-confdir=${sysconfdir}/default \
+                --with-fifodir=/run \
+                --with-flagdir=/run \
+                --with-sasl=no --with-libtirpc \
+                --with-mapdir=${sysconfdir} \
+                --with-path=${STAGING_BINDIR_NATIVE} \
+                --with-fifodir=${localstatedir}/run \
+                --with-flagdir=${localstatedir}/run \
+"
+CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \
+                        ac_cv_path_RPCGEN=rpcgen \
+                        initdir=${INIT_D_DIR} \
+                        piddir=/run \
+"
+
+do_configure_prepend () {
+    if [ ! -e ${S}/acinclude.m4 ]; then
+        cp ${S}/aclocal.m4 ${S}/acinclude.m4
+    fi
+    cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 .
+}
+
+do_install_append () {
+    # samples have been removed from SUBDIRS from 5.1.5, need to install separately
+    oe_runmake 'DESTDIR=${D}' install_samples
+
+    if [ -d ${D}/run ]; then
+        rmdir ${D}/run
+    fi
+    if [ -d ${D}${localstatedir}/run ]; then
+        rmdir ${D}${localstatedir}/run
+    fi
+    # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand.
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d -m 755 ${D}${INIT_D_DIR}
+        install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs
+    fi
+}
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "autofs.service"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch
new file mode 100644
index 0000000..c89822c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch
@@ -0,0 +1,41 @@
+From 6515f3e7656d97d40a6a1cf4eb3ada193a698309 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 12 Sep 2018 23:18:12 +0800
+Subject: [PATCH] Allow saslauthd to be built outside of source tree while
+ configuring with `--enable-ldapdb'
+
+[snip]
+| powerpc-wrs-linux-gcc [snip] -I../common
+|../../git/saslauthd/lak.c:58:10: fatal error: crypto-compat.h:
+No such file or directory
+[snip]
+
+The crypto-compat.h locates in git/common/, it should be                                                                                                                           |
+`-I../../git/common'
+
+Remove useless `-I$(top_srcdir)/../include' which was incorrectly
+added by commit `faae590 cleanup misc INCLUDES for different build paths'
+
+Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ saslauthd/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am
+index d7244be..864b29b 100644
+--- a/saslauthd/Makefile.am
++++ b/saslauthd/Makefile.am
+@@ -34,7 +34,7 @@ saslcache_SOURCES = saslcache.c
+ 
+ EXTRA_DIST	= saslauthd.8 saslauthd.mdoc include \
+ 		  getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD
+-AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include -I$(top_builddir)/common
++AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir)/common -I$(top_srcdir)/common
+ DEFS            = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I..
+ 
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch
new file mode 100644
index 0000000..bf232ac
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch
@@ -0,0 +1,95 @@
+From bb693db0e1d1d693e8ca31fcbc4f46d1674eeca1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 13 Sep 2018 14:20:57 +0800
+Subject: [PATCH] makeinit.sh: fix parallel build issue
+
+While building plugins, each <plugin>.c requires a <plugin>_init.c,
+and the <plugin>_init.c is dynamically generated by makeinit.sh.
+
+But the makeinit.sh generates all *_init.c (13 mechanism plugins,
+3 auxprop plugins) at one time, if there are multiple plugins,
+there will be multiple makeinit.sh invoking.
+
+It caused a parallel issue, the *_init.c files will be generated
+repeatedly.
+
+It occasionally generate dapdb_init.c incorrectly
+[snip plugins/ldapdb_init.c]
+SASL_CANONUSER_PLUG_INIT( ldapdb )
+SASL_CANONUSER_PLUG_INIT( ldapdb )
+SASL_CANONUSER_PLUG_INIT( ldapdb )
+[snip plugins/ldapdb_init.c]
+
+Let makeinit.sh generate the expected <plugin>_init.c which
+is exactly required by <plugin>.c.
+
+Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/532]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ plugins/Makefile.am |  2 +-
+ plugins/makeinit.sh | 19 ++++++++++++++-----
+ 2 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/Makefile.am b/plugins/Makefile.am
+index 929f6a4..81e7f0b 100644
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
+@@ -149,4 +149,4 @@ passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
+ CLEANFILES=$(init_src)
+ 
+ ${init_src}: $(srcdir)/makeinit.sh
+-	$(SHELL) $(srcdir)/makeinit.sh
++	$(SHELL) $(srcdir)/makeinit.sh $@
+diff --git a/plugins/makeinit.sh b/plugins/makeinit.sh
+index cc65f7d..3131877 100644
+--- a/plugins/makeinit.sh
++++ b/plugins/makeinit.sh
+@@ -1,7 +1,9 @@
++plugin_init="$1"
+ # mechanism plugins
+ for mech in anonymous crammd5 digestmd5 scram gssapiv2 kerberos4 login ntlm otp passdss plain srp gs2; do
++    if [ ${plugin_init} = "${mech}_init.c" ];then
+ 
+-echo "
++        echo "
+ #include <config.h>
+ 
+ #include <string.h>
+@@ -43,13 +45,16 @@ BOOL APIENTRY DllMain( HANDLE hModule,
+ 
+ SASL_CLIENT_PLUG_INIT( $mech )
+ SASL_SERVER_PLUG_INIT( $mech )
+-" > ${mech}_init.c
++"       > ${mech}_init.c
++        echo "generating $1"
++    fi # End of `if [ ${plugin_init} = "${mech}_init.c" ];then'
+ done
+ 
+ # auxprop plugins
+ for auxprop in sasldb sql ldapdb; do
++    if [ ${plugin_init} = "${auxprop}_init.c" ];then
+ 
+-echo "
++        echo "
+ #include <config.h>
+ 
+ #include <string.h>
+@@ -86,8 +91,12 @@ BOOL APIENTRY DllMain( HANDLE hModule,
+ #endif
+ 
+ SASL_AUXPROP_PLUG_INIT( $auxprop )
+-" > ${auxprop}_init.c
++"       > ${auxprop}_init.c
++        echo "generating $1"
++    fi # End of `if [ ${plugin_init} = "${auxprop}_init.c" ];then'
+ done
+ 
+ # ldapdb is also a canon_user plugin
+-echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c
++if [ ${plugin_init} = "ldapdb_init.c" ];then
++    echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c
++fi
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch
new file mode 100644
index 0000000..68d09c3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch
@@ -0,0 +1,28 @@
+From 98082f81da1b49876081ff1ab340e952755f985a Mon Sep 17 00:00:00 2001
+From: OBATA Akio <obache@users.noreply.github.com>
+Date: Fri, 11 May 2018 18:36:26 +0900
+Subject: [PATCH] configure.ac: fix condition for suppliment snprintf
+ implementation
+
+$sasl_cv_snprintf means requremnt of suppliment snprintf
+implementation, not existence of system snprintf implementation,
+
+Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/512]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ac59f14..9804e98 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1264,7 +1264,7 @@ SNPRINTFOBJS=""
+ LTSNPRINTFOBJS=""
+ AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprintf()?])], [sasl_cv_snprintf=yes])
+ AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes])
+-if test $sasl_cv_snprintf = no; then
++if test $sasl_cv_snprintf = yes; then
+        AC_LIBOBJ(snprintf)
+        SNPRINTFOBJS="snprintf.o"
+        LTSNPRINTFOBJS="snprintf.lo"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch
new file mode 100644
index 0000000..b94780f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch
@@ -0,0 +1,35 @@
+From 94fe6eb9ea2691f4a7c32fbf2d0c7c454995b666 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 27 Feb 2020 11:08:57 +0800
+Subject: [PATCH] Fix #587
+
+Off by one error in common.c, CVE-2019-19906.
+
+Thanks to Stephan Zeisberg for reporting
+
+CVE: CVE-2019-19906
+
+Upstream-Stauts: Backport [https://github.com/cyrusimap/cyrus-sasl
+/commit/dcc9f51cbd4ed622cfb0f9b1c141eb2ffe3b12f1]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/common.c b/lib/common.c
+index 305311d..445c5d5 100644
+--- a/lib/common.c
++++ b/lib/common.c
+@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t *alloclen,
+ 
+   if (add==NULL) add = "(null)";
+ 
+-  addlen=strlen(add); /* only compute once */
++  addlen=strlen(add)+1; /* only compute once */
+   if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK)
+     return SASL_NOMEM;
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
new file mode 100644
index 0000000..f172362
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
@@ -0,0 +1,26 @@
+From 188ad4497947259811ad32faeee95c20f9a44046 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Fri, 19 Jul 2013 14:29:31 +0800
+Subject: [PATCH] Fix hardcoded libdir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ plugins/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/Makefile.am b/plugins/Makefile.am
+index 2b02a52..929f6a4 100644
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
+@@ -65,7 +65,7 @@ LIB_MYSQL = @LIB_MYSQL@
+ 
+ plugindir = @plugindir@
+ 
+-sasldir = $(prefix)/lib/sasl2
++sasldir = $(libdir)/sasl2
+ sasl_LTLIBRARIES = @SASL_MECHS@
+ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
+ 	libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch
new file mode 100644
index 0000000..aa271b8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch
@@ -0,0 +1,49 @@
+From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Tue, 25 Jun 2013 09:22:59 +0800
+Subject: [PATCH] Avoid to call AC_TRY_RUN
+
+Upstream-Status: Inappropriate [configuration]
+
+Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO
+on cross-compile environment by definition AC_ARG_ENABLE enable-spnego
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ m4/sasl2.m4 | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
+index 56e0504..cf62607 100644
+--- a/m4/sasl2.m4
++++ b/m4/sasl2.m4
+@@ -314,7 +314,18 @@ if test "$gssapi" != no; then
+   cmu_save_LIBS="$LIBS"
+   LIBS="$LIBS $GSSAPIBASE_LIBS"
+ 
+-  AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
++  AC_ARG_ENABLE([spnego],
++              [AC_HELP_STRING([--enable-spnego=<DIR>],
++                              [enable SPNEGO support in GSSAPI libraries [no]])],
++              [spnego=$enableval],
++              [spnego=no])
++
++  if test "$spnego" = no; then
++       echo "no"
++  elif test "$spnego" = yes; then
++       AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
++  else
++       AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
+   AC_TRY_RUN([
+ #ifdef HAVE_GSSAPI_H
+ #include <gssapi.h>
+@@ -341,7 +352,7 @@ int main(void)
+ 	AC_MSG_RESULT(yes) ],
+ 	AC_MSG_RESULT(no))
+   LIBS="$cmu_save_LIBS"
+-
++   fi
+ else
+   AC_MSG_RESULT([disabled])
+ fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff
new file mode 100644
index 0000000..0479acf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff
@@ -0,0 +1,28 @@
+From 1a5f3004e9081eab6263a29cd5be792f06441e36 Mon Sep 17 00:00:00 2001
+From: Fabian Fagerholm <fabbe@debian.org>
+Date: Wed, 24 Jul 2013 11:38:25 -0400
+Subject: [PATCH] cyrus-sasl: Add patches from Debian to fix linking
+
+Description: This patch makes sure the non-PIC version of libsasldb.a, which
+is created out of non-PIC objects, is not going to overwrite the PIC version,
+which is created out of PIC objects. The PIC version is placed in .libs, and
+the non-PIC version in the current directory.  This ensures that both non-PIC
+and PIC versions are available in the correct locations.
+
+---
+ lib/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index a158ca3..3137e19 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -99,7 +99,7 @@ endif
+ 
+ libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
+ 	@echo adding static plugins and dependencies
+-	$(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
++	$(AR) cru $@ $(SASL_STATIC_OBJS)
+ 	@for i in ./libsasl2.la ../common/libplugin_common.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
+ 	if test ! -f $$i; then continue; fi; . $$i; \
+ 	for j in $$dependency_libs foo; do \
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
new file mode 100644
index 0000000..a91a9d3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
@@ -0,0 +1,11 @@
+# Directory in which to place saslauthd's listening socket, pid file, and so
+# on.  This directory must already exist.
+SOCKETDIR=@LOCALSTATEDIR@/run/saslauthd
+
+# Mechanism to use when checking passwords.  Run "saslauthd -v" to get a list
+# of which mechanism your installation was compiled with the ablity to use.
+MECH=pam
+
+# Additional flags to pass to saslauthd on the command line.  See saslauthd(8)
+# for the list of accepted flags.
+FLAGS=
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
new file mode 100644
index 0000000..96dbae3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=SASL authentication daemon.
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/run/saslauthd/saslauthd.pid
+EnvironmentFile=@SYSCONFDIR@/default/saslauthd
+ExecStart=@SBINDIR@/saslauthd -m $SOCKETDIR -a $MECH $FLAGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
new file mode 100644
index 0000000..d55dc4a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
@@ -0,0 +1,98 @@
+SUMMARY = "Generic client/server library for SASL authentication"
+SECTION = "libs"
+HOMEPAGE = "http://asg.web.cmu.edu/sasl/"
+DEPENDS = "openssl db groff-native"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
+
+SRCREV = "e41cfb986c1b1935770de554872247453fdbb079"
+
+SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \
+           file://avoid-to-call-AC_TRY_RUN.patch \
+           file://Fix-hardcoded-libdir.patch \
+           file://debian_patches_0014_avoid_pic_overwrite.diff \
+           file://saslauthd.service \
+           file://saslauthd.conf \
+           file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \
+           file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \
+           file://0001-makeinit.sh-fix-parallel-build-issue.patch \
+           file://CVE-2019-19906.patch \
+           "
+
+UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig useradd systemd
+
+EXTRA_OECONF += "--with-dblib=berkeley \
+                 --with-plugindir='${libdir}/sasl2' \
+                 andrew_cv_runpath_switch=none"
+
+PACKAGECONFIG ??= "ntlm \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)} \
+"
+PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
+PACKAGECONFIG[des] = "--with-des,--without-des,,"
+PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
+PACKAGECONFIG[ntlm] = "--enable-ntlm=yes,--enable-ntlm=no,,"
+
+CFLAGS += "-fPIC"
+
+do_configure_prepend () {
+    # make it be able to work with db 5.0 version
+    local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
+    for sed_file in $sed_files; do
+        sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' ${S}/$sed_file
+    done
+}
+
+do_compile_prepend () {
+    cd include
+    ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/include/makemd5.c -o makemd5
+    touch makemd5.o makemd5.lo makemd5
+    cd ..
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system
+
+        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+        sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
+
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf
+
+        install -d ${D}${sysconfdir}/default/
+        install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd
+    fi
+}
+
+USERADD_PACKAGES = "${PN}-bin"
+USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus"
+
+SYSTEMD_PACKAGES = "${PN}-bin"
+SYSTEMD_SERVICE_${PN}-bin = "saslauthd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425"
+SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3"
+
+PACKAGES =+ "${PN}-bin"
+
+FILES_${PN}           += "${libdir}/sasl2/*.so*"
+FILES_${PN}-bin       += "${bindir} \
+                          ${sysconfdir}/default/saslauthd \
+                          ${systemd_unitdir}/system/saslauthd.service \
+                          ${sysconfdir}/tmpfiles.d/saslauthd.conf"
+FILES_${PN}-dev       += "${libdir}/sasl2/*.la"
+FILES_${PN}-dbg       += "${libdir}/sasl2/.debug"
+FILES_${PN}-staticdev += "${libdir}/sasl2/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb
new file mode 100644
index 0000000..004433b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb
@@ -0,0 +1,13 @@
+SUMMARY = "simple dynamic multicast routing daemon that only uses IGMP signalling"
+HOMEPAGE = "http://sourceforge.net/projects/igmpproxy/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=432040ff3a55670c1dec0c32b209ad69"
+
+SRC_URI = "https://github.com/pali/igmpproxy/releases/download/${PV}/${BP}.tar.gz"
+SRC_URI[md5sum] = "3a9c2cb42c1f5ee0cb769a4884545641"
+SRC_URI[sha256sum] = "d351e623037390f575c1203d9cbb7ba33a8bdef85a3c5e1d2901c5a2a38449a1"
+
+UPSTREAM_CHECK_URI = "https://github.com/pali/${BPN}/releases"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
new file mode 100644
index 0000000..e967621
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
@@ -0,0 +1,56 @@
+From 4848b9e4d516a9203c08432901a7b40419e8f43c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 15:54:35 -0700
+Subject: [PATCH 1/3] Respect flags from env
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile      | 4 ++--
+ cli/Makefile  | 2 +-
+ pppd/Makefile | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a05a000..439a978 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,8 +81,8 @@ LIBS.dmalloc=		-ldmalloc
+ export USE_DMALLOC
+ endif
+ 
+-CPPFLAGS=		$(CPPFLAGS.ippooltest)
+-CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
++CPPFLAGS+=		$(CPPFLAGS.ippooltest)
++CFLAGS+=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+ LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+ LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
+ 
+diff --git a/cli/Makefile b/cli/Makefile
+index 4b5dd59..56fbf2f 100644
+--- a/cli/Makefile
++++ b/cli/Makefile
+@@ -7,7 +7,7 @@ CLI_SRCS_TEST.o=	$(CLI_SRCS_TEST.c:%.c=%.o)
+ 
+ LDFLAGS.cli_test=	-L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc
+ 
+-CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS)
++CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS) $(CPPFLAGS)
+ 
+ .PHONY:			all test clean
+ 
+diff --git a/pppd/Makefile b/pppd/Makefile
+index 106deca..7fd815f 100644
+--- a/pppd/Makefile
++++ b/pppd/Makefile
+@@ -10,7 +10,7 @@ endif
+ 
+ # END CONFIGURABLE SETTINGS
+ 
+-CFLAGS	+= -g -I.. -I/usr/include/pppd $(CFLAGS.pppd) -fPIC
++CFLAGS	+= -g -I.. -I=/usr/include/pppd $(CFLAGS.pppd) -fPIC
+ LDFLAGS	+= -shared
+ 
+ all:	ippool.so
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch
new file mode 100644
index 0000000..7d3f9ac
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch
@@ -0,0 +1,31 @@
+From e4e0aae139b6489dc582fd14e54e562126482ce2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:23:53 -0700
+Subject: [PATCH 1/3] read() returns ssize_t
+
+Fixes
+usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
+                if (nb < 0) {
+                    ~~ ^ ~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_fd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usl/usl_fd.c b/usl/usl_fd.c
+index 3b7a813..04ba48c 100644
+--- a/usl/usl_fd.c
++++ b/usl/usl_fd.c
+@@ -280,7 +280,7 @@ size_t usl_fd_read(int fd, void *buf, size_t count)
+ 	char *ptr = buf;
+ 
+ 	for (chars_read = 0; chars_read < count; ) {
+-		size_t nb = read(fd, ptr, count - chars_read);
++		ssize_t nb = read(fd, ptr, count - chars_read);
+ 		if (nb < 0) {
+ 			if (errno == EINTR)
+ 				continue;
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
new file mode 100644
index 0000000..6fb7cc5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
@@ -0,0 +1,28 @@
+From 5d7f20c045b3c74dad2c53d65e30bd4840250082 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 15:17:19 -0700
+Subject: [PATCH] usl_timer: Check for return value of write() API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_timer.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index fda752b..d8414a6 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -94,7 +94,9 @@ void usl_timer_tick(void)
+ 
+ 	if (!usl_tick_pending) {
+ 		usl_tick_pending = 1;
+-		write(usl_tick_pipe[1], &msg, sizeof(msg));
++		if (write(usl_tick_pipe[1], &msg, sizeof(msg)) != sizeof(msg)) {
++			fprintf(stderr, "write to fd %i failed: %s\n", usl_tick_pipe[1], strerror(errno));
++		}
+ 	}
+ }
+ 
+-- 
+2.13.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch
new file mode 100644
index 0000000..6e2bd52
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch
@@ -0,0 +1,31 @@
+From cf25576428903168cd41b183fb1ca9c2b7e2666e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:28:10 -0700
+Subject: [PATCH 2/3] Mark first element of a string as null
+
+Fixes
+cli_lib.c:427:20: error: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Werror,-Wnon-literal-null-conversion]
+                                        values[arg] = '\0';
+                                                      ^~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_lib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cli/cli_lib.c b/cli/cli_lib.c
+index 41a0b06..e4d2fd5 100644
+--- a/cli/cli_lib.c
++++ b/cli/cli_lib.c
+@@ -424,7 +424,7 @@ int cli_find_args(int argc, char *argv[], struct cli_node *cmd, struct cli_node
+ 			if (arg_string[1] == '\0') {
+ 				/* no arg value - only allowed for string args */
+ 				if (node->arg->parser == cli_arg_parse_string) {
+-					values[arg] = '\0';
++					*values[arg] = '\0';
+ 				} else {
+ 					result = -EINVAL;
+ 					break;
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
new file mode 100644
index 0000000..d80f7b4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
@@ -0,0 +1,30 @@
+From 47aef26198431f7ad568c2277dded158bda3e36f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 16:00:35 -0700
+Subject: [PATCH 2/3] link with libtirpc
+
+musl needs it
+
+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 439a978..ea821eb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ endif
+ 
+ CPPFLAGS+=		$(CPPFLAGS.ippooltest)
+ CFLAGS+=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+-LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc -ltirpc
++LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses $(LIBS.dmalloc) -lc -ltirpc
+ 
+ OPT_CFLAGS?=		-O
+ 
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch
new file mode 100644
index 0000000..3854b11
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch
@@ -0,0 +1,58 @@
+From 994d9575374d3cdb34b1b0f70c3c53ae76fe578e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 07:41:05 -0700
+Subject: [PATCH 3/3] cli: Mark return of strtol as long int
+
+strtol does not return unsigned long
+
+error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
+        if ((*endp == '\0') && (labs(tmp) < 32768)) {
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_lib.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/cli/cli_lib.c b/cli/cli_lib.c
+index e4d2fd5..5f487dc 100644
+--- a/cli/cli_lib.c
++++ b/cli/cli_lib.c
+@@ -522,7 +522,7 @@ int cli_arg_parse_int32(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result)
+ {
+ 	int16_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -539,7 +539,7 @@ int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_int8(struct cli_node *arg, const char *val, void *result)
+ {
+ 	int8_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -573,7 +573,7 @@ int cli_arg_parse_uint32(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result)
+ {
+ 	uint16_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+@@ -590,7 +590,7 @@ int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result)
+ int cli_arg_parse_uint8(struct cli_node *arg, const char *val, void *result)
+ {
+ 	uint8_t *intval = result;
+-	unsigned long tmp;
++	long tmp;
+ 	char *endp;
+ 	int ret = 0;
+ 
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
new file mode 100644
index 0000000..952e4f0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
@@ -0,0 +1,80 @@
+From eb345047decba665e3f39908336a83f039e1ece2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Jul 2017 16:01:32 -0700
+Subject: [PATCH 3/3] musl fixes
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_readline.c |   7 +-
+ ippool_api.c       |   9 ++-
+ net/ppp_defs.h     | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ usl/usl.h          |   4 ++
+ 4 files changed, 208 insertions(+), 6 deletions(-)
+ create mode 100644 net/ppp_defs.h
+
+Index: ippool-1.3/cli/cli_readline.c
+===================================================================
+--- ippool-1.3.orig/cli/cli_readline.c
++++ ippool-1.3/cli/cli_readline.c
+@@ -17,13 +17,14 @@
+  *  Boston, MA 02110-1301 USA
+  *
+  *****************************************************************************/
+-
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/file.h>
+ #include <sys/stat.h>
+-#include <sys/errno.h>
++#include <fcntl.h>
++#include <errno.h>
+ #include <signal.h>
+ 
+ #include <readline/readline.h>
+@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_hand
+ 
+ static int cli_rl_install_signal_handlers(void)
+ {
+-	__sighandler_t handler;
++	sighandler_t handler;
+ 
+ 	rl_catch_signals = 0;
+ 	rl_clear_signals();
+Index: ippool-1.3/ippool_api.c
+===================================================================
+--- ippool-1.3.orig/ippool_api.c
++++ ippool-1.3/ippool_api.c
+@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT
+ 	 * non-loopback interface, reject the request.
+ 	 */
+ 	if ((!ippool_opt_remote_rpc) &&
+-	    ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
+-	     (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
++	    ((xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_LOOPBACK)) &&
++	     (xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_ANY)))) {
++		char straddr[INET6_ADDRSTRLEN];
++		inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
++
+ 		if (ippool_opt_debug) {
+-			ippool_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
++			ippool_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
+ 		}
+ 		svcerr_auth(xprt, AUTH_TOOWEAK);
+ 		return -EPERM;
+Index: ippool-1.3/usl/usl.h
+===================================================================
+--- ippool-1.3.orig/usl/usl.h
++++ ippool-1.3/usl/usl.h
+@@ -38,6 +38,10 @@
+ #include "usl_fsm.h"
+ #include "usl_list.h"
+ 
++#ifndef WAIT_ANY
++#define WAIT_ANY (-1)
++#endif
++
+ #define USL_VERSION	"0.6"
+ 
+ #ifdef DEBUG
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch
new file mode 100644
index 0000000..e475276
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch
@@ -0,0 +1,22 @@
+ippool: always log to syslog
+
+Even when running in the foreground, send log messages to syslog.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+
+--- a/ippool_main.c
++++ b/ippool_main.c
+@@ -251,9 +251,8 @@ void ippool_vlog(int level, const char *
+ 	if (ippool_opt_nodaemon) {
+ 		vprintf(fmt, ap);
+ 		printf("\n");
+-	} else {
+-		vsyslog(level, fmt, ap);
+ 	}
++	vsyslog(level, fmt, ap);
+ 	DMALLOC_VMESSAGE(fmt, ap);
+ }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
new file mode 100644
index 0000000..e5917fc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=ip address pool allocator
+Requires=rpcbind.service
+After=rpcbind.service
+
+[Service]
+Type=simple
+# Start ippoold in the foreground!
+ExecStart=@SBINDIR@/ippoold -f
+# Normal output will go to syslog, so suppress stdout.
+StandardOutput=null
+StandardError=syslog
+# ExecStop is not needed. systemd will send SIGTERM
+# and ippoold will exit status 1.
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch
new file mode 100644
index 0000000..14a768d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch
@@ -0,0 +1,65 @@
+Fix start error if lsb init-functions doesn't exist
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/debian/init.d b/debian/init.d
+index 363ba89..0327fec 100644
+--- a/debian/init.d
++++ b/debian/init.d
+@@ -10,6 +10,9 @@
+ # Description:       Start ippool daemon
+ ### END INIT INFO
+ 
++# Source function library.
++. /etc/init.d/functions
++
+ DAEMON=/usr/sbin/ippoold
+ NAME=ippoold
+ MODULE=pppol2tp
+@@ -18,7 +21,23 @@ MODULE=pppol2tp
+ test -x $DAEMON || exit 0
+ 
+ # Get lsb functions
+-. /lib/lsb/init-functions
++if [ -f /lib/lsb/init-functions ]
++then
++  . /lib/lsb/init-functions
++else
++  log_begin_msg() {
++    echo -n $*
++  }
++
++  log_end_msg() {
++    if [ $1 -eq 0 ]; then
++      echo "done"
++    else
++      echo "failed"
++    fi
++  }
++fi
++
+ . /etc/default/rcS
+ 
+ case "$1" in
+@@ -35,6 +54,10 @@ case "$1" in
+     fi
+     log_end_msg $?
+     ;;
++  status)
++    status /usr/sbin/ippoold;
++    exit $?
++    ;;
+   restart)
+     $0 stop
+     sleep 1
+@@ -46,7 +69,7 @@ case "$1" in
+     log_end_msg $?
+     ;;
+   *)
+-    log_success_msg "Usage: /etc/init.d/ippoold {start|stop|restart|reload|force-reload}"
++    log_success_msg "Usage: /etc/init.d/ippoold {start|stop|status|restart|reload|force-reload}"
+     exit 1
+ esac
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch
new file mode 100644
index 0000000..1ebd95e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch
@@ -0,0 +1,89 @@
+1)add -fPIC for $(IPPOOL_RPC_STEM)_xdr.o, $(IPPOOL_RPC_STEM)_client.o
+2)add sub target for subdirs-all, and those dependencies below
+  pppd plugin directory build depends on $(IPPOOL_RPC_STEM)_xdr.o 
+$(IPPOOL_RPC_STEM)_client.o ippool_rpc.h
+
+  ippoold depends on libusl
+  ippoolconfig depends on libcli
+
+  $(IPPOOL_RPC_STEM)_xdr.o, $(IPPOOL_RPC_STEM)_client.o 
+$(IPPOOL_RPC_STEM)_server.o *.o in main directory depends on ippool_rpc.h
+as those all directly or indirectly include ippool_rpc.h which is 
+dynamically generated by rpcgen
+
+to make parallel make working.
+3)include dependency files for pppd.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/Makefile b/Makefile
+index 73aa72f..4f7af1d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -106,14 +106,14 @@ all:			generated-files $(IPPOOL_RPC_STEM)_xdr.o $(IPPOOL_RPC_STEM)_client.o \
+ 			subdirs-all $(PROGS.sbin) $(PROGS.bin)
+ 
+ # Compile without -Wall because rpcgen-generated code is full of warnings
+-$(IPPOOL_RPC_STEM)_xdr.o:	$(IPPOOL_RPC_STEM)_xdr.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_xdr.o:	$(IPPOOL_RPC_STEM)_xdr.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+-$(IPPOOL_RPC_STEM)_client.o:	$(IPPOOL_RPC_STEM)_client.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_client.o:	$(IPPOOL_RPC_STEM)_client.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+-$(IPPOOL_RPC_STEM)_server.o:	$(IPPOOL_RPC_STEM)_server.c
+-			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $<
++$(IPPOOL_RPC_STEM)_server.o:	$(IPPOOL_RPC_STEM)_server.c $(IPPOOL_RPC_STEM).h
++			$(CC) -I. -MMD -g -c -w $(CPPFLAGS) $(CFLAGS.optimize) $< -fPIC
+ 
+ $(IPPOOL_RPC_STEM)_xdr.c:	$(IPPOOL_RPC_STEM).x
+ 			-$(RM) $@
+@@ -136,8 +136,12 @@ $(IPPOOL_RPC_STEM).h:	$(IPPOOL_RPC_STEM).x
+ 
+ generated-files:	$(RPC_FILES)
+ 
+-subdirs-all:
+-			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" all; if [ $$? -ne 0 ]; then exit 1; fi; done
++subdirs-all:	$(patsubst %,%-dir, $(SUBDIRS))
++
++pppd-dir: $(IPPOOL_RPC_STEM)_xdr.o $(IPPOOL_RPC_STEM)_client.o $(IPPOOL_RPC_STEM).h
++
++$(patsubst %,%-dir,$(SUBDIRS)):
++			@for d in $(patsubst %-dir,%,$@); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" all; if [ $$? -ne 0 ]; then exit 1; fi; done
+ 
+ clean:
+ 			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; if [ $$? -ne 0 ]; then exit 1; fi; done
+@@ -151,13 +155,13 @@ TAGS:
+ 			@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done
+ 			etags -t $(wildcard *.c) $(wildcard *.h)
+ 
+-ippoold:		$(IPPOOLD_SRCS.o)
+-			$(CC) -o $@ $^ $(LDFLAGS.ippoold)
++ippoold:		$(IPPOOLD_SRCS.o) usl-dir
++			$(CC) -o $@ $(IPPOOLD_SRCS.o) $(LDFLAGS.ippoold)
+ 
+-ippoolconfig:		$(IPPOOLCONFIG_SRCS.o)
+-			$(CC) -o $@ $^ $(LDFLAGS.ippoolconfig)
++ippoolconfig:		$(IPPOOLCONFIG_SRCS.o) cli-dir
++			$(CC) -o $@ $(IPPOOLCONFIG_SRCS.o) $(LDFLAGS.ippoolconfig)
+ 
+-%.o:	%.c
++%.o:	%.c $(IPPOOL_RPC_STEM).h
+ 			$(CC) -c $(CFLAGS) $< -o $@
+ 
+ install:		all
+diff --git a/pppd/Makefile b/pppd/Makefile
+index 78d9b33..106deca 100644
+--- a/pppd/Makefile
++++ b/pppd/Makefile
+@@ -24,3 +24,5 @@ install: ippool.so
+ 
+ clean:
+ 	-rm -rf *.o *.so
++
++include $(wildcard *.d /dev/null)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch
new file mode 100644
index 0000000..ca0e332
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch
@@ -0,0 +1,49 @@
+include limits.h to avoid UINT_MAX undefined compiling error.
+remove the unused assign which caused compiling error with -Werror.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index 734b820..fda752b 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -42,6 +42,7 @@
+ #include <signal.h>
+ #include <string.h>
+ #include <sys/time.h>
++#include <limits.h>
+ 
+ #include "usl.h"
+ 
+@@ -87,14 +88,13 @@ void (*usl_timer_tick_hook)(void);
+  */
+ void usl_timer_tick(void)
+ {
+-	int result;
+ 	char msg = '\0';
+ 
+ 	usl_tick++;
+ 
+ 	if (!usl_tick_pending) {
+ 		usl_tick_pending = 1;
+-		result = write(usl_tick_pipe[1], &msg, sizeof(msg));
++		write(usl_tick_pipe[1], &msg, sizeof(msg));
+ 	}
+ }
+ 
+@@ -111,11 +111,10 @@ static void usl_timer_tick_handler(int fd, void *arg)
+ 	struct usl_ord_list_head *tmp;
+ 	struct usl_list_head *iwalk;
+ 	struct usl_list_head *itmp;
+-	int result;
+ 	char msg;
+ 	USL_LIST_HEAD(expire_list);
+ 
+-	result = usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
++	usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
+ 	usl_tick_pending = 0;
+ 
+ 	usl_list_for_each(walk, tmp, &usl_timer_list) {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch
new file mode 100644
index 0000000..7d5b715
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch
@@ -0,0 +1,21 @@
+Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 4f7af1d..a05a000 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ endif
+ 
+ CPPFLAGS=		$(CPPFLAGS.ippooltest)
+ CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+-LDFLAGS.ippoold=	-Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.ippoolconfig=	-Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
+ 
+ OPT_CFLAGS?=		-O
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh
new file mode 100644
index 0000000..f91f582
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+BANNER="----------------------------------------------------------------------------"
+TCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result"
+
+test_setup() {
+        if [ -d ./results ]; then rm -fr ./results; fi
+        mkdir ./results
+}
+
+test_ippool() {
+        echo "${BANNER}"
+        eval $TCLSH -constraints "ipPool"
+}
+test_postprocess() {
+        echo "${BANNER}"
+        (failed=`grep FAILED results/*.result | wc -l`; \
+        let failed2=failed/2 ;\
+        passed=`grep PASSED results/*.result | wc -l`; \
+        echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\
+        exit $failed2)
+}
+
+test_setup
+test_ippool
+test_postprocess
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch
new file mode 100644
index 0000000..01e1da8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch
@@ -0,0 +1,39 @@
+Replace strncpy with memcpy 
+
+since the length of data to 
+be copied has already been determined with strlen(). Replace strncpy()
+with memcpy() to address the warning and optimize the code a little.
+
+| ippool_config.c:112:2: note: 'snprintf' output between 8 and 55 bytes into a destination of size 48
+|   112 |  snprintf(prompt, sizeof(prompt), "ippool-%s", server_name);
+|       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/cli/cli_readline.c
++++ b/cli/cli_readline.c
+@@ -257,10 +257,15 @@ static void cli_rl_display_wrapped_text(
+ 	int pos;
+ 	int in_ws;
+ 	int i;
++	int bufsize = sizeof(text_buf)/sizeof(text_buf[0]);
+ 
+ 	if (left_margin == 0) {
+ 		left_margin = 3;
+ 	}
++	if (left_margin > bufsize) {
++		left_margin = bufsize;
++	}
++
+ 	if (right_margin == 0) {
+ 		right_margin = 78;;
+ 	}
+@@ -271,7 +276,7 @@ static void cli_rl_display_wrapped_text(
+ 	/* First copy the text heading to the buffer and add a "-", accounting for
+ 	 * the specified left margin.
+ 	 */
+-	strncpy(&text_buf[0], text1, left_margin - 3);
++	memcpy(&text_buf[0], text1, left_margin - 3);
+ 	for (pos = strlen(text1); pos < left_margin - 3; pos++) {
+ 		text_buf[pos] = ' ';
+ 	}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
new file mode 100644
index 0000000..3554e68
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -0,0 +1,110 @@
+SUMMARY = "An IP address pool manager"
+DESCRIPTION = "IpPool is implemented as a separate server daemon \
+to allow any application to use its address pools. This makes it possible \
+to define address pools that are shared by PPP, L2TP, PPTP etc. It may be \
+useful in some VPN server setups. IpPool comes with a command line \
+management application, ippoolconfig to manage and query address pool \
+status. A pppd plugin is supplied which allows pppd to request IP \
+addresses from ippoold. \
+"
+HOMEPAGE = "http://www.openl2tp.org/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+
+SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+           file://runtest.sh \
+           file://ippool.service \
+           file://ippool_usl_timer.patch \
+           file://ippool_parallel_make_and_pic.patch \
+           file://ippool_init.d.patch \
+           file://always_syslog.patch \
+           file://makefile-add-ldflags.patch \
+           file://0001-usl_timer-Check-for-return-value-of-write-API.patch \
+           file://0001-Respect-flags-from-env.patch \
+           file://0001-read-returns-ssize_t.patch \
+           file://0002-Mark-first-element-of-a-string-as-null.patch \
+           file://0003-cli-Mark-return-of-strtol-as-long-int.patch \
+           file://0002-link-with-libtirpc.patch \
+           file://0003-musl-fixes.patch \
+           file://strncpy-truncation.patch \
+           "
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
+SRC_URI[md5sum] = "e2401e65db26a3764585b97212888fae"
+SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea314412075b"
+
+inherit systemd
+
+DEPENDS = "readline ppp ncurses gzip-native rpcsvc-proto-native libtirpc"
+RDEPENDS_${PN} = "rpcbind"
+
+EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'"
+EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}"
+# enable self tests
+EXTRA_OEMAKE += "IPPOOL_TEST=y"
+
+CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc"
+
+SYSTEMD_SERVICE_${PN} = "ippool.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+
+do_compile_prepend() {
+    # fix the CFLAGS= and CPPFLAGS= in main Makefile, to have the extra CFLAGS in env
+    sed -i -e "s/^CFLAGS=/CFLAGS+=/" ${S}/Makefile
+    sed -i -e "s/^CPPFLAGS=/CPPFLAGS+=/" ${S}/Makefile
+
+    sed -i -e "s:-I/usr/include/pppd:-I=/usr/include/pppd:" ${S}/pppd/Makefile
+
+}
+
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+
+    install -D -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/ippoold
+    install -D -m 0644 ${WORKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service
+    sed -i -e 's:@SBINDIR@:${sbindir}:g' ${D}${systemd_system_unitdir}/ippool.service
+
+    # install self test
+    install -d ${D}/opt/${BPN}
+    install ${S}/test/all.tcl  ${S}/test/ippool.test \
+        ${S}/test/test_procs.tcl ${D}/opt/${BPN}
+    install ${WORKDIR}/runtest.sh ${D}/opt/${BPN}
+    # fix the ../ippoolconfig in test_procs.tcl
+    sed -i -e "s:../ippoolconfig:ippoolconfig:" \
+        ${D}/opt/${BPN}/test_procs.tcl
+}
+
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN} += "${libdir}/pppd/${PPPD_VERSION}/ippool.so"
+FILES_${PN}-dbg += "${libdir}/pppd/${PPPD_VERSION}/.debug/ippool.so"
+FILES_${PN}-test = "/opt/${BPN}"
+
+# needs tcl to run tests
+RDEPENDS_${PN}-test += "tcl ${BPN}"
+
+PPPD_VERSION="${@get_ppp_version(d)}"
+
+def get_ppp_version(d):
+    import re
+
+    pppd_plugin = d.expand('${STAGING_LIBDIR}/pppd')
+    if not os.path.isdir(pppd_plugin):
+        return None
+
+    bb.debug(1, "pppd plugin dir %s" % pppd_plugin)
+    r = re.compile("\d*\.\d*\.\d*")
+    for f in os.listdir(pppd_plugin):
+        if os.path.isdir(os.path.join(pppd_plugin, f)):
+            ma = r.match(f)
+            if ma:
+                bb.debug(1, "pppd version dir %s" % f)
+                return f
+            else:
+                bb.debug(1, "under pppd plugin dir %s" % f)
+
+    return None
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch
new file mode 100644
index 0000000..d5e0deb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch
@@ -0,0 +1,31 @@
+From 31d88f46bfc67de2659991674253a5d5dfb92afc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Aug 2020 12:00:29 -0700
+Subject: [PATCH] Makefile: Do not set -Werror
+
+clang finds more warnings which causes build to fail, disable treating
+warning as errors
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usr/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/Makefile b/usr/Makefile
+index 21bb154..0018605 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -35,7 +35,7 @@ endif
+ PKG_CONFIG = /usr/bin/pkg-config
+ 
+ CFLAGS ?= -O2 -g
+-WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common
++WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common
+ CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
+ 	  -I$(TOPDIR)/libopeniscsiusr
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+-- 
+2.28.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils
new file mode 100644
index 0000000..42fdd60
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d root root 0755 /var/lock/iscsi none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian
new file mode 100644
index 0000000..99a7638
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian
@@ -0,0 +1,119 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Starts and stops the iSCSI initiator services and logins to default targets
+### END INIT INFO
+#set -x
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/iscsid
+ADM=/usr/sbin/iscsiadm
+PIDFILE=/var/run/iscsid.pid
+
+[ -x "$DAEMON" ] || exit 0
+
+if [ ! -d /sys/class/ ]; then
+  echo "Failure:" "iSCSI requires a mounted sysfs, not started."
+  exit 1
+fi
+
+nodestartup_re='s/^node\.conn\[0]\.startup[ 	]*=[ 	]*//p'
+
+RETVAL=0
+
+start() {
+	echo "Starting iSCSI initiator service" "iscsid"
+	modprobe -q iscsi_tcp 2>/dev/null || :
+	modprobe -q ib_iser 2>/dev/null || :
+	if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
+		INITIATORNAME=$(iscsi-iname)
+		cat >/etc/iscsi/initiatorname.iscsi <<EOF
+## DO NOT EDIT OR REMOVE THIS FILE!
+## If you remove this file, the iSCSI daemon will not start.
+## If you change the InitiatorName, existing access control lists
+## may reject this initiator.  The InitiatorName must be unique
+## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
+InitiatorName=$INITIATORNAME
+EOF
+	fi
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
+	RETVAL=$?
+	starttargets
+}
+
+starttargets() {
+	echo "Setting up iSCSI targets"
+	$ADM -m node --loginall=automatic
+}
+
+stoptargets() {
+	echo "Disconnecting iSCSI targets"
+	sync
+	$ADM -m node --logoutall=all
+	RETVAL=$?
+	#if RETVAL is 21, means no active sessions, consider ok
+	if [ "$RETVAL" = "21" ]; then
+		RETVAL=0
+	fi
+}
+
+stop() {
+	stoptargets
+	if [ $RETVAL -ne 0 ]; then
+		echo "Failure:" "Could not stop all targets, try again later"
+		return $RETVAL
+	fi
+
+	echo "Stopping iSCSI initiator service"
+	start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+	rm -f $PIDFILE
+	status=0
+	modprobe -r ib_iser 2>/dev/null
+	if [ "$?" -ne "0" -a "$?" -ne "1" ]; then
+		status=1
+	fi
+	modprobe -r iscsi_tcp 2>/dev/null
+	if [ "$?" -ne "0" -a "$?" -ne "1" ]; then
+		status=1
+	fi
+}
+
+restart() {
+	stop
+	if [ $RETVAL -ne 0 ]; then
+		echo "Failure:" "Stopping iSCSI initiator service failed, not starting"
+		return $RETVAL
+	fi
+	start
+}
+
+restarttargets() {
+	stoptargets
+	if [ $RETVAL -ne 0 ]; then
+		echo "Failure:" "Could not stop all targets, try again later"
+		return $RETVAL
+	fi
+	starttargets
+}
+
+status() {
+	#XXX FIXME: what to do here?
+	#status iscsid
+	# list active sessions
+	echo Current active iSCSI sessions:
+	$ADM -m session
+}
+
+case "$1" in
+	start|starttargets|stop|stoptargets|restart|restarttargets|status)
+		$1
+		;;
+	*)
+		echo "Usage: $0 {start|stop|restart|status}"
+		exit 1
+		;;
+esac
+exit $RETVAL
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator
new file mode 100644
index 0000000..7fa49a2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator
@@ -0,0 +1,4 @@
+# default command line settings for open-iscsi's iscsid
+
+OPTS_ISCSID=""
+OPTS_ISCSIADM=""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service
new file mode 100644
index 0000000..564b2d2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-targets.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Open-iSCSI initiator (i.e. client) target bindings
+After=iscsi-initiator.service
+Requires=iscsi-initiator.service
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/default/iscsi-initiator
+ExecStart=/usr/sbin/iscsiadm -m node --loginall=automatic $OPTS_ISCSIADM
+ExecStop=/usr/sbin/iscsiadm -m node --logoutall=all $OPTS_ISCSIADM
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
new file mode 100644
index 0000000..3790dae
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Open-iSCSI initiator (i.e. client) service
+After=syslog.target
+
+[Service]
+EnvironmentFile=/etc/default/iscsi-initiator
+ExecStartPre=/sbin/modprobe iscsi_tcp
+ExecStartPre=/usr/lib/iscsi/set_initiatorname
+ExecStart=/usr/sbin/iscsid -f $OPTS_ISCSID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
new file mode 100644
index 0000000..a196c6b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
@@ -0,0 +1,12 @@
+#!/bin/sh
+if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
+    INITIATORNAME=$(iscsi-iname)
+    cat >/etc/iscsi/initiatorname.iscsi <<EOF
+## DO NOT EDIT OR REMOVE THIS FILE!
+## If you remove this file, the iSCSI daemon will not start.
+## If you change the InitiatorName, existing access control lists
+## may reject this initiator.  The InitiatorName must be unique
+## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
+InitiatorName=$INITIATORNAME
+EOF
+fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb
new file mode 100644
index 0000000..4a9cf9d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb
@@ -0,0 +1,117 @@
+SUMMARY = "iSCSI daemon and utility programs"
+DESCRIPTION = "Open-iSCSI project is a high performance, transport \
+independent, multi-platform implementation of RFC3720. The iscsi package \
+provides the server daemon for the iSCSI protocol, as well as the utility \
+programs used to manage it. iSCSI is a protocol for distributed \
+disk access using SCSI commands sent over Internet Protocol networks."
+HOMEPAGE = "http://www.open-iscsi.com/"
+LICENSE = "GPLv2 & LGPLv2.1"
+SECTION = "net"
+DEPENDS = "openssl flex-native bison-native open-isns util-linux kmod"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRCREV ?= "34e3ffb194f6fa3028c0eb2ff57e7db2d1026771"
+
+SRC_URI = "git://github.com/open-iscsi/open-iscsi \
+           file://0001-Makefile-Do-not-set-Werror.patch \
+           file://initd.debian \
+           file://99_iscsi-initiator-utils \
+           file://iscsi-initiator \
+           file://iscsi-initiator.service \
+           file://iscsi-initiator-targets.service \
+           file://set_initiatorname \
+           "
+S = "${WORKDIR}/git"
+
+inherit update-rc.d systemd autotools pkgconfig
+
+EXTRA_OECONF = " \
+    --target=${TARGET_SYS} \
+    --host=${BUILD_SYS} \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '--without-systemd NO_SYSTEMD=1',     d)}"
+
+EXTRA_OEMAKE = ' \
+    OS="${TARGET_SYS}" \
+    TARGET="${TARGET_OS}" \
+    BASE="${prefix}" \
+    MANDIR="${mandir}" \
+    OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \
+    PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \
+'
+
+
+do_configure () {
+    cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF}
+}
+
+do_compile () {
+    # Make sure we DO NOT regenerate prom_lex.c.
+    if [ -f ${S}/utils/fwparam_ibft/prom_lex.l ]; then
+        mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused
+    fi
+    oe_runmake -C ${S} ${EXTRA_OEMAKE} user
+}
+
+do_install () {
+    #install necessary directories
+    install -d ${D}${sbindir} \
+        ${D}${sysconfdir}/init.d \
+        ${D}${sysconfdir}/iscsi \
+        ${D}${localstatedir}/lib/iscsi/nodes \
+        ${D}${localstatedir}/lib/iscsi/send_targets \
+        ${D}${localstatedir}/lib/iscsi/static \
+        ${D}${localstatedir}/lib/iscsi/isns \
+        ${D}${localstatedir}/lib/iscsi/slp \
+        ${D}${localstatedir}/lib/iscsi/ifaces \
+        ${D}${libdir} \
+        ${D}${mandir}/man8
+
+    install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \
+        ${S}/utils/iscsi-iname \
+        ${S}/usr/iscsistart ${D}/${sbindir}
+
+    cp -dR ${S}/libopeniscsiusr/libopeniscsiusr.so* ${D}${libdir}
+    install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8
+    install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi
+    install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid
+
+    sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /run/${BPN}/lock - - - -" \
+                     > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf
+        install -d ${D}/etc/default/
+        install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/
+
+        install -d ${D}${systemd_unitdir}/system/
+        install -m 0644 ${WORKDIR}/iscsi-initiator.service \
+                        ${WORKDIR}/iscsi-initiator-targets.service \
+                        ${D}${systemd_unitdir}/system/
+        install -d ${D}${nonarch_libdir}/iscsi
+        install -m 0755 ${WORKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi
+    else
+        install -d ${D}/etc/default/volatiles
+        install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles
+    fi
+}
+
+pkg_postinst_${PN}() {
+    if [ "x$D" = "x" ]; then
+        if [ -e /etc/init.d/populate-volatile.sh ]; then
+            /etc/init.d/populate-volatile.sh update
+        elif command -v systemd-tmpfiles >/dev/null; then
+            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
+        fi
+    fi
+}
+
+SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service "
+INITSCRIPT_NAME = "iscsid"
+INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ."
+
+FILES_${PN} += "${nonarch_libdir}/iscsi"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_2.0.20.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_2.0.20.bb
new file mode 100644
index 0000000..f3c33dc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_2.0.20.bb
@@ -0,0 +1,45 @@
+SUMMARY = "High Availability monitor built upon LVS, VRRP and service pollers"
+DESCRIPTION = "Keepalived is a routing software written in C. The main goal \
+of this project is to provide simple and robust facilities for loadbalancing \
+and high-availability to Linux system and Linux based infrastructures. \
+Loadbalancing framework relies on well-known and widely used Linux Virtual \
+Server (IPVS) kernel module providing Layer4 loadbalancing \
+"
+HOMEPAGE = "http://www.keepalived.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz"
+SRC_URI[md5sum] = "a5966e8433b60998709c4a922a407bac"
+SRC_URI[sha256sum] = "9670fbc5eb3dc113828be8b702549dc68ec9578cf83287520d935be76fc8f193"
+
+DEPENDS = "libnfnetlink openssl"
+
+inherit autotools pkgconfig systemd
+
+PACKAGECONFIG ??= "libnl snmp \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd"
+
+EXTRA_OECONF = "--disable-libiptc"
+EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
+
+do_install_append() {
+    if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
+        chmod 0755 ${D}${sysconfdir}/init.d/${BPN}
+        sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN}
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${B}/${BPN}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
+    fi
+}
+
+FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt"
+
+SYSTEMD_SERVICE_${PN} = "keepalived.service"
+SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default
new file mode 100644
index 0000000..3acacfd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.default
@@ -0,0 +1,2 @@
+# Uncomment to start SNMP subagent and enable CDP, SONMP and EDP protocol
+#DAEMON_ARGS="-x -c -s -e"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d
new file mode 100644
index 0000000..88bf958
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/lldpd.init.d
@@ -0,0 +1,128 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          lldpd
+# Required-Start:    $remote_fs $network $syslog
+# Required-Stop:     $network $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: LLDP daemon
+# Description:       lldpd is a 802.1AB implementation, a L2 network
+#                    discovery protocol. It also supports CDP, EDP and
+#                    various other protocols.
+### END INIT INFO
+
+# Do NOT "set -e"
+
+log_daemon_msg() {
+    echo $*
+}
+
+log_end_msg() {
+    if [ $1 -eq 0 ]; then
+        success $*
+    else
+        failure $*
+    fi
+}
+
+log_failure_msg() {
+    echo $*
+}
+
+log_success_msg() {
+    echo $*
+}
+
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="LLDP daemon"
+NAME=lldpd
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CHROOT=/var/run/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# LSB log_* functions
+. /etc/init.d/functions
+
+do_start()
+{
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+}
+
+do_stop()
+{
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+do_reload() {
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  reload)
+	log_daemon_msg "Reloading $DESC" "$NAME"
+	do_reload
+	log_end_msg $?
+	;;
+  restart|force-reload)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  status)
+	status_of_proc $DAEMON $NAME -p $PIDFILE && exit 0 || exit $?
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
+	exit 3
+	;;
+esac
+
+:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.4.bb
new file mode 100644
index 0000000..8fdaf84
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.4.bb
@@ -0,0 +1,64 @@
+SUMMARY = "A 802.1ab implementation (LLDP) to help you locate neighbors of all your equipments"
+SECTION = "net/misc"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
+
+DEPENDS = "libbsd libevent"
+
+SRC_URI = "\
+    http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \
+    file://lldpd.init.d \
+    file://lldpd.default \
+    "
+
+SRC_URI[md5sum] = "33e8d58623f99184e4e709cbbfe45db3"
+SRC_URI[sha256sum] = "5319bc032fabf1008d5d91e280276aa7f1bbfbb70129d8526cd4526d7c22724f"
+
+inherit autotools update-rc.d useradd systemd pkgconfig bash-completion
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system -g lldpd --shell /bin/false lldpd"
+GROUPADD_PARAM_${PN} = "--system lldpd"
+
+EXTRA_OECONF += "--without-embedded-libevent \
+                 --disable-oldies \
+                 --with-privsep-user=lldpd \
+                 --with-privsep-group=lldpd \
+                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
+                 --without-sysusersdir \
+"
+
+PACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
+PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxm2"
+PACKAGECONFIG[snmp] = "--with-snmp,--without-snmp,net-snmp"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+PACKAGECONFIG[seccomp] = "--with-seccomp,--without-seccomp,libseccomp"
+PACKAGECONFIG[cdp] = "--enable-cdp,--disable-cdp"
+PACKAGECONFIG[fdp] = "--enable-fdp,--disable-fdp"
+PACKAGECONFIG[edp] = "--enable-edp,--disable-edp"
+PACKAGECONFIG[sonmp] = "--enable-sonmp,--disable-sonmp"
+PACKAGECONFIG[lldpmed] = "--enable-lldpmed,--disable-lldpmed"
+PACKAGECONFIG[dot1] = "--enable-dot1,--disable-dot1"
+PACKAGECONFIG[dot3] = "--enable-dot3,--disable-dot3"
+PACKAGECONFIG[custom] = "--enable-custom,--disable-custom"
+
+INITSCRIPT_NAME = "lldpd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "lldpd.service"
+
+do_install_append() {
+    install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd
+    install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd
+    # Make an empty configuration file
+    touch ${D}${sysconfdir}/lldpd.conf
+}
+
+PACKAGES =+ "${PN}-zsh-completion"
+
+FILES_${PN} += "${libdir}/sysusers.d"
+RDEPENDS_${PN} += "os-release"
+
+FILES_${PN}-zsh-completion += "${datadir}/zsh/"
+# FIXME: zsh is broken in meta-oe so this cannot be enabled for now
+#RDEPENDS_${PN}-zsh-completion += "zsh"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch
new file mode 100644
index 0000000..aa59017
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/ncftp-configure-use-BUILD_CC-for-ccdv.patch
@@ -0,0 +1,32 @@
+From 043e1a9ec83a59671ef8c4cad679dbf781e5ef98 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Sun, 29 Nov 2015 23:37:06 -0800
+Subject: [PATCH] configure: use BUILD_CC for ccdv
+
+ccdv is intended to be invoked from Makefiles only,
+it doesn't work for the cross compiling, so compile
+it with $BUILD_CC and corresponding CFLAGS.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 2f0fae0..a7e9112 100755
+--- a/configure
++++ b/configure
+@@ -11286,7 +11286,7 @@ panic:
+ }	/* main */
+ /* eof ccdv.c */
+ EOF
+-		${CC-cc} $DEFS $CPPFLAGS $CFLAGS "ccdv.c" -o "ccdv" >/dev/null 2>&1
++		${BUILD_CC} $DEFS ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} "ccdv.c" -o "ccdv" >/dev/null 2>&1
+ 	rm -f ccdv.c ccdv.o ccdv.c.gz.uu ccdv.c.gz
+ 	strip ./ccdv >/dev/null 2>&1
+ 	./ccdv >/dev/null 2>&1
+-- 
+2.3.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch
new file mode 100644
index 0000000..1c8146e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch
@@ -0,0 +1,32 @@
+This patch is needed to avoid double definitions of functions
+especially when building with security flags turned on. The double
+definitions causes the sed.sh script in configure to fail since it
+starts to spit out double outputs e.g.
+
+wi_cv_gethostname_size_t size_t size_t
+
+which then caused almost all subsequent compile time tests to fail since
+this gets into confdefs.h file
+
+removing this include causes only one definitions to be emitted into
+the genrated protos.h file and thus avoiding the above failure.
+
+Other solution would to fix sed.sh to ignore double definitions
+
+Upstream-Status: Pending
+
+Signed-of-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: ncftp-3.2.6/configure
+===================================================================
+--- ncftp-3.2.6.orig/configure
++++ ncftp-3.2.6/configure
+@@ -7859,7 +7859,6 @@ chmod 755 "$wi_tmpdir/prpp.pl"
+ cat << 'EOF' > "$wi_tmpdir/unistd.c"
+ #include <confdefs.h>
+ 
+-#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb
new file mode 100644
index 0000000..5f92f27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "A sophisticated console ftp client"
+HOMEPAGE = "http://ncftp.com/"
+SECTION = "net"
+LICENSE = "ClArtistic"
+LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9c2390809f71465aa7ff76e03dc14d91"
+DEPENDS = "ncurses"
+
+SRC_URI = "ftp://ftp.ncftp.com/${BPN}/${BP}-src.tar.xz \
+           file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \
+           file://unistd.patch \
+"
+SRC_URI[md5sum] = "42d0f896d69a4d603ec097546444245f"
+SRC_URI[sha256sum] = "5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d"
+
+inherit autotools-brokensep pkgconfig
+
+CFLAGS += "-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,,"
+
+EXTRA_OECONF = "--disable-precomp"
+TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
+
+do_configure() {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    oe_runconf
+}
+do_install () {
+    install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir}
+    oe_runmake 'prefix=${D}${prefix}' 'BINDIR=${D}${bindir}' \
+        'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \
+        install
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb
new file mode 100644
index 0000000..61d656b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Dispatcher service for systemd-networkd connection status changes"
+DESCRIPTION = "This daemon is similar to NetworkManager-dispatcher, but is much \
+more limited in the types of events it supports due to the limited nature of \
+systemd-networkd(8)."
+AUTHOR = "Clayton Craft and others"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d"
+
+inherit features_check systemd
+
+RDEPENDS_${PN} = "python3-pygobject python3-dbus"
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRCREV = "333ef1ed1d7c7c17264fcf7629e5c2f78ab4112c"
+SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher;protocol=https"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "networkd-dispatcher.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# Nothing to build, just a python script to install
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+    install -D -m 0755 ${S}/networkd-dispatcher ${D}${bindir}/networkd-dispatcher
+    install -D -m 0644 ${S}/networkd-dispatcher.service ${D}/${systemd_system_unitdir}/networkd-dispatcher.service
+    install -D -m 0644 ${S}/networkd-dispatcher.conf ${D}/${sysconfdir}/conf.d/networkd-dispatcher.conf
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch
new file mode 100644
index 0000000..ab9b25f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch
@@ -0,0 +1,27 @@
+From 2bc5c6367a7f70ca5bff177ec95bcad3b1c2b66b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 6 Sep 2018 18:15:10 -0700
+Subject: [PATCH] Do not poke at build host's /etc/os-release
+
+During cross compile we are interested in target distro and not host
+distro therefore do not check for it.
+
+Upstream-Status: Inappropriate [Cross compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: openhpi-3.8.0/configure.ac
+===================================================================
+--- openhpi-3.8.0.orig/configure.ac
++++ openhpi-3.8.0/configure.ac
+@@ -194,7 +194,6 @@ AC_SUBST(JSON_C_LIB)
+ AC_SUBST(JSON_C_INCLUDE)
+ AC_CHECK_LIB([rabbitmq],[amqp_new_connection],[RABBITMQ_LIB=-lrabbitmq],[RABBITMQ_LIB=])
+ AC_SUBST(RABBITMQ_LIB)
+-AC_CHECK_FILE([/etc/os-release],[DISTRO=`grep "^ID=" /etc/os-release | awk -F"\"" '{ print $2 }'`])
+ 
+ AC_CHECK_HEADERS([amqp.h],[have_rabbitmq=yes],[have_rabbitmq=no])
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch
new file mode 100644
index 0000000..c78ec28
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch
@@ -0,0 +1,41 @@
+From 8f47adc3b9085d589e62cb5eb560dd23a703036a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Sep 2018 12:47:49 -0700
+Subject: [PATCH] include iostream for cout
+
+End cout with endl
+
+Fixes
+plugins/dynamic_simulator/thread.cpp:241:3: error: 'cout' was not declared in this scope
+   cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"
+   ^~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/dynamic_simulator/thread.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp
+index b971502..61eaf42 100644
+--- a/plugins/dynamic_simulator/thread.cpp
++++ b/plugins/dynamic_simulator/thread.cpp
+@@ -26,7 +26,7 @@
+  */
+ 
+ #include "thread.h"
+-#include <stdio.h>
++#include <iostream>
+ #include <sys/time.h>
+ #include <errno.h>
+ 
+@@ -238,7 +238,7 @@ cThreadLock::cThreadLock()
+   pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
+   pthread_mutex_init( &m_lock, &attr );
+   pthread_mutexattr_destroy( &attr );
+-  cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"
++  std::cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"<<std::endl;
+ }
+ #else
+ static pthread_mutex_t lock_tmpl = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch
new file mode 100644
index 0000000..2cefd55
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch
@@ -0,0 +1,37 @@
+From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001
+From: Catalin Enache <catalin.enache@windriver.com>
+Date: Fri, 9 Feb 2018 16:35:11 +0200
+Subject: [PATCH] saHpiSessionClose: close socket
+
+saHpiSessionClose leaks file descriptors
+
+Upstream issue: https://github.com/open-hpi/openhpi/issues/1918
+
+Upstream-Status: Pending
+
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ baselib/session.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/baselib/session.cpp b/baselib/session.cpp
+index c5edfc8..4ece1b7 100644
+--- a/baselib/session.cpp
++++ b/baselib/session.cpp
+@@ -126,6 +126,12 @@ cSession::cSession()
+ 
+ cSession::~cSession()
+ {
++	cClientStreamSock * sock;
++	gpointer ptr = wrap_g_static_private_get( &m_sockets );
++	if ( ptr ) {
++	    sock = reinterpret_cast<cClientStreamSock *>(ptr);
++	    sock->Close();
++	}
+     wrap_g_static_private_free( &m_sockets );
+ }
+ 
+-- 
+2.10.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch
new file mode 100644
index 0000000..5eff86b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch
@@ -0,0 +1,22 @@
+From ed51168dfd6844deeaebf7d5f6c65898aafb6299 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 Aug 2017 12:12:04 -0700
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index c29a31f..f7fe0f7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,6 +46,7 @@ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_AWK
+ AC_PROG_GREP
++AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
+ 
+ enabled_non32bit="no"
+ AC_ARG_ENABLE([non32bit-int],
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch
new file mode 100644
index 0000000..7958a07
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch
@@ -0,0 +1,1279 @@
+Support build with Clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim.cpp
++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp
+@@ -415,7 +415,7 @@ extern "C" {
+ /**
+  * Alias for @ref öh_open(), implemented by @ref NewSimulatorOpen().
+  **/
+-static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used));
++static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __asm__("NewSimulatorOpen") __attribute__((used));
+ 
+ /**
+  * @fn NewSimulatorOpen( GHashTable *handler_config, unsigned int hid, 
+@@ -530,7 +530,7 @@ static void * NewSimulatorOpen( GHashTab
+ /**
+  * Alias for @ref öh_close(), implemented by @ref NewSimulatorClose().
+  **/
+-static void NewSimulatorClose( void * ) __attribute__((used));
++static void NewSimulatorClose( void * ) __asm__("NewSimulatorClose") __attribute__((used));
+ 
+ /**
+  * @relate NewSimulatorClose
+@@ -585,7 +585,7 @@ static void NewSimulatorClose( void *hnd
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorGetEvent( void * ) __attribute__((used));
++static SaErrorT NewSimulatorGetEvent( void * ) __asm__("NewSimulatorGetEvent") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetEvent( void *hnd ) {
+    dbg( "NewSimulatorGetEvent" );
+@@ -613,7 +613,7 @@ static SaErrorT NewSimulatorGetEvent( vo
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorDiscoverResources( void * ) __attribute__((used));
++static SaErrorT NewSimulatorDiscoverResources( void * ) __asm__("NewSimulatorDiscoverResources") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDiscoverResources( void *hnd ) {
+    dbg( "NewSimulatorDiscoverResources" );
+@@ -641,7 +641,7 @@ static SaErrorT NewSimulatorDiscoverReso
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used));
++static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("NewSimulatorSetResourceTag") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResourceTag( void *hnd, SaHpiResourceIdT id, 
+                                              SaHpiTextBufferT *tag ) {
+@@ -669,7 +669,7 @@ static SaErrorT NewSimulatorSetResourceT
+  * 
+  * @return HPI error code
+  **/
+-static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used));
++static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("NewSimulatorSetResourceSeverity") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResourceSeverity( void *hnd, SaHpiResourceIdT id, 
+                                                   SaHpiSeverityT sev ) {
+@@ -703,7 +703,7 @@ static SaErrorT NewSimulatorGetSensorRea
+                                                SaHpiResourceIdT id,
+                                                SaHpiSensorNumT num,
+                                                SaHpiSensorReadingT *data,
+-                                               SaHpiEventStateT *state ) __attribute__((used));
++                                               SaHpiEventStateT *state ) __asm__("NewSimulatorGetSensorReading") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorReading( void *hnd,
+                                                SaHpiResourceIdT id,
+@@ -738,7 +738,7 @@ static SaErrorT NewSimulatorGetSensorRea
+ static SaErrorT NewSimulatorGetSensorThresholds( void *hnd,
+                                           SaHpiResourceIdT,
+                                           SaHpiSensorNumT,
+-                                          SaHpiSensorThresholdsT * ) __attribute__((used));
++                                          SaHpiSensorThresholdsT * ) __asm__("NewSimulatorGetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorThresholds( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -777,7 +777,7 @@ static SaErrorT NewSimulatorGetSensorThr
+ static SaErrorT NewSimulatorSetSensorThresholds( void *,
+                                                   SaHpiResourceIdT,
+                                                   SaHpiSensorNumT,
+-                                                  const SaHpiSensorThresholdsT * ) __attribute__((used));
++                                                  const SaHpiSensorThresholdsT * ) __asm__("NewSimulatorSetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorThresholds( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -815,7 +815,7 @@ static SaErrorT NewSimulatorSetSensorThr
+ static SaErrorT NewSimulatorGetSensorEnable( void *,
+                                               SaHpiResourceIdT,
+                                               SaHpiSensorNumT,
+-                                              SaHpiBoolT * ) __attribute__((used));
++                                              SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEnable( void *hnd,
+                                               SaHpiResourceIdT id,
+@@ -849,7 +849,7 @@ static SaErrorT NewSimulatorGetSensorEna
+ static SaErrorT NewSimulatorSetSensorEnable( void *,
+                                               SaHpiResourceIdT,
+                                               SaHpiSensorNumT,
+-                                              SaHpiBoolT ) __attribute__((used));
++                                              SaHpiBoolT ) __asm__("NewSimulatorSetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEnable( void *hnd,
+                                               SaHpiResourceIdT id,
+@@ -883,7 +883,7 @@ static SaErrorT NewSimulatorSetSensorEna
+ static SaErrorT NewSimulatorGetSensorEventEnables( void *,
+                                                     SaHpiResourceIdT,
+                                                     SaHpiSensorNumT,
+-                                                    SaHpiBoolT * ) __attribute__((used));
++                                                    SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEventEnables( void *hnd,
+                                                     SaHpiResourceIdT id,
+@@ -916,7 +916,7 @@ static SaErrorT NewSimulatorGetSensorEve
+ static SaErrorT NewSimulatorSetSensorEventEnables( void *,
+                                                     SaHpiResourceIdT,
+                                                     SaHpiSensorNumT,
+-                                                    SaHpiBoolT ) __attribute__((used));
++                                                    SaHpiBoolT ) __asm__("NewSimulatorSetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEventEnables( void *hnd,
+                                                     SaHpiResourceIdT id,
+@@ -952,7 +952,7 @@ static SaErrorT NewSimulatorGetSensorEve
+                                                   SaHpiResourceIdT,
+                                                   SaHpiSensorNumT,
+                                                   SaHpiEventStateT *,
+-                                                  SaHpiEventStateT * ) __attribute__((used));
++                                                  SaHpiEventStateT * ) __asm__("NewSimulatorGetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSensorEventMasks( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -990,7 +990,7 @@ static SaErrorT NewSimulatorSetSensorEve
+                                                   SaHpiSensorNumT,
+                                                   SaHpiSensorEventMaskActionT,
+                                                   SaHpiEventStateT,
+-                                                  SaHpiEventStateT ) __attribute__((used));
++                                                  SaHpiEventStateT ) __asm__("NewSimulatorSetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSensorEventMasks( void *hnd,
+                                                   SaHpiResourceIdT id,
+@@ -1026,7 +1026,7 @@ static SaErrorT NewSimulatorSetSensorEve
+ static SaErrorT NewSimulatorGetControlState( void *, SaHpiResourceIdT,
+                                               SaHpiCtrlNumT,
+                                               SaHpiCtrlModeT *,
+-                                              SaHpiCtrlStateT * ) __attribute__((used));
++                                              SaHpiCtrlStateT * ) __asm__("NewSimulatorGetControlState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetControlState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiCtrlNumT num,
+@@ -1061,7 +1061,7 @@ static SaErrorT NewSimulatorGetControlSt
+ static SaErrorT NewSimulatorSetControlState( void *, SaHpiResourceIdT,
+                                               SaHpiCtrlNumT,
+                                               SaHpiCtrlModeT,
+-                                              SaHpiCtrlStateT * ) __attribute__((used));
++                                              SaHpiCtrlStateT * ) __asm__("NewSimulatorSetControlState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetControlState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiCtrlNumT num,
+@@ -1099,7 +1099,7 @@ static SaErrorT NewSimulatorGetNextAnnou
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiSeverityT, 
+                                        SaHpiBoolT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorGetNextAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorGetNextAnnouncement(void *hnd, SaHpiResourceIdT id,
+                                        SaHpiAnnunciatorNumT num,
+@@ -1135,7 +1135,7 @@ static SaErrorT NewSimulatorGetNextAnnou
+ static SaErrorT NewSimulatorGetAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorGetAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorGetAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1171,7 +1171,7 @@ static SaErrorT NewSimulatorGetAnnouncem
+ static SaErrorT NewSimulatorAckAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiSeverityT) __attribute__((used));
++                                       SaHpiSeverityT) __asm__("NewSimulatorAckAnnouncement") __attribute__((used));
+  
+ static SaErrorT NewSimulatorAckAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1205,7 +1205,7 @@ static SaErrorT NewSimulatorAckAnnouncem
+  **/
+ static SaErrorT NewSimulatorAddAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+-                                       SaHpiAnnouncementT *) __attribute__((used));
++                                       SaHpiAnnouncementT *) __asm__("NewSimulatorAddAnnouncement") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1239,7 +1239,7 @@ static SaErrorT NewSimulatorAddAnnouncem
+ static SaErrorT NewSimulatorDelAnnouncement(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT, 
+                                        SaHpiEntryIdT, 
+-                                       SaHpiSeverityT) __attribute__((used));
++                                       SaHpiSeverityT) __asm__("NewSimulatorDelAnnouncement") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelAnnouncement(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1273,7 +1273,7 @@ static SaErrorT NewSimulatorDelAnnouncem
+  **/
+ static SaErrorT NewSimulatorGetAnnMode(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT,
+-                                       SaHpiAnnunciatorModeT *) __attribute__((used));
++                                       SaHpiAnnunciatorModeT *) __asm__("NewSimulatorGetAnnMode") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetAnnMode(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num, 
+@@ -1306,7 +1306,7 @@ static SaErrorT NewSimulatorGetAnnMode(v
+  **/
+ static SaErrorT NewSimulatorSetAnnMode(void *, SaHpiResourceIdT, 
+                                        SaHpiAnnunciatorNumT,
+-                                       SaHpiAnnunciatorModeT) __attribute__((used));
++                                       SaHpiAnnunciatorModeT) __asm__("NewSimulatorSetAnnMode") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAnnMode(void *hnd, SaHpiResourceIdT id, 
+                                        SaHpiAnnunciatorNumT  num,
+@@ -1340,7 +1340,7 @@ static SaErrorT NewSimulatorSetAnnMode(v
+ static SaErrorT NewSimulatorGetIdrInfo( void *,
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+-                                         SaHpiIdrInfoT * ) __attribute__((used));
++                                         SaHpiIdrInfoT * ) __asm__("NewSimulatorGetIdrInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrInfo( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1380,7 +1380,7 @@ static SaErrorT NewSimulatorGetIdrAreaHe
+                                                SaHpiIdrAreaTypeT,
+                                                SaHpiEntryIdT,
+                                                SaHpiEntryIdT *,
+-                                               SaHpiIdrAreaHeaderT * ) __attribute__((used));
++                                               SaHpiIdrAreaHeaderT * ) __asm__("NewSimulatorGetIdrAreaHeader") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrAreaHeader( void *hnd,
+                                                SaHpiResourceIdT id,
+@@ -1419,7 +1419,7 @@ static SaErrorT NewSimulatorAddIdrArea(
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+                                          SaHpiIdrAreaTypeT,
+-                                         SaHpiEntryIdT * ) __attribute__((used));
++                                         SaHpiEntryIdT * ) __asm__("NewSimulatorAddIdrArea") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrArea( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1456,7 +1456,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+                                          SaHpiIdrAreaTypeT,
+-                                         SaHpiEntryIdT ) __attribute__((used));
++                                         SaHpiEntryIdT ) __asm__("NewSimulatorAddIdrAreaById") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrAreaById( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1490,7 +1490,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy
+ static SaErrorT NewSimulatorDelIdrArea( void *,
+                                          SaHpiResourceIdT,
+                                          SaHpiIdrIdT,
+-                                         SaHpiEntryIdT ) __attribute__((used));
++                                         SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrArea") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelIdrArea( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1532,7 +1532,7 @@ static SaErrorT NewSimulatorGetIdrField(
+                                           SaHpiIdrFieldTypeT,
+                                           SaHpiEntryIdT,
+                                           SaHpiEntryIdT *,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorGetIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1570,7 +1570,7 @@ static SaErrorT NewSimulatorGetIdrField(
+ static SaErrorT NewSimulatorAddIdrField( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1604,7 +1604,7 @@ static SaErrorT NewSimulatorAddIdrField(
+ static SaErrorT NewSimulatorAddIdrFieldById( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrFieldById") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddIdrFieldById( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1637,7 +1637,7 @@ static SaErrorT NewSimulatorAddIdrFieldB
+ static SaErrorT NewSimulatorSetIdrField( void *,
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+-                                          SaHpiIdrFieldT * ) __attribute__((used));
++                                          SaHpiIdrFieldT * ) __asm__("NewSimulatorSetIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1672,7 +1672,7 @@ static SaErrorT NewSimulatorDelIdrField(
+                                           SaHpiResourceIdT,
+                                           SaHpiIdrIdT,
+                                           SaHpiEntryIdT,
+-                                          SaHpiEntryIdT ) __attribute__((used));
++                                          SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrField") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorDelIdrField( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -1704,7 +1704,7 @@ static SaErrorT NewSimulatorDelIdrField(
+  **/ 
+ static SaErrorT NewSimulatorGetSelInfo( void *,
+                                          SaHpiResourceIdT,
+-                                         SaHpiEventLogInfoT * ) __attribute__((used));
++                                         SaHpiEventLogInfoT * ) __asm__("NewSimulatorGetSelInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelInfo( void *hnd,
+                                          SaHpiResourceIdT id,
+@@ -1736,7 +1736,7 @@ static SaErrorT NewSimulatorGetSelInfo(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used));
++static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("NewSimulatorSetSelTime") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t ) {
+    SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR;
+@@ -1766,7 +1766,7 @@ static SaErrorT NewSimulatorSetSelTime(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __attribute__((used));
++static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __asm__("NewSimulatorAddSelEntry") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorAddSelEntry( void *hnd, SaHpiResourceIdT id,
+                                           const SaHpiEventT *Event ) {
+@@ -1809,7 +1809,7 @@ static SaErrorT NewSimulatorGetSelEntry(
+                                           SaHpiEventLogEntryIdT *,
+                                           SaHpiEventLogEntryT *,
+                                           SaHpiRdrT *,
+-                                          SaHpiRptEntryT * ) __attribute__((used));
++                                          SaHpiRptEntryT * ) __asm__("NewSimulatorGetSelEntry") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelEntry( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiEventLogEntryIdT current,
+@@ -1844,7 +1844,7 @@ static SaErrorT NewSimulatorGetSelEntry(
+  * 
+  * @return HPI error code
+  **/ 
+-static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __attribute__((used));
++static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __asm__("NewSimulatorClearSel") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorClearSel( void *hnd, SaHpiResourceIdT id ) {
+    SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR;
+@@ -1875,7 +1875,7 @@ static SaErrorT NewSimulatorClearSel( vo
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorSetSelState(void *, SaHpiResourceIdT, 
+-                                         SaHpiBoolT) __attribute__((used));
++                                         SaHpiBoolT) __asm__("NewSimulatorSetSelState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetSelState( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiBoolT state ) {
+@@ -1907,7 +1907,7 @@ static SaErrorT NewSimulatorSetSelState(
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorGetSelState(void *, SaHpiResourceIdT, 
+-                                         SaHpiBoolT *) __attribute__((used));
++                                         SaHpiBoolT *) __asm__("NewSimulatorGetSelState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelState( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiBoolT *state ) {
+@@ -1939,7 +1939,7 @@ static SaErrorT NewSimulatorGetSelState(
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorGetSelCapability(void *, SaHpiResourceIdT, 
+-                             SaHpiEventLogCapabilitiesT *) __attribute__((used));
++                             SaHpiEventLogCapabilitiesT *) __asm__("NewSimulatorGetSelCapability") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetSelCapability( void *hnd, SaHpiResourceIdT id,
+                                           SaHpiEventLogCapabilitiesT *caps ) {
+@@ -1970,7 +1970,7 @@ static SaErrorT NewSimulatorGetSelCapabi
+  * @return HPI error code
+  **/ 
+ static SaErrorT NewSimulatorResetSelOverflow(void *, SaHpiResourceIdT) 
+-                                                           __attribute__((used));
++                                                           __asm__("NewSimulatorResetSelOverflow") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorResetSelOverflow( void *hnd, SaHpiResourceIdT id ) {
+ 
+@@ -2002,7 +2002,7 @@ static SaErrorT NewSimulatorResetSelOver
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorHotswapPolicyCancel( void *, SaHpiResourceIdT,
+-                                                  SaHpiTimeoutT ) __attribute__((used));
++                                                  SaHpiTimeoutT ) __asm__("NewSimulatorHotswapPolicyCancel") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id,
+                                                   SaHpiTimeoutT timeout) {
+@@ -2032,7 +2032,7 @@ static SaErrorT NewSimulatorHotswapPolic
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetHotswapState( void *, SaHpiResourceIdT ,
+-                                              SaHpiHsStateT * ) __attribute__((used));
++                                              SaHpiHsStateT * ) __asm__("NewSimulatorGetHotswapState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetHotswapState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiHsStateT *state ) {
+@@ -2063,7 +2063,7 @@ static SaErrorT NewSimulatorGetHotswapSt
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetHotswapState( void *, SaHpiResourceIdT,
+-                                              SaHpiHsStateT ) __attribute__((used));
++                                              SaHpiHsStateT ) __asm__("NewSimulatorSetHotswapState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetHotswapState( void *hnd, SaHpiResourceIdT id,
+                                               SaHpiHsStateT state ) {
+@@ -2105,7 +2105,7 @@ static SaErrorT NewSimulatorSetHotswapSt
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorRequestHotswapAction( void *, SaHpiResourceIdT,
+-                                                   SaHpiHsActionT ) __attribute__((used));
++                                                   SaHpiHsActionT ) __asm__("NewSimulatorRequestHotswapAction") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorRequestHotswapAction( void *hnd, SaHpiResourceIdT id,
+                                                    SaHpiHsActionT act ) {
+@@ -2139,7 +2139,7 @@ static SaErrorT NewSimulatorRequestHotsw
+ static SaErrorT NewSimulatorGetWatchdogInfo(void *,
+                                              SaHpiResourceIdT,
+                                              SaHpiWatchdogNumT,
+-                                             SaHpiWatchdogT *) __attribute__((used));
++                                             SaHpiWatchdogT *) __asm__("NewSimulatorGetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetWatchdogInfo(void *hnd,
+                                              SaHpiResourceIdT  id,
+@@ -2170,7 +2170,7 @@ static SaErrorT NewSimulatorGetWatchdogI
+ static SaErrorT NewSimulatorSetWatchdogInfo(void *,
+                                              SaHpiResourceIdT,
+                                              SaHpiWatchdogNumT,
+-                                             SaHpiWatchdogT *) __attribute__((used));
++                                             SaHpiWatchdogT *) __asm__("NewSimulatorSetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetWatchdogInfo(void *hnd,
+                                              SaHpiResourceIdT  id,
+@@ -2199,7 +2199,7 @@ static SaErrorT NewSimulatorSetWatchdogI
+  **/
+ static SaErrorT NewSimulatorResetWatchdog(void *,
+                                            SaHpiResourceIdT,
+-                                           SaHpiWatchdogNumT) __attribute__((used));
++                                           SaHpiWatchdogNumT) __asm__("NewSimulatorResetWatchdog") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorResetWatchdog(void *hnd,
+                                            SaHpiResourceIdT  id,
+@@ -2229,7 +2229,7 @@ static SaErrorT NewSimulatorResetWatchdo
+ static SaErrorT NewSimulatorGetFumiSpec(void *, 
+                                          SaHpiResourceIdT, 
+                                          SaHpiFumiNumT, 
+-                                         SaHpiFumiSpecInfoT *) __attribute__((used));
++                                         SaHpiFumiSpecInfoT *) __asm__("NewSimulatorGetFumiSpec") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiSpec(void *hnd, 
+                                          SaHpiResourceIdT    id, 
+@@ -2260,7 +2260,7 @@ static SaErrorT NewSimulatorGetFumiSpec(
+ static SaErrorT NewSimulatorGetFumiServImpact(void *, 
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+-                                               SaHpiFumiServiceImpactDataT *) __attribute__((used));
++                                               SaHpiFumiServiceImpactDataT *) __asm__("NewSimulatorGetFumiServImpact") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiServImpact(void *hnd, 
+                                                SaHpiResourceIdT            id, 
+@@ -2294,7 +2294,7 @@ static SaErrorT NewSimulatorSetFumiSourc
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiTextBufferT *) __attribute__((used));
++                                           SaHpiTextBufferT *) __asm__("NewSimulatorSetFumiSource") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorSetFumiSource(void             *hnd, 
+                                            SaHpiResourceIdT  id, 
+@@ -2327,7 +2327,7 @@ static SaErrorT NewSimulatorSetFumiSourc
+ static SaErrorT NewSimulatorValidateFumiSource(void *, 
+                                                 SaHpiResourceIdT, 
+                                                 SaHpiFumiNumT, 
+-                                                SaHpiBankNumT) __attribute__((used));
++                                                SaHpiBankNumT) __asm__("NewSimulatorValidateFumiSource") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorValidateFumiSource(void            *hnd, 
+                                                 SaHpiResourceIdT id, 
+@@ -2361,7 +2361,7 @@ static SaErrorT NewSimulatorGetFumiSourc
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiSourceInfoT *) __attribute__((used));
++                                           SaHpiFumiSourceInfoT *) __asm__("NewSimulatorGetFumiSource") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorGetFumiSource(void                *hnd, 
+                                            SaHpiResourceIdT     id, 
+@@ -2400,7 +2400,7 @@ static SaErrorT NewSimulatorGetFumiSourc
+                              SaHpiBankNumT, 
+                              SaHpiEntryIdT, 
+                              SaHpiEntryIdT *, 
+-                             SaHpiFumiComponentInfoT *) __attribute__((used));
++                             SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiSourceComponent") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiSourceComponent(void            *hnd, 
+                                                     SaHpiResourceIdT id, 
+@@ -2437,7 +2437,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiBankInfoT *) __attribute__((used));
++                                           SaHpiFumiBankInfoT *) __asm__("NewSimulatorGetFumiTarget") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiTarget(void              *hnd, 
+                                            SaHpiResourceIdT   id, 
+@@ -2476,7 +2476,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+                                                     SaHpiBankNumT, 
+                                                     SaHpiEntryIdT, 
+                                                     SaHpiEntryIdT *, 
+-                                                    SaHpiFumiComponentInfoT *) __attribute__((used));
++                                                    SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiTargetComponent") __attribute__((used));
+                                                     
+  static SaErrorT NewSimulatorGetFumiTargetComponent(void                  *hnd, 
+                                                     SaHpiResourceIdT        id, 
+@@ -2511,7 +2511,7 @@ static SaErrorT NewSimulatorGetFumiTarge
+ static SaErrorT NewSimulatorGetFumiLogicalTarget(void *, 
+                                                   SaHpiResourceIdT, 
+                                                   SaHpiFumiNumT, 
+-                                                  SaHpiFumiLogicalBankInfoT *) __attribute__((used));
++                                                  SaHpiFumiLogicalBankInfoT *) __asm__("NewSimulatorGetFumiLogicalTarget") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetFumiLogicalTarget(void            *hnd, 
+                                                   SaHpiResourceIdT id,
+@@ -2547,7 +2547,7 @@ static SaErrorT NewSimulatorGetFumiLogic
+                       SaHpiFumiNumT, 
+                       SaHpiEntryIdT, 
+                       SaHpiEntryIdT *, 
+-                      SaHpiFumiLogicalComponentInfoT *) __attribute__((used));
++                      SaHpiFumiLogicalComponentInfoT *) __asm__("NewSimulatorGetFumiLogicalTargetComponent") __attribute__((used));
+                                                            
+ static SaErrorT NewSimulatorGetFumiLogicalTargetComponent(void         *hnd, 
+                                                          SaHpiResourceIdT id, 
+@@ -2579,7 +2579,7 @@ static SaErrorT NewSimulatorGetFumiLogic
+  **/                  
+ static SaErrorT NewSimulatorStartFumiBackup(void *, 
+                                              SaHpiResourceIdT, 
+-                                             SaHpiFumiNumT) __attribute__((used));
++                                             SaHpiFumiNumT) __asm__("NewSimulatorStartFumiBackup") __attribute__((used));
+                                              
+ static SaErrorT NewSimulatorStartFumiBackup(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2612,7 +2612,7 @@ static SaErrorT NewSimulatorSetFumiBankO
+                                               SaHpiResourceIdT, 
+                                               SaHpiFumiNumT, 
+                                               SaHpiBankNumT, 
+-                                              SaHpiUint32T) __attribute__((used));
++                                              SaHpiUint32T) __asm__("NewSimulatorSetFumiBankOrder") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetFumiBankOrder(void            *hnd, 
+                                               SaHpiResourceIdT id, 
+@@ -2647,7 +2647,7 @@ static SaErrorT NewSimulatorStartFumiBan
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+                                                SaHpiBankNumT, 
+-                                               SaHpiBankNumT) __attribute__((used));
++                                               SaHpiBankNumT) __asm__("NewSimulatorStartFumiBankCopy") __attribute__((used));
+                                                
+ static SaErrorT NewSimulatorStartFumiBankCopy(void             *hnd, 
+                                                SaHpiResourceIdT  id, 
+@@ -2680,7 +2680,7 @@ static SaErrorT NewSimulatorStartFumiBan
+ static SaErrorT NewSimulatorStartFumiInstall(void *, 
+                                               SaHpiResourceIdT, 
+                                               SaHpiFumiNumT, 
+-                                              SaHpiBankNumT) __attribute__((used));
++                                              SaHpiBankNumT) __asm__("NewSimulatorStartFumiInstall") __attribute__((used));
+                                               
+ static SaErrorT NewSimulatorStartFumiInstall(void             *hnd, 
+                                               SaHpiResourceIdT  id, 
+@@ -2714,7 +2714,7 @@ static SaErrorT NewSimulatorGetFumiStatu
+                                            SaHpiResourceIdT, 
+                                            SaHpiFumiNumT, 
+                                            SaHpiBankNumT, 
+-                                           SaHpiFumiUpgradeStatusT *) __attribute__((used));
++                                           SaHpiFumiUpgradeStatusT *) __asm__("NewSimulatorGetFumiStatus") __attribute__((used));
+                                            
+ static SaErrorT NewSimulatorGetFumiStatus(void                   *hnd, 
+                                            SaHpiResourceIdT        id, 
+@@ -2747,7 +2747,7 @@ static SaErrorT NewSimulatorGetFumiStatu
+ static SaErrorT NewSimulatorStartFumiVerification(void *, 
+                                                    SaHpiResourceIdT, 
+                                                    SaHpiFumiNumT, 
+-                                                   SaHpiBankNumT) __attribute__((used));
++                                                   SaHpiBankNumT) __asm__("NewSimulatorStartFumiVerification") __attribute__((used));
+                                                    
+ static SaErrorT NewSimulatorStartFumiVerification(void            *hnd, 
+                                                    SaHpiResourceIdT id, 
+@@ -2776,7 +2776,7 @@ static SaErrorT NewSimulatorStartFumiVer
+  **/                             
+ static SaErrorT NewSimulatorStartFumiVerificationMain(void *, 
+                                                        SaHpiResourceIdT, 
+-                                                       SaHpiFumiNumT) __attribute__((used));
++                                                       SaHpiFumiNumT) __asm__("NewSimulatorStartFumiVerificationMain") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiVerificationMain(void            *hnd, 
+                                                        SaHpiResourceIdT id, 
+@@ -2807,7 +2807,7 @@ static SaErrorT NewSimulatorStartFumiVer
+ static SaErrorT NewSimulatorCancelFumiUpgrade(void *, 
+                                                SaHpiResourceIdT, 
+                                                SaHpiFumiNumT, 
+-                                               SaHpiBankNumT) __attribute__((used));
++                                               SaHpiBankNumT) __asm__("NewSimulatorCancelFumiUpgrade") __attribute__((used));
+                                                
+ static SaErrorT NewSimulatorCancelFumiUpgrade(void            *hnd, 
+                                                SaHpiResourceIdT id, 
+@@ -2838,7 +2838,7 @@ static SaErrorT NewSimulatorCancelFumiUp
+ static SaErrorT NewSimulatorGetFumiRollback(void *, 
+                                              SaHpiResourceIdT, 
+                                              SaHpiFumiNumT, 
+-                                             SaHpiBoolT *) __attribute__((used));
++                                             SaHpiBoolT *) __asm__("NewSimulatorGetFumiRollback") __attribute__((used));
+                                              
+ static SaErrorT NewSimulatorGetFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2870,7 +2870,7 @@ static SaErrorT NewSimulatorGetFumiRollb
+ static SaErrorT NewSimulatorSetFumiRollback(void *, 
+                                              SaHpiResourceIdT, 
+                                              SaHpiFumiNumT, 
+-                                             SaHpiBoolT) __attribute__((used));
++                                             SaHpiBoolT) __asm__("NewSimulatorSetFumiRollback") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2900,7 +2900,7 @@ static SaErrorT NewSimulatorSetFumiRollb
+  **/                          
+ static SaErrorT NewSimulatorStartFumiRollback(void *, 
+                                                SaHpiResourceIdT, 
+-                                               SaHpiFumiNumT) __attribute__((used));
++                                               SaHpiFumiNumT) __asm__("NewSimulatorStartFumiRollback") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiRollback(void            *hnd, 
+                                              SaHpiResourceIdT id, 
+@@ -2929,7 +2929,7 @@ static SaErrorT NewSimulatorStartFumiRol
+  **/                         
+ static SaErrorT NewSimulatorActivateFumi(void *, 
+                                           SaHpiResourceIdT, 
+-                                          SaHpiFumiNumT) __attribute__((used));
++                                          SaHpiFumiNumT) __asm__("NewSimulatorActivateFumi") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorActivateFumi(void            *hnd, 
+                                           SaHpiResourceIdT id, 
+@@ -2960,7 +2960,7 @@ static SaErrorT NewSimulatorActivateFumi
+ static SaErrorT NewSimulatorStartFumiActivation(void *, 
+                                                  SaHpiResourceIdT, 
+                                                  SaHpiFumiNumT, 
+-                                                 SaHpiBoolT) __attribute__((used));
++                                                 SaHpiBoolT) __asm__("NewSimulatorStartFumiActivation") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartFumiActivation(void            *hnd, 
+                                                  SaHpiResourceIdT id, 
+@@ -2992,7 +2992,7 @@ static SaErrorT NewSimulatorStartFumiAct
+ static SaErrorT NewSimulatorCleanupFumi(void *, 
+                                          SaHpiResourceIdT, 
+                                          SaHpiFumiNumT, 
+-                                         SaHpiBankNumT) __attribute__((used));
++                                         SaHpiBankNumT) __asm__("NewSimulatorCleanupFumi") __attribute__((used));
+                                          
+ static SaErrorT NewSimulatorCleanupFumi(void            *hnd, 
+                                          SaHpiResourceIdT id, 
+@@ -3023,7 +3023,7 @@ static SaErrorT NewSimulatorCleanupFumi(
+ static SaErrorT NewSimulatorGetDimiInfo( void *, 
+                                           SaHpiResourceIdT, 
+                                           SaHpiDimiNumT, 
+-                                          SaHpiDimiInfoT *)  __attribute__((used));
++                                          SaHpiDimiInfoT *)  __asm__("NewSimulatorGetDimiInfo") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiInfo( void            *hnd, 
+                                           SaHpiResourceIdT id, 
+@@ -3057,7 +3057,7 @@ static SaErrorT NewSimulatorGetDimiTestI
+                                       SaHpiResourceIdT, 
+                                       SaHpiDimiNumT,
+                                       SaHpiDimiTestNumT, 
+-                                      SaHpiDimiTestT *)  __attribute__((used));
++                                      SaHpiDimiTestT *)  __asm__("NewSimulatorGetDimiTestInfo") __attribute__((used));
+                                       
+ static SaErrorT NewSimulatorGetDimiTestInfo( void     *hnd, 
+                                       SaHpiResourceIdT  id, 
+@@ -3092,7 +3092,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+                                      SaHpiResourceIdT, 
+                                      SaHpiDimiNumT,
+                                      SaHpiDimiTestNumT, 
+-                                     SaHpiDimiReadyT *)  __attribute__((used));
++                                     SaHpiDimiReadyT *)  __asm__("NewSimulatorGetDimiTestReadiness") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestReadiness( void *hnd, 
+                                      SaHpiResourceIdT    id, 
+@@ -3129,7 +3129,7 @@ static SaErrorT NewSimulatorStartDimiTes
+                         SaHpiDimiNumT, 
+                         SaHpiDimiTestNumT,
+                         SaHpiUint8T, 
+-                        SaHpiDimiTestVariableParamsT *)  __attribute__((used));
++                        SaHpiDimiTestVariableParamsT *)  __asm__("NewSimulatorStartDimiTest") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorStartDimiTest( void    *hnd, 
+                         SaHpiResourceIdT             id, 
+@@ -3163,7 +3163,7 @@ static SaErrorT NewSimulatorStartDimiTes
+ static SaErrorT NewSimulatorCancelDimiTest( void *, 
+                                       SaHpiResourceIdT, 
+                                       SaHpiDimiNumT, 
+-                                      SaHpiDimiTestNumT) __attribute__((used));
++                                      SaHpiDimiTestNumT) __asm__("NewSimulatorCancelDimiTest") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorCancelDimiTest( void      *hnd, 
+                                       SaHpiResourceIdT  id, 
+@@ -3199,7 +3199,7 @@ static SaErrorT NewSimulatorGetDimiTestS
+                               SaHpiDimiNumT, 
+                               SaHpiDimiTestNumT, 
+                               SaHpiDimiTestPercentCompletedT *,
+-                              SaHpiDimiTestRunStatusT *) __attribute__((used));
++                              SaHpiDimiTestRunStatusT *) __asm__("NewSimulatorGetDimiTestStatus") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestStatus( void        *hnd, 
+                               SaHpiResourceIdT               id, 
+@@ -3234,7 +3234,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+                                 SaHpiResourceIdT, 
+                                 SaHpiDimiNumT, 
+                                 SaHpiDimiTestNumT, 
+-                                SaHpiDimiTestResultsT *) __attribute__((used));
++                                SaHpiDimiTestResultsT *) __asm__("NewSimulatorGetDimiTestResults") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetDimiTestResults( void *hnd, 
+                                 SaHpiResourceIdT       id, 
+@@ -3263,7 +3263,7 @@ static SaErrorT NewSimulatorGetDimiTestR
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetAutoInsertTimeout( void *, 
+-                                         SaHpiTimeoutT ) __attribute__((used));
++                                         SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoInsertTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT  timeout) {
+    NewSimulator *newsim = VerifyNewSimulator( hnd );
+@@ -3289,7 +3289,7 @@ static SaErrorT NewSimulatorSetAutoInser
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                                                    SaHpiTimeoutT * ) __attribute__((used));
++                                                    SaHpiTimeoutT * ) __asm__("NewSimulatorGetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+                                                     SaHpiTimeoutT *timeout ) {
+@@ -3319,7 +3319,7 @@ static SaErrorT NewSimulatorGetAutoExtra
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                                                    SaHpiTimeoutT ) __attribute__((used));
++                                                    SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+                                                     SaHpiTimeoutT timeout ) {
+@@ -3350,7 +3350,7 @@ static SaErrorT NewSimulatorSetAutoExtra
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetPowerState( void *, SaHpiResourceIdT,
+-                                            SaHpiPowerStateT * ) __attribute__((used));
++                                            SaHpiPowerStateT * ) __asm__("NewSimulatorGetPowerState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetPowerState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiPowerStateT *state ) {
+@@ -3382,7 +3382,7 @@ static SaErrorT NewSimulatorGetPowerStat
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetPowerState( void *, SaHpiResourceIdT,
+-                                            SaHpiPowerStateT ) __attribute__((used));
++                                            SaHpiPowerStateT ) __asm__("NewSimulatorSetPowerState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetPowerState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiPowerStateT state ) {
+@@ -3414,7 +3414,7 @@ static SaErrorT NewSimulatorSetPowerStat
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetIndicatorState( void *, SaHpiResourceIdT,
+-                                                SaHpiHsIndicatorStateT * ) __attribute__((used));
++                                                SaHpiHsIndicatorStateT * ) __asm__("NewSimulatorGetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetIndicatorState( void *hnd, SaHpiResourceIdT id,
+                                                 SaHpiHsIndicatorStateT *state ) {
+@@ -3446,7 +3446,7 @@ static SaErrorT NewSimulatorGetIndicator
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorSetIndicatorState( void *, SaHpiResourceIdT,
+-                                                SaHpiHsIndicatorStateT ) __attribute__((used));
++                                                SaHpiHsIndicatorStateT ) __asm__("NewSimulatorSetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetIndicatorState( void *hnd, SaHpiResourceIdT id,
+                                                 SaHpiHsIndicatorStateT state ) {
+@@ -3479,7 +3479,7 @@ static SaErrorT NewSimulatorSetIndicator
+  **/
+ static SaErrorT NewSimulatorControlParm( void *,
+                                           SaHpiResourceIdT,
+-                                          SaHpiParmActionT ) __attribute__((used));
++                                          SaHpiParmActionT ) __asm__("NewSimulatorControlParm") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorControlParm( void *hnd,
+                                           SaHpiResourceIdT id,
+@@ -3512,7 +3512,7 @@ static SaErrorT NewSimulatorControlParm(
+  * @return HPI error code
+  **/
+ static SaErrorT NewSimulatorGetResetState( void *, SaHpiResourceIdT,
+-                                            SaHpiResetActionT * ) __attribute__((used));
++                                            SaHpiResetActionT * ) __asm__("NewSimulatorGetResetState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorGetResetState( void *hnd, SaHpiResourceIdT id,
+                                             SaHpiResetActionT *act ) {
+@@ -3545,7 +3545,7 @@ static SaErrorT NewSimulatorGetResetStat
+  **/
+ static SaErrorT NewSimulatorSetResetState( void *,
+                                             SaHpiResourceIdT,
+-                                            SaHpiResetActionT ) __attribute__((used));
++                                            SaHpiResetActionT ) __asm__("NewSimulatorSetResetState") __attribute__((used));
+ 
+ static SaErrorT NewSimulatorSetResetState( void *hnd,
+                                             SaHpiResourceIdT id,
+Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim_file.cpp
++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp
+@@ -44,9 +44,9 @@
+ ///< Global skip characters for oh_scanner_config
+ static gchar skip_characters[] = " \t\n";  
+ ///< Global identifier_first for oh_scanner_config
+-static gchar identifier_first[] = G_CSET_a_2_z"_/."G_CSET_A_2_Z; 
++static gchar identifier_first[] = G_CSET_a_2_z "_/." G_CSET_A_2_Z;
+ ///< Global identifier_nth for oh_scanner_config
+-static gchar identifier_nth[] = G_CSET_a_2_z"_-0123456789/."G_CSET_A_2_Z;
++static gchar identifier_nth[] = G_CSET_a_2_z "_-0123456789/." G_CSET_A_2_Z;
+ ///< Global comment signs for oh_scanner_config
+ static gchar comment_single[] = "#\n";
+ 
+Index: openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi.cpp
++++ openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp
+@@ -279,7 +279,7 @@ extern "C" {
+ // ABI Interface functions
+ 
+ static void *
+-IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used));
++IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * )  __asm__("IpmiOpen") __attribute__((used));
+ 
+ static void *
+ IpmiOpen( GHashTable *handler_config, unsigned int hid, oh_evt_queue *eventq )
+@@ -388,7 +388,7 @@ IpmiOpen( GHashTable *handler_config, un
+ 
+ 
+ static void
+-IpmiClose( void * ) __attribute__((used));
++IpmiClose( void * ) __asm__("IpmiClose") __attribute__((used));
+ 
+ static void
+ IpmiClose( void *hnd )
+@@ -436,7 +436,7 @@ IpmiClose( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiGetEvent( void * ) __attribute__((used));
++IpmiGetEvent( void * ) __asm__("IpmiGetEvent") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetEvent( void *hnd )
+@@ -458,7 +458,7 @@ IpmiGetEvent( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiDiscoverResources( void * ) __attribute__((used));
++IpmiDiscoverResources( void * ) __asm__("IpmiDiscoverResources") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDiscoverResources( void *hnd )
+@@ -479,7 +479,7 @@ IpmiDiscoverResources( void *hnd )
+ 
+ 
+ static SaErrorT
+-IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used));
++IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("IpmiSetResourceTag") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResourceTag( void *hnd, SaHpiResourceIdT id, SaHpiTextBufferT *tag )
+@@ -499,7 +499,7 @@ IpmiSetResourceTag( void *hnd, SaHpiReso
+ 
+ 
+ static SaErrorT
+-IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used));
++IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("IpmiSetResourceSeverity") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResourceSeverity( void *hnd, SaHpiResourceIdT id, SaHpiSeverityT sev )
+@@ -523,7 +523,7 @@ IpmiGetSensorReading( void *,
+                    SaHpiResourceIdT id,
+                    SaHpiSensorNumT num,
+                    SaHpiSensorReadingT *data,
+-                   SaHpiEventStateT *state ) __attribute__((used));
++                   SaHpiEventStateT *state ) __asm__("IpmiGetSensorReading") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorReading( void *hnd,
+@@ -550,7 +550,7 @@ static SaErrorT
+ IpmiGetSensorThresholds( void *hnd,
+                          SaHpiResourceIdT,
+                          SaHpiSensorNumT,
+-                         SaHpiSensorThresholdsT * ) __attribute__((used));
++                         SaHpiSensorThresholdsT * ) __asm__("IpmiGetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorThresholds( void                   *hnd,
+@@ -581,7 +581,7 @@ static SaErrorT
+ IpmiSetSensorThresholds( void *,
+                          SaHpiResourceIdT,
+                          SaHpiSensorNumT,
+-                         const SaHpiSensorThresholdsT * ) __attribute__((used));
++                         const SaHpiSensorThresholdsT * ) __asm__("IpmiSetSensorThresholds") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorThresholds( void *hnd,
+@@ -612,7 +612,7 @@ static SaErrorT
+ IpmiGetSensorEnable( void *,
+                      SaHpiResourceIdT,
+                      SaHpiSensorNumT,
+-                     SaHpiBoolT * ) __attribute__((used));
++                     SaHpiBoolT * ) __asm__("IpmiGetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEnable( void *hnd,
+@@ -638,7 +638,7 @@ static SaErrorT
+ IpmiSetSensorEnable( void *,
+                      SaHpiResourceIdT,
+                      SaHpiSensorNumT,
+-                     SaHpiBoolT ) __attribute__((used));
++                     SaHpiBoolT ) __asm__("IpmiSetSensorEnable") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEnable( void *hnd,
+@@ -664,7 +664,7 @@ static SaErrorT
+ IpmiGetSensorEventEnables( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+-                           SaHpiBoolT * ) __attribute__((used));
++                           SaHpiBoolT * ) __asm__("IpmiGetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEventEnables( void *hnd,
+@@ -690,7 +690,7 @@ static SaErrorT
+ IpmiSetSensorEventEnables( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+-                           SaHpiBoolT ) __attribute__((used));
++                           SaHpiBoolT ) __asm__("IpmiSetSensorEventEnables") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEventEnables( void *hnd,
+@@ -717,7 +717,7 @@ IpmiGetSensorEventMasks( void *,
+                            SaHpiResourceIdT,
+                            SaHpiSensorNumT,
+                            SaHpiEventStateT *,
+-                           SaHpiEventStateT * ) __attribute__((used));
++                           SaHpiEventStateT * ) __asm__("IpmiGetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSensorEventMasks( void *hnd,
+@@ -747,7 +747,7 @@ IpmiSetSensorEventMasks( void *,
+                            SaHpiSensorNumT,
+                            SaHpiSensorEventMaskActionT,
+                            SaHpiEventStateT,
+-                           SaHpiEventStateT ) __attribute__((used));
++                           SaHpiEventStateT ) __asm__("IpmiSetSensorEventMasks") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSensorEventMasks( void *hnd,
+@@ -776,7 +776,7 @@ static SaErrorT
+ IpmiGetControlState( void *, SaHpiResourceIdT,
+                      SaHpiCtrlNumT,
+                      SaHpiCtrlModeT *,
+-                     SaHpiCtrlStateT * ) __attribute__((used));
++                     SaHpiCtrlStateT * ) __asm__("IpmiGetControlState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetControlState( void *hnd, SaHpiResourceIdT id,
+@@ -802,7 +802,7 @@ static SaErrorT
+ IpmiSetControlState( void *, SaHpiResourceIdT,
+                      SaHpiCtrlNumT,
+                      SaHpiCtrlModeT,
+-                     SaHpiCtrlStateT * ) __attribute__((used));
++                     SaHpiCtrlStateT * ) __asm__("IpmiSetControlState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetControlState( void *hnd, SaHpiResourceIdT id,
+@@ -828,7 +828,7 @@ static SaErrorT
+ IpmiGetIdrInfo( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+-                SaHpiIdrInfoT * ) __attribute__((used));
++                SaHpiIdrInfoT * ) __asm__("IpmiGetIdrInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrInfo( void *hnd,
+@@ -857,7 +857,7 @@ IpmiGetIdrAreaHeader( void *,
+                       SaHpiIdrAreaTypeT,
+                                   SaHpiEntryIdT,
+                       SaHpiEntryIdT *,
+-                      SaHpiIdrAreaHeaderT * ) __attribute__((used));
++                      SaHpiIdrAreaHeaderT * ) __asm__("IpmiGetIdrAreaHeader") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrAreaHeader( void *hnd,
+@@ -887,7 +887,7 @@ IpmiAddIdrArea( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+                 SaHpiIdrAreaTypeT,
+-                            SaHpiEntryIdT * ) __attribute__((used));
++                            SaHpiEntryIdT * ) __asm__("IpmiAddIdrArea") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddIdrArea( void *hnd,
+@@ -914,7 +914,7 @@ static SaErrorT
+ IpmiDelIdrArea( void *,
+                 SaHpiResourceIdT,
+                 SaHpiIdrIdT,
+-                            SaHpiEntryIdT ) __attribute__((used));
++                            SaHpiEntryIdT ) __asm__("IpmiDelIdrArea") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelIdrArea( void *hnd,
+@@ -944,7 +944,7 @@ IpmiGetIdrField( void *,
+                  SaHpiIdrFieldTypeT,
+                  SaHpiEntryIdT,
+                              SaHpiEntryIdT *,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiGetIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIdrField( void *hnd,
+@@ -974,7 +974,7 @@ static SaErrorT
+ IpmiAddIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiAddIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddIdrField( void *hnd,
+@@ -1000,7 +1000,7 @@ static SaErrorT
+ IpmiSetIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+-                 SaHpiIdrFieldT * ) __attribute__((used));
++                 SaHpiIdrFieldT * ) __asm__("IpmiSetIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetIdrField( void *hnd,
+@@ -1027,7 +1027,7 @@ IpmiDelIdrField( void *,
+                  SaHpiResourceIdT,
+                  SaHpiIdrIdT,
+                  SaHpiEntryIdT,
+-                 SaHpiEntryIdT ) __attribute__((used));
++                 SaHpiEntryIdT ) __asm__("IpmiDelIdrField") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelIdrField( void *hnd,
+@@ -1053,7 +1053,7 @@ IpmiDelIdrField( void *hnd,
+ static SaErrorT
+ IpmiGetSelInfo( void *,
+                 SaHpiResourceIdT,
+-                SaHpiEventLogInfoT * ) __attribute__((used));
++                SaHpiEventLogInfoT * ) __asm__("IpmiGetSelInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSelInfo( void *hnd,
+@@ -1075,7 +1075,7 @@ IpmiGetSelInfo( void *hnd,
+ 
+ 
+ static SaErrorT
+-IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used));
++IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("IpmiSetSelTime") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t )
+@@ -1096,7 +1096,7 @@ IpmiSetSelTime( void *hnd, SaHpiResource
+ 
+ static SaErrorT
+ IpmiAddSelEntry( void *, SaHpiResourceIdT,
+-                 const SaHpiEventT * ) __attribute__((used));
++                 const SaHpiEventT * ) __asm__("IpmiAddSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiAddSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1118,7 +1118,7 @@ IpmiAddSelEntry( void *hnd, SaHpiResourc
+ #ifdef NOTUSED
+ static SaErrorT
+ IpmiDelSelEntry( void *, SaHpiResourceIdT,
+-                 SaHpiEventLogEntryIdT ) __attribute__((used));
++                 SaHpiEventLogEntryIdT ) __asm__("IpmiDelSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiDelSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1145,7 +1145,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc
+                  SaHpiEventLogEntryIdT *, SaHpiEventLogEntryIdT *,
+                  SaHpiEventLogEntryT *,
+                  SaHpiRdrT *,
+-                 SaHpiRptEntryT * ) __attribute__((used));
++                 SaHpiRptEntryT * ) __asm__("IpmiGetSelEntry") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetSelEntry( void *hnd, SaHpiResourceIdT id,
+@@ -1170,7 +1170,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc
+ 
+ 
+ static SaErrorT
+-IpmiClearSel( void *, SaHpiResourceIdT ) __attribute__((used));
++IpmiClearSel( void *, SaHpiResourceIdT ) __asm__("IpmiClearSel") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiClearSel( void *hnd, SaHpiResourceIdT id )
+@@ -1190,7 +1190,7 @@ IpmiClearSel( void *hnd, SaHpiResourceId
+ 
+ static SaErrorT
+ IpmiHotswapPolicyCancel( void *, SaHpiResourceIdT,
+-                         SaHpiTimeoutT ) __attribute__((used));
++                         SaHpiTimeoutT ) __asm__("IpmiHotswapPolicyCancel") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id,
+@@ -1210,7 +1210,7 @@ IpmiHotswapPolicyCancel( void *hnd, SaHp
+ }
+ 
+ static SaErrorT
+-IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __attribute__((used));
++IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __asm__("IpmiSetAutoInsertTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT  timeout)
+@@ -1229,7 +1229,7 @@ IpmiSetAutoInsertTimeout( void *hnd, SaH
+ 
+ static SaErrorT
+ IpmiGetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                           SaHpiTimeoutT * ) __attribute__((used));
++                           SaHpiTimeoutT * ) __asm__("IpmiGetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+@@ -1250,7 +1250,7 @@ IpmiGetAutoExtractTimeout( void *hnd, Sa
+ 
+ static SaErrorT
+ IpmiSetAutoExtractTimeout( void *, SaHpiResourceIdT,
+-                           SaHpiTimeoutT ) __attribute__((used));
++                           SaHpiTimeoutT ) __asm__("IpmiSetAutoExtractTimeout") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id,
+@@ -1271,7 +1271,7 @@ IpmiSetAutoExtractTimeout( void *hnd, Sa
+ 
+ static SaErrorT
+ IpmiGetHotswapState( void *, SaHpiResourceIdT ,
+-                     SaHpiHsStateT * ) __attribute__((used));
++                     SaHpiHsStateT * ) __asm__("IpmiGetHotswapState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetHotswapState( void *hnd, SaHpiResourceIdT id,
+@@ -1293,7 +1293,7 @@ IpmiGetHotswapState( void *hnd, SaHpiRes
+ 
+ static SaErrorT
+ IpmiSetHotswapState( void *, SaHpiResourceIdT,
+-                     SaHpiHsStateT ) __attribute__((used));
++                     SaHpiHsStateT ) __asm__("IpmiSetHotswapState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetHotswapState( void *hnd, SaHpiResourceIdT id,
+@@ -1315,7 +1315,7 @@ IpmiSetHotswapState( void *hnd, SaHpiRes
+ 
+ static SaErrorT
+ IpmiRequestHotswapAction( void *, SaHpiResourceIdT,
+-                          SaHpiHsActionT ) __attribute__((used));
++                          SaHpiHsActionT ) __asm__("IpmiRequestHotswapAction") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiRequestHotswapAction( void *hnd, SaHpiResourceIdT id,
+@@ -1337,7 +1337,7 @@ IpmiRequestHotswapAction( void *hnd, SaH
+ 
+ static SaErrorT
+ IpmiGetPowerState( void *, SaHpiResourceIdT,
+-                   SaHpiPowerStateT * ) __attribute__((used));
++                   SaHpiPowerStateT * ) __asm__("IpmiGetPowerState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetPowerState( void *hnd, SaHpiResourceIdT id,
+@@ -1359,7 +1359,7 @@ IpmiGetPowerState( void *hnd, SaHpiResou
+ 
+ static SaErrorT
+ IpmiSetPowerState( void *, SaHpiResourceIdT,
+-                   SaHpiPowerStateT ) __attribute__((used));
++                   SaHpiPowerStateT ) __asm__("IpmiSetPowerState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetPowerState( void *hnd, SaHpiResourceIdT id,
+@@ -1381,7 +1381,7 @@ IpmiSetPowerState( void *hnd, SaHpiResou
+ 
+ static SaErrorT
+ IpmiGetIndicatorState( void *, SaHpiResourceIdT,
+-                       SaHpiHsIndicatorStateT * ) __attribute__((used));
++                       SaHpiHsIndicatorStateT * ) __asm__("IpmiGetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetIndicatorState( void *hnd, SaHpiResourceIdT id,
+@@ -1403,7 +1403,7 @@ IpmiGetIndicatorState( void *hnd, SaHpiR
+ 
+ static SaErrorT
+ IpmiSetIndicatorState( void *, SaHpiResourceIdT,
+-                       SaHpiHsIndicatorStateT ) __attribute__((used));
++                       SaHpiHsIndicatorStateT ) __asm__("IpmiSetIndicatorState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetIndicatorState( void *hnd, SaHpiResourceIdT id,
+@@ -1426,7 +1426,7 @@ IpmiSetIndicatorState( void *hnd, SaHpiR
+ static SaErrorT
+ IpmiControlParm( void *,
+                  SaHpiResourceIdT,
+-                 SaHpiParmActionT ) __attribute__((used));
++                 SaHpiParmActionT ) __asm__("IpmiControlParm") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiControlParm( void *hnd,
+@@ -1449,7 +1449,7 @@ IpmiControlParm( void *hnd,
+ 
+ static SaErrorT
+ IpmiGetResetState( void *, SaHpiResourceIdT,
+-                   SaHpiResetActionT * ) __attribute__((used));
++                   SaHpiResetActionT * ) __asm__("IpmiGetResetState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetResetState( void *hnd, SaHpiResourceIdT id,
+@@ -1472,7 +1472,7 @@ IpmiGetResetState( void *hnd, SaHpiResou
+ static SaErrorT
+ IpmiSetResetState( void *,
+                    SaHpiResourceIdT,
+-                   SaHpiResetActionT ) __attribute__((used));
++                   SaHpiResetActionT ) __asm__("IpmiSetResetState") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetResetState( void *hnd,
+@@ -1496,7 +1496,7 @@ static SaErrorT
+ IpmiGetWatchdogInfo(void *,
+                     SaHpiResourceIdT,
+                     SaHpiWatchdogNumT,
+-                    SaHpiWatchdogT *) __attribute__((used));
++                    SaHpiWatchdogT *) __asm__("IpmiGetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiGetWatchdogInfo(void *hnd,
+@@ -1517,7 +1517,7 @@ static SaErrorT
+ IpmiSetWatchdogInfo(void *,
+                     SaHpiResourceIdT,
+                     SaHpiWatchdogNumT,
+-                    SaHpiWatchdogT *) __attribute__((used));
++                    SaHpiWatchdogT *) __asm__("IpmiSetWatchdogInfo") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiSetWatchdogInfo(void *hnd,
+@@ -1537,7 +1537,7 @@ IpmiSetWatchdogInfo(void *hnd,
+ static SaErrorT
+ IpmiResetWatchdog(void *,
+                   SaHpiResourceIdT,
+-                  SaHpiWatchdogNumT) __attribute__((used));
++                  SaHpiWatchdogNumT) __asm__("IpmiResetWatchdog") __attribute__((used));
+ 
+ static SaErrorT
+ IpmiResetWatchdog(void *hnd,
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch
new file mode 100644
index 0000000..3161140
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch
@@ -0,0 +1,98 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: fix cross compilation
+
+The OH_SET_SIZES macro relies on the usual autoconf sizeof cache variables
+during cross compilation, but it never ensure that they are initialized.
+
+pkg-config must be called with $ac_tool_prefix and PKG_PROG_PKG_CONFIG takes
+care of that. Setting PKG_CONFIG_PATH breaks the pkg-config-cross-wrapper.
+Don't do that.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openhpi-3.8.0/acinclude.m4
+===================================================================
+--- openhpi-3.8.0.orig/acinclude.m4
++++ openhpi-3.8.0/acinclude.m4
+@@ -22,30 +22,39 @@ AC_DEFUN([OH_SET_SIZES],
+ 
+     if test "x$cross_compiling" != "xno"; then
+         if test "x$OH_SIZEOF_UCHAR" = x; then
++	    AC_CHECK_SIZEOF([unsigned char])
+             OH_SIZEOF_UCHAR=$ac_cv_sizeof_uchar
+         fi
+         if test "x$OH_SIZEOF_USHORT" = x; then
++	    AC_CHECK_SIZEOF([unsigned short])
+             OH_SIZEOF_USHORT=$ac_cv_sizeof_ushort
+         fi
+         if test "x$OH_SIZEOF_UINT" = x; then
++	    AC_CHECK_SIZEOF([unsigned int])
+             OH_SIZEOF_UINT=$ac_cv_sizeof_uint
+         fi
+         if test "x$OH_SIZEOF_CHAR" = x; then
++	    AC_CHECK_SIZEOF([char])
+             OH_SIZEOF_CHAR=$ac_cv_sizeof_char
+         fi
+         if test "x$OH_SIZEOF_SHORT" = x; then
++	    AC_CHECK_SIZEOF([short])
+             OH_SIZEOF_SHORT=$ac_cv_sizeof_short
+         fi
+         if test "x$OH_SIZEOF_INT" = x; then
++	    AC_CHECK_SIZEOF([int])
+             OH_SIZEOF_INT=$ac_cv_sizeof_int
+         fi
+         if test "x$OH_SIZEOF_LLONG" = x; then
++	    AC_CHECK_SIZEOF([long long])
+             OH_SIZEOF_LLONG=$ac_cv_sizeof_longlong
+         fi
+         if test "x$OH_SIZEOF_FLOAT" = x; then
++	    AC_CHECK_SIZEOF([float])
+             OH_SIZEOF_FLOAT=$ac_cv_sizeof_float
+         fi
+         if test "x$OH_SIZEOF_DOUBLE" = x; then
++	    AC_CHECK_SIZEOF([double])
+             OH_SIZEOF_DOUBLE=$ac_cv_sizeof_double
+         fi
+     else
+Index: openhpi-3.8.0/configure.ac
+===================================================================
+--- openhpi-3.8.0.orig/configure.ac
++++ openhpi-3.8.0/configure.ac
+@@ -87,9 +87,9 @@ have_rtas_lib=no
+ 
+ dnl Check for GLIB
+ 
+-AC_CHECK_PROG([found_pkg_config],[pkg-config],[yes])
++PKG_PROG_PKG_CONFIG
+ 
+-if test "x$found_pkg_config" != "xyes"; then
++if test "x$PKG_CONFIG" = "x"; then
+     OH_CHECK_FAIL(pkg-config,pkg-config)
+ fi
+ PKG_CFG_SETPATH
+@@ -105,7 +105,7 @@ GLIB=glib-2.0
+ GTHREAD=gthread-2.0
+ GMODULE=gmodule-2.0
+ 
+-if pkg-config --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then
++if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then
+    :
+ else
+    AC_MSG_ERROR([
+@@ -268,12 +268,12 @@ dnl
+ dnl We really need to make ipmi enablement be contigent on OpenIPMI
+ dnl
+ 
+-if PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --atleast-version 1.4.20 OpenIPMI; then
++if $PKG_CONFIG --atleast-version 1.4.20 OpenIPMI; then
+     have_openipmi=yes
+     AC_CHECK_LIB([OpenIPMI], [ipmi_smi_setup_con], [have_openipmi=yes])
+-    OPENIPMI_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --cflags OpenIPMI`
++    OPENIPMI_CFLAGS=`$PKG_CONFIG --cflags OpenIPMI`
+     AC_SUBST(OPENIPMI_CFLAGS)
+-    OPENIPMI_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --libs OpenIPMI`
++    OPENIPMI_LIBS=`$PKG_CONFIG --libs OpenIPMI`
+     AC_SUBST(OPENIPMI_LIBS)
+ fi
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
new file mode 100644
index 0000000..4c54570
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
@@ -0,0 +1,20 @@
+Fix
+
+sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
+((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
++++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
+     dB & 0xff,
+     ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
+     ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
+-    ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
++    (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
+     0,
+     0,
+   }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch
new file mode 100644
index 0000000..c4dd23e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch
@@ -0,0 +1,37 @@
+Description: Fix FTBFS with OpenSSL 1.1 by honouring OPENSSL_NO_MD2
+Author: Adrian Bunk <bunk@debian.org>
+Bug-Debian: https://bugs.debian.org/859543
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp
+===================================================================
+--- openhpi-3.8.0.orig/plugins/ipmidirect/ipmi_auth.cpp
++++ openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp
+@@ -21,6 +21,7 @@
+ #include "ipmi_auth.h"
+ #include <string.h>
+ #include <errno.h>
++#include <openssl/opensslconf.h>
+ 
+ 
+ cIpmiAuth *
+@@ -32,7 +33,7 @@ IpmiAuthFactory( tIpmiAuthType type )
+             return new cIpmiAuthNone;
+ 
+        case eIpmiAuthTypeMd2:
+-#ifdef HAVE_OPENSSL_MD2_H
++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2)
+             return new cIpmiAuthMd2;
+ #else
+             break;
+@@ -78,7 +79,7 @@ cIpmiAuthNone::Check( cIpmiAuthSg /*d*/[
+ }
+ 
+ 
+-#ifdef HAVE_OPENSSL_MD2_H
++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2)
+ #include <openssl/md2.h>
+ 
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch
new file mode 100644
index 0000000..ca522bc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch
@@ -0,0 +1,20 @@
+Link with libssl
+
+fixed build with openssl-1.1.x
+
+Taken from Fedora
+https://src.fedoraproject.org/rpms/openhpi/c/be77f5484b0206f8946a85b29424ea10bf863063
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Unknown
+
+diff -up openhpi-3.6.1/ssl/Makefile.am.than openhpi-3.6.1/ssl/Makefile.am
+--- openhpi-3.6.1/ssl/Makefile.am.than	2017-02-21 12:21:12.114814698 -0500
++++ openhpi-3.6.1/ssl/Makefile.am	2017-02-21 12:22:44.576454262 -0500
+@@ -19,5 +19,5 @@ lib_LTLIBRARIES		= libopenhpi_ssl.la
+ libopenhpi_ssl_la_SOURCES = oh_ssl.c oh_ssl.h
+ 
+ libopenhpi_ssl_la_LDFLAGS = -version-info @HPI_LIB_VERSION@
+-libopenhpi_ssl_la_LIBADD  = @CRYPTO_LIB@
++libopenhpi_ssl_la_LIBADD  = -lssl @CRYPTO_LIB@
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
new file mode 100644
index 0000000..4644910
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
@@ -0,0 +1,25 @@
+[PATCH] add libnetsnmp when link
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ plugins/snmp_bc/t/Makefile.am |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/snmp_bc/t/Makefile.am b/plugins/snmp_bc/t/Makefile.am
+index 57e77ac..9894620 100644
+--- a/plugins/snmp_bc/t/Makefile.am
++++ b/plugins/snmp_bc/t/Makefile.am
+@@ -74,7 +74,7 @@ nodist_libsnmp_bc_la_SOURCES = $(GENERATED_EVENT_CODE) $(REMOTE_SIM_SOURCES)
+ # libopenhpi_la_LIBADD    = $(top_builddir)/utils/libopenhpiutils.la
+ # libopenhpi_la_LDFLAGS   = -L$(top_builddir)/utils -version-info @HPI_LIB_VERSION@ -export-symbols $(top_srcdir)/src/hpi.sym
+ 
+-libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la
++libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la -lnetsnmp
+ libsnmp_bc_la_LDFLAGS = -L$(top_builddir)/utils -module -version-info @HPI_LIB_VERSION@
+ # libsnmp_bc_la_LDFLAGS = -version 0:0:0
+ 
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
new file mode 100644
index 0000000..077e26c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
@@ -0,0 +1,23 @@
+Fix alignment issue in ipmi_inventory.c
+
+Upstream-Status: Pending
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/plugins/ipmi/ipmi_inventory.c b/plugins/ipmi/ipmi_inventory.c
+index 5382186..01655c6 100644
+--- a/plugins/ipmi/ipmi_inventory.c
++++ b/plugins/ipmi/ipmi_inventory.c
+@@ -2546,8 +2546,11 @@ static SaErrorT modify_inventory(SaHpiIdrFieldT *field,
+ 			if (tb->DataLength == 0) {
+ 				rv = ipmi_fru_set_board_info_mfg_time(fru, 0);
+ 			} else {
++                time_t the_time;
++                /* tb->Data is not aligned -- copy to temp */
++                memcpy(&the_time, tb->Data, sizeof(the_time));
+ 				rv = ipmi_fru_set_board_info_mfg_time(fru,
+-					*(time_t *)tb->Data);
++					the_time);
+ 			}
+ 			break;
+ 		case SAHPI_IDR_FIELDTYPE_MANUFACTURER:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch
new file mode 100644
index 0000000..b2771c0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch
@@ -0,0 +1,35 @@
+From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001
+From: "yanjun.zhu" <yanjun.zhu@windriver.com>
+Date: Tue, 30 Apr 2019 10:04:58 +0800
+Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet
+
+In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if
+TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not
+SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will
+be set even if TH.IsSupported == SAHPI_FALSE.
+
+Upstream-Status: Submitted
+[https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035]
+
+Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ openhpid/safhpi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c
+index 28a2632..61b7f03 100644
+--- a/openhpid/safhpi.c
++++ b/openhpid/safhpi.c
+@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet (
+         oh_release_domain(d); /* Unlock domain */
+ 
+         OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv,
+-                    ResourceId, SensorNum, SensorThresholds);
++                    ResourceId, SensorNum, &tmp);
+         oh_release_handler(h);
+ 
+         return rv;
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
new file mode 100644
index 0000000..97c515e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
@@ -0,0 +1,24 @@
+fix host gcc warnings
+
+Remove gcc warnings when gcc is v3.2
+
+Upstream-Status: Pending
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+Index: openhpi-3.6.1/configure.ac
+===================================================================
+--- openhpi-3.6.1.orig/configure.ac
++++ openhpi-3.6.1/configure.ac
+@@ -656,11 +656,6 @@ AC_ARG_ENABLE([werror],
+     fi],
+     [])
+ 
+-if test -n "`gcc --version | grep ' 3.2'`" ; then
+-        CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'`
+-        CXX_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'`
+-fi
+-
+ case $host_os in
+     solaris*)
+         CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wcast-qual//g'`
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
new file mode 100644
index 0000000..1627c97
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
@@ -0,0 +1,33 @@
+Fix glib cross compile
+
+Uses proper PKG_CONFIG_PATH when cross-compiling
+
+Upstream-Status: Pending
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/configure.ac b/configure.ac
+index b5f5aad..f5a5b74 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -110,13 +110,13 @@ else
+ *** GLIB is always available from ftp://ftp.gtk.org/.])
+ fi
+ 
+-exact_version=`pkg-config --modversion $GLIB`;
+-GLIB_CFLAGS=`pkg-config --cflags $GLIB $GTHREAD`
+-GLIB_LIBS=`pkg-config --libs $GLIB $GTHREAD`
+-GLIB_ONLY_CFLAGS=`pkg-config --cflags $GLIB`
+-GLIB_ONLY_LIBS=`pkg-config --libs $GLIB`
+-GMODULE_ONLY_CFLAGS=`pkg-config --cflags $GMODULE`
+-GMODULE_ONLY_LIBS=`pkg-config --libs $GMODULE`
++exact_version=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --modversion $GLIB`;
++GLIB_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB $GTHREAD`
++GLIB_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB $GTHREAD`
++GLIB_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB`
++GLIB_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB`
++GMODULE_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GMODULE`
++GMODULE_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GMODULE`
+ 
+ # On some versions of Solaris the pkg-config file for gthread-2.0 contains a
+ # compiler option, '-mt', that is incompatible with gcc
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
new file mode 100644
index 0000000..d03c97e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Submitted
+
+Package saftest run a test case to pass invalid session id to function
+saHpiResourceIdGet that expect return SA_ERR_HPI_INVALID_SESSION. But the check
+for SA_ERR_HPI_INVALID_SESSION is missed somehow in function saHpiResourceIdGet.
+
+Add check for SA_ERR_HPI_INVALID_SESSION.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+-----
+--- openhpi-3.4.0/baselib/safhpi.cpp.orig	2014-02-25 10:45:20.911734868 +0800
++++ openhpi-3.4.0/baselib/safhpi.cpp	2014-02-25 10:46:05.366925389 +0800
+@@ -477,6 +477,8 @@
+                                  &rpt_update_count );
+     if ( rv == SA_ERR_HPI_NOT_PRESENT ) {
+         return SA_ERR_HPI_NOT_PRESENT;
++    } else if ( rv == SA_ERR_HPI_INVALID_SESSION) {
++        return SA_ERR_HPI_INVALID_SESSION;
+     } else if ( rv != SA_OK ) {
+         return SA_ERR_HPI_UNKNOWN;
+     }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
new file mode 100644
index 0000000..160eeed
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
@@ -0,0 +1,28 @@
+From afe545e77f9d841b7777d859e7e8108492fece96 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 26 Apr 2017 16:22:00 +0800
+Subject: [PATCH] Fix libxml2 for cross-compiling
+
+Use proper XML2_INCLUDE path when cross-compiling
+
+Upstream-Status: Pending
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6242cbf..4fb6b69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,7 +179,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss
+ 
+ dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap
+ AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=])
+-AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE=])
++AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE=])
+ AC_SUBST(XML2_LIB)
+ AC_SUBST(XML2_INCLUDE)
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
new file mode 100644
index 0000000..3222f5d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
@@ -0,0 +1,33 @@
+Fix ipmi plugin's test dir compilation
+
+The ipmi plugin's test dir is not included
+in compilation since it does not compile
+properly with SSL
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ plugins/ipmi/Makefile.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/ipmi/Makefile.in b/plugins/ipmi/Makefile.in
+index 7c6b0a4..6204dbe 100644
+--- a/plugins/ipmi/Makefile.in
++++ b/plugins/ipmi/Makefile.in
+@@ -448,7 +448,9 @@ top_srcdir = @top_srcdir@
+ MAINTAINERCLEANFILES = Makefile.in
+ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"ipmi\" @OPENHPI_INCLUDES@
+ EXTRA_DIST = ipmi.sym ekeyfru.h
+-SUBDIRS = t
++#SUBDIRS = t
++#Tests don't compile wih SSL properly so comment them out
++SUBDIRS =
+ AM_CFLAGS = @OPENIPMI_CFLAGS@
+ pkglib_LTLIBRARIES = libipmi.la
+ libipmi_la_SOURCES = ipmi.c 		\
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
new file mode 100644
index 0000000..293c8d9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
@@ -0,0 +1,45 @@
+Fix net-snmp when cross-compiling
+
+Remove irrelevant references to net-snmp libs and flags
+when cross-compiling net-snmp
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ acinclude.m4 | 4 ++--
+ configure    | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: openhpi-3.8.0/acinclude.m4
+===================================================================
+--- openhpi-3.8.0.orig/acinclude.m4
++++ openhpi-3.8.0/acinclude.m4
+@@ -160,8 +160,8 @@ AC_DEFUN([OH_CHECK_NETSNMP],
+     ],
+     [
+         have_netsnmp=yes
+-        SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'`
+-        SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs`
++        SNMPFLAGS=""
++        SNMPLIBS=""
+         AC_MSG_RESULT(yes)
+     ],
+     [AC_MSG_RESULT(no.  No SNMP based plugins can be built!)])
+Index: openhpi-3.8.0/configure
+===================================================================
+--- openhpi-3.8.0.orig/configure
++++ openhpi-3.8.0/configure
+@@ -16062,8 +16062,8 @@ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ 
+         have_netsnmp=yes
+-        SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'`
+-        SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs`
++        SNMPFLAGS=""
++        SNMPLIBS=""
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
new file mode 100644
index 0000000..38d9a67
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
@@ -0,0 +1,23 @@
+Fix sysfs when cross-compiling
+
+Use proper paths for sysfs plugins when cross-compiling
+
+Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+diff --git a/plugins/sysfs/sysfs2hpi.c b/plugins/sysfs/sysfs2hpi.c
+index a745214..3685598 100644
+--- a/plugins/sysfs/sysfs2hpi.c
++++ b/plugins/sysfs/sysfs2hpi.c
+@@ -18,7 +18,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <libsysfs.h>
++#include <sysfs/libsysfs.h>
+ 
+ #include <SaHpi.h>
+ #include <oh_utils.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 0000000..472318b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,29 @@
+From 5e0ae172586f5aeb270a8f9b012dd3e36536a2a9 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 24 Dec 2014 10:54:59 +0800
+Subject: [PATCH] openhpi: use serial-tests config needed by ptest
+
+ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+
+Upstream-Status: Inappropriate [default automake behavior incompatible with ptest]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 89d8104..c29a31f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -7,7 +7,7 @@ dnl   various hacks by Sean Dague <http://dague.net/sean> 4/23/03
+ AC_PREREQ(2.57)
+ AC_INIT(openhpi, 3.8.0)
+ AC_CONFIG_SRCDIR(openhpi.spec.in)
+-AM_INIT_AUTOMAKE([1.8])
++AM_INIT_AUTOMAKE([1.8 serial-tests])
+ 
+ AM_CONFIG_HEADER(config.h)
+ AH_TOP([#ifndef __OPENHPI_CONFIG_H
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init
new file mode 100755
index 0000000..3a5f4a0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init
@@ -0,0 +1,230 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          openhpid
+# Required-Start:    $network $remote_fs $syslog
+# Required-Stop:     $network $remote_fs $syslog
+# Should-Start:      $named
+# Should-Stop:       $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start OpenHPI daemon at boot time
+# Description:       Enable OpenHPI service which is provided by openhpid.
+### END INIT INFO
+#
+# openhpid.sh    Start/Stop the openhpi daemon.
+#
+# description: openhpid is standard UNIX program which uses the OpenHPI \
+#              APIs and provides a standard internet server to access those \
+#              APIs for client programs.
+# processname: openhpid
+# config: the standard openhpi conf file specified on the command line or the env.
+# pidfile: /var/run/openhpid.pid
+#
+# Author(s):
+#	W. David Ashley <dashley@us.ibm.com>
+#	Daniel de Araujo <ddearauj@us.ibm.com>
+
+# Source function library.
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+prog="OpenHPI"
+
+# If the openhpid executable is not available, we can't do any of this
+test -f /usr/sbin/openhpid || exit 0
+
+# Determine whether the lsb package is installed
+# If it is, determine which lsb is installed:
+# redhat, suse, or standard lsb
+
+if test -f /etc/init.d/functions
+then
+   lsbtype="rh"
+   . /etc/init.d/functions
+elif test -f /etc/rc.status
+then
+   lsbtype="suse"
+   . /etc/rc.status
+elif test -f /lib/lsb/init-functions
+then
+   lsbtype="lsb"
+   . /lib/lsb/init-functions
+elif test -f /etc/gentoo-release
+then
+   lsbtype="gentoo"
+   . /sbin/functions.sh
+else
+   lsbtype="nolsb"
+fi
+
+print_outcome()
+{
+
+	case "${lsbtype}" in
+
+		suse)
+ 			rc_status -v
+			;;
+
+		lsb)
+			if test "$?" -eq 0
+   			then
+      			log_success_msg "success"
+   			else
+				log_failure_msg "failed"
+   			fi
+  			;;
+  
+  		gentoo)
+  			eend $?
+  			;;
+
+		nolsb | rh)
+			if test "$?" -eq 0
+			then
+				echo " ... success"
+			fi
+			if test "$?" -ne 0
+			then
+				echo " ... failed"
+			fi
+			;;
+   	esac
+}
+
+start() {
+	case "${lsbtype}" in
+
+		suse)
+			echo -n "Starting $prog: "
+			startproc /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		lsb)
+			echo -n "Starting $prog: "
+			start_daemon /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		gentoo | rh)
+			echo "Starting $prog: "
+			start-stop-daemon --start --quiet --exec /usr/sbin/openhpid -- -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+		nolsb)
+			echo -n "Starting $prog: "
+			/usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
+			RETVAL=$?
+			;;
+
+	esac
+
+	print_outcome
+
+}
+
+stop() {
+	case "${lsbtype}" in
+
+		lsb | suse)
+			echo -n "Stopping $prog: "
+			killproc /usr/sbin/openhpid
+			RETVAL=$?
+			;;
+
+		gentoo)
+			echo "Stopping $prog: "
+			start-stop-daemon --stop --quiet --exec /usr/sbin/openhpid
+			RETVAL=$?
+			;;
+
+		nolsb | rh)
+			echo -n "Stopping $prog: "
+			if test -f /var/run/openhpid.pid && test "`cat /var/run/openhpid.pid`" != ""
+         		then
+            			kill "`cat /var/run/openhpid.pid`"
+				RETVAL=$?
+			else
+				RETVAL=0
+			fi
+			;;
+
+	esac
+
+	print_outcome
+
+	if test "$RETVAL" -eq 0 && test -f /var/run/openhpid.pid
+	then
+		rm -f /var/lock/openhpid
+		rm -f /var/run/openhpid.pid
+	fi
+
+}
+
+dstatus() {
+	echo "Checking for $prog daemon: "
+
+	case "${lsbtype}" in
+
+		suse)
+			checkproc /usr/sbin/openhpid
+			rc_status -v
+			;;
+		lsb)
+			pid="`pidofproc /usr/sbin/openhpid`"
+         		if test "${pid}" != ""
+			then
+				log_success_msg "$prog is running"
+			else
+				log_success_msg "$prog is not running"
+			fi
+			;;
+		gentoo | nolsb | rh)
+			if test -f /var/run/openhpid.pid &&
+				test "`cat /var/run/openhpid.pid`" != "" &&
+				kill -s 0 "`cat /var/run/openhpid.pid`"
+			then
+				echo "$prog is running"
+			else
+				echo "$prog is not running"
+			fi
+
+			;;
+
+	esac
+
+
+
+}
+
+restart() {
+  	stop
+	start
+}
+
+force_reload() {
+	# We don't currently support a reload, but can do a restart
+	stop
+	start
+}
+
+# See how we were called.
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+  	restart
+	;;
+  status)
+  	dstatus
+	;;
+  force-reload)
+  	force_reload
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|status|force-reload}"
+	exit 1
+esac
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service
new file mode 100644
index 0000000..cd4168f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon providing access to the SAF Hardware Platform Interface
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/openhpid.pid
+ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest
new file mode 100755
index 0000000..5b187d9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+for x in `find ./ -name Makefile`;
+do
+	make -C `dirname ${x}` -k runtest-TESTS
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
new file mode 100644
index 0000000..e8d19a2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
@@ -0,0 +1,138 @@
+SUMMARY = "Hardware Platform Interface Library and Tools"
+
+DESCRIPTION = "\
+OpenHPI is an open source project created with the intent of providing an \
+implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \
+provides an abstracted interface to managing computer hardware, typically for \
+chassis and rack based servers. HPI includes resource modeling; access to and \
+control over sensor, control, watchdog, and inventory data associated with \
+resources; abstracted System Event Log interfaces; hardware events and alerts; \
+and a managed hotswap interface. \
+\
+OpenHPI provides a modular mechanism for adding new hardware and device support \
+easily. Many plugins exist in the OpenHPI source tree to provide access to \
+various types of hardware. This includes, but is not limited to, IPMI based \
+servers, Blade Center, and machines which export data via sysfs. \
+"
+
+HOMEPAGE = "http://openhpi.sourceforge.net/Home"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
+
+DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \
+           autoconf-archive-native os-release"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://openhpi.init \
+           file://openhpid.service \
+           file://run-ptest \
+           file://openhpi-netsnmp-cross-compile.patch \
+           file://openhpi-sysfs-cross-compile.patch \
+           file://openhpi-libxml2-cross-compile.patch \
+           file://openhpi-glib-cross-compile.patch \
+           file://openhpi-linkfix.patch \
+           file://openhpi-fix-host-gcc.patch \
+           file://openhpi-fix-function-saHpiSensorThresholds.patch \
+           file://openhpi-add-libnetsnmp-when-link.patch \
+           file://openhpi-invalide-session.patch \
+           file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
+           file://openhpi-fix-alignment-issue.patch \
+           file://c++11.patch \
+           file://clang-c++11.patch \
+           file://fix-narrowing-warning.patch \
+           file://0001-session-close-socket.patch \
+           file://openhpi-3.6.1-ssl.patch \
+           file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \
+           file://cross_899198.patch \
+           file://no-md2.patch \
+           file://0001-include-iostream-for-cout.patch \
+           "
+SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df"
+SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723"
+
+inherit autotools pkgconfig ptest update-rc.d systemd
+
+PACKAGES =+ "${PN}-libs"
+
+FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
+
+INSANE_SKIP_${PN}-libs = "dev-so"
+RDEPENDS_${PN} += "${PN}-libs"
+
+PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc"
+PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
+PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
+PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,,"
+PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc"
+
+export DISTRO
+
+do_install_append () {
+    install -m 0755 -d ${D}${sysconfdir}/${BPN}
+    install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf
+    install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf
+    install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data
+    install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data
+    install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system
+    sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \
+        ${D}${systemd_unitdir}/system/openhpid.service
+}
+
+do_compile_ptest () {
+    for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
+        dir=`dirname ${x}`
+        case $dir in
+            *cpp/t)      ;;
+            *snmp_bc/t)  if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)}
+                         then
+                           oe_runmake -C ${dir} buildtest-TESTS
+                         fi
+                         ;;
+            *)           oe_runmake -C ${dir} buildtest-TESTS ;;
+        esac
+    done
+}
+
+ack_do_compile_ptest () {
+    for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
+        dir=`dirname ${x}`
+        upper=`dirname ${dir}`
+        if [ `basename ${upper}` != "cpp" ]; then
+            oe_runmake -C ${dir} buildtest-TESTS
+        fi
+    done
+}
+
+do_install_ptest () {
+    cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/
+    TESTS="utils marshal openhpid"
+    for subtest in ${TESTS}; do
+        mkdir -p ${D}${PTEST_PATH}/${subtest}/t
+        cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t
+    done
+
+    for x in `find ${D}${PTEST_PATH} -name Makefile`; do
+        sed -i "s:${S}:${PTEST_PATH}/:g" ${x};
+        sed -i "s/^Makefile:/MM:/g" ${x};
+    done;
+
+    install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/
+    sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile
+
+    mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/
+    cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/
+    cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/
+    find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \;
+    find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
+    find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \;
+}
+
+INITSCRIPT_NAME = "openhpid"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "openhpid.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch
new file mode 100644
index 0000000..2b03b18
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch
@@ -0,0 +1,67 @@
+From 91c7362834ccd88d1432b3e6c5c51748b72b10ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 07:21:16 -0700
+Subject: [PATCH] Add configure time check for gettid API
+
+glibc 2.30 has added syscalls wrapper for gettid
+it should now be checked during configure if C library provides
+this API then do not define local function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac         | 4 ++++
+ src/base/logtrace.cc | 3 +++
+ src/osaf/config.h.in | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 22ab936..90f3da4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -480,6 +480,10 @@ fi
+ 
+ AC_SUBST([localstatedir])
+ 
++#############################################
++# Checks for functions.
++#############################################
++AC_CHECK_FUNCS([ gettid ])
+ 
+ #############################################
+ # Checks for programs.
+diff --git a/src/base/logtrace.cc b/src/base/logtrace.cc
+index 8908c1f..fe87e8d 100644
+--- a/src/base/logtrace.cc
++++ b/src/base/logtrace.cc
+@@ -31,6 +31,7 @@
+ #include "base/logtrace_client.h"
+ #include "base/logtrace_buffer.h"
+ #include "base/ncsgl_defs.h"
++#include "osaf/config.h"
+ 
+ namespace global {
+ 
+@@ -58,7 +59,9 @@ std::once_flag init_flag;
+ thread_local LogTraceBuffer gl_thread_buffer{gl_local_thread_trace,
+   global::thread_trace_buffer_size};
+ 
++#ifndef HAVE_GETTID
+ static pid_t gettid() { return syscall(SYS_gettid); }
++#endif
+ 
+ /**
+  * USR2 signal handler to enable/disable trace (toggle)
+diff --git a/src/osaf/config.h.in b/src/osaf/config.h.in
+index d1f6d1a..0a3f27d 100644
+--- a/src/osaf/config.h.in
++++ b/src/osaf/config.h.in
+@@ -18,6 +18,9 @@
+ /* Define if experimental code is enabled */
+ #undef HAVE_EXPERIMENTAL
+ 
++/* Define to 1 if you have the `gettid' function. */
++#undef HAVE_GETTID
++
+ /* SAHPI_INTERFACE_VERSION == A01 */
+ #undef HAVE_HPI_A01
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
new file mode 100644
index 0000000..be0a587
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
@@ -0,0 +1,125 @@
+From c2668f7f2ea82a61115b7cae56ed081b41ff5153 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 12:34:37 -0700
+Subject: [PATCH] configure: Disable format-overflow if supported by gcc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ Makefile.am                 |  6 +--
+ configure.ac                |  2 +
+ m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 79 insertions(+), 3 deletions(-)
+ create mode 100644 m4/ax_check_compile_flag.m4
+
+diff --git a/Makefile.am b/Makefile.am
+index b3d6553..5607fc2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -52,10 +52,10 @@ AM_CPPFLAGS = \
+ 	-pthread \
+ 	-D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \
+ 	$(CORE_INCLUDES) \
+-	$(all_includes)
++	$(all_includes) @NOWARNINGS@
+ 
+-AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
+-AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
++AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
++AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
+ 
+ if ENABLE_GCOV
+ AM_CFLAGS += --coverage
+diff --git a/configure.ac b/configure.ac
+index 5b86730..47d1002 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -600,6 +600,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
+ fi
+ AC_SUBST(OSAF_HARDEN_FLAGS)
+ 
++AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow])
++AC_SUBST(NOWARNINGS)
+ #############################################
+ # List the output Makefiles
+ #############################################
+diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
+new file mode 100644
+index 0000000..dcabb92
+--- /dev/null
++++ b/m4/ax_check_compile_flag.m4
+@@ -0,0 +1,74 @@
++# ===========================================================================
++#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
++#
++# DESCRIPTION
++#
++#   Check whether the given FLAG works with the current language's compiler
++#   or gives an error.  (Warnings, however, are ignored)
++#
++#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
++#   success/failure.
++#
++#   If EXTRA-FLAGS is defined, it is added to the current language's default
++#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
++#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
++#   force the compiler to issue an error when a bad flag is given.
++#
++#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
++#
++#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
++#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
++#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
++#
++#   This program is free software: you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation, either version 3 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <https://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 5
++
++AC_DEFUN([AX_CHECK_COMPILE_FLAG],
++[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
++  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
++  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
++  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
++    [AS_VAR_SET(CACHEVAR,[yes])],
++    [AS_VAR_SET(CACHEVAR,[no])])
++  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
++AS_VAR_IF(CACHEVAR,yes,
++  [m4_default([$2], :)],
++  [m4_default([$3], :)])
++AS_VAR_POPDEF([CACHEVAR])dnl
++])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch
new file mode 100644
index 0000000..e4bbb4c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch
@@ -0,0 +1,27 @@
+From 979b2b6a1aa574a26e8b736049c4207d568f60f3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Apr 2017 17:39:07 -0700
+Subject: [PATCH] configure: Pass linker specific options with -Wl
+
+This helps make it pass the options to linker correctly
+and we can use non-gcc compilers
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 12a5d5c..5b86730 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -596,7 +596,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
+ 	if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then
+ 		OSAF_HARDEN_FLAGS=""
+ 	fi
+-	OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow"
++	OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now"
+ fi
+ AC_SUBST(OSAF_HARDEN_FLAGS)
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch
new file mode 100644
index 0000000..21abcf7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch
@@ -0,0 +1,23 @@
+From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Sep 2019 12:50:11 -0700
+Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding
+ gcc
+
+This ensures that cross-compiles can succeed, otherwise we get wrong
+architecture on these stub libraries
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ scripts/create_empty_library | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/create_empty_library
++++ b/scripts/create_empty_library
+@@ -66,4 +66,4 @@ for s in $symbols; do
+     echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c"
+ done
+ rm -f "$1"
+-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1"
++$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch
new file mode 100644
index 0000000..f458746
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch
@@ -0,0 +1,50 @@
+From ffc829603a2c50674c8e04de5221e43f80bfc1b2 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 13:00:53 +0000
+Subject: [PATCH] immom_python: convert to python3
+
+Convert immom_python to use python3, python2 is EOL and is not supported
+by all distributions anymore.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ samples/immsv/immom_python/immom.py         | 2 +-
+ samples/immsv/immom_python/immomexamples.py | 2 +-
+ samples/immsv/immom_python/immomtest.py     | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/samples/immsv/immom_python/immom.py b/samples/immsv/immom_python/immom.py
+index 4f68625ed..f88197000 100755
+--- a/samples/immsv/immom_python/immom.py
++++ b/samples/immsv/immom_python/immom.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#!/usr/bin/env python3
+ """
+ immom -- An IMM Object Manager in Python
+ 
+diff --git a/samples/immsv/immom_python/immomexamples.py b/samples/immsv/immom_python/immomexamples.py
+index 70c579265..bd693c25f 100755
+--- a/samples/immsv/immom_python/immomexamples.py
++++ b/samples/immsv/immom_python/immomexamples.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python3
+ 
+ import immom
+ 
+diff --git a/samples/immsv/immom_python/immomtest.py b/samples/immsv/immom_python/immomtest.py
+index 4b98bea8c..ed2463ba9 100755
+--- a/samples/immsv/immom_python/immomtest.py
++++ b/samples/immsv/immom_python/immomtest.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ import immom
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch
new file mode 100644
index 0000000..e40d2b3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch
@@ -0,0 +1,32 @@
+From c21f77d592415f316138c05f581192a1f061e735 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 10:09:03 -0700
+Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h
+
+Fixes
+redirecting incorrect #include <wait.h> to <sys/wait.h>
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/imm/common/immpbe_dump.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc
+index e6b3cc5..3956028 100644
+--- a/src/imm/common/immpbe_dump.cc
++++ b/src/imm/common/immpbe_dump.cc
+@@ -26,12 +26,12 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <time.h>
+-#include <wait.h>
+ #include <unistd.h>
+ #include <iostream>
+ #include <sstream>
+ #include <stdint.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
+ #include <libgen.h>
+ #include <set>
+ #include <vector>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch
new file mode 100644
index 0000000..e4a3975
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch
@@ -0,0 +1,120 @@
+From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Sep 2017 09:39:40 -0700
+Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX
+
+Use _GNU_SOURCE instead of libc internal __USE_GNU
+Do not use the deprecated headers under include/sys
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/base/os_defs.h        | 5 +++--
+ src/mds/mds_dt_tcp.c      | 1 -
+ src/mds/mds_dt_tcp_disc.h | 2 +-
+ src/mds/mds_dt_tipc.c     | 1 -
+ src/mds/mds_dt_tipc.h     | 2 +-
+ src/mds/mds_dt_trans.c    | 1 -
+ src/ntf/ntfd/NtfLogger.cc | 2 +-
+ 7 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/src/base/os_defs.h b/src/base/os_defs.h
+index a570c43..3559b19 100644
+--- a/src/base/os_defs.h
++++ b/src/base/os_defs.h
+@@ -47,17 +47,18 @@
+ #include <sys/stat.h>
+ #include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */
+ #include <syslog.h>
+-#ifndef __USE_GNU
++#include <limits.h>
++#ifndef _GNU_SOURCE
+ struct msgbuf {
+   long int mtype;
+   char mtext[1];
+ };
+ #endif /* else defined in <sys/msg.h> */
+ #include <sys/time.h>
+-#include <sys/fcntl.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ 
++#include <fcntl.h>
+ #include <signal.h>
+ #include <pthread.h>
+ 
+diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
+index 1407eb1..a87c22f 100644
+--- a/src/mds/mds_dt_tcp.c
++++ b/src/mds/mds_dt_tcp.c
+@@ -27,7 +27,6 @@
+ 
+ #include <stdlib.h>
+ #include <sched.h>
+-#include <sys/poll.h>
+ #include <poll.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h
+index a6249d7..574f526 100644
+--- a/src/mds/mds_dt_tcp_disc.h
++++ b/src/mds/mds_dt_tcp_disc.h
+@@ -24,7 +24,7 @@
+ #include "base/ncssysf_tsk.h"
+ #include "base/ncssysf_mem.h"
+ #include "mds_dt_tcp_disc.h"
+-#include "sys/poll.h"
++#include <poll.h>
+ 
+ /*  mds_indentifire + mds_version   + msg_type + scope_type + server_type +
+    server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val  +
+diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
+index 7714175..a0ed3b6 100644
+--- a/src/mds/mds_dt_tipc.c
++++ b/src/mds/mds_dt_tipc.c
+@@ -35,7 +35,6 @@
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <sched.h>
+-#include <sys/poll.h>
+ #include <poll.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h
+index e73a11b..401d208 100644
+--- a/src/mds/mds_dt_tipc.h
++++ b/src/mds/mds_dt_tipc.h
+@@ -32,7 +32,7 @@
+ #include <assert.h>
+ #include <string.h>
+ #include <sys/param.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <netdb.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c
+index 6f621e0..5aacbd3 100644
+--- a/src/mds/mds_dt_trans.c
++++ b/src/mds/mds_dt_trans.c
+@@ -26,7 +26,6 @@
+ #include "mds_core.h"
+ #include "base/osaf_utility.h"
+ 
+-#include <sys/poll.h>
+ #include <poll.h>
+ 
+ #define MDS_PROT_TCP 0xA0
+diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc
+index fd17c58..1120008 100644
+--- a/src/ntf/ntfd/NtfLogger.cc
++++ b/src/ntf/ntfd/NtfLogger.cc
+@@ -20,7 +20,7 @@
+  *   INCLUDE FILES
+  * ========================================================================
+  */
+-#include <sys/poll.h>
++#include <poll.h>
+ 
+ #include "base/osaf_utility.h"
+ #include <saAis.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb
new file mode 100644
index 0000000..3ab4757
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb
@@ -0,0 +1,77 @@
+SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
+DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
+middleware consistent with Service Availability Forum (SA Forum) \
+specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
+established by leading Communications and Enterprise Computing Companies to \
+facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
+code base in commercial products. \
+The OpenSAF project was launched in mid 2007 and has been under development by \
+an informal group of supporters of the OpenSAF initiative. The OpenSAF \
+Foundation was founded on January 22nd 2008 with Emerson Network Power, \
+Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
+HOMEPAGE = "http://www.opensaf.org"
+SECTION = "admin"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
+
+DEPENDS = "libxml2 python3"
+TOOLCHAIN = "gcc"
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
+           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
+           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
+           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
+           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
+           file://0001-Add-configure-time-check-for-gettid-API.patch \
+           file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
+           file://0001-immom_python-convert-to-python3.patch \
+           "
+SRC_URI[md5sum] = "9b61df01d1a092101c4a626692edae19"
+SRC_URI[sha256sum] = "6da9af96e8ee58d11031d305bf4804a00deb6108e12e422722882a2091bd34bd"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases"
+
+inherit autotools useradd systemd pkgconfig
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-f -r opensaf"
+USERADD_PARAM_${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
+
+SYSTEMD_SERVICE_${PN} += "opensafd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGECONFIG[systemd] = ",,systemd"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
+PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
+
+CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
+CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
+LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
+
+do_install_append() {
+    rm -fr "${D}${localstatedir}/lock"
+    rm -fr "${D}${localstatedir}/run"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
+    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
+    fi
+}
+
+FILES_${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
+FILES_${PN}-dev += "${libdir}/libopensaf_core.so"
+FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+RDEPENDS_${PN} += "bash python3-core"
+
+# http://errors.yoctoproject.org/Errors/Details/186970/
+COMPATIBLE_HOST_libc-musl = 'null'
+
+FILES_SOLIBSDEV = ""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
new file mode 100644
index 0000000..763a4a9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
@@ -0,0 +1,64 @@
+From a0d0de10e4c5ab55bc2fa48798079e2876b1211d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 10:29:37 -0700
+Subject: [PATCH] makedefs: Use native compiler to build makedefs.test
+
+Its a binary used during build
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ makedefs | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 9fd4bc2..5ee7747 100644
+--- a/makedefs
++++ b/makedefs
+@@ -526,7 +526,7 @@ int     main(int argc, char **argv)
+     exit(0);
+ }
+ EOF
+-			   ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
++			   ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+ 			   rm -f makedefs.test makedefs.test.[co]
+ 		       fi;;
+ 		esac
+@@ -762,7 +762,7 @@ int     main(int argc, char **argv)
+     exit(0);
+ }
+ EOF
+-		   ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
++		   ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+ 		   ./makedefs.test 2>/dev/null ||
+ 			CCARGS="$CCARGS -DNO_SIGSETJMP"
+ 		   rm -f makedefs.test makedefs.test.[co]
+@@ -796,7 +796,7 @@ int main(int argc, char **argv)
+ 				  &error) != 14);
+ }
+ EOF
+-		    ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
++		    ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
+ 			$icu_ldflags >/dev/null 2>&1
+ 		    if ./makedefs.test 2>/dev/null ; then
+ 			CCARGS="$CCARGS $icu_cppflags"
+@@ -911,7 +911,7 @@ int     main(void)
+     exit(ferror(stdout) ? 1 : 0);
+ }
+ EOF
+-    eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
++    eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+     ./makedefs.test || exit 1
+     rm -f makedefs.test makedefs.test.[co]
+ }
+@@ -1067,7 +1067,7 @@ int     main(void)
+     exit(ferror(stdout) ? 1 : 0);
+ }
+ EOF
+-	eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
++	eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+ 	parm_val=`./makedefs.test` || exit 1
+ 	rm -f makedefs.test makedefs.test.[co]
+ 	eval ${parm_name}=\""\$parm_val"\"
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch
new file mode 100644
index 0000000..5650984
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch
@@ -0,0 +1,58 @@
+From 4caa18feb70f8f3d133657c1250a53f4e292bb42 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Fri, 12 Oct 2018 12:38:02 +0800
+Subject: [PATCH] makedefs: add -lnsl and -lresolv to SYSLIBS by default
+
+We don't need to check libnsl.so and libresolv.so since the libnsl2 is
+specified in DEPENDS and libresolv.so is from c libarary.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ makedefs | 22 ++--------------------
+ 1 file changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 2683bce..8f1b3f4 100644
+--- a/makedefs
++++ b/makedefs
+@@ -484,16 +484,7 @@ case "$SYSTEM.$RELEASE" in
+ 		    SYSLIBS="$SYSLIBS -ldb"
+ 		    ;;
+ 		esac
+-		for name in nsl resolv $GDBM_LIBS
+-		do
+-		    for lib in $BUILD_SYSROOT_NSL_PATH
+-		    do
+-			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+-			    SYSLIBS="$SYSLIBS -l$name"
+-			    break
+-			}
+-		    done
+-		done
++		SYSLIBS="$SYSLIBS -lnsl -lresolv"
+ 		# Kernel 2.4 added IPv6
+ 		case "$RELEASE" in
+ 		2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";;
+@@ -561,16 +552,7 @@ EOF
+ 		    SYSLIBS="$SYSLIBS -ldb"
+ 		    ;;
+ 		esac
+-		for name in nsl resolv
+-		do
+-		    for lib in $BUILD_SYSROOT_NSL_PATH
+-		    do
+-			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+-			    SYSLIBS="$SYSLIBS -l$name"
+-			    break
+-			}
+-		    done
+-		done
++		SYSLIBS="$SYSLIBS -lnsl -lresolv"
+ 		SYSLIBS="$SYSLIBS -ldl"
+ 		: ${SHLIB_SUFFIX=.so}
+ 		: ${SHLIB_CFLAGS=-fPIC}
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb
new file mode 100755
index 0000000..855a64f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/aliasesdb
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp
+
+make_aliasesdb() {
+        if [ "$(/usr/sbin/postconf -h alias_database)" = "hash:/etc/aliases" ]
+        then
+                # /etc/aliases.db may be used by other MTA, make sure nothing
+                # has touched it since our last newaliases call
+                [ /etc/aliases -nt /etc/aliases.db ] ||
+                        [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] ||
+                        [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return 0
+                /usr/bin/newaliases
+                touch -r /etc/aliases.db "$ALIASESDB_STAMP"
+        else
+                /usr/bin/newaliases
+        fi
+}
+
+make_aliasesdb
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh
new file mode 100755
index 0000000..37a0dd0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/check_hostname.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+HOSTNAME=$(/bin/hostname)
+
+if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ]; then
+	# If hostname is invalid, and myhostname not existed in main.cf
+	/usr/sbin/postconf -h "myhostname" 2>/dev/null
+	if [ $? -ne 0 ]; then
+		# Set "localhost" to main.cf
+		/usr/sbin/postconf -e "myhostname=localhost"
+	fi
+fi
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch
new file mode 100644
index 0000000..9bd9c2f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/icu-config.patch
@@ -0,0 +1,21 @@
+do not entertain cppflags from icu, this is because
+icu-config feeds the -I path without sysroot which
+caused native headers to be included and build is
+corrupted in any case its just adding -I/usr/include
+to the CCARGS which we loose nothing if its not
+entertained.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: postfix-3.2.2/makedefs
+===================================================================
+--- postfix-3.2.2.orig/makedefs
++++ postfix-3.2.2/makedefs
+@@ -799,7 +799,6 @@ EOF
+ 		    ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
+ 			$icu_ldflags >/dev/null 2>&1
+ 		    if ./makedefs.test 2>/dev/null ; then
+-			CCARGS="$CCARGS $icu_cppflags"
+ 			SYSLIBS="$SYSLIBS $icu_ldflags"
+ 		    else
+ 			CCARGS="$CCARGS -DNO_EAI"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch
new file mode 100644
index 0000000..d023680
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/install.patch
@@ -0,0 +1,93 @@
+From 190650e1cd5700cd6950ead3fcb17ebcec192a2e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 17:14:58 +0900
+Subject: [PATCH] Change fixed postconf to a variable for cross-compiling
+
+Upstreamstatus: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ postfix-install | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/postfix-install b/postfix-install
+index 1662c3d..d11fa12 100644
+--- a/postfix-install
++++ b/postfix-install
+@@ -226,8 +226,8 @@ test -z "$non_interactive" -a ! -t 0 && {
+     exit 1
+ }
+ 
+-test -x bin/postconf || {
+-    echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2
++test -x "$POSTCONF" || {
++    echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2
+     exit 1
+ }
+ 
+@@ -248,7 +248,7 @@ do
+     case "$junk" in
+     *MAIL_VERSION*) 
+ 	case "$mail_version" in
+-	"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
++	"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
+ 	esac
+ 	val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1
+ 	case "$val" in
+@@ -434,7 +434,7 @@ template files main.cf.proto and master.cf.proto."
+ 
+ : ${install_root=/}
+ : ${tempdir=`pwd`}
+-: ${config_directory=`bin/postconf -c conf -h -d config_directory`}
++: ${config_directory=`$POSTCONF -c conf -h -d config_directory`}
+ 
+ # Find out the location of installed configuration files.
+ 
+@@ -500,7 +500,7 @@ test -f $CONFIG_DIRECTORY/main.cf && {
+ 	case "$junk" in
+ 	"") eval unset $name;;
+ 	esac
+-	eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} ||
++	eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -hx $name\`} ||
+ 	    exit 1
+     done
+ }
+@@ -513,7 +513,7 @@ do
+     case "$junk" in
+     "") eval unset $name;;
+     esac
+-    eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1
++    eval : \${$name=\`$POSTCONF -c conf -d -hx $name\`} || exit 1
+ done
+ 
+ # Override settings manually.
+@@ -639,6 +639,8 @@ README_DIRECTORY=$install_root$readme_directory
+ SHLIB_DIRECTORY=$install_root$shlib_directory
+ META_DIRECTORY=$install_root$meta_directory
+ 
++test "x$POSTCONF" != "x" || POSTCONF="bin/postconf"
++
+ # Avoid repeated tests for existence of these; default permissions suffice.
+ 
+ test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
+@@ -810,7 +812,7 @@ IFS="$BACKUP_IFS"
+ # the wrong place when Postfix is being upgraded.
+ 
+ case "$mail_version" in
+-"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
++"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
+ esac
+ 
+ # Undo MAIL_VERSION expansion at the end of a parameter value. If
+@@ -830,7 +832,7 @@ do
+     esac
+ done
+ 
+-bin/postconf -c $CONFIG_DIRECTORY -e \
++"$POSTCONF" -c $CONFIG_DIRECTORY -e \
+     "daemon_directory = $daemon_directory" \
+     "data_directory = $data_directory" \
+     "command_directory = $command_directory" \
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient
new file mode 100644
index 0000000..6a8f268
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/internal_recipient
@@ -0,0 +1 @@
+root@   permit_mynetworks,reject
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf
new file mode 100644
index 0000000..e75c6fc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf
@@ -0,0 +1,105 @@
+compatibility_level = 2
+smtputf8_enable = no
+
+# Configure your domain and accounts
+#mydomain=sample.com
+#FQDN from gethostname
+#myhostname =
+mydomain=localdomain
+mydestination = $myhostname, localhost.localdomain localhost
+mynetworks = 127.0.0.1/8
+inet_interfaces = 127.0.0.1
+
+virtual_mailbox_domains = sample.com, other.net
+virtual_mailbox_maps = hash:/etc/postfix/virtual
+virtual_alias_maps = hash:/etc/postfix/virtual_alias
+
+alias_maps = hash:/etc/aliases
+
+# You'll start with the following lines for maildir storage
+virtual_mailbox_base = /var/spool/vmail
+virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
+virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
+
+
+# You'll start with the following lines for IMAP storage
+#virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
+
+
+# General stuff here again
+#config_directory = /etc/postfix
+sample_directory = /etc/postfix
+queue_directory = /var/spool/postfix
+mail_spool_directory = /var/spool/mail
+readme_directory = no
+command_directory = /usr/sbin
+daemon_directory = @LIBEXECDIR@/postfix
+mail_owner = postfix
+setgid_group = postdrop
+unknown_local_recipient_reject_code = 450
+mynetworks_style = host
+debug_peer_level = 2
+sendmail_path = /usr/sbin/sendmail
+newaliases_path = /usr/bin/newaliases
+mailq_path = /usr/bin/mailq
+
+smtpd_data_restrictions =
+        permit_mynetworks,
+        reject_unauth_pipelining,
+        permit
+
+smtpd_client_restrictions =
+        permit_mynetworks,
+        # reject_unknown_client, # This can cause a lot of false rejects.
+        reject_invalid_hostname,
+        reject_rbl_client list.dsbl.org,
+        reject_rbl_client sbl.spamhaus.org,
+        reject_rbl_client cbl.abuseat.org,
+        reject_rbl_client dul.dnsbl.sorbs.net,
+        permit
+
+smtpd_helo_required = yes
+smtpd_helo_restrictions =
+        permit_mynetworks,
+        reject_unauth_pipelining,
+        # reject_non_fqdn_hostname, # This can cause a lot of false rejects.
+        # reject_unknown_hostname, # This can cause a lot of false rejects.
+        reject_invalid_hostname,
+        permit
+
+smtpd_sender_restrictions =
+        permit_mynetworks,
+        reject_non_fqdn_sender,
+        # check_sender_access hash:/etc/postfix/access_domains,
+        reject_unknown_sender_domain,
+        permit
+
+smtpd_recipient_restrictions =
+        permit_mynetworks,
+        permit_sasl_authenticated,
+        reject_unauth_destination,
+
+        # check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
+        # check_helo_access pcre:/etc/postfix/helo_checks.pcre,
+
+        # check_client_access hash:/etc/postfix/maps/access_client,
+        # check_client_access hash:/etc/postfix/maps/exceptions_client,
+        # check_helo_access hash:/etc/postfix/maps/access_helo,
+        # check_helo_access hash:/etc/postfix/maps/verify_helo,
+        # check_sender_access hash:/etc/postfix/maps/access_sender,
+        # check_sender_access hash:/etc/postfix/maps/verify_sender,
+        # check_recipient_access hash:/etc/postfix/maps/access_recipient,
+
+        # reject_multi_recipient_bounce,
+        reject_non_fqdn_recipient,
+        reject_unknown_recipient_domain,
+        # reject_unlisted_recipient,
+        #check_policy_service unix:private/policy,
+
+        # check_sender_access hash:/etc/postfix/maps/no_verify_sender,
+        # check_sender_access hash:/etc/postfix/access_domains,
+        # reject_unverified_sender,
+        # reject_unverified_recipient
+        check_recipient_access hash:/etc/postfix/internal_recipient
+
+disable_vrfy_command = yes
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch
new file mode 100644
index 0000000..98d5f7e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/makedefs.patch
@@ -0,0 +1,116 @@
+From 4f49e2ce420fb3c17415937530493158ef312733 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 16:45:54 +0900
+Subject: [PATCH] 1)remove RANLIB, SYSLIBS, AR and get them from env.
+
+2)reference sysroot when searching header files
+3)include sysroot path instead of absolute include path
+for Linux2 and Linux3 systems.
+4)for non-native build, search STAGING_BASELIBDIR/LIBDIR
+  native build, search host library path for nsl and resolv library
+  which comes from libc
+
+Upstreamstatus: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ makedefs | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 8b84e47..893fb0d 100644
+--- a/makedefs
++++ b/makedefs
+@@ -170,9 +170,6 @@ echo "# pie=$pie"
+ 
+ # Defaults for most sane systems
+ 
+-RANLIB=ranlib
+-SYSLIBS=
+-AR=ar
+ ARFL=rv
+ 
+ # Ugly function to make our error message more visible among the
+@@ -424,12 +421,12 @@ case "$SYSTEM.$RELEASE" in
+ 		case "$CCARGS" in
+ 		 *-DNO_DB*) ;;
+ 		 *-DHAS_DB*) ;;
+-		 *) if [ -f /usr/include/db.h ]
++		 *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
+ 		    then
+ 			: we are all set
+-		    elif [ -f /usr/include/db/db.h ]
++		    elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
+ 		    then
+-			CCARGS="$CCARGS -I/usr/include/db"
++			CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
+ 		    else
+ 			# No, we're not going to try db1 db2 db3 etc.
+ 			# On a properly installed system, Postfix builds
+@@ -438,12 +435,12 @@ case "$SYSTEM.$RELEASE" in
+ 			echo "Install the appropriate db*-devel package first." 1>&2
+ 			exit 1
+ 		    fi
+-		    SYSLIBS="-ldb"
++		    SYSLIBS="$SYSLIBS -ldb"
+ 		    ;;
+ 		esac
+ 		for name in nsl resolv $GDBM_LIBS
+ 		do
+-		    for lib in /usr/lib64 /lib64 /usr/lib /lib
++		    for lib in $BUILD_SYSROOT_NSL_PATH
+ 		    do
+ 			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+ 			    SYSLIBS="$SYSLIBS -l$name"
+@@ -463,7 +460,7 @@ case "$SYSTEM.$RELEASE" in
+ 		       if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ]
+ 		       then
+ 			   :
+-		       elif [ ! -e /usr/include/sys/epoll.h ]
++		       elif [ ! -e "$BUILD_SYSROOT"/usr/include/sys/epoll.h ]
+ 		       then
+ 			   echo CCARGS="$CCARGS -DNO_EPOLL"
+ 		       else
+@@ -487,8 +484,6 @@ int     main(int argc, char **argv)
+ }
+ EOF
+ 			   ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
+-			   ./makedefs.test 2>/dev/null ||
+-				CCARGS="$CCARGS -DNO_EPOLL"
+ 			   rm -f makedefs.test makedefs.test.[co]
+ 		       fi;;
+ 		esac
+@@ -504,12 +499,12 @@ EOF
+ 		case "$CCARGS" in
+ 		 *-DNO_DB*) ;;
+ 		 *-DHAS_DB*) ;;
+-		 *) if [ -f /usr/include/db.h ]
++		 *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
+ 		    then
+ 			: we are all set
+-		    elif [ -f /usr/include/db/db.h ]
++		    elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
+ 		    then
+-			CCARGS="$CCARGS -I/usr/include/db"
++			CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
+ 		    else
+ 			# On a properly installed system, Postfix builds
+ 			# by including <db.h> and by linking with -ldb
+@@ -517,12 +512,12 @@ EOF
+ 			echo "Install the appropriate db*-devel package first." 1>&2
+ 			exit 1
+ 		    fi
+-		    SYSLIBS="-ldb"
++		    SYSLIBS="$SYSLIBS -ldb"
+ 		    ;;
+ 		esac
+ 		for name in nsl resolv
+ 		do
+-		    for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
++		    for lib in $BUILD_SYSROOT_NSL_PATH
+ 		    do
+ 			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
+ 			    SYSLIBS="$SYSLIBS -l$name"
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix
new file mode 100755
index 0000000..8c7a601
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix
@@ -0,0 +1,94 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: postfix MTA
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: start and stop postfix
+# Description: Postfix is a Mail Transport Agent, which is the program
+#              that moves mail from one machine to another.
+### END INIT INFO
+
+success() {
+        echo " Successful"
+        exit 0
+}
+
+fail() {
+        echo " Failed"
+        exit 1
+
+}
+
+check_return () {
+        local ret="$1"
+
+        if [ "$ret" = "0" ]; then
+          success
+        else
+          fail
+        fi
+}
+
+PIDFile=/var/spool/postfix/pid/master.pid
+case "$1" in
+
+        start)
+        echo -n "Starting Postfix..."
+        if [ ! -e /etc/aliases.db ]; then
+          # The alias database is necessary for postfix to work correctly.
+          echo "Creating aliases database ..."
+          newaliases
+        fi
+        if ! postfix status >/dev/null 2>&1; then
+          /usr/sbin/check_hostname.sh
+          postfix start
+          check_return $?
+        else
+          success
+        fi
+        ;;
+
+        stop)
+        echo -n  "Stopping Postfix..."
+        if postfix status >/dev/null 2>&1; then
+          postfix stop
+          check_return $?
+        else
+          success
+        fi
+        ;;
+
+        reload)
+        echo -n "Reloading Postfix..."
+        if postfix status >/dev/null 2>&1; then
+          postfix reload
+          check_return $?
+        else
+          postfix start
+          check_return $?
+        fi
+        ;;
+
+        restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+
+        status)
+        if postfix status >/dev/null 2>&1; then
+          pid=`sed -e 's/\s//g' $PIDFile`
+          echo "The Postfix mail system is running (PID: $pid)"
+          exit 0
+        else
+          echo "The Postfix mail system is not running"
+          exit 1
+        fi
+        ;;
+
+        *)
+        echo "Usage: $0 {start|stop|status|reload|restart}"
+        exit 1
+        ;;
+esac
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
new file mode 100644
index 0000000..45479bd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
@@ -0,0 +1,26 @@
+Index: postfix-3.2.2/postfix-install
+===================================================================
+--- postfix-3.2.2.orig/postfix-install
++++ postfix-3.2.2/postfix-install
+@@ -843,7 +843,7 @@ IFS="$BACKUP_IFS"
+ # the wrong place when Postfix is being upgraded.
+ 
+ case "$mail_version" in
+-"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
++"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1
+ esac
+ 
+ # Undo MAIL_VERSION expansion at the end of a parameter value. If
+Index: postfix-3.2.2/Makefile.in
+===================================================================
+--- postfix-3.2.2.orig/Makefile.in
++++ postfix-3.2.2/Makefile.in
+@@ -20,7 +20,7 @@ META	= meta/main.cf.proto meta/master.cf
+ EXPAND	= sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \
+ 	    -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);"
+ SHLIB_DIR_OVERRIDE = \
+-	$${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`}
++	$${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`}
+ 
+ default: update
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
new file mode 100644
index 0000000..30d54a4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Postfix Mail Transport Agent
+After=syslog.target network.target
+Conflicts=sendmail.service exim.service
+
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid
+ExecStartPre=-@SBINDIR@/check_hostname.sh
+ExecStartPre=-@LIBEXECDIR@/postfix/aliasesdb
+ExecStart=@SBINDIR@/postfix start
+ExecReload=@SBINDIR@/postfix reload
+ExecStop=@SBINDIR@/postfix stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
new file mode 100644
index 0000000..4b9940c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -0,0 +1,222 @@
+SUMMARY = "Postfix Mail Transport Agent"
+DESCRIPTION = "Postfix is Wietse Venema's mail server that started life at \
+IBM research as an alternative to the widely-used Sendmail program. \
+Postfix attempts to be fast, easy to administer, and secure. The outsidei \
+has a definite Sendmail-ish flavor, but the inside is completely different."
+
+HOMEPAGE= "http://www.postfix.org"
+SECTION = "mail"
+DEPENDS = "db icu libpcre libnsl2 openssl postfix-native \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
+"
+
+LICENSE = "IPL-1.0 | EPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a"
+
+S = "${WORKDIR}/postfix-${PV}"
+
+CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native"
+
+inherit update-rc.d useradd update-alternatives systemd lib_package
+
+INITSCRIPT_NAME = "postfix"
+INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ."
+USERADD_PACKAGES = "${PN}-bin"
+USERADD_PARAM_${PN}-bin = \
+"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \
+ -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \
+"
+GROUPADD_PARAM_${PN}-bin = "--system postfix;--system postdrop;--system vmail"
+
+export SYSLIBS = "${LDFLAGS}"
+
+# CCARGS specifies includes, defines
+# AUXLIBS specifies libraries
+# Linux2/Linux3 has HAS_DB defined
+# makedefs will make CC to be CC+CCARGS
+
+# ldap support
+export CCARGS-ldap  = "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-DHAS_LDAP', '', d)}"
+export AUXLIBS-ldap = "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}"
+
+# no native openldap
+export CCARGS-ldap_class-native = ""
+export AUXLIBS-ldap_class-native = ""
+
+export CCARGS-nonis_libc-musl = "-DNO_NIS"
+export CCARGS-nonis = ""
+
+# SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
+# current openldap didn't enable SASL
+export CCARGS-sasl  = "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${STAGING_INCDIR}/sasl', '', d)}"
+export AUXLIBS-sasl = "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}"
+export CCARGS-sasl_class-native = ""
+export AUXLIBS-sasl_class-native = ""
+
+# PCRE, TLS support default
+export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
+export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
+export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
+
+# OPT,DEBUG is aready in CFLAGS
+# ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS
+EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
+
+do_compile () {
+    unset CFLAGS CPPFLAGS CXXFLAGS
+    local native_build
+
+    native_build="${@['0', '1'][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]}"
+
+    # if not native build, then pass SYSTEM and RELEASE to makedefs
+    if [ "${native_build}" != "1" ]; then
+        # uname -s for target
+        SYSTEM="Linux"
+
+        # uname -r, use 2.6 as bottomline, even target kernel ver > 2.6
+        RELEASE="2.6.34"
+        sed -i -e \
+            "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \
+            ${S}/Makefile.in
+        export BUILD_SYSROOT="${STAGING_DIR_HOST}"
+    else
+        # native build
+        export BUILD_SYSROOT="${STAGING_DIR_NATIVE}"
+    fi
+
+    oe_runmake makefiles
+    oe_runmake
+}
+
+do_install_prepend_class-native() {
+    export POSTCONF="bin/postconf"
+}
+
+SYSTEMD_SERVICE_${PN} = "postfix.service"
+
+do_install () {
+    sh ./postfix-install 'install_root=${D}' \
+        'config_directory=${sysconfdir}/postfix' \
+        'daemon_directory=${libexecdir}/postfix' \
+        'command_directory=${sbindir}' \
+        'queue_directory=${localstatedir}/spool/postfix' \
+        'sendmail_path=${sbindir}/sendmail.postfix' \
+        'newaliases_path=${bindir}/newaliases' \
+        'mailq_path=${bindir}/mailq' \
+        'manpage_directory=${mandir}' \
+        'readme_directory=${datadir}/doc/postfix' \
+        'data_directory=${localstatedir}/lib/postfix' \
+        -non-interactive
+    rm -rf ${D}${localstatedir}/spool/postfix
+    mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
+    install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/
+    install -d ${D}${sysconfdir}/init.d
+    install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf
+    sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf
+
+    install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/
+
+    install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
+    install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service
+    sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
+
+    install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix
+
+    install -m 770 -d ${D}${localstatedir}/spool/postfix
+    chown postfix:postfix ${D}${localstatedir}/spool/postfix
+
+    install -m 0755 -d ${D}${localstatedir}/lib/postfix
+    chown postfix:nogroup ${D}${localstatedir}/lib/postfix
+    install -m 0755 -d ${D}${localstatedir}/spool/postfix
+    chown root:postfix ${D}${localstatedir}/spool/postfix
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/active
+    chown postfix:root ${D}${localstatedir}/spool/postfix/active
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/bounce
+    chown postfix:root ${D}${localstatedir}/spool/postfix/bounce
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/corrupt
+    chown postfix:root ${D}${localstatedir}/spool/postfix/corrupt
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/defer
+    chown postfix:root ${D}${localstatedir}/spool/postfix/defer
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/deferred
+    chown postfix:root ${D}${localstatedir}/spool/postfix/deferred
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/flush
+    chown postfix:root ${D}${localstatedir}/spool/postfix/flush
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/hold
+    chown postfix:root ${D}${localstatedir}/spool/postfix/hold
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/incoming
+    chown postfix:root ${D}${localstatedir}/spool/postfix/incoming
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/saved
+    chown postfix:root ${D}${localstatedir}/spool/postfix/saved
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/trace
+    chown postfix:root ${D}${localstatedir}/spool/postfix/trace
+    install -m 0730 -d ${D}${localstatedir}/spool/postfix/maildrop
+    chown postfix:postdrop ${D}${localstatedir}/spool/postfix/maildrop
+    install -m 0755 -d ${D}${localstatedir}/spool/postfix/pid
+    chown root:root ${D}${localstatedir}/spool/postfix/pid
+    install -m 0700 -d ${D}${localstatedir}/spool/postfix/private
+    chown postfix:root ${D}${localstatedir}/spool/postfix/private
+    install -m 0710 -d ${D}${localstatedir}/spool/postfix/public
+    chown postfix:postdrop ${D}${localstatedir}/spool/postfix/public
+    install -m 0755 -d ${D}${localstatedir}/spool/vmail
+    chown vmail:vmail ${D}${localstatedir}/spool/vmail
+
+    chown :postdrop ${D}${sbindir}/postqueue
+    chown :postdrop ${D}${sbindir}/postdrop
+    chmod g+s ${D}${sbindir}/postqueue
+    chmod g+s ${D}${sbindir}/postdrop
+
+    rm -rf ${D}/etc/postfix/makedefs.out
+}
+
+do_install_append_class-native() {
+    ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases
+    ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
+}
+
+ALTERNATIVE_${PN}-bin = "sendmail mailq newaliases"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}-bin_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
+ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
+ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
+ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
+
+ALTERNATIVE_PRIORITY = "120"
+
+ALTERNATIVE_${PN}-doc += "mailq.1 newaliases.1 sendmail.1"
+ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
+ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
+ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
+
+pkg_postinst_ontarget_${PN}-cfg () {
+    touch /etc/aliases
+    newaliases
+
+    # generate virtual_alias, default is hash
+    touch /etc/postfix/virtual_alias
+    postmap /etc/postfix/virtual_alias
+}
+
+PACKAGES =+ "${PN}-cfg"
+RDEPENDS_${PN}-cfg_class-target += "${PN}-bin"
+RDEPENDS_${PN}_class-target += "${PN}-cfg"
+# Exclude .debug directories from the main package
+FILES_${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \
+               ${libexecdir}/* ${systemd_unitdir}/*"
+FILES_${PN}-cfg = "${sysconfdir}"
+FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"
+ALLOW_EMPTY_${PN} = "1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb
new file mode 100644
index 0000000..db5b41b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb
@@ -0,0 +1,18 @@
+require postfix.inc
+
+SRC_URI += "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
+           file://makedefs.patch \
+           file://install.patch \
+           file://main.cf \
+           file://postfix \
+           file://internal_recipient \
+           file://postfix.service \
+           file://aliasesdb \
+           file://check_hostname.sh \
+           file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
+           file://postfix-install.patch \
+           file://icu-config.patch \
+           file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
+           "
+SRC_URI[sha256sum] = "18555183ae8b52a9e76067799279c86f9f2770cdef3836deb8462ee0a0855dec"
+UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
new file mode 100644
index 0000000..4967bed
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Inappropriate [configuration]
+
+proftpd tries to get the IP address from the hostname.
+Unluckily now the hostname is not properly configured in /etc/hosts.
+We can use this patch as a workaround.
+
+Author: Dexuan Cui <dexuan.cui@intel.com>
+Tue Oct 25 12:59:27 CST 2011
+
+--- proftpd-1.3.3c.orig/sample-configurations/basic.conf
++++ proftpd-1.3.3c/sample-configurations/basic.conf
+@@ -7,6 +7,9 @@
+ ServerType			standalone
+ DefaultServer			on
+ 
++#By default we bind to all interfaces.
++DefaultAddress      0.0.0.0
++
+ # Port 21 is the standard FTP port.
+ Port				21
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
new file mode 100644
index 0000000..9816d4d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch
@@ -0,0 +1,112 @@
+Upstream-Status: Inappropriate [configuration]
+
+combined the following patches into one:
+make, move-pidfile-to-var-run, move-runfile-to-var-run
+
+move pidfile to /var/run
+redefine PR_RUN_DIR as ${localstatedir}/run
+
+Signed-off-By: Armin Kuster <akuster808@gmail.com>
+
+
+Index: proftpd-1.3.6/Make.rules.in
+===================================================================
+--- proftpd-1.3.6.orig/Make.rules.in
++++ proftpd-1.3.6/Make.rules.in
+@@ -30,9 +30,9 @@ INSTALL=@INSTALL@
+ INSTALL_STRIP=@INSTALL_STRIP@
+ INSTALL_USER=@install_user@
+ INSTALL_GROUP=@install_group@
+-INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
+-INSTALL_SBIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
+-INSTALL_MAN=$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644
++INSTALL_BIN=$(INSTALL) -m 0755
++INSTALL_SBIN=$(INSTALL) -m 0755
++INSTALL_MAN=$(INSTALL) -m 0644
+ 
+ RM=rm -f
+ SHELL=@CONFIG_SHELL@
+Index: proftpd-1.3.6/Makefile.in
+===================================================================
+--- proftpd-1.3.6.orig/Makefile.in
++++ proftpd-1.3.6/Makefile.in
+@@ -105,7 +105,6 @@ check: proftpd$(EXEEXT)
+ $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
+ 	@if [ ! -d $@ ]; then \
+ 		mkdir -p $@; \
+-		chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \
+ 		chmod 0755 $@; \
+ 	fi
+ 
+@@ -115,7 +114,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc
+ 		rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \
+ 	fi
+ 	ln -s proftpd $(DESTDIR)$(sbindir)/in.proftpd
+-	-chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd
+ 
+ install-libs: $(DESTDIR)$(libdir)/proftpd
+ 	cd lib/ && $(MAKE) install
+@@ -152,11 +150,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE
+ 	$(INSTALL_SBIN) ftpshut  $(DESTDIR)$(sbindir)/ftpshut
+ 	$(INSTALL_BIN)  ftptop   $(DESTDIR)$(bindir)/ftptop
+ 	$(INSTALL_BIN)  ftpwho   $(DESTDIR)$(bindir)/ftpwho
+-	$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
++	$(INSTALL) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
+ 
+ install-conf: $(DESTDIR)$(sysconfdir)
+ 	if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \
+-		$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 \
++		$(INSTALL) -m 0644 \
+ 		           $(top_srcdir)/sample-configurations/basic.conf \
+ 	       	           $(DESTDIR)$(sysconfdir)/proftpd.conf ; \
+ 	fi
+Index: proftpd-1.3.6/configure
+===================================================================
+--- proftpd-1.3.6.orig/configure
++++ proftpd-1.3.6/configure
+@@ -41777,7 +41777,7 @@ _ACEOF
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define PR_RUN_DIR "`eval echo "${localstatedir}"`"
++#define PR_RUN_DIR "`eval echo "${localstatedir}"/run/`"
+ _ACEOF
+ 
+ 
+@@ -41787,7 +41787,7 @@ _ACEOF
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/proftpd.pid"`"
++#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/run/proftpd.pid"`"
+ _ACEOF
+ 
+ 
+Index: proftpd-1.3.6/configure.in
+===================================================================
+--- proftpd-1.3.6.orig/configure.in
++++ proftpd-1.3.6/configure.in
+@@ -3833,8 +3833,8 @@ locale_dir="`eval echo ${locale_dir}`"
+ AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`", [Define the locale directory])
+ 
+ AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`", [Define the run directory])
+-AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`", [Define the configuration file path])
+-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`", [Define the PID file path])
++AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/run/proftpd.conf"`", [Define the configuration file path])
++AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`", [Define the PID file path])
+ 
+ prefix="$pr_saved_prefix"
+ exec_prefix="$pr_saved_exec_prefix"
+Index: proftpd-1.3.6/lib/libcap/Makefile
+===================================================================
+--- proftpd-1.3.6.orig/lib/libcap/Makefile
++++ proftpd-1.3.6/lib/libcap/Makefile
+@@ -26,7 +26,7 @@ OBJS=$(addsuffix .o, $(FILES))
+ all: $(LIBNAME)
+ 
+ _makenames: _makenames.c cap_names.sed
+-	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
++	$(BUILD_CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+ 
+ cap_names.h: _makenames
+ 	./_makenames > cap_names.h
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
new file mode 100644
index 0000000..c64535c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
@@ -0,0 +1,27 @@
+close RequireValidShell check
+
+Upstream-Status: Inappropriate [configuration]
+
+close RequireValidShell check since we like to make /bin/false as shell
+for ftp user
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ sample-configurations/basic.conf |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sample-configurations/basic.conf b/sample-configurations/basic.conf
+index 314eb79..abcb284 100644
+--- a/sample-configurations/basic.conf
++++ b/sample-configurations/basic.conf
+@@ -53,6 +53,7 @@ AllowOverwrite		on
+   # We want clients to be able to login with "anonymous" as well as "ftp"
+   UserAlias			anonymous ftp
+ 
++  RequireValidShell	 	off
+   # Limit the maximum number of anonymous logins
+   MaxClients			10
+ 
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch
new file mode 100644
index 0000000..7e2a8e3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/contrib.patch
@@ -0,0 +1,42 @@
+The contrib directory now contains its own Makefile which is
+used during installation. It was required to pass DESTDIR through
+when it gets called from the base Makefile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
+---
+ Makefile.in         |    2 +-
+ contrib/Makefile.in |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5b2e683..ee72fe1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -120,7 +120,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir)
+ 	test -z "$(SHARED_MODULE_OBJS)" -a -z "$(SHARED_MODULE_DIRS)" -a -z "$(STATIC_MODULE_DIRS)" || (cd modules/ && $(MAKE) install)
+ 
+ install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir)
+-	cd contrib/ && $(MAKE) install-utils
++	cd contrib/ && $(MAKE) DESTDIR=${DESTDIR} install-utils
+ 	$(INSTALL_BIN)  ftpcount $(DESTDIR)$(bindir)/ftpcount
+ 	$(INSTALL_BIN)  ftpdctl  $(DESTDIR)$(bindir)/ftpdctl
+ 	$(INSTALL_SBIN) ftpscrub $(DESTDIR)$(sbindir)/ftpscrub
+diff --git a/contrib/Makefile.in b/contrib/Makefile.in
+index 5bcc038..51d248c 100644
+--- a/contrib/Makefile.in
++++ b/contrib/Makefile.in
+@@ -18,6 +18,6 @@ Makefile: Makefile.in ../config.status
+ 	cd ../ && ./config.status
+ 
+ install-utils:
+-	$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
+-	$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
+-	$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
++	$(INSTALL) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
++	$(INSTALL) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
++	$(INSTALL) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
+-- 
+1.7.9.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default
new file mode 100644
index 0000000..b31f36c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/default
@@ -0,0 +1,9 @@
+# Defaults for proftpd initscript
+
+# Master system-wide proftpd switch. The initscript
+# will not run if it is not set to yes.
+RUN="yes"
+
+# Default options.
+# For more exhaustive logging, try "-d 3".
+OPTIONS=""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
new file mode 100644
index 0000000..01c998c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
@@ -0,0 +1,220 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          proftpd
+# Required-Start:    $remote_fs $syslog $local_fs $network
+# Required-Stop:     $remote_fs $syslog $local_fs $network
+# Should-Start:      $named
+# Should-Stop:       $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Starts ProFTPD daemon
+# Description:       This script runs the FTP service offered
+#                    by the ProFTPD daemon
+### END INIT INFO
+
+# Start the proftpd FTP daemon.
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/proftpd
+NAME=proftpd
+
+# Defaults
+RUN="no"
+OPTIONS=""
+CONFIG_FILE=/etc/proftpd.conf
+
+PIDFILE=`grep -i '^pidfile' $CONFIG_FILE|awk '{ print $2 }'`
+if [ "x$PIDFILE" = "x" ];
+then
+    PIDFILE=/var/run/proftpd.pid
+fi
+
+# Read config (will override defaults)
+[ -r /etc/default/proftpd ] && . /etc/default/proftpd
+
+trap "" 1
+trap "" 15
+
+test -f $DAEMON || exit 0
+
+. /etc/init.d/functions
+
+#
+# Servertype could be inetd|standalone|none.
+# In all cases check against inetd and xinetd support.
+#
+if ! egrep -qi "^[[:space:]]*ServerType.*standalone" $CONFIG_FILE
+then
+    if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.conf 2>/dev/null || \
+       egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.d/* 2>/dev/null || \
+       egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
+    then
+        RUN="no"
+        INETD="yes"
+    else
+        if ! egrep -qi "^[[:space:]]*ServerType.*inetd" $CONFIG_FILE
+        then
+            RUN="yes"
+            INETD="no"
+        else
+            RUN="no"
+            INETD="no"
+        fi
+    fi
+fi
+
+# /var/run could be on a tmpfs
+
+[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
+
+inetd_check()
+{
+    if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd ]; then
+        echo "Neither inetd nor xinetd appears installed: check your configuration."
+    fi
+}
+
+start()
+{
+    set -e
+    echo -n "Starting ftp server $NAME... "
+    start-stop-daemon --start --quiet --pidfile "$PIDFILE" --oknodo --exec $DAEMON -- -c $CONFIG_FILE $OPTIONS
+    echo "done."
+}
+
+signal()
+{
+
+    if [ "$1" = "stop" ]; then
+        SIGNAL="TERM"
+        echo -n "Stopping ftp server $NAME... "
+    else
+        if [ "$1" = "reload" ]; then
+            SIGNAL="HUP"
+            echo -n "Reloading ftp server $NAME... "
+        else
+            echo "ERR: wrong parameter given to signal()"
+            exit 1
+        fi
+    fi
+    if [ -f "$PIDFILE" ]; then
+        start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
+        if [ $? = 0 ]; then
+            echo "done."
+            return
+        else
+            SIGNAL="KILL"
+            start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
+            if [ $? != 0 ]; then
+                echo
+                [ $2 != 0 ] || exit 0
+            else
+                echo "done."
+                return
+            fi
+        fi
+        if [ "$SIGNAL" = "KILL" ]; then
+            rm -f "$PIDFILE"
+        fi
+    else
+        echo "done."
+        return
+    fi
+}
+
+case "$1" in
+    start)
+        if [ "x$RUN" = "xyes" ] ; then
+            start
+        else
+            if [ "x$INETD" = "xyes" ] ; then
+                echo "ProFTPD is started from inetd/xinetd."
+                inetd_check
+            else
+                echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+            fi
+        fi
+        ;;
+
+    force-start)
+        if [ "x$INETD" = "xyes" ] ; then
+            echo "Warning: ProFTPD is started from inetd/xinetd (trying to start anyway)."
+            inetd_check
+        fi
+        start
+        ;;
+
+    stop)
+        if [ "x$RUN" = "xyes" ] ; then
+            signal stop 0
+        else
+            if [ "x$INETD" = "xyes" ] ; then
+                echo "ProFTPD is started from inetd/xinetd."
+                inetd_check
+            else
+                echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+            fi
+        fi
+        ;;
+
+    force-stop)
+        if [ "x$INETD" = "xyes" ] ; then
+            echo "Warning: ProFTPD is started from inetd/xinetd (trying to kill anyway)."
+            inetd_check
+        fi
+        signal stop 0
+        ;;
+
+    reload)
+        signal reload 0
+        ;;
+
+    force-reload|restart)
+        if [ "x$RUN" = "xyes" ] ; then
+            signal stop 1
+            sleep 2
+            start
+        else
+            if [ "x$INETD" = "xyes" ] ; then
+                echo "ProFTPD is started from inetd/xinetd."
+                inetd_check
+            else
+                echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
+            fi
+        fi
+        ;;
+
+    status)
+        if [ "x$INETD" = "xyes" ] ; then
+            echo "ProFTPD is started from inetd/xinetd."
+            inetd_check
+            exit 0
+        else
+            if [ -f "$PIDFILE" ]; then
+                pid=$(cat $PIDFILE)
+            else
+                pid="x"
+            fi
+            if [ `pidof proftpd|grep "$pid"|wc -l` -ne 0 ] ; then
+                echo "ProFTPD is started in standalone mode, currently running."
+                exit 0
+            else
+                echo "ProFTPD is started in standalone mode, currently not running."
+                exit 3
+            fi
+        fi
+        ;;
+
+    check-config)
+        $DAEMON -t >/dev/null && echo "ProFTPD configuration OK" && exit 0
+        exit 1
+        ;;
+
+    *)
+        echo "Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload|check-config}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service
new file mode 100644
index 0000000..1876438
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/files/proftpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=proftpd Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf
+StandardError=syslog
+
+[Install]
+WantedBy=default.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
new file mode 100644
index 0000000..1e4697a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
@@ -0,0 +1,141 @@
+SUMMARY = "Secure and configurable FTP server"
+SECTION = "net"
+HOMEPAGE = "http://www.proftpd.org"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
+
+SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
+           file://basic.conf.patch \
+           file://proftpd-basic.init \
+           file://default \
+           file://close-RequireValidShell-check.patch \
+           file://contrib.patch  \
+           file://build_fixup.patch \
+           file://proftpd.service \
+           "
+SRC_URI[md5sum] = "13270911c42aac842435f18205546a1b"
+SRC_URI[sha256sum] = "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf"
+
+inherit autotools-brokensep useradd update-rc.d systemd multilib_script
+
+PACKAGECONFIG ??= "shadow \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
+                  "
+
+PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses"
+PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl, openssl"
+PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam"
+PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
+PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow"
+PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre "
+
+# enable POSIX.1e capabilities
+PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap"
+
+#enable support for POSIX ACLs
+PACKAGECONFIG[acl] = "--enable-facl, --disable-facl"
+
+#enable proftpd controls via ftpdct
+PACKAGECONFIG[ctrls] = "--enable-ctrls, --disable-crtls"
+
+#prevent proftpd from using its bundled getopt implementation.
+PACKAGECONFIG[getopt] = "--with-getopt, --without-getopt"
+
+#do not strip debugging symbols from installed code
+PACKAGECONFIG[strip] = "--enable-strip, --disable-strip"
+
+#enable SIA authentication support (Tru64)
+PACKAGECONFIG[sia] = "--enable-sia, --disable-sia"
+PACKAGECONFIG[sendfile] = "-enable-sendfile, --disable-sendfile"
+
+#enable Native Language Support (NLS)
+PACKAGECONFIG[nls] = "--enable-nls, --disable-nls"
+
+#add mod_dso to core modules
+PACKAGECONFIG[dso] = "--enable-dso, --disable-dso"
+PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile"
+
+#omit mod_auth_file from core modules
+PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file"
+
+
+# proftpd uses libltdl which currently makes configuring using
+# autotools.bbclass a pain...
+do_configure () {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    oe_runconf
+    cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool
+}
+
+FTPUSER = "ftp"
+FTPGROUP = "ftp"
+
+do_install () {
+    oe_runmake DESTDIR=${D} install
+    rmdir ${D}${libdir}/proftpd ${D}${datadir}/locale
+    [ -d ${D}${libexecdir} ] && rmdir ${D}${libexecdir}
+    sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf
+    sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd
+
+    install -d ${D}${sysconfdir}/default
+    install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd
+
+    # create the pub directory
+    mkdir -p ${D}/home/${FTPUSER}/pub/
+    chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
+        # install proftpd pam configuration
+        install -d ${D}${sysconfdir}/pam.d
+        install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd
+        sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd
+        # specify the user Authentication config
+        sed -i '/^MaxInstances/a\AuthPAM                         on\nAuthPAMConfig                   proftpd' \
+            ${D}${sysconfdir}/proftpd.conf
+    fi
+
+    install -d ${D}/${systemd_unitdir}/system
+    install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system
+    sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@SBINDIR@,${sbindir},g' \
+        -i ${D}${systemd_unitdir}/system/*.service
+
+    sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \
+        -e 's|${STAGING_DIR_NATIVE}||g' \
+        -e 's|-fdebug-prefix-map=[^ ]*||g' \
+        -e 's|-fmacro-prefix-map=[^ ]*||g' \
+        -i ${D}/${bindir}/prxs
+
+    # ftpmail perl script, which reads the proftpd log file and sends
+    # automatic email notifications once an upload finishs,
+    # depends on an old perl Mail::Sendmail
+    # The Mail::Sendmail has not been maintained for almost 10 years
+    # Other distribution not ship with ftpmail, so do the same to
+    # avoid confusion about having it fails to run
+    rm -rf ${D}${bindir}/ftpmail
+    rm -rf ${D}${mandir}/man1/ftpmail.1
+}
+
+INITSCRIPT_NAME = "proftpd"
+INITSCRIPT_PARAM = "defaults 85 15"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "proftpd.service"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}"
+USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \
+                       --shell /bin/false ${FTPUSER}"
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/prxs"
+
+FILES_${PN} += "/home/${FTPUSER}"
+
+RDEPENDS_${PN} += "perl"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch
new file mode 100644
index 0000000..1d2a536
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch
@@ -0,0 +1,68 @@
+From e00d3f52ccc6496a60992ac5a9d771b1d067eceb Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Thu, 22 Nov 2018 08:42:48 +0000
+Subject: [PATCH] Fixed 100% CPU using issue by adding minimum POSIX timer
+ interval
+
+Added minimum POSIX timer interval to prevent from timers firing
+to quickly for the process to handle, resulting in 100% CPU and
+endless signal queue.
+
+Upstream-status: Backport
+[From commit 1f0baae98a7b23e85f2bfd8f5de64795421c270e:
+  - critical: added minimum POSIX timer interval to prevent from
+    timers firing to quickly for the process to handle,
+    resulting in 100% CPU and endless signal queue]
+
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ src/dep/eventtimer.h        | 3 ++-
+ src/dep/eventtimer_itimer.c | 2 +-
+ src/dep/eventtimer_posix.c  | 4 ++++
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/dep/eventtimer.h b/src/dep/eventtimer.h
+index 64e483a..0a21318 100644
+--- a/src/dep/eventtimer.h
++++ b/src/dep/eventtimer.h
+@@ -30,7 +30,8 @@
+  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#define EVENTTIMER_MAX_DESC           20
++#define EVENTTIMER_MAX_DESC		20
++#define EVENTTIMER_MIN_INTERVAL_US	250 /* 4000/sec */
+ 
+ typedef struct EventTimer EventTimer;
+ 
+diff --git a/src/dep/eventtimer_itimer.c b/src/dep/eventtimer_itimer.c
+index cf3c6db..3bb7ec6 100644
+--- a/src/dep/eventtimer_itimer.c
++++ b/src/dep/eventtimer_itimer.c
+@@ -53,7 +53,7 @@
+ 
+ #include "../ptpd.h"
+ 
+-#define US_TIMER_INTERVAL (62500)
++#define US_TIMER_INTERVAL (31250)
+ 
+ static volatile unsigned int elapsed;
+ 
+diff --git a/src/dep/eventtimer_posix.c b/src/dep/eventtimer_posix.c
+index 637eef3..f4a702d 100644
+--- a/src/dep/eventtimer_posix.c
++++ b/src/dep/eventtimer_posix.c
+@@ -100,6 +100,10 @@ eventTimerStart_posix(EventTimer *timer, double interval)
+ 	ts.tv_sec = interval;
+ 	ts.tv_nsec = (interval - ts.tv_sec) * 1E9;
+ 
++	if(!ts.tv_sec && ts.tv_nsec < EVENTTIMER_MIN_INTERVAL_US * 1000) {
++	    ts.tv_nsec = EVENTTIMER_MIN_INTERVAL_US * 1000;
++	}
++
+ 	DBGV("Timer %s start requested at %d.%4d sec interval\n", timer->id, ts.tv_sec, ts.tv_nsec);
+ 
+ 	its.it_interval = ts;
+-- 
+2.11.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch
new file mode 100644
index 0000000..e4578dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch
@@ -0,0 +1,35 @@
+From 4c850b92a1cf8cfa19677c66bcde2edfab1a4490 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 24 Feb 2015 23:02:14 -0500
+Subject: [PATCH] ptpd: use pkgconfig
+
+Yocto uses pkg-config for libpcap, rather than pcap-config, so use that
+instead as the source for libs and cflags.
+
+Upstream-status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dc9541f..288f547 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -112,10 +112,10 @@ case "$try_pcap" in
+  yes)
+     case "$PATH_PCAP_CONFIG" in
+      /*)
+-	PCAP_LIBS=`$PATH_PCAP_CONFIG --libs`
++	PCAP_LIBS=`$PATH_PCAP_CONFIG --libs libpcap`
+ 	AC_SUBST([PCAP_LIBS])
+ 	# Separate CPPFLAGS and CFLAGS
+-	foo=`$PATH_PCAP_CONFIG --cflags`
++	foo=`$PATH_PCAP_CONFIG --cflags libpcap`
+ 	PCAP_CPPFLAGS=
+ 	PCAP_CFLAGS=
+ 	for i in $foo; do
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf
new file mode 100644
index 0000000..ddd5710
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf
@@ -0,0 +1,7 @@
+#
+# PTPD Configuration
+#
+# See man ptpd2 for arguments.
+#
+# Example arguments
+PTPDARGS="-d 1 -i eth0"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service
new file mode 100644
index 0000000..f84799e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ptpd time precision daemon
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/ptpd
+ExecStart=@BINDIR@/ptpd2 $PTPDARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb
new file mode 100644
index 0000000..cab0d94
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb
@@ -0,0 +1,61 @@
+SUMMARY = "The PTP daemon (PTPd)"
+DESCRIPTION = "The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as \
+defined by the relevant IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, \
+and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise \
+time coordination of LAN connected computers."
+HOMEPAGE = "http://sourceforge.net/projects/ptpd"
+SECTION = "net"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d"
+
+DEPENDS = "libpcap"
+
+inherit autotools pkgconfig systemd
+
+# return something like '1.2.3' or '1.2.3/rc1'
+#
+def get_sub(d):
+    parts = d.getVar('PV').split('-')
+    try:
+        return parts[0] + '/' + parts[1]
+    except:
+        return parts[0]
+
+SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \
+           file://ptpd-use-pkgconfig.patch \
+           file://Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch \
+           file://ptpd.service \
+           file://ptpd.conf \
+"
+
+SRC_URI[md5sum] = "253bab7ab51d969616ea811be1f132f3"
+SRC_URI[sha256sum] = "0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ptpd/files/releases"
+
+S = "${WORKDIR}/ptpd-${PV}"
+
+EXTRA_OEMAKE = ""
+
+EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config"
+
+do_install() {
+    install -d ${D}${bindir} ${D}${mandir}/man8
+    install -m 0755 ${B}/src/ptpd2 ${D}${bindir}
+    install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system
+
+        sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service
+        sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service
+
+        install -d ${D}${sysconfdir}/default/
+        install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd
+    fi
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "ptpd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch
new file mode 100644
index 0000000..2606a36
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch
@@ -0,0 +1,46 @@
+From a45e086661a3eed29193546c525998d7525ef6d9 Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Tue, 4 Aug 2015 02:46:39 +0200
+Subject: [PATCH] Remove hardcoded /usr/local includes from configure.ac
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+
+Update for 1.0.49.
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+
+---
+ configure.ac | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 079e6f0..9a1ec06 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -96,21 +96,6 @@ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"])
+ AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"])
+ AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"])
+ 
+-if test "x$cross_compiling" != "xyes"; then
+-  for path in \
+-    /usr/kerberos \
+-    /usr/local /opt /usr/local/opt \
+-    /usr/openssl@1.1 /opt/openssl@1.1 /usr/local/opt/openssl@1.1 \
+-    /usr/openssl /opt/openssl /usr/local/opt/openssl; do
+-    if test -d $path/include; then
+-      CPPFLAGS="$CPPFLAGS -I${path}/include"
+-    fi
+-    if test -d $path/lib; then
+-      LDFLAGS="$LDFLAGS -L${path}/lib"
+-    fi
+-  done
+-fi
+-
+ CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
+ 
+ dnl Checks for header files
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch
new file mode 100644
index 0000000..32d714f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch
@@ -0,0 +1,30 @@
+From 79fd22c0def26eba130db98e312bb00fec32ac0a Mon Sep 17 00:00:00 2001
+From: Tudor Florea <tudor.florea@enea.com>
+Date: Tue, 4 Aug 2015 03:07:01 +0200
+Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is
+ specified
+
+We especially don't want stripping enabled.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+
+---
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 695ce68..0f28b55 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -414,8 +414,6 @@ AC_ARG_WITH(minimal,
+     AC_DEFINE(NO_FTP_USERS)
+     AC_DEFINE(WITHOUT_ASCII)    
+     AC_DEFINE(BORING_MODE)
+-    CFLAGS="$CFLAGS -Os -fomit-frame-pointer -fno-unroll-loops "
+-    LDFLAGS="$LDFLAGS -s "
+   fi ])
+ 
+ AC_ARG_WITH(paranoidmsg,
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.49.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.49.bb
new file mode 100644
index 0000000..5a8e9c1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.49.bb
@@ -0,0 +1,20 @@
+SUMMARY = "FTP Server with a strong focus on software security"
+DESCRIPTION = "Pure-FTPd is a free (BSD license), secure, production-quality and standard-conformant FTP server."
+HOMEPAGE = "http://www.pureftpd.org/project/pure-ftpd"
+SECTION = "net"
+LICENSE = "BSD-0-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e25e28bc568d70eb26c3a91387c86ccb"
+
+DEPENDS = "libcap virtual/crypt"
+
+SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \
+           file://0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch \
+           file://nostrip.patch \
+"
+SRC_URI[md5sum] = "451879495ba61c1d7dcfca8dd231119f"
+SRC_URI[sha256sum] = "767bf458c70b24f80c0bb7a1bbc89823399e75a0a7da141d30051a2b8cc892a5"
+
+inherit autotools
+
+PACKAGECONFIG[libsodium] ="ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=yes, \
+                           ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.conf
new file mode 100644
index 0000000..c006f86
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.conf
@@ -0,0 +1,18 @@
+# NOTE: there is no such thing as a working "by-default" configuration file. 
+#       At least the prefix needs to be specified.  Please consult the radvd.conf(5)
+#       man page and/or /usr/share/doc/radvd-*/radvd.conf.example for help.
+#
+#
+#interface eth0
+#{
+#	AdvSendAdvert on;
+#	MinRtrAdvInterval 30;
+#	MaxRtrAdvInterval 100;
+#	prefix 2001:db8:1:0::/64
+#	{
+#		AdvOnLink on;
+#		AdvAutonomous on;
+#		AdvRouterAddr off;
+#	};
+#
+#};
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default
new file mode 100644
index 0000000..7cb73c7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.default
@@ -0,0 +1 @@
+OPTIONS="-u radvd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init
new file mode 100755
index 0000000..8b26317
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.init
@@ -0,0 +1,135 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:       radvd
+# Required-Start: $remote_fs $named $syslog
+# Required-Stop:  $remote_fs $named $syslog
+# Default-Start:  3 5
+# Default-Stop:   0 1 2 6
+# Description:    router advertisement daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/radvd
+NAME=radvd
+DESC=radvd
+CONFIG=/etc/radvd.conf
+SAVED_SETTINGS=/var/run/radvd/saved-settings
+PIDFILE=/var/run/radvd/radvd.pid
+OPTIONS="-u radvd -p $PIDFILE"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+# Check for IPv6 support in kernel
+if test \! -e /proc/sys/net/ipv6; then
+  echo "IPv6 support must be enabled in the kernel for $DESC to work."
+  exit
+fi
+
+save_settings()
+{
+    local file=$1
+    
+    rm -f $file
+    for if_conf in /proc/sys/net/ipv6/conf/*; do
+	echo -e "$if_conf/forwarding\t `cat $if_conf/forwarding`" >> $file
+    done
+    return 0
+}
+
+restore_settings()
+{
+    file=$1
+    
+    if [ ! -f $file ]; then
+	echo "$0: warning: cannot restore settings"
+	return
+    fi
+    
+    ( 
+	while read f value; do
+	    if [ -w $f ]; then
+		echo $value > $f
+	    fi
+	done
+    ) < $file
+}
+
+chkconfig() {
+    if [ ! -e $CONFIG -o ! -s $CONFIG ]; then
+        echo ""
+	echo "* $CONFIG does not exist or is empty." 
+	echo "* See /usr/share/doc/radvd/radvd.conf.example for a simple"
+	echo "* configuration suitable for most systems, and radvd.conf(5)"
+	echo "* for configuration file syntax. radvd will *not* be started."
+	exit 0
+    fi
+}
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	chkconfig
+	save_settings $SAVED_SETTINGS
+	
+        # We must enable IPv6 forwarding for radvd to work
+	echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+
+	# Check for stale pidfile; radvd won't start if one is lying around
+	if [ -f $PIDFILE ] && ! ps `cat  $PIDFILE` > /dev/null; then
+	  rm -f $PIDFILE
+	fi
+	if ! start-stop-daemon --oknodo --start --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS; then
+	  echo "failed." && exit 1
+	fi
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	if ! [ -f $PIDFILE ] ; then
+		echo "not running."
+		exit 0
+	fi
+	start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
+		--exec $DAEMON
+	restore_settings $SAVED_SETTINGS
+	rm -f $SAVED_SETTINGS
+	echo "$NAME."
+	;;
+  status)
+	status $DAEMON;
+	exit $?
+	;;
+  reload|force-reload)
+	echo "Reloading $DESC configuration files."
+	start-stop-daemon --stop --signal HUP --quiet --pidfile \
+	    $PIDFILE --exec $DAEMON
+	;;
+  restart)
+	chkconfig
+	echo -n "Restarting $DESC: "
+	if ! start-stop-daemon --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON; then
+	  # stop failed, so we were not running
+	  save_settings $SAVED_SETTINGS
+	  echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+	fi
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON -- $OPTIONS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|status|restart|reload|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service
new file mode 100644
index 0000000..e60798a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/radvd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Router advertisement daemon for IPv6
+After=network.target
+ConditionPathExists=@SYSCONFDIR@/radvd.conf
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/default/radvd
+ExecStart=@SBINDIR@/radvd -n $OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
new file mode 100644
index 0000000..89256a4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radvd root 0755 /var/run/radvd none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
new file mode 100644
index 0000000..fbcf93b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
@@ -0,0 +1,67 @@
+SUMMARY = "IPv6 router advertisement daemon"
+DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \
+listens to router solicitations and sends router \
+advertisements as described in RFC 2461, Neighbor \
+Discovery for IP Version 6 (IPv6). With these \
+advertisements hosts can automatically configure their \
+addresses and some other parameters. They also can \
+choose a default router based on these advertisements."
+HOMEPAGE = "http://www.litech.org/radvd/"
+SECTION = "net"
+DEPENDS = "flex-native bison-native libdaemon "
+
+# License is BSD-Style (with advertising clause) but also has an additional 0th clause
+LICENSE = "radvd"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
+
+SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
+           file://radvd.init \
+           file://radvd.service \
+           file://volatiles.03_radvd \
+           file://radvd.default \
+           file://radvd.conf"
+
+inherit autotools useradd pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "radvd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+    install -m 0755 -d ${D}${sysconfdir}/init.d \
+                       ${D}${sysconfdir}/default/volatiles \
+                       ${D}${docdir}/radvd
+    # Install init script and volatiles
+    install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd
+
+    install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd
+
+    # Install systemd service files
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \
+           -e 's#@SBINDIR@#${sbindir}#g' \
+           -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service
+
+    # Install default environment file
+    install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd
+
+    # Documentation
+    for i in radvd.conf.example README; do \
+        install -m 0644 ${S}/$i ${D}${docdir}/radvd; \
+    done
+
+    install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf
+}
+
+USERADD_PACKAGES    = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -s /bin/false -g nogroup radvd"
+
+pkg_postinst_${PN} () {
+    if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then
+        /etc/init.d/populate-volatile.sh update
+    fi
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb
new file mode 100644
index 0000000..6097b20
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb
@@ -0,0 +1,5 @@
+
+require radvd.inc
+
+SRC_URI[md5sum] = "26ead3a0d5cfbe4c81c3089eaf7b3250"
+SRC_URI[sha256sum] = "4f573e36b96ba92d03b5abbbd5f059b9c8994967812c77852f44049ac5a448fd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
new file mode 100644
index 0000000..302136a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
@@ -0,0 +1,118 @@
+From c21adbb0b230ffba97cf5d059e2bd024e13a37df Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 11:54:57 -0700
+Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler
+ option
+
+If this option is supported by compiler then disable it ( gcc7+)
+Fixes
+client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++++++++++
+ configure.ac                       |  2 ++
+ 2 files changed, 76 insertions(+)
+ create mode 100644 acinclude/ax_check_compile_flag.m4
+
+diff --git a/acinclude/ax_check_compile_flag.m4 b/acinclude/ax_check_compile_flag.m4
+new file mode 100644
+index 0000000..dcabb92
+--- /dev/null
++++ b/acinclude/ax_check_compile_flag.m4
+@@ -0,0 +1,74 @@
++# ===========================================================================
++#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
++#
++# DESCRIPTION
++#
++#   Check whether the given FLAG works with the current language's compiler
++#   or gives an error.  (Warnings, however, are ignored)
++#
++#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
++#   success/failure.
++#
++#   If EXTRA-FLAGS is defined, it is added to the current language's default
++#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
++#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
++#   force the compiler to issue an error when a bad flag is given.
++#
++#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
++#
++#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
++#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
++#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
++#
++#   This program is free software: you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation, either version 3 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <https://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 5
++
++AC_DEFUN([AX_CHECK_COMPILE_FLAG],
++[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
++  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
++  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
++  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
++    [AS_VAR_SET(CACHEVAR,[yes])],
++    [AS_VAR_SET(CACHEVAR,[no])])
++  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
++AS_VAR_IF(CACHEVAR,yes,
++  [m4_default([$2], :)],
++  [m4_default([$3], :)])
++AS_VAR_POPDEF([CACHEVAR])dnl
++])dnl AX_CHECK_COMPILE_FLAGS
+diff --git a/configure.ac b/configure.ac
+index ff4688c..9382fdf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4])
+ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
+ m4_include([acinclude/ax_cxx_0x_types.m4])
++m4_include([acinclude/ax_check_compile_flag.m4])
+ 
+ HOSTCXX="$BUILD_CXX"
+ PRESET_CFLAGS="$CFLAGS"
+@@ -44,6 +45,7 @@ AC_PROG_CXX
+ AC_LANG([C++])
+ AC_CANONICAL_HOST
+ 
++AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"])
+ # Clang 3.2 on some CPUs requires -march-native to detect correctly.
+ # GCC 4.3+ can also produce faster executables when its used.
+ # But building inside a virtual machine environment has been found to
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch
new file mode 100644
index 0000000..fbbad15
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch
@@ -0,0 +1,31 @@
+From 1def5b4278d97f197520d23c1dce52f93a1b2f46 Mon Sep 17 00:00:00 2001
+From: Andrej Valek <andrej.valek@siemens.com>
+Date: Tue, 9 Apr 2019 09:40:30 +0200
+Subject: [PATCH] splay.cc: fix bind is not a member of std
+
+fix
+| ../../squid-4.6/test-suite/splay.cc:134:28: error: 'bind' is not a member of 'std'
+|      auto nextRandom = std::bind (distribution, generator);
+|                             ^~~~
+| ../../squid-4.6/test-suite/splay.cc:134:28: note: 'std::bind' is defined in header '<functional>'; did you forget to '#include <functional>'?
+
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+---
+ test-suite/splay.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test-suite/splay.cc b/test-suite/splay.cc
+index f71b337..4e21adc 100644
+--- a/test-suite/splay.cc
++++ b/test-suite/splay.cc
+@@ -20,6 +20,7 @@
+ #include <unistd.h>
+ #endif
+ #include <random>
++#include <functional>
+ 
+ class intnode
+ {
+-- 
+2.11.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
new file mode 100644
index 0000000..f267875
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
@@ -0,0 +1,34 @@
+From 86dae8010310d13bd2a2beb006b4085d06ae1556 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Jun 2017 00:59:24 -0700
+Subject: [PATCH] tools.cc: fixed unused-result warning
+
+fix
+| ../../squid-3.5.26/src/tools.cc: In function 'void enter_suid()':
+| ../../squid-3.5.26/src/tools.cc:616:11: error: ignoring return value of 'int setuid(__uid_t)', declared with attribute warn_unused_result [-Werror=unused-result]
+|      setuid(0);
+|      ~~~~~~^~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/tools.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools.cc b/src/tools.cc
+index 5829574..19f0836 100644
+--- a/src/tools.cc
++++ b/src/tools.cc
+@@ -581,8 +581,10 @@ enter_suid(void)
+         debugs (21, 3, "enter_suid: setresuid failed: " << xstrerr(xerrno));
+     }
+ #else
+-
+-    setuid(0);
++    if (setuid(0) < 0) {
++        const auto xerrno = errno;
++        debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerr(xerrno));
++    }
+ #endif
+ #if HAVE_PRCTL && defined(PR_SET_DUMPABLE)
+     /* Set Linux DUMPABLE flag */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
new file mode 100644
index 0000000..1516bb0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
@@ -0,0 +1,38 @@
+From b73b802282bf95d214c86ba943c5765ba6930bc1 Mon Sep 17 00:00:00 2001
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Mon, 21 Oct 2013 12:50:44 -0400
+Subject: [PATCH] Fix flawed dynamic -ldb link test in configure
+
+The test uses dbopen, but just ignores the fact
+that this function may not exist in the db version
+used.  This leads to the dynamic link test failing
+and the configure script just making assumptions
+about why and setting the need for -ldb incorrectly.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index d2f7feb..c7ae568 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3235,6 +3235,16 @@ case "$host" in
+ 		;;
+ esac
+ 
++if test "x$ac_cv_have_decl_dbopen" = "xyes"; then
++  dnl 1.85
++  SQUID_CHECK_DBOPEN_NEEDS_LIBDB
++else
++  # dbopen isn't there. So instead of running a compile/link test that
++  # uses it and is thus guaranteed to fail, we just assume that we will
++  # need to link in the db library, rather than fabricate some other
++  # dynamic compile/link test.
++  ac_cv_dbopen_libdb="yes"
++fi
+ dnl System-specific library modifications
+ dnl
+ case "$host" in
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
new file mode 100644
index 0000000..3852f7c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
@@ -0,0 +1,28 @@
+From 995aaf30799fa972441354b6feb45f0621968929 Mon Sep 17 00:00:00 2001
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Wed, 16 Oct 2013 16:41:03 -0400
+Subject: [PATCH] Set up for cross compilation
+
+Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com>
+
+Set the host compiler to BUILD_CXX so
+proper cross compilation can occur.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index fe80ee0..57cd1ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,6 +27,7 @@ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
+ m4_include([acinclude/ax_cxx_0x_types.m4])
+ 
++HOSTCXX="$BUILD_CXX"
+ PRESET_CFLAGS="$CFLAGS"
+ PRESET_CXXFLAGS="$CXXFLAGS"
+ PRESET_LDFLAGS="$LDFLAGS"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
new file mode 100644
index 0000000..dd83b62
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
@@ -0,0 +1,65 @@
+From e4778299a3e49a634d2c7fe4fd9ac77777e829e3 Mon Sep 17 00:00:00 2001
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Tue, 14 Oct 2014 02:56:08 -0400
+Subject: [PATCH] Skip AC_RUN_IFELSE tests
+
+Upstream-Status: Inappropriate [cross compiling specific]
+
+Such tests are not supported in a cross compile
+environment.  Choose sane defaults.
+
+Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ acinclude/krb5.m4       | 10 +++++++++-
+ acinclude/lib-checks.m4 |  8 ++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4
+index ad0ba60..4477446 100644
+--- a/acinclude/krb5.m4
++++ b/acinclude/krb5.m4
+@@ -61,7 +61,15 @@ main(void)
+ 
+         return 0;
+ }
+-]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ])
++]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ],
++[
++  dnl Can't test in cross compiled env - so assume good
++  squid_cv_broken_heimdal_krb5_h=no
++])
++    ],
++    [
++     dnl Can't test in cross compiled env - so assume good
++     squid_cv_broken_heimdal_krb5_h=no
+     ])
+   ])
+ ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H
+diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4
+index 7624b56..b449c5a 100644
+--- a/acinclude/lib-checks.m4
++++ b/acinclude/lib-checks.m4
+@@ -217,7 +217,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[
+   [
+    AC_MSG_RESULT([no])
+   ],
+-  [])
++  [
++   AC_MSG_RESULT([skipped - can't test in cross-compiled env])
++  ])
+ 
+ SQUID_STATE_ROLLBACK(check_const_SSL_METHOD)
+ ])
+@@ -377,7 +379,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1)
+   ],
+-[])
++[
++   AC_MSG_RESULT([skipped - can't test in cross-compiled env])
++])
+ 
+ SQUID_STATE_ROLLBACK(check_TXTDB)
+ ])
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest
new file mode 100644
index 0000000..de79a29
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+#
+make -C test-suite -k runtest-TESTS
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch
new file mode 100644
index 0000000..124e044
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch
@@ -0,0 +1,41 @@
+From 702bd881b66dc034e711c0ff47805f2da40b6e0d Mon Sep 17 00:00:00 2001
+From: Yue Tao <yue.tao@windriver.com>
+Date: Mon, 8 Aug 2016 16:04:33 +0800
+Subject: [PATCH] Set the SYSROOT for libxml2 header file to avoid host
+ contamination.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+---
+ configure.ac | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 504a844..ff4688c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -931,15 +931,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then
+     dnl Find the main header and include path...
+     AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [
+       AC_CHECK_HEADERS([libxml/parser.h], [], [
+-        AC_MSG_NOTICE([Testing in /usr/include/libxml2])
++        AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2])
+         SAVED_CPPFLAGS="$CPPFLAGS"
+-        CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS"
++        CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS"
+         unset ac_cv_header_libxml_parser_h
+-        AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/include/libxml2"], [
+-          AC_MSG_NOTICE([Testing in /usr/local/include/libxml2])
+-          CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS"
++        AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/include/libxml2"], [
++          AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2])
++          CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS"
+           unset ac_cv_header_libxml_parser_h
+-          AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/local/include/libxml2"], [
++          AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/local/include/libxml2"], [
+             AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h])
+           ])
+         ])
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
new file mode 100644
index 0000000..e5267ea
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
@@ -0,0 +1,61 @@
+From 8786b91488dae3f6dfeadd686e80d2ffc5c29320 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 25 Aug 2016 15:22:57 +0800
+Subject: [PATCH] squid: don't do squid-conf-tests at build time
+
+* squid-conf-tests is a test to run "squid -k parse -f"
+  to perse the config files, which should not be run
+  at build time since we are cross compiling, so remove
+  it but it will be added back for the runtime ptest.
+
+* Fix the directories of the conf files for squid-conf-tests
+  so that it can run on the target board.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ test-suite/Makefile.am | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
+index 061a463..350dfb2 100644
+--- a/test-suite/Makefile.am
++++ b/test-suite/Makefile.am
+@@ -41,8 +41,7 @@ TESTS += debug \
+ 	MemPoolTest\
+ 	mem_node_test\
+ 	mem_hdr_test\
+-	$(ESI_TESTS) \
+-	squid-conf-tests
++	$(ESI_TESTS)
+ 
+ ## Sort by alpha - any build failures are significant.
+ check_PROGRAMS += debug \
+@@ -125,19 +124,19 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc $(DEBUG_SOURCE)
+ ##$(TARGLIB): $(LIBOBJS)
+ ##	$(AR_R) $(TARGLIB) $(LIBOBJS)
+ 
+-squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
++squid-conf-tests: $(sysconfdir)/squid.conf.default squidconf/*
+ 	@failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
+ 	for cfg in $$cfglist ; do \
+-		$(top_builddir)/src/squid -k parse -f $$cfg || \
++		squid -k parse -f $$cfg || \
+ 			{ echo "FAIL: squid.conf test: $$cfg" | \
+-				sed s%$(top_builddir)/src/%% | \
+-				sed s%$(srcdir)/squidconf/%% ; \
++				sed s%$(sysconfdir)/%% | \
++				sed s%squidconf/%% ; \
+ 				failed=1; break; \
+ 			}; \
+ 		if test "$$failed" -eq 0; then \
+ 			echo "PASS: squid.conf test: $$cfg" | \
+-				sed s%$(top_builddir)/src/%% | \
+-				sed s%$(srcdir)/squidconf/%% ; \
++				sed s%$(sysconfdir)/%% | \
++				sed s%squidconf/%% ; \
+ 		else break; fi; \
+ 	done; \
+ 	if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 0000000..732cf17
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,29 @@
+From 3d881c112bba765731d581194aae95651819b715 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 19 Jul 2016 01:56:23 -0400
+Subject: [PATCH] squid: use serial-tests config needed by ptest
+
+ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+
+Upstream-Status: Inappropriate [default automake behavior incompatible with ptest]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c7ae568..5e1454e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,7 @@ AC_PREREQ(2.61)
+ AC_CONFIG_HEADERS([include/autoconf.h])
+ AC_CONFIG_AUX_DIR(cfgaux)
+ AC_CONFIG_SRCDIR([src/main.cc])
+-AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz])
++AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz serial-tests])
+ AC_REVISION($Revision$)dnl
+ AC_PREFIX_DEFAULT(/usr/local/squid)
+ AM_MAINTAINER_MODE
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid
new file mode 100644
index 0000000..83e1f8b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/files/volatiles.03_squid
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d squid squid 0755 /var/run/squid none
+d squid squid 0750 /var/log/squid none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_4.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_4.9.bb
new file mode 100644
index 0000000..19949ac
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/squid/squid_4.9.bb
@@ -0,0 +1,117 @@
+SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux"
+DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \
+Squid offers a rich access control, authorization and logging environment to \
+develop web proxy and content serving applications. \
+Squid offers a rich set of traffic optimization options, most of which are \
+enabled by default for simpler installation and high performance. \
+"
+HOMEPAGE = "http://www.squid-cache.org"
+SECTION = "web"
+LICENSE = "GPLv2+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 \
+           file://Set-up-for-cross-compilation.patch \
+           file://Skip-AC_RUN_IFELSE-tests.patch \
+           file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \
+           file://squid-use-serial-tests-config-needed-by-ptest.patch \
+           file://run-ptest \
+           file://volatiles.03_squid \
+           file://set_sysroot_patch.patch \
+           file://squid-don-t-do-squid-conf-tests-at-build-time.patch \
+           file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
+           file://0001-tools.cc-fixed-unused-result-warning.patch \
+           file://0001-splay.cc-fix-bind-is-not-a-member-of-std.patch \
+           "
+
+SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
+
+SRC_URI[md5sum] = "b315d0dce37627dfe61eec7f5304baaf"
+SRC_URI[sha256sum] = "0f5829d878002147e7c4d9b8901c2c3c051693465e82e45cef9ab0e226e3e729"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://errors/COPYRIGHT;md5=19cc4dd146f397e72f3ff6f9f58fbfbe \
+                    "
+DEPENDS = "libtool krb5 openldap db cyrus-sasl"
+
+inherit autotools pkgconfig useradd ptest perlnative
+
+LDFLAGS_append_mipsarch = " -latomic"
+LDFLAGS_append_powerpc = " -latomic"
+LDFLAGS_append_riscv64 = " -latomic"
+LDFLAGS_append_riscv32 = " -latomic"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+                  "
+PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking,"
+PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2"
+PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl"
+
+BASIC_AUTH = "DB SASL LDAP"
+
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}"
+
+EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \
+                 --sysconfdir=${sysconfdir}/${BPN} \
+                 --with-logdir=${localstatedir}/log/${BPN} \
+                 'PERL=${USRBINPATH}/env perl'"
+
+export BUILDCXXFLAGS="${BUILD_CXXFLAGS}"
+
+TESTDIR = "test-suite"
+
+do_configure_prepend() {
+    export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+do_compile_ptest() {
+    oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+    cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
+    cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
+
+    # do NOT need to rebuild Makefile itself
+    sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+
+    # Add squid-conf-tests for runtime tests
+    sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \
+        -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \
+        -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+
+    # Ensure the path for command true is correct
+    sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+        echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+    fi
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid
+
+    rmdir "${D}${localstatedir}/run/${BPN}"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run"
+
+    rmdir "${D}${localstatedir}/log/${BPN}"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log"
+}
+
+FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
+FILES_${PN}-dbg += "/usr/src/debug"
+FILES_${PN}-doc += "${datadir}/*.txt"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-ptest += "make"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch
new file mode 100644
index 0000000..cead977
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch
@@ -0,0 +1,62 @@
+From 941038fc05be21202cab7a7a9434097fb55ecbe0 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.de>
+Date: Thu, 31 Jul 2014 16:29:41 +0930
+Subject: [PATCH] __progname[] is provided by libc
+
+Rename local variable to tftpd_progname to avoid a clash with glibc
+global symbols and work around Debian bug #519006 (Closes: #564052).
+
+[ hpa: specifically, double-underscore symbols in C are reserved for
+  the implementation, i.e. compiler/libc. ]
+
+Signed-off-by: Ron Lee <ron@debian.org>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+---
+ tftpd/tftpd.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
+index e247b97..5fec7bf 100644
+--- a/tftpd/tftpd.c
++++ b/tftpd/tftpd.c
+@@ -76,7 +76,7 @@ static int ai_fam = AF_INET;
+ #define TRIES   6               /* Number of attempts to send each packet */
+ #define TIMEOUT_LIMIT ((1 << TRIES)-1)
+ 
+-const char *__progname;
++const char *tftpd_progname;
+ static int peer;
+ static unsigned long timeout  = TIMEOUT;        /* Current timeout value */
+ static unsigned long rexmtval = TIMEOUT;       /* Basic timeout value */
+@@ -395,9 +395,9 @@ int main(int argc, char **argv)
+     /* basename() is way too much of a pain from a portability standpoint */
+ 
+     p = strrchr(argv[0], '/');
+-    __progname = (p && p[1]) ? p + 1 : argv[0];
++    tftpd_progname = (p && p[1]) ? p + 1 : argv[0];
+ 
+-    openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
++    openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+ 
+     srand(time(NULL) ^ getpid());
+ 
+@@ -946,14 +946,14 @@ int main(int argc, char **argv)
+        syslog daemon gets restarted by the time we get here. */
+     if (secure && standalone) {
+         closelog();
+-        openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
++        openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+     }
+ 
+ #ifdef HAVE_TCPWRAPPERS
+     /* Verify if this was a legal request for us.  This has to be
+        done before the chroot, while /etc is still accessible. */
+     request_init(&wrap_request,
+-                 RQ_DAEMON, __progname,
++                 RQ_DAEMON, tftpd_progname,
+                  RQ_FILE, fd,
+                  RQ_CLIENT_SIN, &from, RQ_SERVER_SIN, &myaddr, 0);
+     sock_methods(&wrap_request);
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch
new file mode 100644
index 0000000..d01c20d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch
@@ -0,0 +1,81 @@
+From bd5773947af5ca80ca546ad5625818fc912bdd60 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Thu, 22 Aug 2013 08:56:09 +0800
+Subject: [PATCH] tftp-hpa: add error check for disk filled up
+
+Upstream-status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html]
+
+Add error check when the write-buffer is finally flushed to the file,
+the caller can detect if the disk filled up (or had an i/o error) and
+return a NOSAPCE nak to the other side.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ common/tftpsubs.c |    8 +++++---
+ tftpd/tftpd.c     |   12 ++++++++++--
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index 8c999f6..b4d4ffe 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -206,20 +206,22 @@ int write_behind(FILE * file, int convert)
+ 
+     p = buf;
+     ct = count;
++    count = 0;
+     while (ct--) {              /* loop over the buffer */
+         c = *p++;               /* pick up a character */
+         if (prevchar == '\r') { /* if prev char was cr */
+             if (c == '\n')      /* if have cr,lf then just */
+-                fseek(file, -1, 1);     /* smash lf on top of the cr */
++                count = count - 1;
+             else if (c == '\0') /* if have cr,nul then */
+                 goto skipit;    /* just skip over the putc */
+             /* else just fall through and allow it */
+         }
+-        putc(c, file);
++        buf[count] = c;
++        count ++;
+       skipit:
+         prevchar = c;
+     }
+-    return count;
++    return write(fileno(file), buf, count);
+ }
+ 
+ /* When an error has occurred, it is possible that the two sides
+diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
+index 1873e70..c2adbda 100644
+--- a/tftpd/tftpd.c
++++ b/tftpd/tftpd.c
+@@ -1681,7 +1681,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac
+             syslog(LOG_WARNING, "tftpd: write(ack): %m");
+             goto abort;
+         }
+-        write_behind(file, pf->f_convert);
++        if(write_behind(file, pf->f_convert) < 0) {
++            nak(ENOSPACE, NULL);
++            (void)fclose(file);
++            goto abort;
++        }
+         for (;;) {
+             n = recv_time(peer, dp, PKTSIZE, 0, &r_timeout);
+             if (n < 0) {        /* really? */
+@@ -1712,7 +1716,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac
+             goto abort;
+         }
+     } while (size == segsize);
+-    write_behind(file, pf->f_convert);
++    if(write_behind(file, pf->f_convert) < 0) {
++        nak(ENOSPACE, NULL);
++        (void)fclose(file);
++        goto abort;
++    }
+     (void)fclose(file);         /* close data file */
+ 
+     ap->th_opcode = htons((u_short) ACK);       /* send the "final" ack */
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default
new file mode 100644
index 0000000..1dce7fd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/default
@@ -0,0 +1,3 @@
+#Defaults for tftpd-hpa
+RUN_DAEMON="yes"
+OPTIONS="-l -s /var/lib/tftpboot"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch
new file mode 100644
index 0000000..452aa05
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch
@@ -0,0 +1,39 @@
+[PATCH] fix the empty file writting
+
+Upstream-Status: pending
+
+With the feature that checking the disk filled up, the return
+value of function write_behind was checked and used to detect
+the disk status. While for empty file, without data being
+written, this function will return -1 thus the disk filled up
+error was miss-raised.
+
+make write_behind to return 0 if written file is empty, to fix
+the this bug.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ common/tftpsubs.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index b4ea3f2..9f6cafc 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -198,9 +198,12 @@ int write_behind(FILE * file, int convert)
+     nextone = !nextone;         /* incr for next time */
+     buf = dp->th_data;
+ 
+-    if (count <= 0)
++    if (count < 0)
+         return -1;              /* nak logic? */
+ 
++    if (count == 0)
++        return 0;
++
+     if (convert == 0)
+         return write(fileno(file), buf, count);
+ 
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init
new file mode 100644
index 0000000..9e18436
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init
@@ -0,0 +1,105 @@
+#! /bin/sh
+#
+# Author:	Jaakko Niemi <liiwi@iki.fi>
+# Modified from skeleton file in sarge
+
+### BEGIN INIT INFO
+# Provides:          tftp-hpa
+# Required-Start:    $local_fs $remote_fs $syslog $network
+# Required-Stop:     $local_fs $remote_fs $syslog $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      1
+# Short-Description: HPA's tftp client 
+# Description:       tftp server to allow booting clients which support
+#                    the PXE protocol.
+### END INIT INFO
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="HPA's tftpd"
+NAME=in.tftpd-hpa
+SCRIPTNAME=/etc/init.d/tftpd-hpa
+
+# Read config file if it is present.
+if [ -r /etc/default/tftpd-hpa ]
+then
+	. /etc/default/tftpd-hpa
+fi
+
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+if [ "$RUN_DAEMON" != "yes" ] ; then
+         echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
+	 exit 0
+fi
+
+#
+#	Function that starts the daemon/service.
+#
+d_start() {
+	start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
+}
+
+#
+#	Function that stops the daemon/service.
+#
+d_stop() {
+	start-stop-daemon --stop --quiet --name $NAME
+}
+
+#
+#	Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+	start-stop-daemon --stop --quiet --name $NAME --signal 1
+}
+
+case "$1" in
+  start)
+	echo  "Starting $DESC: $NAME"
+	d_start
+	echo "."
+	;;
+  stop)
+	echo  "Stopping $DESC: $NAME"
+	d_stop
+	echo "."
+	;;
+  #reload)
+	#
+	#	If the daemon can reload its configuration without
+	#	restarting (for example, when it is sent a SIGHUP),
+	#	then implement that here.
+	#
+	#	If the daemon responds to changes in its config file
+	#	directly anyway, make this an "exit 0".
+	#
+	# echo -n "Reloading $DESC configuration..."
+	# d_reload
+	# echo "done."
+  #;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	echo "Restarting $DESC: $NAME"
+	d_stop
+	sleep 1
+	d_start
+	echo "."
+	;;
+  *)
+	# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
new file mode 100644
index 0000000..3f69060
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
@@ -0,0 +1,25 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c
+--- tftp-hpa-0.49/tftpd/remap.c.zero	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/remap.c	2008-11-25 11:41:09.000000000 -0500
+@@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f)
+     int lineno = 0;
+     int err = 0;
+ 
++    memset(this_rule, '\0', sizeof(struct rule));
+     while (lineno++, fgets(line, MAXLINE, f)) {
+         rv = parseline(line, this_rule, lineno);
+         if (rv < 0)
+@@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f)
+             *last_rule = this_rule;
+             last_rule = &this_rule->next;
+             this_rule = tfmalloc(sizeof(struct rule));
++            memset(this_rule, '\0', sizeof(struct rule));
+         }
+     }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
new file mode 100644
index 0000000..98a86b7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
@@ -0,0 +1,60 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.48/tftp-xinetd.tftpboot tftp-hpa-0.48/tftp-xinetd
+--- tftp-hpa-0.48/tftp-xinetd.tftpboot	2007-01-31 00:51:05.000000000 +0100
++++ tftp-hpa-0.48/tftp-xinetd	2008-05-20 12:05:53.000000000 +0200
+@@ -10,7 +10,7 @@ service tftp
+ 	wait			= yes
+ 	user			= root
+ 	server			= /usr/sbin/in.tftpd
+-	server_args		= -s /tftpboot
++	server_args		= -s /var/lib/tftpboot
+ 	disable			= yes
+ 	per_source		= 11
+ 	cps			= 100 2
+diff -up tftp-hpa-0.48/README.security.tftpboot tftp-hpa-0.48/README.security
+--- tftp-hpa-0.48/README.security.tftpboot	2008-05-29 17:36:32.000000000 +0200
++++ tftp-hpa-0.48/README.security	2008-05-29 17:37:21.000000000 +0200
+@@ -17,10 +17,10 @@ probably the following:
+ 
+ 1. Create a separate "tftpd" user and group only used for tftpd;
+ 2. Have all your boot files in a single directory tree (usually called 
+-   /tftpboot).
+-3. Specify "-p -u tftpd -s /tftpboot" on the tftpd command line; if
++   /var/lib/tftpboot).
++3. Specify "-p -u tftpd -s /var/lib/tftpboot" on the tftpd command line; if
+    you want clients to be able to create files use
+-   "-p -c -U 002 -u tftpd -s /tftpboot" (replace 002 with whatever
++   "-p -c -U 002 -u tftpd -s /var/lib/tftpboot" (replace 002 with whatever
+    umask is appropriate for your setup.)
+ 
+ 	       =======================================
+@@ -40,12 +40,12 @@ directly.  Thus, if your /etc/inetd.conf
+ line):
+ 
+ tftp	dgram	udp	wait	root	/usr/sbin/tcpd
+-/usr/sbin/in.tftpd -s /tftpboot -r blksize
++/usr/sbin/in.tftpd -s /var/lib/tftpboot -r blksize
+ 
+ ... it's better to change to ...
+ 
+ tftp	dgram	udp	wait	root	/usr/sbin/in.tftpd
+-in.tftpd -s /tftpboot -r blksize
++in.tftpd -s /var/lib/tftpboot -r blksize
+ 
+ You should make sure that you are using "wait" option in tftpd; you
+ also need to have tftpd spawned as root in order for chroot (-s) to
+diff -up tftp-hpa-0.48/tftpd/sample.rules.tftpboot tftp-hpa-0.48/tftpd/sample.rules
+--- tftp-hpa-0.48/tftpd/sample.rules.tftpboot	2008-05-29 17:38:46.000000000 +0200
++++ tftp-hpa-0.48/tftpd/sample.rules	2008-05-29 17:38:05.000000000 +0200
+@@ -30,5 +30,5 @@ rg	\\		/		# Convert backslashes to slash
+ rg	\#		@		# Convert hash marks to @ signs
+ rg	/../		/..no../	# Convert /../ to /..no../
+ e	^ok/				# These are always ok
+-r	^[^/]		/tftpboot/\0	# Convert non-absolute files
++r	^[^/]		/var/lib/tftpboot/\0	# Convert non-absolute files
+ a	\.pvt$				# Reject requests for private files
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
new file mode 100644
index 0000000..7ae1a87
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
@@ -0,0 +1,21 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes	2009-01-15 15:28:50.000000000 +0100
++++ tftp-hpa-0.49/tftpd/tftpd.c	2009-01-15 15:31:36.000000000 +0100
+@@ -932,7 +932,10 @@ int main(int argc, char **argv)
+             exit(EX_OSERR);
+         }
+ #ifdef __CYGWIN__
+-        chdir("/");             /* Cygwin chroot() bug workaround */
++				if (chdir("/") < 0) {			/* Cygwin chroot() bug workaround */
++					syslog(LOG_ERR, "chroot: %m");
++					exit(EX_OSERR);
++				}
+ #endif
+     }
+ #ifdef HAVE_SETREGID
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
new file mode 100644
index 0000000..6b8ceaa
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
@@ -0,0 +1,165 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/config.h.cmd_arg tftp-hpa-0.49/config.h
+--- tftp-hpa-0.49/config.h.cmd_arg	2010-04-19 15:29:10.567331454 +0200
++++ tftp-hpa-0.49/config.h	2010-04-20 07:33:03.133232772 +0200
+@@ -291,6 +291,7 @@ typedef int socklen_t;
+ /* Prototypes for libxtra functions */
+ 
+ void *xmalloc(size_t);
++void *xrealloc(void *, size_t);
+ char *xstrdup(const char *);
+ 
+ #ifndef HAVE_BSD_SIGNAL
+diff -up tftp-hpa-0.49/configure.in.cmd_arg tftp-hpa-0.49/configure.in
+--- tftp-hpa-0.49/configure.in.cmd_arg	2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/configure.in	2010-04-19 11:05:12.387340698 +0200
+@@ -152,6 +152,7 @@ OBJROOT=`pwd`
+ 
+ XTRA=false
+ PA_SEARCH_LIBS_AND_ADD(xmalloc, iberty)
++PA_SEARCH_LIBS_AND_ADD(xrealloc, iberty)
+ PA_SEARCH_LIBS_AND_ADD(xstrdup, iberty)
+ PA_SEARCH_LIBS_AND_ADD(bsd_signal, bsd, bsdsignal)
+ PA_SEARCH_LIBS_AND_ADD(getopt_long, getopt, getopt_long)
+diff -up tftp-hpa-0.49/lib/xrealloc.c.cmd_arg tftp-hpa-0.49/lib/xrealloc.c
+--- tftp-hpa-0.49/lib/xrealloc.c.cmd_arg	2010-04-19 11:05:12.387340698 +0200
++++ tftp-hpa-0.49/lib/xrealloc.c	2010-04-19 11:05:12.387340698 +0200
+@@ -0,0 +1,20 @@
++/*
++ * xrealloc.c
++ *
++ * Simple error-checking version of realloc()
++ *
++ */
++
++#include "config.h"
++
++void *xrealloc(void *ptr, size_t size)
++{
++    void *p = realloc(ptr, size);
++
++    if (!p) {
++        fprintf(stderr, "Out of memory!\n");
++        exit(128);
++    }
++
++    return p;
++}
+diff -up tftp-hpa-0.49/tftp/main.c.cmd_arg tftp-hpa-0.49/tftp/main.c
+--- tftp-hpa-0.49/tftp/main.c.cmd_arg	2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/tftp/main.c	2010-04-19 11:05:12.389329337 +0200
+@@ -89,11 +89,14 @@ int connected;
+ const struct modes *mode;
+ #ifdef WITH_READLINE
+ char *line = NULL;
++char *remote_pth = NULL;
+ #else
+ char line[LBUFLEN];
++char remote_pth[LBUFLEN];
+ #endif
+ int margc;
+-char *margv[20];
++char **margv;
++int sizeof_margv=0;
+ const char *prompt = "tftp> ";
+ sigjmp_buf toplevel;
+ void intr(int);
+@@ -379,6 +382,10 @@ static void getmoreargs(const char *part
+         free(line);
+         line = NULL;
+     }
++    if (remote_pth) {
++        free(remote_pth);
++        remote_pth = NULL;
++    }
+     line = xmalloc(len + elen + 1);
+     strcpy(line, partial);
+     strcpy(line + len, eline);
+@@ -535,6 +542,7 @@ void put(int argc, char *argv[])
+     int fd;
+     int n, err;
+     char *cp, *targ;
++    long dirlen, namelen, lastlen=0;
+ 
+     if (argc < 2) {
+         getmoreargs("send ", "(file) ");
+@@ -588,9 +596,22 @@ void put(int argc, char *argv[])
+     }
+     /* this assumes the target is a directory */
+     /* on a remote unix system.  hmmmm.  */
+-    cp = strchr(targ, '\0');
+-    *cp++ = '/';
++    dirlen = strlen(targ)+1;
++#ifdef WITH_READLINE
++    remote_pth = xmalloc(dirlen+1);
++#endif
++    strcpy(remote_pth, targ);
++    remote_pth[dirlen-1] = '/';
++    cp = remote_pth + dirlen;
+     for (n = 1; n < argc - 1; n++) {
++#ifdef WITH_READLINE
++        namelen = strlen(tail(argv[n])) + 1;
++        if (namelen > lastlen) {
++            remote_pth = xrealloc(remote_pth, dirlen + namelen + 1);
++            cp = remote_pth + dirlen;
++            lastlen = namelen;
++        }
++#endif
+         strcpy(cp, tail(argv[n]));
+         fd = open(argv[n], O_RDONLY | mode->m_openflags);
+         if (fd < 0) {
+@@ -600,9 +621,9 @@ void put(int argc, char *argv[])
+         }
+         if (verbose)
+             printf("putting %s to %s:%s [%s]\n",
+-                   argv[n], hostname, targ, mode->m_mode);
++                   argv[n], hostname, remote_pth, mode->m_mode);
+         sa_set_port(&peeraddr, port);
+-        tftp_sendfile(fd, targ, mode->m_mode);
++        tftp_sendfile(fd, remote_pth, mode->m_mode);
+     }
+ }
+ 
+@@ -801,6 +822,10 @@ static void command(void)
+             free(line);
+             line = NULL;
+         }
++        if (remote_pth) {
++            free(remote_pth);
++            remote_pth = NULL;
++        }
+         line = readline(prompt);
+         if (!line)
+             exit(0);            /* EOF */
+@@ -872,7 +897,13 @@ struct cmd *getcmd(char *name)
+ static void makeargv(void)
+ {
+     char *cp;
+-    char **argp = margv;
++    char **argp;
++
++    if (!sizeof_margv) {
++        sizeof_margv = 20;
++        margv = xmalloc(sizeof_margv * sizeof(char *));
++    }
++    argp = margv;
+ 
+     margc = 0;
+     for (cp = line; *cp;) {
+@@ -882,6 +913,11 @@ static void makeargv(void)
+             break;
+         *argp++ = cp;
+         margc += 1;
++        if (margc == sizeof_margv) {
++            sizeof_margv += 20;
++            margv = xrealloc(margv, sizeof_margv * sizeof(char *));
++            argp = margv + margc;
++        }
+         while (*cp != '\0' && !isspace(*cp))
+             cp++;
+         if (*cp == '\0')
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
new file mode 100644
index 0000000..85110eb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
@@ -0,0 +1,24 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.tzfix	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/tftpd.c	2008-11-25 11:45:27.000000000 -0500
+@@ -350,6 +350,14 @@ int main(int argc, char **argv)
+     const char *pidfile = NULL;
+     u_short tp_opcode;
+ 
++    time_t my_time = 0;
++    struct tm* p_tm;
++    char envtz[10];
++    my_time = time(NULL);
++    p_tm = localtime(&my_time);
++    snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
++    setenv("TZ", envtz, 0);
++
+     /* basename() is way too much of a pain from a portability standpoint */
+ 
+     p = strrchr(argv[0], '/');
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
new file mode 100644
index 0000000..08d2b5b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
@@ -0,0 +1,32 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49.orig/tftp/tftp.c	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftp/tftp.c	2009-08-05 09:47:18.072585848 -0400
+@@ -279,15 +279,16 @@
+             struct tftphdr *tp, const char *mode)
+ {
+     char *cp;
++    size_t len;
+ 
+     tp->th_opcode = htons((u_short) request);
+     cp = (char *)&(tp->th_stuff);
+-    strcpy(cp, name);
+-    cp += strlen(name);
+-    *cp++ = '\0';
+-    strcpy(cp, mode);
+-    cp += strlen(mode);
+-    *cp++ = '\0';
++    len = strlen(name) + 1;
++    memcpy(cp, name, len);
++    cp += len;
++    len = strlen(mode) + 1;
++    memcpy(cp, mode, len);
++    cp += len;
+     return (cp - (char *)tp);
+ }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
new file mode 100644
index 0000000..720cd69
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
@@ -0,0 +1,20 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftp/tftp.c.stats tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49/tftp/tftp.c.stats	2011-01-03 15:38:34.217918067 +0100
++++ tftp-hpa-0.49/tftp/tftp.c	2011-01-03 15:38:37.498917014 +0100
+@@ -400,8 +400,8 @@ static void printstats(const char *direc
+ {
+     double delta;
+ 
+-    delta = (tstop.tv_sec + (tstop.tv_usec / 100000.0)) -
+-        (tstart.tv_sec + (tstart.tv_usec / 100000.0));
++    delta = (tstop.tv_sec + (tstop.tv_usec / 1000000.0)) -
++        (tstart.tv_sec + (tstart.tv_usec / 1000000.0));
+     if (verbose) {
+         printf("%s %lu bytes in %.1f seconds", direction, amount, delta);
+         printf(" [%.0f bit/s]", (amount * 8.) / delta);
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
new file mode 100644
index 0000000..216349d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
@@ -0,0 +1,29 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-5.2/tftpd/recvfrom.c.test tftp-hpa-5.2/tftpd/recvfrom.c
+--- tftp-hpa-5.2/tftpd/recvfrom.c.test	2011-12-11 23:13:52.000000000 +0100
++++ tftp-hpa-5.2/tftpd/recvfrom.c	2012-01-04 10:05:17.852042256 +0100
+@@ -149,16 +149,16 @@ myrecvfrom(int s, void *buf, int len, un
+ 
+     /* Try to enable getting the return address */
+ #ifdef IP_RECVDSTADDR
+-    if (from->sa_family == AF_INET)
++    if (from->sa_family == AF_INET || !from->sa_family)
+         setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
+ #endif
+ #ifdef IP_PKTINFO
+-    if (from->sa_family == AF_INET)
++    if (from->sa_family == AF_INET || !from->sa_family)
+         setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
+ #endif
+ #ifdef HAVE_IPV6
+ #ifdef IPV6_RECVPKTINFO
+-    if (from->sa_family == AF_INET6)
++    if (from->sa_family == AF_INET6 || !from->sa_family)
+         setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
+ #endif
+ #endif
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch
new file mode 100644
index 0000000..3e220ec
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch
@@ -0,0 +1,38 @@
+From 6ed1eb8829dee351b54e183bc42c007cb306aaa5 Mon Sep 17 00:00:00 2001
+From: Zhang Xiao <xiao.zhang@windriver.com>
+Date: Wed, 11 Jun 2014 14:01:16 +0800
+Subject: [PATCH] tftp-hpa: bug fix on separated CR and LF
+
+In ascii mode, if the CR and LF was separated into different transfer
+blocks, LF will be just dropped instead of replacing the previous CR.
+Add a checking on the first character to fix it.
+
+Upstream-Status: pending
+
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+ common/tftpsubs.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/common/tftpsubs.c b/common/tftpsubs.c
+index b4d4ffe..b4ea3f2 100644
+--- a/common/tftpsubs.c
++++ b/common/tftpsubs.c
+@@ -207,6 +207,14 @@ int write_behind(FILE * file, int convert)
+     p = buf;
+     ct = count;
+     count = 0;
++
++    /* Check the first character together with prevchar */
++    c = *p;
++    if ((prevchar == '\r') && (c == '\n')) {
++        lseek(fileno(file), -1, SEEK_CUR);
++        count++;
++    }
++
+     while (ct--) {              /* loop over the buffer */
+         c = *p++;               /* pick up a character */
+         if (prevchar == '\r') { /* if prev char was cr */
+-- 
+1.8.5.2.233.g932f7e4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
new file mode 100644
index 0000000..fe70163
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
@@ -0,0 +1,18 @@
+# default: off
+# description: The tftp server serves files using the trivial file transfer \
+#	protocol.  The tftp protocol is often used to boot diskless \
+#	workstations, download configuration files to network-aware printers, \
+#	and to start the installation process for some operating systems.
+service tftp
+{
+	socket_type		= dgram
+	protocol		= udp
+	wait			= yes
+	user			= root
+	server			= /usr/sbin/in.tftpd-hpa
+	server_args		= -s /var/lib/tftpboot
+	disable			= yes
+	per_source		= 11
+	cps				= 100 2
+	flags			= IPv6
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service
new file mode 100644
index 0000000..97d5658
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tftp Server
+Requires=tftpd-hpa.socket
+
+[Service]
+ExecStart=@SBINDIR@/in.tftpd-hpa -s /var/lib/tftpboot
+StandardInput=socket
+
+[Install]
+Also=tftpd-hpa.socket
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket
new file mode 100644
index 0000000..8764c1d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Tftp Server Activation Socket
+
+[Socket]
+ListenDatagram=69
+
+[Install]
+WantedBy=sockets.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
new file mode 100644
index 0000000..413950b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
@@ -0,0 +1,96 @@
+SUMMARY        = "Client for the Trivial File Transfer Protocol"
+DESCRIPTION    = \
+"The Trivial File Transfer Protocol (TFTP) is normally used only for \
+booting diskless workstations.  The tftp package provides the user   \
+interface for TFTP, which allows users to transfer files to and from a \
+remote machine.  This program and TFTP provide very little security, \
+and should not be enabled unless it is expressly needed."
+DEPENDS = "tcp-wrappers readline"
+SECTION = "net"
+HOMEPAGE = "http://freecode.com/projects/tftp-hpa"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://MCONFIG.in;beginline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \
+                    file://tftp/tftp.c;beginline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4"
+
+
+SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.tar.bz2 \
+           file://tftp-0.40-remap.patch \
+           file://tftp-0.42-tftpboot.patch \
+           file://tftp-0.49-chk_retcodes.patch \
+           file://tftp-0.49-cmd_arg.patch \
+           file://tftp-hpa-0.39-tzfix.patch \
+           file://tftp-hpa-0.49-fortify-strcpy-crash.patch \
+           file://tftp-hpa-0.49-stats.patch \
+           file://tftp-hpa-5.2-pktinfo.patch \
+           file://default \
+           file://init \
+           file://add-error-check-for-disk-filled-up.patch \
+           file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \
+           file://fix-writing-emtpy-file.patch \
+           file://0001-__progname-is-provided-by-libc.patch \
+           file://tftpd-hpa.socket \
+           file://tftpd-hpa.service \
+"
+
+SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21"
+SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269"
+
+inherit autotools-brokensep update-rc.d update-alternatives systemd
+
+export AR = "${HOST_PREFIX}ar cq"
+
+EXTRA_OECONF += "--disable-option-checking"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# configure.in has errors
+do_configure() {
+    oe_runconf
+}
+
+do_install() {
+    oe_runmake install INSTALLROOT=${D}
+    mv ${D}${bindir}/tftp ${D}${bindir}/tftp-hpa
+    mv ${D}${sbindir}/in.tftpd ${D}${sbindir}/in.tftpd-hpa
+
+    install -m 755 -d ${D}${localstatedir}/lib/tftpboot/
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa
+
+    install -d ${D}${sysconfdir}/default
+    install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service
+}
+
+FILES_${PN} = "${bindir}"
+
+PACKAGES += "tftp-hpa-server"
+SUMMARY_tftp-hpa-server = "Server for the Trivial File Transfer Protocol"
+FILES_tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}"
+CONFFILES_tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa"
+
+INITSCRIPT_PACKAGES = "tftp-hpa-server"
+INITSCRIPT_NAME = "tftpd-hpa"
+INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ."
+
+ALTERNATIVE_${PN}-doc = "tftpd.8 tftp.1"
+ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8"
+ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1"
+
+ALTERNATIVE_${PN} = "tftp"
+ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa"
+ALTERNATIVE_PRIORITY = "60"
+
+
+SYSTEMD_PACKAGES = "tftp-hpa-server"
+SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service"
+SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch
new file mode 100644
index 0000000..d2eb156
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/cross.patch
@@ -0,0 +1,16 @@
+Remove CC and CFLAGS values, we set these ourselves
+
+Upstream-Status: Inappropriate [config]
+
+diff -urN vblade-19.old//makefile vblade-19//makefile
+--- vblade-19.old//makefile	2008-10-08 22:07:40.000000000 +0100
++++ vblade-19//makefile	2008-11-18 19:07:51.700365029 +0000
+@@ -9,8 +9,6 @@
+ mandir = ${sharedir}/man
+ 
+ O=aoe.o bpf.o ${PLATFORM}.o ata.o
+-CFLAGS += -Wall -g -O2
+-CC = gcc
+ 
+ vblade: $O
+ 	${CC} -o vblade $O
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch
new file mode 100644
index 0000000..a74452d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/makefile b/makefile
+index 98008da..c328ba7 100644
+--- a/makefile
++++ b/makefile
+@@ -11,7 +11,7 @@ mandir = ${sharedir}/man
+ O=aoe.o bpf.o ${PLATFORM}.o ata.o
+ 
+ vblade: $O
+-	${CC} -o vblade $O
++	${CC} ${LDFLAGS} -o vblade $O
+ 
+ aoe.o : aoe.c config.h dat.h fns.h makefile
+ 	${CC} ${CFLAGS} -c $<
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf
new file mode 100644
index 0000000..e8b93ec
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.conf
@@ -0,0 +1,2 @@
+# network_device shelf slot file/disk/partition mac[,mac[,mac]]
+#eth0 0 0 /dev/sdb 00:11:22:33:44:55
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init
new file mode 100644
index 0000000..0298c80
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.init
@@ -0,0 +1,193 @@
+#!/bin/sh
+# 
+# Init script for vblade (ATA over Ethernet daemon)
+# 
+# chkconfig: - 30 70
+# description: vblade AoE daemon
+# 
+# processname: vblade
+# config: /etc/vblade.conf
+# 
+# Shamelessly hacked together from other init scripts (sshd, mostly)
+# integrate vblade.init from Fedora's vblade-14-6.fc12.src.rpm
+# 
+
+RETVAL=0
+prog=vblade
+
+spawn_vblade() {
+  ALLOWMACS=""
+  [ -n "$5" ] && ALLOWMACS="-m $5"
+  ID="$1-e$2.$3"
+  if [ ! -d "/var/run/$prog" ]; then
+    mkdir /var/run/$prog
+  fi
+  PID_FILE=/var/run/$prog/${ID}.pid
+  $prog $ALLOWMACS $2 $3 $1 $4 >> /var/log/$prog.log 2>&1 &
+  pid=$!
+  RETVAL=$?
+  echo $pid > $PID_FILE
+  echo -n $"$4 (e$2.$3@$1) [pid $pid]"
+  [ "$RETVAL" = 0 ] && echo "success" || echo "failure"
+  echo
+}
+
+start() {
+  local ret
+
+  echo $"Starting up $prog: "
+  
+  #/var/lock/subsys/$prog exists?
+  status $prog 2>&1 > /dev/null
+  ret=$?
+
+  if [ "$ret" = "2" ]; then
+    echo "$prog dead but subsys locked"
+    echo
+    return 2
+  else 
+    if [ "$ret" = "0" ]; then
+      #is running
+      echo "already running"
+      return 0
+    fi
+  fi
+
+  if [ 0 -ne `grep -vc '^#\|^$' /etc/$prog.conf` ]
+  then
+    grep -v '^#' /etc/$prog.conf | sed -e 's/	/ /g' -e 's/  / /g' | while read line
+    do
+      spawn_vblade $line
+    done
+    touch /var/lock/subsys/$prog
+  else
+    echo -n "empty $prog.conf?"
+    echo " passed"
+    echo
+  fi
+}
+
+stop() {
+  echo -n $"Shutting down $prog: "
+  for pidfile in `ls /var/run/$prog/*.pid 2>/dev/null`
+  do
+    kill -TERM `cat $pidfile`
+    rm -f $pidfile
+  done
+  echo "success"
+  echo
+  rm -f /var/lock/subsys/$prog
+}
+
+__pids_var_run() {
+        local base=${1##*/}
+        local pid_file=${2:-/var/run/$base.pid}
+
+        pid=
+        if [ -f "$pid_file" ] ; then
+                local line p
+
+                while : ; do
+                        read line
+                        [ -z "$line" ] && break
+                        for p in $line ; do
+                                [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
+                        done
+                done < "$pid_file"
+
+                if [ -n "$pid" ]; then
+                        return 0
+                fi
+                return 1 # "Program is dead and /var/run pid file exists"
+        fi
+        return 3 # "Program is not running"
+}
+
+__pids_pidof() {
+        pidof "$1" || pidof "${1##*/}"
+}
+
+status() {
+        local base pid lock_file= pid_file=
+
+        # Test syntax.
+        if [ "$#" = 0 ] ; then
+                echo $"Usage: status [-p pidfile] {program}"
+                return 1
+        fi
+        if [ "$1" = "-p" ]; then
+                pid_file=$2
+                shift 2
+        fi
+        if [ "$1" = "-l" ]; then
+                lock_file=$2
+                shift 2
+        fi
+        base=${1##*/}
+
+        # First try "pidof"
+        __pids_var_run "$1" "$pid_file"
+        RC=$?
+        if [ -z "$pid_file" -a -z "$pid" ]; then
+                pid="$(__pids_pidof "$1")"
+        fi
+        if [ -n "$pid" ]; then
+                echo $"${base} (pid $pid) is running..."
+                return 0
+        fi
+
+        case "$RC" in
+                0)
+                        echo $"${base} (pid $pid) is running..."
+                        return 0
+                        ;;
+                1)
+                        echo $"${base} dead but pid file exists"
+                        return 1
+                        ;;
+        esac
+        if [ -z "${lock_file}" ]; then
+                lock_file=${base}
+        fi
+        # See if /var/lock/subsys/${lock_file} exists
+        if [ -f /var/lock/subsys/${lock_file} ]; then
+                echo $"${base} dead but subsys locked"
+                return 2
+        fi
+        echo $"${base} is stopped"
+        return 3
+}
+
+case "$1" in
+	start)
+		start
+		;;
+	stop)
+		stop
+		;;
+	restart)
+		stop
+		start
+		;;
+	reload)
+		# yes, this sucks, but the vblade processes die on SIGHUP
+		stop
+		start
+		;;
+	condrestart)
+		if [ -f /var/lock/subsys/$prog ]; then
+			stop
+			# avoid race
+			sleep 3
+			start
+		fi
+		;;
+	status)
+		status $prog
+		RETVAL=$?
+		;;
+	*)
+		echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+		RETVAL=1
+esac
+exit $RETVAL
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service
new file mode 100644
index 0000000..83a4d5d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/vblade.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Virtual EtherDrive blade AoE target
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=@BINDIR@/vblade.init start
+ExecStop=@BINDIR@/vblade.init stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade
new file mode 100644
index 0000000..64a5881
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/files/volatiles.99_vblade
@@ -0,0 +1 @@
+d root root 0755 /var/run/vblade none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb
new file mode 100644
index 0000000..a52a1e9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Virtual EtherDrive blade AoE target"
+SECTION = "admin"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \
+           file://cross.patch \
+           file://makefile-add-ldflags.patch \
+           file://${BPN}.conf \
+           file://${BPN}.init \
+           file://${BPN}.service \
+           file://volatiles.99_vblade \
+          "
+
+SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e"
+SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/"
+
+inherit autotools-brokensep update-rc.d systemd
+
+do_install() {
+    install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade
+    install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed
+    install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8
+
+    install -D -m 0644 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf
+    install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN}
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d ${D}/${sysconfdir}/default/volatiles
+        install -m 0755 ${WORKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}/${bindir}
+        install -m 0755 ${WORKDIR}/${BPN}.init ${D}/${bindir}/
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /var/run/${BPN} 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/vblade.service ${D}${systemd_system_unitdir}
+        sed -e 's,@BINDIR@,${bindir},g' -i ${D}${systemd_system_unitdir}/*.service
+    fi
+
+}
+
+INITSCRIPT_NAME = "vblade"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "vblade.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
new file mode 100644
index 0000000..b69de1d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
@@ -0,0 +1,62 @@
+From ce2be5d4967445828d5ae9d9462cfaa78ae03c73 Mon Sep 17 00:00:00 2001
+From: Ming Liu <ming.liu@windriver.com>
+Date: Wed, 18 Sep 2013 09:44:20 +0800
+Subject: [PATCH] vsftpd: change default value of secure_chroot_dir
+
+Upstream-Status: Pending
+
+Change secure_chroot_dir pointing to a volatile directory.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+---
+ INSTALL       | 6 +++---
+ tunables.c    | 2 +-
+ vsftpd.conf.5 | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/INSTALL b/INSTALL
+index 4f811aa..427122a 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -27,11 +27,11 @@ user in case it does not already exist. e.g.:
+ [root@localhost root]# useradd nobody
+ useradd: user nobody exists
+ 
+-2b) vsftpd needs the (empty) directory /usr/share/empty in the default
++2b) vsftpd needs the (empty) directory /var/run/vsftpd/empty in the default
+ configuration. Add this directory in case it does not already exist. e.g.:
+ 
+-[root@localhost root]# mkdir /usr/share/empty/
+-mkdir: cannot create directory `/usr/share/empty': File exists
++[root@localhost root]# mkdir /var/run/vsftpd/empty/
++mkdir: cannot create directory `/var/run/vsftpd/empty': File exists
+ 
+ 2c) For anonymous FTP, you will need the user "ftp" to exist, and have a
+ valid home directory (which is NOT owned or writable by the user "ftp").
+diff --git a/tunables.c b/tunables.c
+index 284a10d..8c63c3f 100644
+--- a/tunables.c
++++ b/tunables.c
+@@ -254,7 +254,7 @@ tunables_load_defaults()
+   /* -rw------- */
+   tunable_chown_upload_mode = 0600;
+ 
+-  install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
++  install_str_setting("/var/run/vsftpd/empty", &tunable_secure_chroot_dir);
+   install_str_setting("ftp", &tunable_ftp_username);
+   install_str_setting("root", &tunable_chown_username);
+   install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
+diff --git a/vsftpd.conf.5 b/vsftpd.conf.5
+index fcc6022..e4ffdee 100644
+--- a/vsftpd.conf.5
++++ b/vsftpd.conf.5
+@@ -969,7 +969,7 @@ This option should be the name of a directory which is empty. Also, the
+ directory should not be writable by the ftp user. This directory is used
+ as a secure chroot() jail at times vsftpd does not require filesystem access.
+ 
+-Default: /usr/share/empty
++Default: /var/run/vsftpd/empty
+ .TP
+ .B ssl_ciphers
+ This option can be used to select which SSL ciphers vsftpd will allow for
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init
new file mode 100755
index 0000000..72adf0d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: vsftpd
+# Default-Start:  2345
+# Default-Stop:   016
+# Short-Description: Very Secure Ftp Daemon
+# Description: vsftpd is a Very Secure FTP daemon. It was written completely from
+#              scratch
+### END INIT INFO
+
+DAEMON=/usr/sbin/vsftpd
+NAME=vsftpd
+DESC="FTP Server"
+ARGS=""
+FTPDIR=/var/lib/ftp
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+    start)
+        echo -n "* starting $DESC: $NAME... "
+        if ! test -d $FTPDIR; then
+            mkdir -p $FTPDIR/in
+            chown ftp $FTPDIR -R
+            chmod a-w $FTPDIR
+            chmod u+w $FTPDIR/in
+        fi
+        start-stop-daemon -S -b -x $DAEMON -- $ARGS
+        echo "done."
+        ;;
+    stop)
+        echo -n "* stopping $DESC: $NAME... "
+        start-stop-daemon -K -x $DAEMON
+        echo "done."
+        ;;
+    restart)
+        echo "* restarting $DESC: $NAME... "
+        $0 stop
+        $0 start
+        echo "done."
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd
new file mode 100644
index 0000000..8a602ba
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/volatiles.99_vsftpd
@@ -0,0 +1 @@
+d root root 0755 /var/run/vsftpd/empty none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf
new file mode 100644
index 0000000..bb19294
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.conf
@@ -0,0 +1,139 @@
+# Example config file /etc/vsftpd.conf
+#
+# The default compiled in settings are fairly paranoid. This sample file
+# loosens things up a bit, to make the ftp daemon more usable.
+# Please see vsftpd.conf.5 for all compiled in defaults.
+#
+# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
+# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
+# capabilities.
+
+# run standalone
+listen=YES
+
+# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
+anonymous_enable=NO
+#
+# Uncomment this to allow local users to log in.
+local_enable=YES
+#
+# Uncomment this to enable any form of FTP write command.
+write_enable=YES
+#
+# Default umask for local users is 077. You may wish to change this to 022,
+# if your users expect that (022 is used by most other ftpd's)
+local_umask=022
+#
+# Uncomment this to allow the anonymous FTP user to upload files. This only
+# has an effect if the above global write enable is activated. Also, you will
+# obviously need to create a directory writable by the FTP user.
+#anon_upload_enable=YES
+#
+# Uncomment this if you want the anonymous FTP user to be able to create
+# new directories.
+#anon_mkdir_write_enable=YES
+#
+# Activate directory messages - messages given to remote users when they
+# go into a certain directory.
+dirmessage_enable=YES
+#
+# Activate logging of uploads/downloads.
+xferlog_enable=YES
+#
+# Make sure PORT transfer connections originate from port 20 (ftp-data).
+connect_from_port_20=YES
+#
+# If you want, you can arrange for uploaded anonymous files to be owned by
+# a different user. Note! Using "root" for uploaded files is not
+# recommended!
+#chown_uploads=YES
+#chown_username=whoever
+#
+# You may override where the log file goes if you like. The default is shown
+# below.
+#xferlog_file=/var/log/vsftpd.log
+#
+# If you want, you can have your log file in standard ftpd xferlog format
+xferlog_std_format=YES
+#
+# You may change the default value for timing out an idle session.
+#idle_session_timeout=600
+#
+# You may change the default value for timing out a data connection.
+#data_connection_timeout=120
+#
+# It is recommended that you define on your system a unique user which the
+# ftp server can use as a totally isolated and unprivileged user.
+#nopriv_user=ftp
+#
+# Enable this and the server will recognise asynchronous ABOR requests. Not
+# recommended for security (the code is non-trivial). Not enabling it,
+# however, may confuse older FTP clients.
+#async_abor_enable=YES
+#
+# By default the server will pretend to allow ASCII mode but in fact ignore
+# the request. Turn on the below options to have the server actually do ASCII
+# mangling on files when in ASCII mode.
+# Beware that turning on ascii_download_enable enables malicious remote parties
+# to consume your I/O resources, by issuing the command "SIZE /big/file" in
+# ASCII mode.
+# These ASCII options are split into upload and download because you may wish
+# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
+# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
+# on the client anyway..
+#ascii_upload_enable=YES
+#ascii_download_enable=YES
+#
+# You may fully customise the login banner string:
+#ftpd_banner=Welcome to blah FTP service.
+#
+# You may specify a file of disallowed anonymous e-mail addresses. Apparently
+# useful for combatting certain DoS attacks.
+#deny_email_enable=YES
+# (default follows)
+#banned_email_file=/etc/vsftpd.banned_emails
+#
+# You may specify an explicit list of local users to chroot() to their home
+# directory. If chroot_local_user is YES, then this list becomes a list of
+# users to NOT chroot().
+#chroot_list_enable=YES
+# (default follows)
+#chroot_list_file=/etc/vsftpd.chroot_list
+#
+# You may activate the "-R" option to the builtin ls. This is disabled by
+# default to avoid remote users being able to cause excessive I/O on large
+# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+# the presence of the "-R" option, so there is a strong case for enabling it.
+#ls_recurse_enable=YES
+#
+# This string is the name of the PAM service vsftpd will use.
+pam_service_name=vsftpd
+#
+# This option is examined if userlist_enable is activated. If you set this
+# setting to NO, then users will be denied login  unless  they are  explicitly 
+# listed  in the file specified by userlist_file.  When login is denied, the 
+# denial is issued before the user is asked for a password.
+userlist_deny=YES
+#
+# If enabled, vsftpd will load a list of usernames, from the filename given by
+# userlist_file.  If a user tries to log in using  a  name in  this  file,  they
+# will be denied before they are asked for a password. This may be useful in 
+# preventing cleartext passwords being transmitted. See also userlist_deny.
+userlist_enable=YES
+#
+# If enabled,  vsftpd  will display directory listings with the time in your
+# local time zone. The default is to display GMT. The times returned by the
+# MDTM FTP command are also affected by this option.
+use_localtime=YES
+#
+# If set to YES, local users will be (by default) placed in a chroot() jail in
+# their home directory after login.  Warning: This  option has  security  
+# implications,  especially  if  the users have upload permission, or shell access.
+# Only enable if you know what you are doing.  Note that these security implications
+# are not vsftpd specific. They apply to all FTP daemons which offer to put 
+# local  users in chroot() jails.
+chroot_local_user=YES
+#
+allow_writeable_chroot=YES
+#
+tcp_wrappers=YES
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers
new file mode 100644
index 0000000..096142f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.ftpusers
@@ -0,0 +1,15 @@
+# Users that are not allowed to login via ftp
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+nobody
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service
new file mode 100644
index 0000000..e271020
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Vsftpd ftp daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/vsftpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list
new file mode 100644
index 0000000..d283e3d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/vsftpd.user_list
@@ -0,0 +1,20 @@
+# vsftpd userlist
+# If userlist_deny=NO, only allow users in this file
+# If userlist_deny=YES (default), never allow users in this file, and
+# do not even prompt for a password.
+# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
+# for users that are denied.
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+nobody
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch
new file mode 100644
index 0000000..d81c94a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch
@@ -0,0 +1,26 @@
+From c5caf52b9ed79da8916ef5722efe6df61a856e2f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 20:09:12 -0700
+Subject: [PATCH] sysdeputil.c: Fix with musl which does not have utmpx
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ sysdeputil.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeputil.c b/sysdeputil.c
+index 06f01f4..a8cff3b 100644
+--- a/sysdeputil.c
++++ b/sysdeputil.c
+@@ -58,7 +58,9 @@
+ #define VSF_SYSDEP_HAVE_SHADOW
+ #define VSF_SYSDEP_HAVE_USERSHELL
+ #define VSF_SYSDEP_HAVE_LIBCAP
+-#define VSF_SYSDEP_HAVE_UTMPX
++#if defined(__GLIBC__)
++  #define VSF_SYSDEP_HAVE_UTMPX
++#endif
+ 
+ #define __USE_GNU
+ #include <utmpx.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch
new file mode 100644
index 0000000..7573c96
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch
@@ -0,0 +1,46 @@
+From dd353303f62d1dfe32cb000e482616b021708fbe Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 29 Nov 2018 00:47:34 -0800
+Subject: [PATCH] vsftpd: allow syscalls in the seccomp sandbox
+
+* Allow sysinfo() and getdents64 in the seccomp
+  sandbox otherwise comes below OOPS: priv_sock_get_cmd
+  as the syscall sysinfo() and getdents64 not allowed
+
+root@qemux86-64:~# tnftp 192.168.1.1
+Connected to 192.168.1.1.
+220 (vsFTPd 3.0.3)
+Name (192.168.1.1:root): anonymous
+331 Please specify the password.
+Password:
+230 Login successful.
+Remote system type is UNIX.
+Using binary mode to transfer files.
+ftp> prompt
+Interactive mode off.
+ftp> mget small*
+OOPS: priv_sock_get_cmd
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ seccompsandbox.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/seccompsandbox.c b/seccompsandbox.c
+index 2c350a9..377c50e 100644
+--- a/seccompsandbox.c
++++ b/seccompsandbox.c
+@@ -409,6 +409,8 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess)
+   allow_nr(__NR_getcwd);
+   allow_nr(__NR_chdir);
+   allow_nr(__NR_getdents);
++  allow_nr(__NR_getdents64);
++  allow_nr(__NR_sysinfo);
+   /* Misc */
+   allow_nr(__NR_umask);
+ 
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
new file mode 100644
index 0000000..5ad5c14
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
@@ -0,0 +1,52 @@
+From bab3f62f1fd5b7c2ab197f4311ad191bf18816b9 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Mon, 20 Feb 2012 13:51:49 +0000
+Subject: [PATCH] Use DESTDIR within install to allow installing under a prefix
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c63ed1b..9e4f35f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,21 +29,21 @@ vsftpd: $(OBJS)
+ 	$(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
+ 
+ install:
+-	if [ -x /usr/local/sbin ]; then \
+-		$(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
++	if [ -x ${DESTDIR}/usr/local/sbin ]; then \
++		$(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/local/sbin/vsftpd; \
+ 	else \
+-		$(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
+-	if [ -x /usr/local/man ]; then \
+-		$(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
+-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
+-	elif [ -x /usr/share/man ]; then \
+-		$(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
+-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
++		$(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/sbin/vsftpd; fi
++	if [ -x ${DESTDIR}/usr/local/man ]; then \
++		$(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/local/man/man8/vsftpd.8; \
++		$(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/local/man/man5/vsftpd.conf.5; \
++	elif [ -x ${DESTDIR}/usr/share/man ]; then \
++		$(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/share/man/man8/vsftpd.8; \
++		$(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/share/man/man5/vsftpd.conf.5; \
+ 	else \
+-		$(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
+-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
+-	if [ -x /etc/xinetd.d ]; then \
+-		$(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
++		$(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/man/man8/vsftpd.8; \
++		$(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/man/man5/vsftpd.conf.5; fi
++	if [ -x ${DESTDIR}/etc/xinetd.d ]; then \
++		$(INSTALL) -m 644 xinetd.d/vsftpd ${DESTDIR}/etc/xinetd.d/vsftpd; fi
+ 
+ clean:
+ 	rm -f *.o *.swp vsftpd
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
new file mode 100644
index 0000000..d2e58a3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
@@ -0,0 +1,30 @@
+From 328799d0cd5c523ad7a814fefec16d8a84aa8010 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Tue, 16 Apr 2013 10:53:55 +0000
+Subject: [PATCH] Hardcode LIBS instead of using a script to determine
+ available libs
+
+We want to avoid this dynamic detection so we have a deterministic
+build.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 9e4f35f..3a5535d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@ CFLAGS	=	-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+ 	-D_FORTIFY_SOURCE=2 \
+ 	#-pedantic -Wconversion
+ 
+-LIBS	=	`./vsf_findlibs.sh`
++LIBS	=	-lssl -lcrypto -lnsl -lresolv
+ LINK	=	-Wl,-s
+ LDFLAGS	=	-fPIE -pie -Wl,-z,relro -Wl,-z,now
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
new file mode 100644
index 0000000..e596073
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
@@ -0,0 +1,25 @@
+From 261874ea47973ea156141185082252fc92081906 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Tue, 16 Apr 2013 10:53:55 +0000
+Subject: [PATCH] Disable stripping at link time
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 3a5535d..e78019a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,6 @@ CFLAGS	=	-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+ 	#-pedantic -Wconversion
+ 
+ LIBS	=	-lssl -lcrypto -lnsl -lresolv
+-LINK	=	-Wl,-s
+ LDFLAGS	=	-fPIE -pie -Wl,-z,relro -Wl,-z,now
+ 
+ OBJS	=	main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
new file mode 100644
index 0000000..a4387c1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
@@ -0,0 +1,26 @@
+From 71628ddc91b6efb9b922a3fcf8cc18522f5387be Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Mon, 20 Feb 2012 13:51:49 +0000
+Subject: [PATCH] Disable PAM
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ builddefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builddefs.h b/builddefs.h
+index 0106d1a..f48a568 100644
+--- a/builddefs.h
++++ b/builddefs.h
+@@ -2,7 +2,7 @@
+ #define VSF_BUILDDEFS_H
+ 
+ #define VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
++#undef VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+ 
+ #endif /* VSF_BUILDDEFS_H */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch
new file mode 100644
index 0000000..cf0d68e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch
@@ -0,0 +1,16 @@
+Disable PAM
+
+Upstream-Status: Inappropriate [config]
+
+diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h
+--- vsftpd-2.0.1_org/builddefs.h	2004-07-02 16:36:59.000000000 +0200
++++ vsftpd-2.0.1_patch/builddefs.h	2004-07-21 09:34:49.044900488 +0200
+@@ -2,7 +2,7 @@
+ #define VSF_BUILDDEFS_H
+ 
+ #undef VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
++#undef VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+ 
+ #endif /* VSF_BUILDDEFS_H */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
new file mode 100644
index 0000000..590eb58
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
@@ -0,0 +1,89 @@
+From b756444854c5ab3b1284fd7113043fe8860e99ec Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Fri, 24 Apr 2015 09:36:48 +0800
+Subject: [PATCH] Fix the CVE-2015-1419
+
+Upstream-Status: Pending
+
+Try to fix deny_file parsing to do more what is expected. Taken
+from fedora. CVE-2015-1419
+
+ftp://195.220.108.108/linux/fedora/linux/development/rawhide/source/SRPMS/v/vsftpd-3.0.2-13.fc22.src.rpm
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ ls.c  | 26 ++++++++++++++++++++++++--
+ str.c | 11 +++++++++++
+ str.h |  1 +
+ 3 files changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/ls.c b/ls.c
+index 7e1376d..e9302dd 100644
+--- a/ls.c
++++ b/ls.c
+@@ -246,9 +246,31 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
+   int ret = 0;
+   char last_token = 0;
+   int must_match_at_current_pos = 1;
++  
++  
+   str_copy(&filter_remain_str, p_filter_str);
+-  str_copy(&name_remain_str, p_filename_str);
+-
++  
++  if (!str_isempty (&filter_remain_str) && !str_isempty(p_filename_str)) {
++    if (str_get_char_at(p_filter_str, 0) == '/') {
++      if (str_get_char_at(p_filename_str, 0) != '/') {
++        str_getcwd (&name_remain_str);
++     
++        if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */
++          str_append_char (&name_remain_str, '/');
++          
++        str_append_str (&name_remain_str, p_filename_str);
++      }
++      else
++       str_copy (&name_remain_str, p_filename_str);
++    } else {
++      if (str_get_char_at(p_filter_str, 0) != '{')
++        str_basename (&name_remain_str, p_filename_str);
++      else
++        str_copy (&name_remain_str, p_filename_str);
++    }
++  } else
++    str_copy(&name_remain_str, p_filename_str);
++  
+   while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
+   {
+     static struct mystr s_match_needed_str;
+diff --git a/str.c b/str.c
+index 6596204..ba4b92a 100644
+--- a/str.c
++++ b/str.c
+@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_str, char new_char)
+   }
+ }
+ 
++void
++str_basename (struct mystr* d_str, const struct mystr* path)
++{
++  static struct mystr tmp;
++
++  str_copy (&tmp, path);
++  str_split_char_reverse(&tmp, d_str, '/');
++
++  if (str_isempty(d_str))
++   str_copy (d_str, path);
++}
+diff --git a/str.h b/str.h
+index ab0a9a4..3a21b50 100644
+--- a/str.h
++++ b/str.h
+@@ -100,6 +100,7 @@ void str_replace_unprintable(struct mystr* p_str, char new_char);
+ int str_atoi(const struct mystr* p_str);
+ filesize_t str_a_to_filesize_t(const struct mystr* p_str);
+ unsigned int str_octal_to_uint(const struct mystr* p_str);
++void str_basename (struct mystr* d_str, const struct mystr* path);
+ 
+ /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string
+  * buffer, starting at character position 'p_pos'. The extracted line will
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
new file mode 100644
index 0000000..c558aee
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
@@ -0,0 +1,26 @@
+From c026b0c0de4eebb189bc77b2d4c3b9528454ac04 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Fri, 19 Jul 2013 10:19:25 +0800
+Subject: [PATCH] Enable tcp_wrapper.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ builddefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builddefs.h b/builddefs.h
+index e908352..0106d1a 100644
+--- a/builddefs.h
++++ b/builddefs.h
+@@ -1,7 +1,7 @@
+ #ifndef VSF_BUILDDEFS_H
+ #define VSF_BUILDDEFS_H
+ 
+-#undef VSF_BUILD_TCPWRAPPERS
++#define VSF_BUILD_TCPWRAPPERS
+ #define VSF_BUILD_PAM
+ #undef VSF_BUILD_SSL
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
new file mode 100644
index 0000000..df0d7f4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Very Secure FTP server"
+HOMEPAGE = "https://security.appspot.com/vsftpd.html"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271"
+
+DEPENDS = "libcap openssl"
+
+SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \
+           file://makefile-destdir.patch \
+           file://makefile-libs.patch \
+           file://makefile-strip.patch \
+           file://init \
+           file://vsftpd.conf \
+           file://vsftpd.user_list \
+           file://vsftpd.ftpusers \
+           file://change-secure_chroot_dir.patch \
+           file://volatiles.99_vsftpd \
+           file://vsftpd.service \
+           file://vsftpd-2.1.0-filter.patch \
+           file://0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch \
+           ${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \
+           file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \
+           "
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/v/vsftpd/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \
+                        file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \
+                        file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb"
+SRC_URI[md5sum] = "da119d084bd3f98664636ea05b5bb398"
+SRC_URI[sha256sum] = "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7"
+
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
+
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}"
+PAMLIB = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}"
+WRAPLIB = "${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '-lwrap', '', d)}"
+NOPAM_SRC ="${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}"
+
+inherit update-rc.d useradd systemd
+
+CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf"
+LDFLAGS_append =" -lcrypt -lcap"
+CFLAGS_append_libc-musl = " -D_GNU_SOURCE -include fcntl.h"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_configure() {
+    # Fix hardcoded /usr, /etc, /var mess.
+    cat tunables.c|sed s:\"/usr:\"${prefix}:g|sed s:\"/var:\"${localstatedir}:g \
+    |sed s:\"/etc:\"${sysconfdir}:g > tunables.c.new
+    mv tunables.c.new tunables.c
+}
+
+do_compile() {
+   oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} ${WRAPLIB}"
+}
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man8
+    install -d ${D}${mandir}/man5
+    oe_runmake 'DESTDIR=${D}' install
+    install -d ${D}${sysconfdir}
+    install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
+    install -d ${D}${sysconfdir}/init.d/
+    install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
+    install -d ${D}/${sysconfdir}/default/volatiles
+    install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+
+    install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
+    install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
+    if ! test -z "${PAMLIB}" ; then
+        install -d ${D}${sysconfdir}/pam.d/
+        cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd
+        sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd
+        sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd
+    fi
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /var/run/vsftpd/empty 0755 root root -" \
+        > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+    fi
+
+    # Install systemd unit files
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service
+}
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "vsftpd"
+INITSCRIPT_PARAMS_${PN} = "defaults 80"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \
+                       --shell /bin/false ftp "
+GROUPADD_PARAM_${PN} = "-r ftp"
+
+SYSTEMD_SERVICE_${PN} = "vsftpd.service"
+
+pkg_postinst_${PN}() {
+    if [ -z "$D" ]; then
+        if type systemd-tmpfiles >/dev/null; then
+            systemd-tmpfiles --create
+        elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+            ${sysconfdir}/init.d/populate-volatile.sh update
+        fi
+    fi
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-devtools/python/python3-ldap_3.2.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-devtools/python/python3-ldap_3.2.0.bb
new file mode 100644
index 0000000..f46ddbf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-devtools/python/python3-ldap_3.2.0.bb
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2012 Wind River Systems, Inc.
+#
+SUMMARY = "Provides a wrapper in Python to LDAP"
+DESCRIPTION = "This module provides access to the LDAP \
+(Lightweight Directory Access Protocol) through Python operations \
+instead of C API. The module mainly acts as a wrapper for the \
+OpenLDAP 2.x libraries. Errors will appear as exceptions."
+
+LICENSE = "PSF"
+HOMEPAGE = "http://www.python-ldap.org/"
+DEPENDS = "python3 openldap cyrus-sasl"
+
+PYPI_PACKAGE = "python-ldap"
+inherit pypi setuptools3
+
+LIC_FILES_CHKSUM = "file://LICENCE;md5=36ce9d726d0321b73c1521704d07db1b"
+SRC_URI[md5sum] = "fe22522208dc9b06d16eb70f8553eaab"
+SRC_URI[sha256sum] = "7d1c4b15375a533564aad3d3deade789221e450052b21ebb9720fb822eccdb8e"
+
+do_configure_prepend() {
+    sed -i -e 's:^library_dirs =.*::' ${S}/setup.cfg
+    sed -i -e 's:^include_dirs =.*:include_dirs = =/usr/include/sasl/:' ${S}/setup.cfg
+}
+
+RDEPENDS_${PN} = " \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-pyasn1 \
+    ${PYTHON_PN}-pyasn1-modules \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/corosync.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/corosync.conf
new file mode 100644
index 0000000..744a30f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/corosync.conf
@@ -0,0 +1,61 @@
+# Please read the corosync.conf.5 manual page
+totem {
+	version: 2
+
+	# Set name of the cluster
+	cluster_name: testCluster
+
+	# crypto_cipher and crypto_hash: Used for mutual node authentication.
+	# If you choose to enable this, then do remember to create a shared
+	# secret with "corosync-keygen".
+	# enabling crypto_cipher, requires also enabling of crypto_hash.
+	# crypto works only with knet transport
+	crypto_cipher: none
+	crypto_hash: none
+}
+
+logging {
+	# Log the source file and line where messages are being
+	# generated. When in doubt, leave off. Potentially useful for
+	# debugging.
+	fileline: off
+	# Log to standard error. When in doubt, set to yes. Useful when
+	# running in the foreground (when invoking "corosync -f")
+	to_stderr: yes
+	# Log to a log file. When set to "no", the "logfile" option
+	# must not be set.
+	to_logfile: yes
+	logfile: /var/log/cluster/corosync.log
+	# Log to the system log daemon. When in doubt, set to yes.
+	to_syslog: yes
+	# Log debug messages (very verbose). When in doubt, leave off.
+	debug: off
+	# Log messages with time stamps. When in doubt, set to hires (or on)
+	#timestamp: hires
+	logger_subsys {
+		subsys: QUORUM
+		debug: off
+	}
+}
+
+quorum {
+	# Enable and configure quorum subsystem (default: off)
+	# see also corosync.conf.5 and votequorum.5
+	provider: corosync_votequorum
+}
+
+nodelist {
+	# Change/uncomment/add node sections to match cluster configuration
+
+	node {
+		# Hostname of the node
+		name: node1
+		# Cluster membership node identifier
+		nodeid: 1
+		# Address of first link
+		ring0_addr: 127.0.0.1
+		# When knet transport is used it's possible to define up to 8 links
+		#ring1_addr: 192.168.1.1
+	}
+	# ...
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
new file mode 100644
index 0000000..c0531d3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
@@ -0,0 +1,74 @@
+SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces"
+DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \
+APIs and libraries, default configuration files, and an init script."
+HOMEPAGE = "http://corosync.github.io/corosync/"
+
+SECTION = "base"
+
+inherit autotools pkgconfig systemd useradd
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+           file://corosync.conf \
+          "
+SRC_URI[sha256sum] = "20eb903eb984f6a728282c199825e442e8bba869acefd22390076ef3a33a4ded"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.(?!99)\d+(\.\d+)+)"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
+
+DEPENDS = "groff-native nss libqb kronosnet"
+
+SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
+"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+INITSCRIPT_NAME = "corosync-daemon"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+                   dbus snmp \
+"
+
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
+
+EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash ap_cv_cc_pie=no"
+EXTRA_OEMAKE = "tmpfilesdir_DATA="
+
+#do_configure_prepend() {
+#    ( cd ${S}
+#    ${S}/autogen.sh )
+#}
+
+do_install_append() {
+    install -D -m 0644 ${WORKDIR}/corosync.conf ${D}/${sysconfdir}/corosync/corosync.conf.example
+    install -d ${D}${sysconfdir}/sysconfig/
+    install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
+    install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
+
+    rm -rf "${D}${localstatedir}/run"
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
+
+    if [ ${@bb.utils.filter('PACKAGECONFIG', 'qnetd', d)} ]; then
+        chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
+        echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
+    fi
+
+    if [ ${@bb.utils.filter('DISTRO_FEATURES','systemd',d)} ]; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
+    fi
+}
+
+RDEPENDS_${PN} += "bash ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
+
+FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug"
+FILES_${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system coroqnetd"
+USERADD_PARAM_${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch
new file mode 100644
index 0000000..6f9a0a4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch
@@ -0,0 +1,41 @@
+From a55ab8a07770296bf6a622df14f2f0445be16327 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 19 Aug 2018 15:58:49 -0700
+Subject: [PATCH] Include sys/sysmacros.h for major/minor macros in glibc 2.25+
+
+sys/sysmacros.h was included though sys/types.h until 2.28
+glibc release removed it therefore it must be included
+explicitly now.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dlm_controld/action.c | 2 ++
+ libdlm/libdlm.c       | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/dlm_controld/action.c b/dlm_controld/action.c
+index 84637f1..2b8ad6c 100644
+--- a/dlm_controld/action.c
++++ b/dlm_controld/action.c
+@@ -8,6 +8,8 @@
+ 
+ #include "dlm_daemon.h"
+ 
++#include <sys/sysmacros.h>
++
+ #include <corosync/corotypes.h>
+ #include <corosync/cmap.h>
+ 
+diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c
+index a9e6195..499eb6a 100644
+--- a/libdlm/libdlm.c
++++ b/libdlm/libdlm.c
+@@ -14,6 +14,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <inttypes.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch
new file mode 100644
index 0000000..f56359a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch
@@ -0,0 +1,36 @@
+From ad207a6f83dac390b2d95e3a8262d27292921863 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 26 Jun 2019 11:49:33 +0800
+Subject: [PATCH] dlm: fix compile error since xml2-config should not be used
+
+xml2-config is disabled, so change Makefile to use pkgconfig
+to find libxml2.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ fence/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fence/Makefile b/fence/Makefile
+index b927879..6e16078 100644
+--- a/fence/Makefile
++++ b/fence/Makefile
+@@ -18,11 +18,11 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
+ 	-fstack-clash-protection -Wl,-z,now
+ 
+ CFLAGS += -fPIE -DPIE
+-CFLAGS += `xml2-config --cflags`
++CFLAGS += `pkg-config libxml-2.0 --cflags`
+ CFLAGS += -I../include
+ 
+ LDFLAGS += -Wl,-z,relro -pie
+-LDFLAGS += `xml2-config --libs`
++LDFLAGS += `pkg-config libxml-2.0 --libs`
+ LDFLAGS += -ldl
+ 
+ all: $(BIN_TARGET)
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
new file mode 100644
index 0000000..e6a3757
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
@@ -0,0 +1,51 @@
+From 2f72f9271b8dd61ca5092e025b0f8243c6fd68f2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2020 12:38:19 -0800
+Subject: [PATCH] make: Replace cp -a with mode preserving options
+
+Helps fix permissions in staging area
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dlm_controld/Makefile | 4 ++--
+ libdlm/Makefile       | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
+index 6081cf8..fe71be2 100644
+--- a/dlm_controld/Makefile
++++ b/dlm_controld/Makefile
+@@ -88,8 +88,8 @@ install: all
+ 	$(INSTALL) -d $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR)
+ 	$(INSTALL) -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 644 libdlmcontrol.h $(DESTDIR)/$(HDRDIR)
+ 	$(INSTALL) -m 644 dlm_controld.8 $(DESTDIR)/$(MANDIR)/man8/
+diff --git a/libdlm/Makefile b/libdlm/Makefile
+index ab32761..8820bf8 100644
+--- a/libdlm/Makefile
++++ b/libdlm/Makefile
+@@ -125,10 +125,10 @@ install: all
+ 	$(INSTALL) -d $(DESTDIR)/$(UDEVDIR)
+ 	$(INSTALL) -c -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -c -m 755 $(LLT_TARGET) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LLT_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LLT_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 644 $(LLT_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -c -m 644 $(HDR_TARGET) $(DESTDIR)/$(HDRDIR)
+-- 
+2.25.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
new file mode 100644
index 0000000..577db70
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
@@ -0,0 +1,60 @@
+DESCRIPTION = "dlm control daemon and tool"
+
+SECTION = "utils"
+HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage"
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \
+           file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \
+           file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
+           file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
+           "
+
+SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e"
+SRC_URI[sha256sum] = "d59142e067cbd603aaf66151a04e9fa34330219680b8827c953d20821b951991"
+
+UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases"
+UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
+
+LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
+
+S = "${WORKDIR}/dlm-dlm-${PV}"
+
+DEPENDS += "corosync"
+
+inherit pkgconfig systemd features_check
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[pacemaker] = ",,pacemaker"
+
+SYSTEMD_SERVICE_${PN} = "dlm.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+export EXTRA_OEMAKE = ""
+
+DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"
+
+do_compile_prepend_toolchain-clang() {
+    sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile
+}
+
+do_compile() {
+    sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
+    sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
+    oe_runmake 'CC=${CC}'
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
+    install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
+    install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
+
+    # install systemd unit files
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service
+    fi
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb
new file mode 100644
index 0000000..6bf268d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb
@@ -0,0 +1,23 @@
+# Copyright (C) 2020 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = " Kronosnet, often referred to as knet, is a network abstraction layer designed for High Availability use cases, where redundancy, security, fault tolerance and fast fail-over are the core requirements of your application."
+HOMEPAGE = "https://kronosnet.org/"
+LICENSE = "GPL-2.0+ & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING.applications;md5=751419260aa954499f7abaabaa882bbe \
+                    file://COPYING.libraries;md5=2d5025d4aa3495befef8f17206a5b0a1"
+SECTION = "libs"
+DEPENDS = "doxygen-native libqb-native libxml2-native bzip2 libqb libxml2 libnl lksctp-tools lz4 lzo openssl nss xz zlib zstd"
+
+SRCREV = "0ba5985c3ddec8429b989f0e7bd3324f53e0a9b0"
+SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1"
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+# libknet/transport_udp.c:326:48: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
+# for (cmsg = CMSG_FIRSTHDR(&msg);cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+#                                                             ^~~~~~~~~~~~~~~~~~~~~~~
+CFLAGS_append_toolchain-clang = " -Wno-sign-compare"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb
new file mode 100644
index 0000000..115353f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "IPTables based firewall scripts"
+HOMEPAGE = "http://rocky.eld.leidenuniv.nl/joomla/index.php?option=com_content&view=article&id=45&Itemid=63"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://gpl_license.txt;md5=11c7b65c4a4acb9d5175f7e9bf99c403"
+
+SRCREV = "39276d14b659684c4c0612725ab83ea841c6ef99"
+SRC_URI = "git://github.com/arno-iptables-firewall/aif"
+
+S = "${WORKDIR}/git"
+
+inherit systemd
+
+do_install() {
+	install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${bindir} ${D}${systemd_unitdir}/system ${D}${sysconfdir}/init.d
+	install -d ${D}${datadir}/arno-iptables-firewall ${D}${sysconfdir}/arno-iptables-firewall
+	cp -r ${S}${sysconfdir}/arno-iptables-firewall ${D}${sysconfdir}/
+	install -m 0755 ${S}${sysconfdir}/init.d/arno-iptables-firewall ${D}${bindir}
+	install -m 0755 ${S}/bin/arno-iptables-firewall ${D}${sbindir}
+	install -m 0755 ${S}/bin/arno-fwfilter ${D}${bindir}
+	cp -r ${S}/share/arno-iptables-firewall/* ${D}${datadir}/arno-iptables-firewall
+	cp -r ${S}/etc/arno-iptables-firewall/* ${D}${sysconfdir}/arno-iptables-firewall
+	install -m 0644 ${S}/${systemd_unitdir}/system/arno-iptables-firewall.service ${D}${systemd_unitdir}/system
+	sed -i -e 's%/usr/local/sbin%${bindir}%g' ${D}${systemd_unitdir}/system/arno-iptables-firewall.service
+	sed -i -e 's%/usr/local/sbin%${sbindir}%g' ${D}${bindir}/arno-iptables-firewall
+	sed -i -e 's%/usr/local%${exec_prefix}%g' ${D}${sysconfdir}/arno-iptables-firewall/firewall.conf
+	sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${bindir}/arno-fwfilter
+	sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/traffic-accounting-helper
+	sed -i -e 's%#!/bin/bash%#!/bin/sh%g' ${D}${datadir}/arno-iptables-firewall/plugins/dyndns-host-open-helper
+}
+
+SYSTEMD_SERVICE_${PN} = "arno-iptables-firewall.service"
+FILES_${PN} += "${systemd_unitdir}/system/arno-iptables-firewall.service"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.6.bb
new file mode 100644
index 0000000..ad50a89
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.6.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Connection tracking userspace tools for Linux"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+DEPENDS = "libnfnetlink libnetfilter-conntrack libnetfilter-cttimeout \
+           libnetfilter-cthelper libnetfilter-queue bison-native libtirpc"
+
+EXTRA_OECONF += "LIBS=-ltirpc CPPFLAGS=-I${STAGING_INCDIR}/tirpc"
+
+SRC_URI = "http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \
+    file://conntrack-failover \
+    file://init \
+"
+SRC_URI[tar.md5sum] = "a9dc7567921213007def78ad72313109"
+SRC_URI[tar.sha256sum] = "590859cc848245dbfd9c6487761dd303b3a1771e007f4f42213063ca56205d5f"
+
+inherit autotools update-rc.d pkgconfig
+
+INITSCRIPT_NAME = "conntrackd"
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/conntrackd
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0644 ${S}/doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample
+    install -m 0755 ${WORKDIR}/conntrack-failover ${D}/${sysconfdir}/init.d/conntrack-failover
+    install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/conntrackd
+
+    # Fix hardcoded paths in scripts
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd
+    sed -i 's!/var/!${localstatedir}/!g' ${D}/${sysconfdir}/init.d/conntrack-failover ${D}/${sysconfdir}/init.d/conntrackd ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample
+    sed -i 's!^export PATH=.*!export PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}/${sysconfdir}/init.d/conntrackd
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover
new file mode 100644
index 0000000..6d92e63
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/conntrack-failover
@@ -0,0 +1,77 @@
+#!/bin/sh
+# 
+# (C) 2008 by Pablo Neira Ayuso <pablo@netfilter.org>
+# (C) 2009 Roman I Khimov <khimov@altell.ru>
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+#
+# Description:
+#
+# This is the script for primary-backup setups for keepalived
+# (http://www.keepalived.org). You may adapt it to make it work with other
+# high-availability managers.
+#
+# Do not forget to include the required modifications to your keepalived.conf
+# file to invoke this script during keepalived's state transitions.
+#
+# Contributions to improve this script are welcome :).
+#
+## Modified to work as init.d script under pacemaker control
+
+CONNTRACKD_BIN=/usr/sbin/conntrackd
+CONNTRACKD_LOCK=/var/lock/conntrack.lock
+CONNTRACKD_CONFIG=/etc/conntrackd/conntrackd.conf
+
+case "$1" in
+  start)
+    #
+    # commit the external cache into the kernel table
+    #
+    $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -c
+    if [ $? -eq 1 ]
+    then
+        logger "ERROR: failed to invoke conntrackd -c"
+    fi
+
+    #
+    # flush the internal and the external caches
+    #
+    $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -f
+    if [ $? -eq 1 ]
+    then
+    	logger "ERROR: failed to invoke conntrackd -f"
+    fi
+
+    #
+    # resynchronize my internal cache to the kernel table
+    #
+    $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -R
+    if [ $? -eq 1 ]
+    then
+    	logger "ERROR: failed to invoke conntrackd -R"
+    fi
+
+    #
+    # send a bulk update to backups 
+    #
+    $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -B
+    if [ $? -eq 1 ]
+    then
+        logger "ERROR: failed to invoke conntrackd -B"
+    fi
+    ;;
+  stop)
+	$CONNTRACKD_BIN -t
+	$CONNTRACKD_BIN -n
+	;;
+  status)
+	;;
+  *)
+    logger "ERROR: unknown command"
+    echo "Usage: conntrack-failover {start|stop|status}"
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init
new file mode 100644
index 0000000..bce2075
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/conntrack-tools/files/init
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# /etc/init.d/conntrackd
+#
+# Maximilian Wilhelm <max@rfc2324.org>
+#  -- Mon, 06 Nov 2006 18:39:07 +0100
+#
+# Roman I Khimov <khimov@altell.ru>
+#  -- Tue, 27 Oct 2009 14:34:00 +0300
+
+### BEGIN INIT INFO
+# Provides:          conntrackd
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Description: Starts conntrackd
+# short-description: Starts conntrackd
+### END INIT INFO
+
+export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+NAME="conntrackd"
+DAEMON="/usr/sbin/conntrackd"
+CONFIG="/etc/conntrackd/conntrackd.conf"
+PIDFILE="/var/run/${NAME}.pid"
+
+
+# Gracefully exit if there is no daemon (debian way of life)
+if [ ! -x "${DAEMON}" ]; then
+	exit 0
+fi
+
+# Check for config file
+if [ ! -f /etc/conntrackd/conntrackd.conf ]; then
+	echo "Error: There is no config file for $NAME" >&2
+	exit 1;
+fi
+
+case "$1" in
+  start)
+        echo -n "Starting $NAME: "
+	for i in nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_proto_dccp nf_conntrack_tftp \
+		nf_conntrack_sane nf_conntrack_pptp nf_conntrack_irc nf_conntrack_amanda nf_conntrack_h323 \
+		nf_conntrack_proto_udplite nf_conntrack_proto_gre nf_conntrack_proto_sctp nf_conntrack_ftp \
+		nf_conntrack_sip; do
+		modprobe $i >/dev/null 2>/dev/null &
+	done
+	start-stop-daemon --start --quiet --make-pidfile --pidfile "/var/run/${NAME}.pid" --background --exec "${DAEMON}"
+	RET=$?
+	if [ "$?" = "0" ]; then
+		sleep 2
+		# Sync with other server
+		conntrackd -n
+		echo "done."
+	else
+		echo "FAILED!"
+	fi
+	exit $RET
+	;;
+  stop)
+        echo -n "Stopping $NAME:"
+	start-stop-daemon --stop --quiet --oknodo --pidfile "/var/run/${NAME}.pid" && echo "done." || echo "FAILED!"
+	;;
+  status)
+	echo -n "conntrackd "
+	start-stop-daemon -q -K -t -x $DAEMON
+	RET=$?
+	if [ "$RET" = "0" ]; then
+                PID=`cat $PIDFILE`
+		echo "($PID) is running"
+	else
+		echo "is not running"
+		exit $RET
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	;;
+
+  *)
+	echo "Usage: /etc/init.d/conntrackd {start|stop|restart}"
+	exit 1
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0001-add-RARP-and-update-iana-url.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0001-add-RARP-and-update-iana-url.patch
new file mode 100644
index 0000000..90b6979
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0001-add-RARP-and-update-iana-url.patch
@@ -0,0 +1,45 @@
+From dd35afc9ce1004128a754d5eeb8c5c2cb32ae420 Mon Sep 17 00:00:00 2001
+From: Bart De Schuymer <bdschuym@pandora.be>
+Date: Tue, 3 Jul 2012 18:47:32 +0000
+Subject: [PATCH 01/10] add RARP and update iana url
+
+---
+ ethertypes | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/ethertypes b/ethertypes
+index 5e700f6..813177b 100644
+--- a/ethertypes
++++ b/ethertypes
+@@ -5,6 +5,7 @@
+ #
+ # This list could be found on:
+ #         http://www.iana.org/assignments/ethernet-numbers
++#         http://www.iana.org/assignments/ieee-802-numbers
+ #
+ # <name>    <hexnumber> <alias1>...<alias35> #Comment
+ #
+@@ -21,15 +22,16 @@ LAT		6004			# DEC LAT
+ DIAG		6005			# DEC Diagnostics
+ CUST		6006			# DEC Customer use
+ SCA		6007			# DEC Systems Comms Arch
+-TEB		6558             	# Trans Ether Bridging   [RFC1701]
+-RAW_FR  	6559                   	# Raw Frame Relay        [RFC1701]
++TEB		6558			# Trans Ether Bridging   [RFC1701]
++RAW_FR  	6559			# Raw Frame Relay        [RFC1701]
++RARP		8035			# Reverse ARP            [RFC903]
+ AARP		80F3			# Appletalk AARP
+-ATALK		809B                  	# Appletalk
++ATALK		809B			# Appletalk
+ 802_1Q		8100	8021q 1q 802.1q	dot1q # 802.1Q Virtual LAN tagged frame
+ IPX		8137			# Novell IPX
+ NetBEUI		8191			# NetBEUI
+ IPv6		86DD	ip6 		# IP version 6
+-PPP		880B                    # PPP
++PPP		880B			# PPP
+ ATMMPOA		884C			# MultiProtocol over ATM
+ PPP_DISC	8863			# PPPoE discovery messages
+ PPP_SES		8864			# PPPoE session messages
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0002-fix-compilation-warning.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0002-fix-compilation-warning.patch
new file mode 100644
index 0000000..87b0e9b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0002-fix-compilation-warning.patch
@@ -0,0 +1,25 @@
+From 2a5333fc8b4825251adfb717d980d89cefde38d6 Mon Sep 17 00:00:00 2001
+From: Petri Gynther <petri.gynther@gmail.com>
+Date: Sun, 24 Feb 2013 10:56:59 +0100
+Subject: [PATCH 02/10] fix compilation warning
+
+---
+ communication.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/communication.c b/communication.c
+index 62ed667..ba058c0 100644
+--- a/communication.c
++++ b/communication.c
+@@ -282,7 +282,7 @@ static int store_counters_in_file(char *filename, struct ebt_u_replace *repl)
+ 	}
+ close_file:
+ 	fclose(file);
+-	return 0;
++	return ret;
+ }
+ 
+ /* Gets executed after ebt_deliver_table. Delivers the counters to the kernel
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0003-add-info-about-Wl-no-as-needed.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0003-add-info-about-Wl-no-as-needed.patch
new file mode 100644
index 0000000..c8573a4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0003-add-info-about-Wl-no-as-needed.patch
@@ -0,0 +1,25 @@
+From a6faf3b50d6af4768b7b853cb536944fb18e1450 Mon Sep 17 00:00:00 2001
+From: Bart De Schuymer <bdschuym@pandora.be>
+Date: Wed, 3 Jul 2013 22:12:47 +0200
+Subject: [PATCH 03/10] add info about -Wl,-no-as-needed
+
+---
+ INSTALL | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/INSTALL b/INSTALL
+index 4a05c67..e90d5c1 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -39,6 +39,8 @@ That's all
+ You can also use a base directory different from the root directory (/),
+ using the DESTDIR option. See the Makefile for more details.
+ 
++You might need to set LDFLAGS=-Wl,-no-as-needed to build ebtables correctly
++on your system.
+ 
+ ADDITIONAL PROGRAMS:
+ ----------------------
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0004-workaround-for-kernel-regression-bug-IPv6-source-des.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0004-workaround-for-kernel-regression-bug-IPv6-source-des.patch
new file mode 100644
index 0000000..d8f2795
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0004-workaround-for-kernel-regression-bug-IPv6-source-des.patch
@@ -0,0 +1,28 @@
+From b0617af37b8b1aafb43e8019135bea44c2d94c28 Mon Sep 17 00:00:00 2001
+From: Luis Fernando <tdthp@terra.com.br>
+Date: Wed, 3 Jul 2013 22:19:55 +0200
+Subject: [PATCH 04/10] workaround for kernel regression bug: IPv6
+ source/destination addresses are potentially not matched correctly
+
+---
+ extensions/ebt_ip6.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/extensions/ebt_ip6.c b/extensions/ebt_ip6.c
+index 0465e77..bbdc4ae 100644
+--- a/extensions/ebt_ip6.c
++++ b/extensions/ebt_ip6.c
+@@ -312,6 +312,10 @@ static void init(struct ebt_entry_match *match)
+ 
+ 	ipinfo->invflags = 0;
+ 	ipinfo->bitmask = 0;
++	memset(ipinfo->saddr.s6_addr, 0, sizeof(ipinfo->saddr.s6_addr));
++	memset(ipinfo->smsk.s6_addr, 0, sizeof(ipinfo->smsk.s6_addr));
++	memset(ipinfo->daddr.s6_addr, 0, sizeof(ipinfo->daddr.s6_addr));
++	memset(ipinfo->dmsk.s6_addr, 0, sizeof(ipinfo->dmsk.s6_addr));
+ }
+ 
+ #define OPT_SOURCE 0x01
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0005-Add-noflush-command-line-support-for-ebtables-restor.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0005-Add-noflush-command-line-support-for-ebtables-restor.patch
new file mode 100644
index 0000000..9585fd2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0005-Add-noflush-command-line-support-for-ebtables-restor.patch
@@ -0,0 +1,75 @@
+From 15d3ab8a4a167dc44396b003d2ec01841949972f Mon Sep 17 00:00:00 2001
+From: Sanket Shah <sanket.shah@cyberoam.com>
+Date: Wed, 31 Jul 2013 21:40:08 +0200
+Subject: [PATCH 05/10] Add --noflush command line support for ebtables-restore
+
+---
+ ebtables-restore.c | 29 +++++++++++++++++++++++++----
+ 1 file changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/ebtables-restore.c b/ebtables-restore.c
+index ea02960..bb4d0cf 100644
+--- a/ebtables-restore.c
++++ b/ebtables-restore.c
+@@ -22,13 +22,25 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <getopt.h>
+ #include "include/ebtables_u.h"
+ 
++static const struct option options[] = {
++	{.name = "noflush", .has_arg = 0, .val = 'n'},
++	{ 0 }
++};
++
+ static struct ebt_u_replace replace[3];
+ void ebt_early_init_once();
+ 
+ #define OPT_KERNELDATA  0x800 /* Also defined in ebtables.c */
+ 
++static void print_usage()
++{
++	fprintf(stderr, "Usage: ebtables-restore [ --noflush ]\n");
++	exit(1);
++}
++
+ static void copy_table_names()
+ {
+ 	strcpy(replace[0].name, "filter");
+@@ -41,11 +53,20 @@ static void copy_table_names()
+ int main(int argc_, char *argv_[])
+ {
+ 	char *argv[EBTD_ARGC_MAX], cmdline[EBTD_CMDLINE_MAXLN];
+-	int i, offset, quotemode = 0, argc, table_nr = -1, line = 0, whitespace;
++	int i, offset, quotemode = 0, argc, table_nr = -1, line = 0, whitespace, c, flush = 1;
+ 	char ebtables_str[] = "ebtables";
+ 
+-	if (argc_ != 1)
+-		ebtrest_print_error("options are not supported");
++	while ((c = getopt_long(argc_, argv_, "n", options, NULL)) != -1) {
++		switch(c) {
++			case 'n':
++				flush = 0;
++				break;
++			default:
++				print_usage();
++				break;
++		}
++	}
++
+ 	ebt_silent = 0;
+ 	copy_table_names();
+ 	ebt_early_init_once();
+@@ -68,7 +89,7 @@ int main(int argc_, char *argv_[])
+ 				ebtrest_print_error("table '%s' was not recognized", cmdline+1);
+ 			table_nr = i;
+ 			replace[table_nr].command = 11;
+-			ebt_get_kernel_table(&replace[table_nr], 1);
++			ebt_get_kernel_table(&replace[table_nr], flush);
+ 			replace[table_nr].command = 0;
+ 			replace[table_nr].flags = OPT_KERNELDATA; /* Prevent do_command from initialising replace */
+ 			continue;
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0006-don-t-print-IPv6-mask-if-it-s-all-ones-based-on-patc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0006-don-t-print-IPv6-mask-if-it-s-all-ones-based-on-patc.patch
new file mode 100644
index 0000000..21f8e58
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0006-don-t-print-IPv6-mask-if-it-s-all-ones-based-on-patc.patch
@@ -0,0 +1,69 @@
+From 85a0f6d77a9d5c0e7ef7948395f0f6b1612dc987 Mon Sep 17 00:00:00 2001
+From: Bart De Schuymer <bdschuym@pandora.be>
+Date: Mon, 14 Apr 2014 22:04:55 +0200
+Subject: [PATCH 06/10] don't print IPv6 mask if it's all ones (based on patch
+ by Mariusz Mazur <mmazur at axeos.com>)
+
+---
+ extensions/ebt_ip6.c |  4 ++--
+ include/ebtables_u.h |  1 +
+ useful_functions.c   | 13 +++++++++++++
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/extensions/ebt_ip6.c b/extensions/ebt_ip6.c
+index bbdc4ae..e3e0956 100644
+--- a/extensions/ebt_ip6.c
++++ b/extensions/ebt_ip6.c
+@@ -449,14 +449,14 @@ static void print(const struct ebt_u_entry *entry,
+ 		if (ipinfo->invflags & EBT_IP6_SOURCE)
+ 			printf("! ");
+ 		printf("%s", ebt_ip6_to_numeric(&ipinfo->saddr));
+-		printf("/%s ", ebt_ip6_to_numeric(&ipinfo->smsk));
++		printf("%s ", ebt_ip6_mask_to_string(&ipinfo->smsk));
+ 	}
+ 	if (ipinfo->bitmask & EBT_IP6_DEST) {
+ 		printf("--ip6-dst ");
+ 		if (ipinfo->invflags & EBT_IP6_DEST)
+ 			printf("! ");
+ 		printf("%s", ebt_ip6_to_numeric(&ipinfo->daddr));
+-		printf("/%s ", ebt_ip6_to_numeric(&ipinfo->dmsk));
++		printf("%s ", ebt_ip6_mask_to_string(&ipinfo->dmsk));
+ 	}
+ 	if (ipinfo->bitmask & EBT_IP6_TCLASS) {
+ 		printf("--ip6-tclass ");
+diff --git a/include/ebtables_u.h b/include/ebtables_u.h
+index ab615c1..35a5bcc 100644
+--- a/include/ebtables_u.h
++++ b/include/ebtables_u.h
+@@ -303,6 +303,7 @@ char *ebt_mask_to_dotted(uint32_t mask);
+ void ebt_parse_ip6_address(char *address, struct in6_addr *addr, 
+ 						   struct in6_addr *msk);
+ char *ebt_ip6_to_numeric(const struct in6_addr *addrp);
++char *ebt_ip6_mask_to_string(const struct in6_addr *msk);
+ 
+ 
+ int do_command(int argc, char *argv[], int exec_style,
+diff --git a/useful_functions.c b/useful_functions.c
+index d20b68e..d14cbe9 100644
+--- a/useful_functions.c
++++ b/useful_functions.c
+@@ -411,3 +411,16 @@ char *ebt_ip6_to_numeric(const struct in6_addr *addrp)
+ 	static char buf[50+1];
+ 	return (char *)inet_ntop(AF_INET6, addrp, buf, sizeof(buf));
+ }
++
++char *ebt_ip6_mask_to_string(const struct in6_addr *msk)
++{
++   	/* /0000:0000:0000:0000:0000:000.000.000.000
++	 * /0000:0000:0000:0000:0000:0000:0000:0000 */
++	static char buf[51+1];
++	if (msk->s6_addr32[0] == 0xFFFFFFFFL && msk->s6_addr32[1] == 0xFFFFFFFFL &&
++	    msk->s6_addr32[2] == 0xFFFFFFFFL && msk->s6_addr32[3] == 0xFFFFFFFFL)
++		*buf = '\0';
++	else
++		sprintf(buf, "/%s", ebt_ip6_to_numeric(msk));
++	return buf;
++}
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0007-extensions-Use-stdint-types.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0007-extensions-Use-stdint-types.patch
new file mode 100644
index 0000000..6fbe7df
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0007-extensions-Use-stdint-types.patch
@@ -0,0 +1,67 @@
+From a60c7d4a6d05387aceb8ae9c38390d0f9bae84a2 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 16 May 2015 12:22:39 +0200
+Subject: [PATCH 07/10] extensions: Use stdint types
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ extensions/ebt_ip6.c   |  4 ++--
+ extensions/ebt_limit.c | 10 +++++-----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/extensions/ebt_ip6.c b/extensions/ebt_ip6.c
+index e3e0956..dd48547 100644
+--- a/extensions/ebt_ip6.c
++++ b/extensions/ebt_ip6.c
+@@ -53,8 +53,8 @@ static const struct option opts[] =
+ 
+ struct icmpv6_names {
+ 	const char *name;
+-	u_int8_t type;
+-	u_int8_t code_min, code_max;
++	uint8_t type;
++	uint8_t code_min, code_max;
+ };
+ 
+ static const struct icmpv6_names icmpv6_codes[] = {
+diff --git a/extensions/ebt_limit.c b/extensions/ebt_limit.c
+index ee40e5c..d189a09 100644
+--- a/extensions/ebt_limit.c
++++ b/extensions/ebt_limit.c
+@@ -59,11 +59,11 @@ static void print_help(void)
+ "                                default %u\n", EBT_LIMIT_BURST);
+ }
+ 
+-static int parse_rate(const char *rate, u_int32_t *val)
++static int parse_rate(const char *rate, uint32_t *val)
+ {
+ 	const char *delim;
+-	u_int32_t r;
+-	u_int32_t mult = 1;  /* Seconds by default. */
++	uint32_t r;
++	uint32_t mult = 1;  /* Seconds by default. */
+ 
+ 	delim = strchr(rate, '/');
+ 	if (delim) {
+@@ -151,7 +151,7 @@ static void final_check(const struct ebt_u_entry *entry,
+ struct rates
+ {
+ 	const char *name;
+-	u_int32_t mult;
++	uint32_t mult;
+ };
+ 
+ static struct rates g_rates[] =
+@@ -162,7 +162,7 @@ static struct rates g_rates[] =
+ 	{ "sec", EBT_LIMIT_SCALE }
+ };
+ 
+-static void print_rate(u_int32_t period)
++static void print_rate(uint32_t period)
+ {
+ 	unsigned int i;
+ 
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0008-ethernetdb.h-Remove-C-specific-compiler-hint-macro-_.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0008-ethernetdb.h-Remove-C-specific-compiler-hint-macro-_.patch
new file mode 100644
index 0000000..df3f521
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0008-ethernetdb.h-Remove-C-specific-compiler-hint-macro-_.patch
@@ -0,0 +1,48 @@
+From 6ed23c8c2bc5efc3956e7bb6155afc8f45e6ae1a Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 16 May 2015 12:31:58 +0200
+Subject: [PATCH 08/10] ethernetdb.h: Remove C++ specific compiler hint macro
+ _THROW
+
+Fixes compilation with musl libc
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/ethernetdb.h | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/include/ethernetdb.h b/include/ethernetdb.h
+index 46d8bfd..1683abe 100644
+--- a/include/ethernetdb.h
++++ b/include/ethernetdb.h
+@@ -38,21 +38,20 @@ struct ethertypeent {
+ 
+ /* Open ethertype data base files and mark them as staying open even
+    after a later search if STAY_OPEN is non-zero.  */
+-extern void setethertypeent(int __stay_open) __THROW;
++extern void setethertypeent(int __stay_open);
+ 
+ /* Close ethertype data base files and clear `stay open' flag.  */
+-extern void endethertypeent(void) __THROW;
++extern void endethertypeent(void);
+ 
+ /* Get next entry from ethertype data base file.  Open data base if
+    necessary.  */
+-extern struct ethertypeent *getethertypeent(void) __THROW;
++extern struct ethertypeent *getethertypeent(void);
+ 
+ /* Return entry from ethertype data base for network with NAME.  */
+-extern struct ethertypeent *getethertypebyname(__const char *__name)
+-    __THROW;
++extern struct ethertypeent *getethertypebyname(__const char *__name);
+ 
+ /* Return entry from ethertype data base which number is PROTO.  */
+-extern struct ethertypeent *getethertypebynumber(int __ethertype) __THROW;
++extern struct ethertypeent *getethertypebynumber(int __ethertype);
+ 
+ 
+ #endif				/* ethernetdb.h */
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0009-ebtables-Allow-RETURN-target-rules-in-user-defined-c.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0009-ebtables-Allow-RETURN-target-rules-in-user-defined-c.patch
new file mode 100644
index 0000000..248582c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0009-ebtables-Allow-RETURN-target-rules-in-user-defined-c.patch
@@ -0,0 +1,48 @@
+From e6b367c0c2668341c47242d099f4d2048ae575ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alin=20N=C4=83stac?= <alin.nastac@gmail.com>
+Date: Thu, 22 Oct 2015 16:41:03 +0200
+Subject: [PATCH 09/10] ebtables: Allow RETURN target rules in user defined
+ chains
+
+During loop checking ebtables marks entries with '1 << NF_BR_NUMHOOKS' if
+they're called from a base chain rather than a user defined chain.
+
+This can be used by ebtables targets that can encode a special return
+value to bail out if e.g. RETURN is used from a base chain.
+
+Unfortunately, this is broken, since the '1 << NF_BR_NUMHOOKS' is also
+copied to called user-defined-chains (i.e., a user defined chain can no
+longer be distinguished from a base chain):
+
+root@OpenWrt:~# ebtables -N foo
+root@OpenWrt:~# ebtables -A OUTPUT -j foo
+root@OpenWrt:~# ebtables -A foo -j mark --mark-or 3 --mark-target RETURN
+--mark-target RETURN not allowed on base chain.
+
+This works if -A OUTPUT -j foo is omitted, but will still appear
+if we try to call foo from OUTPUT afterwards.
+
+After this patch we still reject
+'-A OUTPUT -j mark .. --mark-target RETURN'.
+
+Signed-off-by: Florian Westphal <fw@strlen.de>
+---
+ libebtc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libebtc.c b/libebtc.c
+index 17ba8f2..74830ec 100644
+--- a/libebtc.c
++++ b/libebtc.c
+@@ -1102,7 +1102,7 @@ void ebt_check_for_loops(struct ebt_u_replace *replace)
+ 			/* check if we've dealt with this chain already */
+ 			if (entries2->hook_mask & (1<<i))
+ 				goto letscontinue;
+-			entries2->hook_mask |= entries->hook_mask;
++			entries2->hook_mask |= entries->hook_mask & ~(1 << NF_BR_NUMHOOKS);
+ 			/* Jump to the chain, make sure we know how to get back */
+ 			stack[sp].chain_nr = chain_nr;
+ 			stack[sp].n = j;
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0010-Adjust-header-include-sequence.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0010-Adjust-header-include-sequence.patch
new file mode 100644
index 0000000..a6ef9cd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/0010-Adjust-header-include-sequence.patch
@@ -0,0 +1,216 @@
+From b7cee37734007fced7a4d5ed586c3a9e5ad92878 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 26 Mar 2017 13:12:21 -0700
+Subject: [PATCH 10/10] Adjust header include sequence
+
+This fixes the build with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ extensions/ebt_among.c    |   2 +-
+ extensions/ebt_arpreply.c |   2 +-
+ extensions/ebt_nat.c      |   2 +-
+ include/linux/if_ether.h  | 126 ----------------------------------------------
+ useful_functions.c        |   4 +-
+ 5 files changed, 5 insertions(+), 131 deletions(-)
+ delete mode 100644 include/linux/if_ether.h
+
+diff --git a/extensions/ebt_among.c b/extensions/ebt_among.c
+index f97d07e..b096847 100644
+--- a/extensions/ebt_among.c
++++ b/extensions/ebt_among.c
+@@ -12,8 +12,8 @@
+ #include <getopt.h>
+ #include <ctype.h>
+ #include <unistd.h>
+-#include "../include/ebtables_u.h"
+ #include <netinet/ether.h>
++#include "../include/ebtables_u.h"
+ #include "../include/ethernetdb.h"
+ #include <linux/if_ether.h>
+ #include <linux/netfilter_bridge/ebt_among.h>
+diff --git a/extensions/ebt_arpreply.c b/extensions/ebt_arpreply.c
+index c3757f3..c5102a4 100644
+--- a/extensions/ebt_arpreply.c
++++ b/extensions/ebt_arpreply.c
+@@ -11,8 +11,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <getopt.h>
+-#include "../include/ebtables_u.h"
+ #include <netinet/ether.h>
++#include "../include/ebtables_u.h"
+ #include <linux/netfilter_bridge/ebt_arpreply.h>
+ 
+ static int mac_supplied;
+diff --git a/extensions/ebt_nat.c b/extensions/ebt_nat.c
+index e6afbf8..8d318d1 100644
+--- a/extensions/ebt_nat.c
++++ b/extensions/ebt_nat.c
+@@ -10,8 +10,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <getopt.h>
+-#include "../include/ebtables_u.h"
+ #include <netinet/ether.h>
++#include "../include/ebtables_u.h"
+ #include <linux/netfilter_bridge/ebt_nat.h>
+ 
+ static int to_source_supplied, to_dest_supplied;
+diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
+deleted file mode 100644
+index 28a15ff..0000000
+--- a/include/linux/if_ether.h
++++ /dev/null
+@@ -1,126 +0,0 @@
+-/*
+- * INET		An implementation of the TCP/IP protocol suite for the LINUX
+- *		operating system.  INET is implemented using the  BSD Socket
+- *		interface as the means of communication with the user level.
+- *
+- *		Global definitions for the Ethernet IEEE 802.3 interface.
+- *
+- * Version:	@(#)if_ether.h	1.0.1a	02/08/94
+- *
+- * Author:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
+- *		Donald Becker, <becker@super.org>
+- *		Alan Cox, <alan@lxorguk.ukuu.org.uk>
+- *		Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
+- *
+- *		This program is free software; you can redistribute it and/or
+- *		modify it under the terms of the GNU General Public License
+- *		as published by the Free Software Foundation; either version
+- *		2 of the License, or (at your option) any later version.
+- */
+-
+-#ifndef _LINUX_IF_ETHER_H
+-#define _LINUX_IF_ETHER_H
+-
+-#include <linux/types.h>
+-
+-/*
+- *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
+- *	and FCS/CRC (frame check sequence).
+- */
+-
+-#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
+-#define ETH_HLEN	14		/* Total octets in header.	 */
+-#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
+-#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
+-#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
+-#define ETH_FCS_LEN	4		/* Octets in the FCS		 */
+-
+-/*
+- *	These are the defined Ethernet Protocol ID's.
+- */
+-
+-#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
+-#define ETH_P_PUP	0x0200		/* Xerox PUP packet		*/
+-#define ETH_P_PUPAT	0x0201		/* Xerox PUP Addr Trans packet	*/
+-#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
+-#define ETH_P_X25	0x0805		/* CCITT X.25			*/
+-#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
+-#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
+-#define ETH_P_IEEEPUP	0x0a00		/* Xerox IEEE802.3 PUP packet */
+-#define ETH_P_IEEEPUPAT	0x0a01		/* Xerox IEEE802.3 PUP Addr Trans packet */
+-#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
+-#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
+-#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
+-#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
+-#define ETH_P_LAT       0x6004          /* DEC LAT                      */
+-#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
+-#define ETH_P_CUST      0x6006          /* DEC Customer use             */
+-#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
+-#define ETH_P_TEB	0x6558		/* Trans Ether Bridging		*/
+-#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
+-#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
+-#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
+-#define ETH_P_8021Q	0x8100          /* 802.1Q VLAN Extended Header  */
+-#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
+-#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
+-#define ETH_P_PAUSE	0x8808		/* IEEE Pause frames. See 802.3 31B */
+-#define ETH_P_SLOW	0x8809		/* Slow Protocol. See 802.3ad 43B */
+-#define ETH_P_WCCP	0x883E		/* Web-cache coordination protocol
+-					 * defined in draft-wilson-wrec-wccp-v2-00.txt */
+-#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
+-#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
+-#define ETH_P_MPLS_UC	0x8847		/* MPLS Unicast traffic		*/
+-#define ETH_P_MPLS_MC	0x8848		/* MPLS Multicast traffic	*/
+-#define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
+-#define ETH_P_LINK_CTL	0x886c		/* HPNA, wlan link local tunnel */
+-#define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
+-					 * over Ethernet
+-					 */
+-#define ETH_P_PAE	0x888E		/* Port Access Entity (IEEE 802.1X) */
+-#define ETH_P_AOE	0x88A2		/* ATA over Ethernet		*/
+-#define ETH_P_TIPC	0x88CA		/* TIPC 			*/
+-#define ETH_P_1588	0x88F7		/* IEEE 1588 Timesync */
+-#define ETH_P_FCOE	0x8906		/* Fibre Channel over Ethernet  */
+-#define ETH_P_FIP	0x8914		/* FCoE Initialization Protocol */
+-#define ETH_P_EDSA	0xDADA		/* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
+-
+-/*
+- *	Non DIX types. Won't clash for 1500 types.
+- */
+-
+-#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
+-#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
+-#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
+-#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
+-#define ETH_P_SNAP	0x0005		/* Internal only		*/
+-#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
+-#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
+-#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
+-#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
+-#define ETH_P_CAN	0x000C		/* Controller Area Network      */
+-#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
+-#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/
+-#define ETH_P_MOBITEX	0x0015		/* Mobitex (kaz@cafe.net)	*/
+-#define ETH_P_CONTROL	0x0016		/* Card specific control frames */
+-#define ETH_P_IRDA	0x0017		/* Linux-IrDA			*/
+-#define ETH_P_ECONET	0x0018		/* Acorn Econet			*/
+-#define ETH_P_HDLC	0x0019		/* HDLC frames			*/
+-#define ETH_P_ARCNET	0x001A		/* 1A for ArcNet :-)            */
+-#define ETH_P_DSA	0x001B		/* Distributed Switch Arch.	*/
+-#define ETH_P_TRAILER	0x001C		/* Trailer switch tagging	*/
+-#define ETH_P_PHONET	0x00F5		/* Nokia Phonet frames          */
+-#define ETH_P_IEEE802154 0x00F6		/* IEEE802.15.4 frame		*/
+-#define ETH_P_CAIF	0x00F7		/* ST-Ericsson CAIF protocol	*/
+-
+-/*
+- *	This is an Ethernet frame header.
+- */
+-
+-struct ethhdr {
+-	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
+-	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
+-	__be16		h_proto;		/* packet type ID field	*/
+-} __attribute__((packed));
+-
+-
+-#endif	/* _LINUX_IF_ETHER_H */
+diff --git a/useful_functions.c b/useful_functions.c
+index d14cbe9..c304f4d 100644
+--- a/useful_functions.c
++++ b/useful_functions.c
+@@ -22,8 +22,6 @@
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+-#include "include/ebtables_u.h"
+-#include "include/ethernetdb.h"
+ #include <stdio.h>
+ #include <netinet/ether.h>
+ #include <string.h>
+@@ -33,6 +31,8 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
++#include "include/ebtables_u.h"
++#include "include/ethernetdb.h"
+ 
+ const unsigned char mac_type_unicast[ETH_ALEN] =   {0,0,0,0,0,0};
+ const unsigned char msk_type_unicast[ETH_ALEN] =   {1,0,0,0,0,0};
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch
new file mode 100644
index 0000000..c260403
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## debian_defaultconfig.dpatch by  <hesso@pool.math.tu-berlin.de>
+##
+## DP: Debian enhancements to the ebtables "sysconfig" default settings.
+
+@DPATCH@
+
+--- ebtables-2.0.8.1.orig/ebtables-config
++++ ebtables-2.0.8.1/ebtables-config
+@@ -1,17 +1,3 @@
+-# Save (and possibly restore) in text format.
+-#   Value: yes|no,  default: yes
+-# Save the firewall rules in text format to __SYSCONFIG__/ebtables
+-# If EBTABLES_BINARY_FORMAT="no" then restoring the firewall rules
+-# is done using this text format.
+-EBTABLES_TEXT_FORMAT="yes"
+-
+-# Save (and restore) in binary format.
+-#   Value: yes|no,  default: yes
+-# Save (and restore) the firewall rules in binary format to (and from)
+-# __SYSCONFIG__/ebtables.<chain>. Enabling this option will make
+-# firewall initialisation a lot faster.
+-EBTABLES_BINARY_FORMAT="yes"
+-
+ # Unload modules on restart and stop
+ #   Value: yes|no,  default: yes
+ # This option has to be 'yes' to get to a sane state for a firewall
+@@ -19,6 +5,12 @@
+ # modules.
+ EBTABLES_MODULES_UNLOAD="yes"
+ 
++# Load firewall rules on system startup.
++#   Value: yes|no,  default: no
++# Restores the ebtables rulesets from the last saved state when the
++# system boots up.
++EBTABLES_LOAD_ON_START="no"
++
+ # Save current firewall rules on stop.
+ #   Value: yes|no,  default: no
+ # Saves all firewall rules if firewall gets stopped
+@@ -35,3 +27,9 @@
+ # Save rule counters when saving a kernel table to a file. If the
+ # rule counters were saved, they will be restored when restoring the table.
+ EBTABLES_SAVE_COUNTER="no"
++
++# Backup suffix for ruleset save files.
++#   Value: <string>,  default: "~"
++# Keep one backup level of saved rules.
++# Set this variable to the empty string to disable backups.
++EBTABLES_BACKUP_SUFFIX="~"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save
new file mode 100755
index 0000000..2d7fc4e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables-save
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+EBTABLES="/sbin/ebtables"
+
+[ -x "$EBTABLES" ] || exit 1
+
+echo "# Generated by ebtables-save v1.0 on $(date)"
+
+cnt=""
+[ "x$EBTABLES_SAVE_COUNTER" = "xyes" ] && cnt="--Lc"
+
+for table_name in $(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//); do
+    table=$($EBTABLES -t $table_name -L $cnt)
+    [ $? -eq 0 ] || { echo "$table"; exit -1; }
+
+    chain=""
+    rules=""
+    while read line; do
+	[ -z "$line" ] && continue
+
+	case "$line" in 
+	    Bridge\ table:\ *)
+		echo "*${line:14}"
+		;;
+	    Bridge\ chain:\ *)
+		chain="${line:14}"
+		chain="${chain%%,*}"
+		policy="${line##*policy: }"
+		echo ":$chain $policy"
+		;;
+	    *)
+		if [ "$cnt" = "--Lc" ]; then
+		    line=${line/, pcnt \=/ -c}
+		    line=${line/-- bcnt \=/}
+		fi
+		rules="$rules-A $chain $line\n"
+		;;
+	esac
+    done <<EOF
+$table
+EOF
+    echo -e $rules
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
new file mode 100644
index 0000000..1ae18fe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
@@ -0,0 +1,163 @@
+#!/bin/sh
+
+[ -x /sbin/ebtables ] || exit 1
+
+EBTABLES_DUMPFILE_STEM=/etc/ebtables/dump
+
+RETVAL=0
+prog="ebtables"
+desc="Ethernet bridge filtering"
+umask 0077
+
+#default configuration
+EBTABLES_MODULES_UNLOAD="yes"
+EBTABLES_LOAD_ON_START="no"
+EBTABLES_SAVE_ON_STOP="no"
+EBTABLES_SAVE_ON_RESTART="no"
+EBTABLES_SAVE_COUNTER="no"
+EBTABLES_BACKUP_SUFFIX="~"
+
+config=/etc/default/$prog
+[ -f "$config" ] && . "$config"
+
+get_supported_tables() {
+	EBTABLES_SUPPORTED_TABLES=
+	/sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission
+	if [ $? -eq 0 ]; then
+		echo "Error: insufficient privileges to access the ebtables rulesets."
+		exit 1
+	fi
+	for table in filter nat broute; do
+		/sbin/ebtables -t $table -L &> /dev/null
+		if [ $? -eq 0 ]; then
+			EBTABLES_SUPPORTED_TABLES="${EBTABLES_SUPPORTED_TABLES} $table"
+		fi
+	done
+}
+
+load() {
+	RETVAL=0
+	get_supported_tables
+	echo -n "Restoring ebtables rulesets: "
+	for table in $EBTABLES_SUPPORTED_TABLES; do
+		echo -n "$table "
+		if [ -s ${EBTABLES_DUMPFILE_STEM}.$table ]; then
+			/sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table --atomic-commit
+			RET=$?
+			if [ $RET -ne 0 ]; then
+				echo -n "(failed) "
+				RETVAL=$RET
+			fi
+		else
+			echo -n "(no saved state) "
+		fi
+	done
+	if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+		echo -n "no kernel support. "
+	else
+		echo -n "done. "
+	fi
+	if [ $RETVAL -eq 0 ]; then
+		echo "ok"
+	else
+		echo "fail"
+	fi
+}
+
+clear_rules() {
+	RETVAL=0
+	get_supported_tables
+	echo -n "Clearing ebtables rulesets: "
+	for table in $EBTABLES_SUPPORTED_TABLES; do
+		echo -n "$table "
+		/sbin/ebtables -t $table --init-table
+	done
+
+	if [ "$EBTABLES_MODULES_UNLOAD" = "yes" ]; then
+		for mod in $(grep -E '^(ebt|ebtable)_' /proc/modules | cut -d' ' -f1) ebtables; do
+			rmmod $mod 2> /dev/null
+		done
+	fi
+	if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+		echo -n "no kernel support. "
+	else
+		echo -n "done. "
+	fi
+	if [ $RETVAL -eq 0 ]; then
+		echo "ok"
+	else
+		echo "fail"
+	fi
+}
+
+save() {
+	RETVAL=0
+	get_supported_tables
+	echo -n "Saving ebtables rulesets: "
+	for table in $EBTABLES_SUPPORTED_TABLES; do
+		echo -n "$table "
+		[ -n "$EBTABLES_BACKUP_SUFFIX" ] && [ -s ${EBTABLES_DUMPFILE_STEM}.$table ] && \
+		  mv ${EBTABLES_DUMPFILE_STEM}.$table ${EBTABLES_DUMPFILE_STEM}.$table$EBTABLES_BACKUP_SUFFIX
+		/sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table --atomic-save
+		RET=$?
+		if [ $RET -ne 0 ]; then
+			echo -n "(failed) "
+			RETVAL=$RET
+		else
+			if [ "$EBTABLES_SAVE_COUNTER" = "no" ]; then
+				/sbin/ebtables -t $table --atomic-file ${EBTABLES_DUMPFILE_STEM}.$table -Z
+			fi
+		fi
+	done
+	if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+		echo -n "no kernel support. "
+	else
+		echo -n "done. "
+	fi
+	if [ $RETVAL -eq 0 ]; then
+		echo "ok"
+	else
+		echo "fail"
+	fi
+}
+
+case "$1" in
+  start)
+	[ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
+	;;
+  stop)
+	[ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
+	clear_rules
+	;;
+  restart|reload|force-reload)
+	[ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save
+	clear_rules
+	[ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
+	;;
+  load)
+	load
+	;;
+  save)
+	save
+	;;
+  status)
+	get_supported_tables
+	if [ -z "$EBTABLES_SUPPORTED_TABLES" ]; then
+		echo "No kernel support for ebtables."
+		RETVAL=1
+	else
+		echo -n "Ebtables support available, number of installed rules: "
+		for table in $EBTABLES_SUPPORTED_TABLES; do
+			COUNT=$(( $(/sbin/ebtables -t $table -L | sed -e "/^Bridge chain/! d" -e "s/^.*entries: //" -e "s/,.*$/ +/") 0 ))
+			echo -n "$table($COUNT) "
+		done
+		echo ok
+		RETVAL=0
+	fi
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|reload|force-reload|load|save|status}" >&2
+	RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init
new file mode 100755
index 0000000..c9a77a2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# init script for the Ethernet Bridge filter tables
+#
+# Written by Dag Wieers <dag@wieers.com>
+# Modified by Rok Papez <rok.papez@arnes.si>
+#	     Bart De Schuymer <bdschuym@pandora.be>
+# Adapted to Debian by Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
+# Adapted to OpenEmbedded by Roman I Khimov <khimov@altell.ru>
+#
+# chkconfig: - 15 85
+# description: Ethernet Bridge filtering tables
+#
+### BEGIN INIT INFO
+# Provides:		ebtables
+# Required-Start:	
+# Required-Stop:	
+# Should-Start:		$local_fs
+# Should-Stop:		$local_fs
+# Default-Start:	S
+# Default-Stop:		0 6
+# Short-Description:	ebtables ruleset management
+# Description:		Saves and restores the state of the ebtables rulesets.
+### END INIT INFO
+
+/usr/sbin/ebtables.common $1
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service
new file mode 100644
index 0000000..3abd1fe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ethernet Bridge Filtering Tables
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@SBINDIR@/ebtables.common start
+ExecStop=@SBINDIR@/ebtables.common stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables_optimizations.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables_optimizations.patch
new file mode 100644
index 0000000..21d4cfd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables_optimizations.patch
@@ -0,0 +1,19 @@
+ebtables: use optimizations from bitbake
+
+Enables building with O2 or Os to create smaller binaries.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
+
+--- a/Makefile	2021-04-16 12:43:40.475431286 +0000
++++ b/Makefile	2021-04-16 12:45:23.654597711 +0000
+@@ -18,7 +18,7 @@ SYSCONFIGDIR:=/etc/sysconfig
+ DESTDIR:=
+ 
+ CFLAGS:=-Wall -Wunused -Werror
+-CFLAGS_SH_LIB:=-fPIC -O3
++CFLAGS_SH_LIB:=-fPIC
+ CC:=gcc
+ 
+ ifeq ($(shell uname -m),sparc64)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch
new file mode 100644
index 0000000..bcd9bed
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/installnonroot.patch
@@ -0,0 +1,43 @@
+diff --git a/Makefile b/Makefile
+index c1106a4..7ea6b7a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -157,31 +157,31 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\//\\\//g')
+ scripts: ebtables-save ebtables.sysv ebtables-config
+ 	cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
+ 	mkdir -p $(DESTDIR)$(BINDIR)
+-	install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
++	install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
+ 	cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
+ 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
+-	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
++	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
+ 	cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
+ 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
+-	if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
++	if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
+ 	rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
+ 
+ tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
+ $(MANDIR)/man8/ebtables.8: ebtables.8
+ 	mkdir -p $(DESTDIR)$(@D)
+ 	sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
+-	install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
++	install -m 0644 ebtables.8_ $(DESTDIR)$@
+ 	rm -f ebtables.8_
+ 
+ $(DESTDIR)$(ETHERTYPESFILE): ethertypes
+ 	mkdir -p $(@D)
+-	install -m 0644 -o root -g root $< $@
++	install -m 0644 $< $@
+ 
+ .PHONY: exec
+ exec: ebtables ebtables-restore
+ 	mkdir -p $(DESTDIR)$(BINDIR)
+-	install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
+-	install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
++	install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
++	install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
+ 
+ .PHONY: install
+ install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) exec scripts
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch
new file mode 100644
index 0000000..336119d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/no-as-needed.patch
@@ -0,0 +1,25 @@
+link ebtables with --no-as-needed and adjust the link order to fix runtime crash
+
+Program terminated with signal 11, Segmentation fault.
+#0  0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+(gdb) bt
+#0  0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+#1  0x00007ffaa83824dc in do_command () from /lib64/ebtables/libebtc.so
+#2  0x000000000040065c in ?? ()
+#3  0x00007ffaa7fed755 in __libc_start_main () from /lib64/libc.so.6
+#4  0x0000000000400691 in ?? ()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: ebtables-v2.0.10-4/Makefile
+===================================================================
+--- ebtables-v2.0.10-4.orig/Makefile	2011-12-15 12:02:47.000000000 -0800
++++ ebtables-v2.0.10-4/Makefile	2012-12-17 22:09:45.065973753 -0800
+@@ -90,7 +90,7 @@
+ 	$(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
+ 
+ ebtables: $(OBJECTS) ebtables-standalone.o libebtc.so
+-	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
++	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -Wl,--no-as-needed $(EXT_LIBSI) -lebtc \
+ 	-Wl,-rpath,$(LIBDIR)
+ 
+ ebtablesu: ebtablesu.c
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
new file mode 100644
index 0000000..8b6dcea
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Filtering tool for a Linux-based bridging firewall"
+HOMEPAGE = "http://sourceforge.net/projects/ebtables/"
+DESCRIPTION = "Utility for basic Ethernet frame filtering on a Linux bridge, \
+               advanced logging, MAC DNAT/SNAT and brouting."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=53b4a999993871a28ab1488fdbd2e73e"
+SECTION = "net"
+PR = "r4"
+
+RDEPENDS_${PN} += "bash"
+
+RRECOMMENDS_${PN} += "kernel-module-ebtables \
+    "
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/ebtables/files/ebtables/"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ebtables/ebtables-v${PV}.tar.gz \
+           file://ebtables-save \
+           file://installnonroot.patch \
+           file://01debian_defaultconfig.patch \
+           file://ebtables.init \
+           file://ebtables.common \
+           file://ebtables.service \
+           file://no-as-needed.patch \
+           file://0001-add-RARP-and-update-iana-url.patch \
+           file://0002-fix-compilation-warning.patch \
+           file://0003-add-info-about-Wl-no-as-needed.patch \
+           file://0004-workaround-for-kernel-regression-bug-IPv6-source-des.patch \
+           file://0005-Add-noflush-command-line-support-for-ebtables-restor.patch \
+           file://0006-don-t-print-IPv6-mask-if-it-s-all-ones-based-on-patc.patch \
+           file://0007-extensions-Use-stdint-types.patch \
+           file://0008-ethernetdb.h-Remove-C-specific-compiler-hint-macro-_.patch \
+           file://0009-ebtables-Allow-RETURN-target-rules-in-user-defined-c.patch \
+           file://ebtables_optimizations.patch \
+           "
+
+SRC_URI_append_libc-musl = " file://0010-Adjust-header-include-sequence.patch"
+
+SRC_URI[md5sum] = "506742a3d44b9925955425a659c1a8d0"
+SRC_URI[sha256sum] = "dc6f7b484f207dc712bfca81645f45120cb6aee3380e77a1771e9c34a9a4455d"
+
+# It is using '-' but not '.' as delimiter for the version in the releases page,
+# which causes the version comparison unmatched.
+#UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/ebtables/files/ebtables/"
+#UPSTREAM_CHECK_REGEX = "ebtables-(?P<pver>\d+(\-\d+)+)"
+
+RECIPE_UPSTREAM_VERSION = "2.0.10-4"
+RECIPE_UPSTREAM_DATE = "Dec 15, 2011"
+CHECK_DATE = "May 25, 2018"
+
+S = "${WORKDIR}/ebtables-v${PV}"
+
+inherit update-rc.d systemd
+
+python __anonymous () {
+    import re
+
+    karch = d.getVar('TARGET_ARCH')
+    multilib = d.getVar('MLPREFIX')
+
+    if multilib and ( karch == 'powerpc64' or karch == 'arm' ):
+        searchstr = "lib.?32"
+        reg = re.compile(searchstr)
+        if reg.search(multilib):
+            d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
+}
+
+EXTRA_OEMAKE = " \
+        BINDIR=${base_sbindir} \
+        MANDIR=${mandir} \
+        ETHERTYPESPATH=${sysconfdir} \
+        INITDIR=${sysconfdir}/init.d \
+        SYSCONFIGDIR=${sysconfdir}/default \
+        LIBDIR=${base_libdir}/ebtables \
+        'CC=${CC}' \
+        'CFLAGS=${CFLAGS}' \
+        'LDFLAGS=${LDFLAGS} -Wl,--no-as-needed' \
+        'LD=${LD}' \
+"
+
+do_install () {
+    install -d ${D}${sbindir}
+    install -m 0755 ${WORKDIR}/ebtables.common ${D}${sbindir}/ebtables.common
+    # Fix hardcoded paths in scripts
+    sed -i 's!/sbin/!${base_sbindir}/!g' ${D}${sbindir}/ebtables.common
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sbindir}/ebtables.common
+
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/default
+    install -d ${D}${sysconfdir}/ebtables
+    oe_runmake DESTDIR='${D}' install
+    install -m 0755 ${WORKDIR}/ebtables.init ${D}/${sysconfdir}/init.d/ebtables
+    mv ${D}${sysconfdir}/default/ebtables-config ${D}${sysconfdir}/default/ebtables
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ebtables
+
+    # Replace upstream ebtables-save perl script with Fedora bash based rewrite
+    # http://pkgs.fedoraproject.org/cgit/rpms/ebtables.git/tree/ebtables-save
+    install -m 0755 ${WORKDIR}/ebtables-save ${D}${base_sbindir}/ebtables-save
+    sed -i 's!/sbin/!${base_sbindir}/!g' ${D}${base_sbindir}/ebtables-save
+
+    # Install systemd service files
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ebtables.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/ebtables.service
+}
+
+CONFFILES_${PN} += "${sysconfdir}/default/ebtables"
+
+INITSCRIPT_NAME = "ebtables"
+INITSCRIPT_PARAMS = "start 41 S . stop 41 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ebtables.service"
+
+FILES_${PN}-dbg += "${base_libdir}/ebtables/.debug"
+FILES_${PN} += "${base_libdir}/ebtables/*.so"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch
new file mode 100644
index 0000000..9e0b420
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch
@@ -0,0 +1,255 @@
+From f3e3e8fa703e88b76b22c5486277dfca3c85a24b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 10 Apr 2017 14:56:18 -0700
+Subject: [PATCH] Declare the define visivility attribute together
+
+clang ignores the visibility attribute if its not
+defined before the definition. As a result these
+symbols become hidden and consumers of this library
+fail to link due to these missing symbols
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ doxygen.cfg.in          |  2 +-
+ src/internal.h          |  5 ++---
+ src/libnetfilter_acct.c | 41 ++++++++++++++---------------------------
+ 3 files changed, 17 insertions(+), 31 deletions(-)
+
+diff --git a/doxygen.cfg.in b/doxygen.cfg.in
+index 7f4bd04..fe64d48 100644
+--- a/doxygen.cfg.in
++++ b/doxygen.cfg.in
+@@ -72,7 +72,7 @@ RECURSIVE              = YES
+ EXCLUDE                = 
+ EXCLUDE_SYMLINKS       = NO
+ EXCLUDE_PATTERNS       = */.git/* .*.d
+-EXCLUDE_SYMBOLS        = EXPORT_SYMBOL nfacct
++EXCLUDE_SYMBOLS        = nfacct
+ EXAMPLE_PATH           = 
+ EXAMPLE_PATTERNS       = 
+ EXAMPLE_RECURSIVE      = NO
+diff --git a/src/internal.h b/src/internal.h
+index f0cc2e1..e5c5ffd 100644
+--- a/src/internal.h
++++ b/src/internal.h
+@@ -3,10 +3,9 @@
+ 
+ #include "config.h"
+ #ifdef HAVE_VISIBILITY_HIDDEN
+-#	define __visible	__attribute__((visibility("default")))
+-#	define EXPORT_SYMBOL(x)	typeof(x) (x) __visible
++#	define __EXPORT	__attribute__((visibility("default")))
+ #else
+-#	define EXPORT_SYMBOL
++#	define __EXPORT
+ #endif
+ 
+ #include <endian.h>
+diff --git a/src/libnetfilter_acct.c b/src/libnetfilter_acct.c
+index b0bcf67..0220d14 100644
+--- a/src/libnetfilter_acct.c
++++ b/src/libnetfilter_acct.c
+@@ -76,21 +76,19 @@ struct nfacct {
+  * In case of success, this function returns a valid pointer, otherwise NULL
+  * s returned and errno is appropriately set.
+  */
+-struct nfacct *nfacct_alloc(void)
++struct nfacct __EXPORT *nfacct_alloc(void)
+ {
+ 	return calloc(1, sizeof(struct nfacct));
+ }
+-EXPORT_SYMBOL(nfacct_alloc);
+ 
+ /**
+  * nfacct_free - release one accounting object
+  * \param nfacct pointer to the accounting object
+  */
+-void nfacct_free(struct nfacct *nfacct)
++void __EXPORT nfacct_free(struct nfacct *nfacct)
+ {
+ 	free(nfacct);
+ }
+-EXPORT_SYMBOL(nfacct_free);
+ 
+ /**
+  * nfacct_attr_set - set one attribute of the accounting object
+@@ -98,7 +96,7 @@ EXPORT_SYMBOL(nfacct_free);
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-void
++void __EXPORT
+ nfacct_attr_set(struct nfacct *nfacct, enum nfacct_attr_type type,
+ 		const void *data)
+ {
+@@ -126,7 +124,6 @@ nfacct_attr_set(struct nfacct *nfacct, enum nfacct_attr_type type,
+ 		break;
+ 	}
+ }
+-EXPORT_SYMBOL(nfacct_attr_set);
+ 
+ /**
+  * nfacct_attr_set_str - set one attribute the accounting object
+@@ -134,13 +131,12 @@ EXPORT_SYMBOL(nfacct_attr_set);
+  * \param type attribute type you want to set
+  * \param name string that will be used to set this attribute
+  */
+-void
++void __EXPORT
+ nfacct_attr_set_str(struct nfacct *nfacct, enum nfacct_attr_type type,
+ 		    const char *name)
+ {
+ 	nfacct_attr_set(nfacct, type, name);
+ }
+-EXPORT_SYMBOL(nfacct_attr_set_str);
+ 
+ /**
+  * nfacct_attr_set_u64 - set one attribute the accounting object
+@@ -148,20 +144,19 @@ EXPORT_SYMBOL(nfacct_attr_set_str);
+  * \param type attribute type you want to set
+  * \param value unsigned 64-bits integer
+  */
+-void
++void __EXPORT
+ nfacct_attr_set_u64(struct nfacct *nfacct, enum nfacct_attr_type type,
+ 		    uint64_t value)
+ {
+ 	nfacct_attr_set(nfacct, type, &value);
+ }
+-EXPORT_SYMBOL(nfacct_attr_set_u64);
+ 
+ /**
+  * nfacct_attr_unset - unset one attribute the accounting object
+  * \param nfacct pointer to the accounting object
+  * \param type attribute type you want to set
+  */
+-void
++void __EXPORT
+ nfacct_attr_unset(struct nfacct *nfacct, enum nfacct_attr_type type)
+ {
+ 	switch(type) {
+@@ -182,7 +177,6 @@ nfacct_attr_unset(struct nfacct *nfacct, enum nfacct_attr_type type)
+ 		break;
+ 	}
+ }
+-EXPORT_SYMBOL(nfacct_attr_unset);
+ 
+ /**
+  * nfacct_attr_get - get one attribute the accounting object
+@@ -192,7 +186,7 @@ EXPORT_SYMBOL(nfacct_attr_unset);
+  * This function returns a valid pointer to the attribute data. If a
+  * unsupported attribute is used, this returns NULL.
+  */
+-const void *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type)
++const void __EXPORT *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type)
+ {
+ 	const void *ret = NULL;
+ 
+@@ -220,7 +214,6 @@ const void *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type)
+ 	}
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfacct_attr_get);
+ 
+ /**
+  * nfacct_attr_get_str - get one attribute the accounting object
+@@ -230,12 +223,11 @@ EXPORT_SYMBOL(nfacct_attr_get);
+  * This function returns a valid pointer to the beginning of the string.
+  * If the attribute is unsupported, this returns NULL.
+  */
+-const char *
++const char __EXPORT *
+ nfacct_attr_get_str(struct nfacct *nfacct, enum nfacct_attr_type type)
+ {
+ 	return nfacct_attr_get(nfacct, type);
+ }
+-EXPORT_SYMBOL(nfacct_attr_get_str);
+ 
+ /**
+  * nfacct_attr_get_u64 - get one attribute the accounting object
+@@ -245,12 +237,11 @@ EXPORT_SYMBOL(nfacct_attr_get_str);
+  * This function returns a unsigned 64-bits integer. If the attribute is
+  * unsupported, this returns NULL.
+  */
+-uint64_t nfacct_attr_get_u64(struct nfacct *nfacct, enum nfacct_attr_type type)
++uint64_t __EXPORT nfacct_attr_get_u64(struct nfacct *nfacct, enum nfacct_attr_type type)
+ {
+ 	const void *ret = nfacct_attr_get(nfacct, type);
+ 	return ret ? *((uint64_t *)ret) : 0;
+ }
+-EXPORT_SYMBOL(nfacct_attr_get_u64);
+ 
+ static int
+ nfacct_snprintf_plain(char *buf, size_t rem, struct nfacct *nfacct,
+@@ -424,8 +415,8 @@ err:
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct,
+-		    uint16_t type, uint16_t flags)
++int __EXPORT nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct,
++		             uint16_t type, uint16_t flags)
+ {
+ 	int ret = 0;
+ 
+@@ -445,7 +436,6 @@ int nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct,
+ 	}
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfacct_snprintf);
+ 
+ /**
+  * @}
+@@ -484,7 +474,7 @@ EXPORT_SYMBOL(nfacct_snprintf);
+  * - Command NFNL_MSG_ACCT_DEL, to delete one specific nfacct object (if
+  *   unused, otherwise you hit EBUSY).
+  */
+-struct nlmsghdr *
++struct nlmsghdr __EXPORT *
+ nfacct_nlmsg_build_hdr(char *buf, uint8_t cmd, uint16_t flags, uint32_t seq)
+ {
+ 	struct nlmsghdr *nlh;
+@@ -502,14 +492,13 @@ nfacct_nlmsg_build_hdr(char *buf, uint8_t cmd, uint16_t flags, uint32_t seq)
+ 
+ 	return nlh;
+ }
+-EXPORT_SYMBOL(nfacct_nlmsg_build_hdr);
+ 
+ /**
+  * nfacct_nlmsg_build_payload - build payload from accounting object
+  * \param nlh: netlink message that you want to use to add the payload.
+  * \param nfacct: pointer to a accounting object
+  */
+-void nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct)
++void __EXPORT nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct)
+ {
+ 	if (nfacct->bitset & (1 << NFACCT_ATTR_NAME))
+ 		mnl_attr_put_strz(nlh, NFACCT_NAME, nfacct->name);
+@@ -526,7 +515,6 @@ void nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct)
+ 	if (nfacct->bitset & (1 << NFACCT_ATTR_QUOTA))
+ 		mnl_attr_put_u64(nlh, NFACCT_QUOTA, htobe64(nfacct->quota));
+ }
+-EXPORT_SYMBOL(nfacct_nlmsg_build_payload);
+ 
+ static int nfacct_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data)
+ {
+@@ -563,7 +551,7 @@ static int nfacct_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data)
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int
++int __EXPORT
+ nfacct_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfacct *nfacct)
+ {
+ 	struct nlattr *tb[NFACCT_MAX+1] = {};
+@@ -589,7 +577,6 @@ nfacct_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfacct *nfacct)
+ 
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfacct_nlmsg_parse_payload);
+ 
+ /**
+  * @}
+-- 
+2.12.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch
new file mode 100644
index 0000000..aa9ff09
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch
@@ -0,0 +1,1227 @@
+From db7eb5f0a4e78c6bd3c4f9cbd8332d909eb82ad6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 10 Apr 2017 12:09:41 -0700
+Subject: [PATCH] Declare the define visivility attribute together
+
+clang ignores the visibility attribute if its not
+defined before the definition. As a result these
+symbols become hidden and consumers of this library
+fail to link due to these missing symbols
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ doxygen.cfg.in           |   2 +-
+ src/extra/ipv4.c         |  15 ++----
+ src/extra/ipv6.c         |   9 ++--
+ src/extra/pktbuff.c      |  42 +++++----------
+ src/extra/tcp.c          |  21 +++-----
+ src/extra/udp.c          |  21 +++-----
+ src/internal.h           |   5 +-
+ src/libnetfilter_queue.c | 108 +++++++++++++--------------------------
+ src/nlmsg.c              |  21 +++-----
+ 9 files changed, 82 insertions(+), 162 deletions(-)
+
+diff --git a/doxygen.cfg.in b/doxygen.cfg.in
+index a7378ca..659abee 100644
+--- a/doxygen.cfg.in
++++ b/doxygen.cfg.in
+@@ -72,7 +72,7 @@ RECURSIVE              = YES
+ EXCLUDE                = 
+ EXCLUDE_SYMLINKS       = NO
+ EXCLUDE_PATTERNS       = 
+-EXCLUDE_SYMBOLS        = EXPORT_SYMBOL
++EXCLUDE_SYMBOLS        =
+ EXAMPLE_PATH           = 
+ EXAMPLE_PATTERNS       = 
+ EXAMPLE_RECURSIVE      = NO
+diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c
+index a93d113..56d5dc7 100644
+--- a/src/extra/ipv4.c
++++ b/src/extra/ipv4.c
+@@ -32,7 +32,7 @@
+  * This funcion returns NULL if the IPv4 is malformed or the protocol version
+  * is not 4. On success, it returns a valid pointer to the IPv4 header.
+  */
+-struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb)
++struct iphdr __EXPORTED *nfq_ip_get_hdr(struct pkt_buff *pktb)
+ {
+ 	struct iphdr *iph;
+ 	unsigned int pktlen = pktb->tail - pktb->network_header;
+@@ -53,14 +53,13 @@ struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb)
+ 
+ 	return iph;
+ }
+-EXPORT_SYMBOL(nfq_ip_get_hdr);
+ 
+ /**
+  * nfq_ip_set_transport_header - set transport header
+  * \param pktb: pointer to network packet buffer
+  * \param iph: pointer to the IPv4 header
+  */
+-int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph)
++int __EXPORTED nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph)
+ {
+ 	int doff = iph->ihl * 4;
+ 
+@@ -71,7 +70,6 @@ int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph)
+ 	pktb->transport_header = pktb->network_header + doff;
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfq_ip_set_transport_header);
+ 
+ /**
+  * nfq_ip_set_checksum - set IPv4 checksum
+@@ -80,14 +78,13 @@ EXPORT_SYMBOL(nfq_ip_set_transport_header);
+  * \note Call to this function if you modified the IPv4 header to update the
+  * checksum.
+  */
+-void nfq_ip_set_checksum(struct iphdr *iph)
++void __EXPORTED nfq_ip_set_checksum(struct iphdr *iph)
+ {
+ 	uint32_t iph_len = iph->ihl * 4;
+ 
+ 	iph->check = 0;
+ 	iph->check = nfq_checksum(0, (uint16_t *)iph, iph_len);
+ }
+-EXPORT_SYMBOL(nfq_ip_set_checksum);
+ 
+ /**
+  * nfq_ip_mangle - mangle IPv4 packet buffer
+@@ -100,7 +97,7 @@ EXPORT_SYMBOL(nfq_ip_set_checksum);
+  *
+  * \note This function recalculates the IPv4 checksum (if needed).
+  */
+-int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff,
++int __EXPORTED nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff,
+ 		  unsigned int match_offset, unsigned int match_len,
+ 		  const char *rep_buffer, unsigned int rep_len)
+ {
+@@ -116,7 +113,6 @@ int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff,
+ 
+ 	return 1;
+ }
+-EXPORT_SYMBOL(nfq_ip_mangle);
+ 
+ /**
+  * nfq_pkt_snprintf_ip - print IPv4 header into buffer in iptables LOG format
+@@ -128,7 +124,7 @@ EXPORT_SYMBOL(nfq_ip_mangle);
+  * case that there is enough room in the buffer. Read snprintf manpage for more
+  * information to know more about this strange behaviour.
+  */
+-int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph)
++int __EXPORTED nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph)
+ {
+ 	int ret;
+ 	struct in_addr src = { iph->saddr };
+@@ -147,7 +143,6 @@ int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph)
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfq_ip_snprintf);
+ 
+ /**
+  * @}
+diff --git a/src/extra/ipv6.c b/src/extra/ipv6.c
+index 7c5dc9b..6641c6b 100644
+--- a/src/extra/ipv6.c
++++ b/src/extra/ipv6.c
+@@ -33,7 +33,7 @@
+  * This funcion returns NULL if an invalid header is found. On sucess, it
+  * returns a valid pointer to the header.
+  */
+-struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb)
++struct ip6_hdr __EXPORTED *nfq_ip6_get_hdr(struct pkt_buff *pktb)
+ {
+ 	struct ip6_hdr *ip6h;
+ 	unsigned int pktlen = pktb->tail - pktb->network_header;
+@@ -50,7 +50,6 @@ struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb)
+ 
+ 	return ip6h;
+ }
+-EXPORT_SYMBOL(nfq_ip6_get_hdr);
+ 
+ /**
+  * nfq_ip6_set_transport_header - set transport header pointer for IPv6 packet
+@@ -61,7 +60,7 @@ EXPORT_SYMBOL(nfq_ip6_get_hdr);
+  * This function returns 1 if the protocol has been found and the transport
+  * header has been set. Otherwise, it returns 0.
+  */
+-int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h,
++int __EXPORTED nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h,
+ 				 uint8_t target)
+ {
+ 	uint8_t nexthdr = ip6h->ip6_nxt;
+@@ -115,7 +114,6 @@ int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h,
+ 	pktb->transport_header = cur;
+ 	return cur ? 1 : 0;
+ }
+-EXPORT_SYMBOL(nfq_ip6_set_transport_header);
+ 
+ /**
+  * nfq_ip6_snprintf - print IPv6 header into one buffer in iptables LOG format
+@@ -124,7 +122,7 @@ EXPORT_SYMBOL(nfq_ip6_set_transport_header);
+  * \param ip6_hdr: pointer to a valid IPv6 header.
+  *
+  */
+-int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h)
++int __EXPORTED nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h)
+ {
+ 	int ret;
+ 	char src[INET6_ADDRSTRLEN];
+@@ -143,7 +141,6 @@ int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h)
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfq_ip6_snprintf);
+ 
+ /**
+  * @}
+diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c
+index 1c15a00..54d8244 100644
+--- a/src/extra/pktbuff.c
++++ b/src/extra/pktbuff.c
+@@ -40,7 +40,7 @@
+  *
+  * \return a pointer to a new queue handle or NULL on failure.
+  */
+-struct pkt_buff *
++struct pkt_buff __EXPORTED *
+ pktb_alloc(int family, void *data, size_t len, size_t extra)
+ {
+ 	struct pkt_buff *pktb;
+@@ -84,120 +84,108 @@ pktb_alloc(int family, void *data, size_t len, size_t extra)
+ 	}
+ 	return pktb;
+ }
+-EXPORT_SYMBOL(pktb_alloc);
+ 
+ /**
+  * pktb_data - return pointer to the beginning of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-uint8_t *pktb_data(struct pkt_buff *pktb)
++uint8_t __EXPORTED *pktb_data(struct pkt_buff *pktb)
+ {
+ 	return pktb->data;
+ }
+-EXPORT_SYMBOL(pktb_data);
+ 
+ /**
+  * pktb_len - return length of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-uint32_t pktb_len(struct pkt_buff *pktb)
++uint32_t __EXPORTED pktb_len(struct pkt_buff *pktb)
+ {
+ 	return pktb->len;
+ }
+-EXPORT_SYMBOL(pktb_len);
+ 
+ /**
+  * pktb_free - release packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-void pktb_free(struct pkt_buff *pktb)
++void __EXPORTED pktb_free(struct pkt_buff *pktb)
+ {
+ 	free(pktb);
+ }
+-EXPORT_SYMBOL(pktb_free);
+ 
+ /**
+  * pktb_push - update pointer to the beginning of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-void pktb_push(struct pkt_buff *pktb, unsigned int len)
++void __EXPORTED pktb_push(struct pkt_buff *pktb, unsigned int len)
+ {
+ 	pktb->data -= len;
+ 	pktb->len += len;
+ }
+-EXPORT_SYMBOL(pktb_push);
+ 
+ /**
+  * pktb_pull - update pointer to the beginning of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-void pktb_pull(struct pkt_buff *pktb, unsigned int len)
++void __EXPORTED pktb_pull(struct pkt_buff *pktb, unsigned int len)
+ {
+ 	pktb->data += len;
+ 	pktb->len -= len;
+ }
+-EXPORT_SYMBOL(pktb_pull);
+ 
+ /**
+  * pktb_put - add extra bytes to the tail of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-void pktb_put(struct pkt_buff *pktb, unsigned int len)
++void __EXPORTED pktb_put(struct pkt_buff *pktb, unsigned int len)
+ {
+ 	pktb->tail += len;
+ 	pktb->len += len;
+ }
+-EXPORT_SYMBOL(pktb_put);
+ 
+ /**
+  * pktb_trim - set new length for this packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-void pktb_trim(struct pkt_buff *pktb, unsigned int len)
++void __EXPORTED pktb_trim(struct pkt_buff *pktb, unsigned int len)
+ {
+ 	pktb->len = len;
+ }
+-EXPORT_SYMBOL(pktb_trim);
+ 
+ /**
+  * pktb_tailroom - get room in bytes in the tail of the packet buffer
+  * \param pktb Pointer to packet buffer
+  */
+-unsigned int pktb_tailroom(struct pkt_buff *pktb)
++unsigned int __EXPORTED pktb_tailroom(struct pkt_buff *pktb)
+ {
+ 	return pktb->data_len - pktb->len;
+ }
+-EXPORT_SYMBOL(pktb_tailroom);
+ 
+ /**
+  * pktb_mac_header - return pointer to layer 2 header (if any)
+  * \param pktb Pointer to packet buffer
+  */
+-uint8_t *pktb_mac_header(struct pkt_buff *pktb)
++uint8_t __EXPORTED *pktb_mac_header(struct pkt_buff *pktb)
+ {
+ 	return pktb->mac_header;
+ }
+-EXPORT_SYMBOL(pktb_mac_header);
+ 
+ /**
+  * pktb_network_header - return pointer to layer 3 header
+  * \param pktb Pointer to packet buffer
+  */
+-uint8_t *pktb_network_header(struct pkt_buff *pktb)
++uint8_t __EXPORTED *pktb_network_header(struct pkt_buff *pktb)
+ {
+ 	return pktb->network_header;
+ }
+-EXPORT_SYMBOL(pktb_network_header);
+ 
+ /**
+  * pktb_transport_header - return pointer to layer 4 header (if any)
+  * \param pktb Pointer to packet buffer
+  */
+-uint8_t *pktb_transport_header(struct pkt_buff *pktb)
++uint8_t __EXPORTED *pktb_transport_header(struct pkt_buff *pktb)
+ {
+ 	return pktb->transport_header;
+ }
+-EXPORT_SYMBOL(pktb_transport_header);
+ 
+ static int pktb_expand_tail(struct pkt_buff *pkt, int extra)
+ {
+@@ -224,7 +212,7 @@ static int enlarge_pkt(struct pkt_buff *pkt, unsigned int extra)
+ 	return 1;
+ }
+ 
+-int pktb_mangle(struct pkt_buff *pkt,
++int __EXPORTED pktb_mangle(struct pkt_buff *pkt,
+ 		 unsigned int dataoff,
+ 		 unsigned int match_offset,
+ 		 unsigned int match_len,
+@@ -258,17 +246,15 @@ int pktb_mangle(struct pkt_buff *pkt,
+ 	pkt->mangled = true;
+ 	return 1;
+ }
+-EXPORT_SYMBOL(pktb_mangle);
+ 
+ /**
+  * pktb_mangled - return true if packet has been mangled
+  * \param pktb Pointer to packet buffer
+  */
+-bool pktb_mangled(const struct pkt_buff *pkt)
++bool __EXPORTED pktb_mangled(const struct pkt_buff *pkt)
+ {
+ 	return pkt->mangled;
+ }
+-EXPORT_SYMBOL(pktb_mangled);
+ 
+ /**
+  * @}
+diff --git a/src/extra/tcp.c b/src/extra/tcp.c
+index d1cd79d..8038ce5 100644
+--- a/src/extra/tcp.c
++++ b/src/extra/tcp.c
+@@ -40,7 +40,7 @@
+  * \note You have to call nfq_ip_set_transport_header or
+  * nfq_ip6_set_transport_header first to access the TCP header.
+  */
+-struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb)
++struct tcphdr __EXPORTED *nfq_tcp_get_hdr(struct pkt_buff *pktb)
+ {
+ 	if (pktb->transport_header == NULL)
+ 		return NULL;
+@@ -51,14 +51,13 @@ struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb)
+ 
+ 	return (struct tcphdr *)pktb->transport_header;
+ }
+-EXPORT_SYMBOL(nfq_tcp_get_hdr);
+ 
+ /**
+  * nfq_tcp_get_payload - get the TCP packet payload
+  * \param tcph: pointer to the TCP header
+  * \param pktb: pointer to user-space network packet buffer
+  */
+-void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb)
++void __EXPORTED *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb)
+ {
+ 	unsigned int len = tcph->doff * 4;
+ 
+@@ -72,47 +71,43 @@ void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb)
+ 
+ 	return pktb->transport_header + len;
+ }
+-EXPORT_SYMBOL(nfq_tcp_get_payload);
+ 
+ /**
+  * nfq_tcp_get_payload_len - get the tcp packet payload
+  * \param tcph: pointer to the TCP header
+  * \param pktb: pointer to user-space network packet buffer
+  */
+-unsigned int
++unsigned int __EXPORTED
+ nfq_tcp_get_payload_len(struct tcphdr *tcph, struct pkt_buff *pktb)
+ {
+ 	return pktb->tail - pktb->transport_header;
+ }
+-EXPORT_SYMBOL(nfq_tcp_get_payload_len);
+ 
+ /**
+  * nfq_tcp_set_checksum_ipv4 - computes IPv4/TCP packet checksum
+  * \param tcph: pointer to the TCP header
+  * \param iph: pointer to the IPv4 header
+  */
+-void
++void __EXPORTED
+ nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph)
+ {
+ 	/* checksum field in header needs to be zero for calculation. */
+ 	tcph->check = 0;
+ 	tcph->check = nfq_checksum_tcpudp_ipv4(iph);
+ }
+-EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4);
+ 
+ /**
+  * nfq_tcp_set_checksum_ipv6 - computes IPv6/TCP packet checksum
+  * \param tcph: pointer to the TCP header
+  * \param iph: pointer to the IPv6 header
+  */
+-void
++void __EXPORTED
+ nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h)
+ {
+ 	/* checksum field in header needs to be zero for calculation. */
+ 	tcph->check = 0;
+ 	tcph->check = nfq_checksum_tcpudp_ipv6(ip6h, tcph);
+ }
+-EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv6);
+ 
+ /*
+  *	The union cast uses a gcc extension to avoid aliasing problems
+@@ -134,7 +129,7 @@ union tcp_word_hdr {
+  * \param tcp: pointer to a valid tcp header.
+  *
+  */
+-int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph)
++int __EXPORTED nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph)
+ {
+ 	int ret, len = 0;
+ 
+@@ -177,7 +172,6 @@ int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph)
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfq_tcp_snprintf);
+ 
+ /**
+  * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer
+@@ -189,7 +183,7 @@ EXPORT_SYMBOL(nfq_tcp_snprintf);
+  *
+  * \note This function recalculates the IPv4 and TCP checksums for you.
+  */
+-int
++int __EXPORTED
+ nfq_tcp_mangle_ipv4(struct pkt_buff *pkt,
+ 		    unsigned int match_offset, unsigned int match_len,
+ 		    const char *rep_buffer, unsigned int rep_len)
+@@ -208,7 +202,6 @@ nfq_tcp_mangle_ipv4(struct pkt_buff *pkt,
+ 
+ 	return 1;
+ }
+-EXPORT_SYMBOL(nfq_tcp_mangle_ipv4);
+ 
+ /**
+  * @}
+diff --git a/src/extra/udp.c b/src/extra/udp.c
+index 8c44a66..99c8faa 100644
+--- a/src/extra/udp.c
++++ b/src/extra/udp.c
+@@ -37,7 +37,7 @@
+  * This function returns NULL if invalid UDP header is found. On success,
+  * it returns the UDP header.
+  */
+-struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb)
++struct udphdr __EXPORTED *nfq_udp_get_hdr(struct pkt_buff *pktb)
+ {
+ 	if (pktb->transport_header == NULL)
+ 		return NULL;
+@@ -48,14 +48,13 @@ struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb)
+ 
+ 	return (struct udphdr *)pktb->transport_header;
+ }
+-EXPORT_SYMBOL(nfq_udp_get_hdr);
+ 
+ /**
+  * nfq_udp_get_payload - get the UDP packet payload.
+  * \param udph: the pointer to the UDP header.
+  * \param tail: pointer to the tail of the packet
+  */
+-void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb)
++void __EXPORTED *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb)
+ {
+ 	uint16_t len = ntohs(udph->len);
+ 
+@@ -69,17 +68,15 @@ void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb)
+ 
+ 	return pktb->transport_header + sizeof(struct udphdr);
+ }
+-EXPORT_SYMBOL(nfq_udp_get_payload);
+ 
+ /**
+  * nfq_udp_get_payload_len - get the udp packet payload.
+  * \param udp: the pointer to the udp header.
+  */
+-unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb)
++unsigned int __EXPORTED nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb)
+ {
+ 	return pktb->tail - pktb->transport_header;
+ }
+-EXPORT_SYMBOL(nfq_udp_get_payload_len);
+ 
+ /**
+  * nfq_udp_set_checksum_ipv4 - computes a IPv4/TCP packet's segment
+@@ -91,14 +88,13 @@ EXPORT_SYMBOL(nfq_udp_get_payload_len);
+  * \see nfq_pkt_compute_ip_checksum
+  * \see nfq_pkt_compute_udp_checksum
+  */
+-void
++void __EXPORTED
+ nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph)
+ {
+ 	/* checksum field in header needs to be zero for calculation. */
+ 	udph->check = 0;
+ 	udph->check = nfq_checksum_tcpudp_ipv4(iph);
+ }
+-EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4);
+ 
+ /**
+  * nfq_udp_set_checksum_ipv6 - computes a IPv6/TCP packet's segment
+@@ -110,14 +106,13 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4);
+  * \see nfq_pkt_compute_ip_checksum
+  * \see nfq_pkt_compute_udp_checksum
+  */
+-void
++void __EXPORTED
+ nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h)
+ {
+ 	/* checksum field in header needs to be zero for calculation. */
+ 	udph->check = 0;
+ 	udph->check = nfq_checksum_tcpudp_ipv6(ip6h, udph);
+ }
+-EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6);
+ 
+ /**
+  * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer
+@@ -129,7 +124,7 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6);
+  *
+  * \note This function recalculates the IPv4 and TCP checksums for you.
+  */
+-int
++int __EXPORTED
+ nfq_udp_mangle_ipv4(struct pkt_buff *pkt,
+ 		    unsigned int match_offset, unsigned int match_len,
+ 		    const char *rep_buffer, unsigned int rep_len)
+@@ -148,7 +143,6 @@ nfq_udp_mangle_ipv4(struct pkt_buff *pkt,
+ 
+ 	return 1;
+ }
+-EXPORT_SYMBOL(nfq_udp_mangle_ipv4);
+ 
+ /**
+  * nfq_pkt_snprintf_udp_hdr - print udp header into one buffer in a humnan
+@@ -158,12 +152,11 @@ EXPORT_SYMBOL(nfq_udp_mangle_ipv4);
+  * \param udp: pointer to a valid udp header.
+  *
+  */
+-int nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph)
++int __EXPORTED nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph)
+ {
+ 	return snprintf(buf, size, "SPT=%u DPT=%u ",
+ 			htons(udph->source), htons(udph->dest));
+ }
+-EXPORT_SYMBOL(nfq_udp_snprintf);
+ 
+ /**
+  * @}
+diff --git a/src/internal.h b/src/internal.h
+index 558d267..79b0752 100644
+--- a/src/internal.h
++++ b/src/internal.h
+@@ -5,10 +5,9 @@
+ #include <stdint.h>
+ #include <stdbool.h>
+ #ifdef HAVE_VISIBILITY_HIDDEN
+-#	define __visible	__attribute__((visibility("default")))
+-#	define EXPORT_SYMBOL(x)	typeof(x) (x) __visible
++#	define __EXPORTED	__attribute__((visibility("default")))
+ #else
+-#	define EXPORT_SYMBOL
++#	define __EXPORTED
+ #endif
+ 
+ struct iphdr;
+diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
+index 673e3b0..c12f068 100644
+--- a/src/libnetfilter_queue.c
++++ b/src/libnetfilter_queue.c
+@@ -133,8 +133,7 @@ struct nfq_data {
+ 	struct nfattr **data;
+ };
+ 
+-int nfq_errno;
+-EXPORT_SYMBOL(nfq_errno);
++int __EXPORTED nfq_errno;
+ 
+ /***********************************************************************
+  * low level stuff 
+@@ -218,11 +217,10 @@ static int __nfq_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[],
+ 
+ /* public interface */
+ 
+-struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h)
++struct nfnl_handle __EXPORTED *nfq_nfnlh(struct nfq_handle *h)
+ {
+ 	return h->nfnlh;
+ }
+-EXPORT_SYMBOL(nfq_nfnlh);
+ 
+ /**
+  *
+@@ -294,11 +292,10 @@ EXPORT_SYMBOL(nfq_nfnlh);
+  * over the netlink connection associated with the given queue connection
+  * handle.
+  */
+-int nfq_fd(struct nfq_handle *h)
++int __EXPORTED nfq_fd(struct nfq_handle *h)
+ {
+ 	return nfnl_fd(nfq_nfnlh(h));
+ }
+-EXPORT_SYMBOL(nfq_fd);
+ /**
+  * @}
+  */
+@@ -349,7 +346,7 @@ EXPORT_SYMBOL(nfq_fd);
+  *
+  * \return a pointer to a new queue handle or NULL on failure.
+  */
+-struct nfq_handle *nfq_open(void)
++struct nfq_handle __EXPORTED *nfq_open(void)
+ {
+ 	struct nfnl_handle *nfnlh = nfnl_open();
+ 	struct nfq_handle *qh;
+@@ -366,7 +363,6 @@ struct nfq_handle *nfq_open(void)
+ 
+ 	return qh;
+ }
+-EXPORT_SYMBOL(nfq_open);
+ 
+ /**
+  * @}
+@@ -382,7 +378,7 @@ EXPORT_SYMBOL(nfq_open);
+  *
+  * \return a pointer to a new queue handle or NULL on failure.
+  */
+-struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh)
++struct nfq_handle __EXPORTED *nfq_open_nfnl(struct nfnl_handle *nfnlh)
+ {
+ 	struct nfnl_callback pkt_cb = {
+ 		.call		= __nfq_rcv_pkt,
+@@ -419,7 +415,6 @@ out_free:
+ 	free(h);
+ 	return NULL;
+ }
+-EXPORT_SYMBOL(nfq_open_nfnl);
+ 
+ /**
+  * \addtogroup LibrarySetup
+@@ -438,7 +433,7 @@ EXPORT_SYMBOL(nfq_open_nfnl);
+  *
+  * \return 0 on success, non-zero on failure. 
+  */
+-int nfq_close(struct nfq_handle *h)
++int __EXPORTED nfq_close(struct nfq_handle *h)
+ {
+ 	int ret;
+ 	
+@@ -447,7 +442,6 @@ int nfq_close(struct nfq_handle *h)
+ 		free(h);
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfq_close);
+ 
+ /**
+  * nfq_bind_pf - bind a nfqueue handler to a given protocol family
+@@ -460,11 +454,10 @@ EXPORT_SYMBOL(nfq_close);
+  *
+  * \return integer inferior to 0 in case of failure
+  */
+-int nfq_bind_pf(struct nfq_handle *h, uint16_t pf)
++int __EXPORTED nfq_bind_pf(struct nfq_handle *h, uint16_t pf)
+ {
+ 	return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_BIND, 0, pf);
+ }
+-EXPORT_SYMBOL(nfq_bind_pf);
+ 
+ /**
+  * nfq_unbind_pf - unbind nfqueue handler from a protocol family
+@@ -476,11 +469,10 @@ EXPORT_SYMBOL(nfq_bind_pf);
+  *
+  * This call is obsolete, Linux kernels from 3.8 onwards ignore it.
+  */
+-int nfq_unbind_pf(struct nfq_handle *h, uint16_t pf)
++int __EXPORTED nfq_unbind_pf(struct nfq_handle *h, uint16_t pf)
+ {
+ 	return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_UNBIND, 0, pf);
+ }
+-EXPORT_SYMBOL(nfq_unbind_pf);
+ 
+ 
+ /**
+@@ -524,7 +516,7 @@ typedef int nfq_callback(struct nfq_q_handle *qh,
+  * The callback should return < 0 to stop processing.
+  */
+ 
+-struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h, 
++struct nfq_q_handle __EXPORTED *nfq_create_queue(struct nfq_handle *h, 
+ 		uint16_t num,
+ 		nfq_callback *cb,
+ 		void *data)
+@@ -555,7 +547,6 @@ struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h,
+ 	add_qh(qh);
+ 	return qh;
+ }
+-EXPORT_SYMBOL(nfq_create_queue);
+ 
+ /**
+  * @}
+@@ -573,7 +564,7 @@ EXPORT_SYMBOL(nfq_create_queue);
+  * Removes the binding for the specified queue handle. This call also unbind
+  * from the nfqueue handler, so you don't have to call nfq_unbind_pf.
+  */
+-int nfq_destroy_queue(struct nfq_q_handle *qh)
++int __EXPORTED nfq_destroy_queue(struct nfq_q_handle *qh)
+ {
+ 	int ret = __build_send_cfg_msg(qh->h, NFQNL_CFG_CMD_UNBIND, qh->id, 0);
+ 	if (ret == 0) {
+@@ -583,7 +574,6 @@ int nfq_destroy_queue(struct nfq_q_handle *qh)
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfq_destroy_queue);
+ 
+ /**
+  * nfq_handle_packet - handle a packet received from the nfqueue subsystem
+@@ -597,11 +587,10 @@ EXPORT_SYMBOL(nfq_destroy_queue);
+  *
+  * \return 0 on success, non-zero on failure.
+  */
+-int nfq_handle_packet(struct nfq_handle *h, char *buf, int len)
++int __EXPORTED nfq_handle_packet(struct nfq_handle *h, char *buf, int len)
+ {
+ 	return nfnl_handle_packet(h->nfnlh, buf, len);
+ }
+-EXPORT_SYMBOL(nfq_handle_packet);
+ 
+ /**
+  * nfq_set_mode - set the amount of packet data that nfqueue copies to userspace
+@@ -618,7 +607,7 @@ EXPORT_SYMBOL(nfq_handle_packet);
+  *
+  * \return -1 on error; >=0 otherwise.
+  */
+-int nfq_set_mode(struct nfq_q_handle *qh,
++int __EXPORTED nfq_set_mode(struct nfq_q_handle *qh,
+ 		uint8_t mode, uint32_t range)
+ {
+ 	union {
+@@ -638,7 +627,6 @@ int nfq_set_mode(struct nfq_q_handle *qh,
+ 
+ 	return nfnl_query(qh->h->nfnlh, &u.nmh);
+ }
+-EXPORT_SYMBOL(nfq_set_mode);
+ 
+ /**
+  * nfq_set_queue_flags - set flags (options) for the kernel queue
+@@ -708,7 +696,7 @@ EXPORT_SYMBOL(nfq_set_mode);
+  *
+  * \return -1 on error with errno set appropriately; =0 otherwise.
+  */
+-int nfq_set_queue_flags(struct nfq_q_handle *qh,
++int __EXPORTED nfq_set_queue_flags(struct nfq_q_handle *qh,
+ 			uint32_t mask, uint32_t flags)
+ {
+ 	union {
+@@ -729,7 +717,6 @@ int nfq_set_queue_flags(struct nfq_q_handle *qh,
+ 
+ 	return nfnl_query(qh->h->nfnlh, &u.nmh);
+ }
+-EXPORT_SYMBOL(nfq_set_queue_flags);
+ 
+ /**
+  * nfq_set_queue_maxlen - Set kernel queue maximum length parameter
+@@ -742,7 +729,7 @@ EXPORT_SYMBOL(nfq_set_queue_flags);
+  *
+  * \return -1 on error; >=0 otherwise.
+  */
+-int nfq_set_queue_maxlen(struct nfq_q_handle *qh,
++int __EXPORTED nfq_set_queue_maxlen(struct nfq_q_handle *qh,
+ 				uint32_t queuelen)
+ {
+ 	union {
+@@ -760,7 +747,6 @@ int nfq_set_queue_maxlen(struct nfq_q_handle *qh,
+ 
+ 	return nfnl_query(qh->h->nfnlh, &u.nmh);
+ }
+-EXPORT_SYMBOL(nfq_set_queue_maxlen);
+ 
+ /**
+  * @}
+@@ -847,14 +833,13 @@ static int __set_verdict(struct nfq_q_handle *qh, uint32_t id,
+  *
+  * \return -1 on error; >= 0 otherwise.
+  */
+-int nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id,
++int __EXPORTED nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id,
+ 		uint32_t verdict, uint32_t data_len,
+ 		const unsigned char *buf)
+ {
+ 	return __set_verdict(qh, id, verdict, 0, 0, data_len, buf,
+ 						NFQNL_MSG_VERDICT);
+ }
+-EXPORT_SYMBOL(nfq_set_verdict);
+ 
+ /**
+  * nfq_set_verdict2 - like nfq_set_verdict, but you can set the mark.
+@@ -865,14 +850,13 @@ EXPORT_SYMBOL(nfq_set_verdict);
+  * \param data_len number of bytes of data pointed to by #buf
+  * \param buf the buffer that contains the packet data
+  */
+-int nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id,
++int __EXPORTED nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id,
+ 		     uint32_t verdict, uint32_t mark,
+ 		     uint32_t data_len, const unsigned char *buf)
+ {
+ 	return __set_verdict(qh, id, verdict, htonl(mark), 1, data_len,
+ 						buf, NFQNL_MSG_VERDICT);
+ }
+-EXPORT_SYMBOL(nfq_set_verdict2);
+ 
+ /**
+  * nfq_set_verdict_batch - issue verdicts on several packets at once
+@@ -886,13 +870,12 @@ EXPORT_SYMBOL(nfq_set_verdict2);
+  * batch support was added in Linux 3.1.
+  * These functions will fail silently on older kernels.
+  */
+-int nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id,
++int __EXPORTED nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id,
+ 					  uint32_t verdict)
+ {
+ 	return __set_verdict(qh, id, verdict, 0, 0, 0, NULL,
+ 					NFQNL_MSG_VERDICT_BATCH);
+ }
+-EXPORT_SYMBOL(nfq_set_verdict_batch);
+ 
+ /**
+  * nfq_set_verdict_batch2 - like nfq_set_verdict_batch, but you can set a mark.
+@@ -901,13 +884,12 @@ EXPORT_SYMBOL(nfq_set_verdict_batch);
+  * \param verdict verdict to return to netfilter (NF_ACCEPT, NF_DROP)
+  * \param mark mark to put on packet
+  */
+-int nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id,
++int __EXPORTED nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id,
+ 		     uint32_t verdict, uint32_t mark)
+ {
+ 	return __set_verdict(qh, id, verdict, htonl(mark), 1, 0,
+ 				NULL, NFQNL_MSG_VERDICT_BATCH);
+ }
+-EXPORT_SYMBOL(nfq_set_verdict_batch2);
+ 
+ /**
+  * nfq_set_verdict_mark - like nfq_set_verdict, but you can set the mark.
+@@ -923,14 +905,13 @@ EXPORT_SYMBOL(nfq_set_verdict_batch2);
+  * This function is deprecated since it is broken, its use is highly
+  * discouraged. Please, use nfq_set_verdict2 instead.
+  */
+-int nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id,
++int __EXPORTED nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id,
+ 		uint32_t verdict, uint32_t mark,
+ 		uint32_t data_len, const unsigned char *buf)
+ {
+ 	return __set_verdict(qh, id, verdict, mark, 1, data_len, buf,
+ 						NFQNL_MSG_VERDICT);
+ }
+-EXPORT_SYMBOL(nfq_set_verdict_mark);
+ 
+ /**
+  * @}
+@@ -965,12 +946,11 @@ EXPORT_SYMBOL(nfq_set_verdict_mark);
+ 	} __attribute__ ((packed));
+ \endverbatim
+  */
+-struct nfqnl_msg_packet_hdr *nfq_get_msg_packet_hdr(struct nfq_data *nfad)
++struct nfqnl_msg_packet_hdr __EXPORTED *nfq_get_msg_packet_hdr(struct nfq_data *nfad)
+ {
+ 	return nfnl_get_pointer_to_data(nfad->data, NFQA_PACKET_HDR,
+ 					struct nfqnl_msg_packet_hdr);
+ }
+-EXPORT_SYMBOL(nfq_get_msg_packet_hdr);
+ 
+ /**
+  * nfq_get_nfmark - get the packet mark
+@@ -978,11 +958,10 @@ EXPORT_SYMBOL(nfq_get_msg_packet_hdr);
+  *
+  * \return the netfilter mark currently assigned to the given queued packet.
+  */
+-uint32_t nfq_get_nfmark(struct nfq_data *nfad)
++uint32_t __EXPORTED nfq_get_nfmark(struct nfq_data *nfad)
+ {
+ 	return ntohl(nfnl_get_data(nfad->data, NFQA_MARK, uint32_t));
+ }
+-EXPORT_SYMBOL(nfq_get_nfmark);
+ 
+ /**
+  * nfq_get_timestamp - get the packet timestamp
+@@ -993,7 +972,7 @@ EXPORT_SYMBOL(nfq_get_nfmark);
+  *
+  * \return 0 on success, non-zero on failure.
+  */
+-int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv)
++int __EXPORTED nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv)
+ {
+ 	struct nfqnl_msg_packet_timestamp *qpt;
+ 	qpt = nfnl_get_pointer_to_data(nfad->data, NFQA_TIMESTAMP,
+@@ -1006,7 +985,6 @@ int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv)
+ 
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfq_get_timestamp);
+ 
+ /**
+  * nfq_get_indev - get the interface that the packet was received through
+@@ -1019,11 +997,10 @@ EXPORT_SYMBOL(nfq_get_timestamp);
+  * \warning all nfq_get_dev() functions return 0 if not set, since linux
+  * only allows ifindex >= 1, see net/core/dev.c:2600  (in 2.6.13.1)
+  */
+-uint32_t nfq_get_indev(struct nfq_data *nfad)
++uint32_t __EXPORTED nfq_get_indev(struct nfq_data *nfad)
+ {
+ 	return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_INDEV, uint32_t));
+ }
+-EXPORT_SYMBOL(nfq_get_indev);
+ 
+ /**
+  * nfq_get_physindev - get the physical interface that the packet was received
+@@ -1033,11 +1010,10 @@ EXPORT_SYMBOL(nfq_get_indev);
+  * If the returned index is 0, the packet was locally generated or the
+  * physical input interface is no longer known (ie. POSTROUTING?).
+  */
+-uint32_t nfq_get_physindev(struct nfq_data *nfad)
++uint32_t __EXPORTED nfq_get_physindev(struct nfq_data *nfad)
+ {
+ 	return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSINDEV, uint32_t));
+ }
+-EXPORT_SYMBOL(nfq_get_physindev);
+ 
+ /**
+  * nfq_get_outdev - gets the interface that the packet will be routed out
+@@ -1047,11 +1023,10 @@ EXPORT_SYMBOL(nfq_get_physindev);
+  * returned index is 0, the packet is destined for localhost or the output
+  * interface is not yet known (ie. PREROUTING?).
+  */
+-uint32_t nfq_get_outdev(struct nfq_data *nfad)
++uint32_t __EXPORTED nfq_get_outdev(struct nfq_data *nfad)
+ {
+ 	return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_OUTDEV, uint32_t));
+ }
+-EXPORT_SYMBOL(nfq_get_outdev);
+ 
+ /**
+  * nfq_get_physoutdev - get the physical interface that the packet output
+@@ -1063,11 +1038,10 @@ EXPORT_SYMBOL(nfq_get_outdev);
+  * 
+  * \return The index of physical interface that the packet output will be routed out.
+  */
+-uint32_t nfq_get_physoutdev(struct nfq_data *nfad)
++uint32_t __EXPORTED nfq_get_physoutdev(struct nfq_data *nfad)
+ {
+ 	return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSOUTDEV, uint32_t));
+ }
+-EXPORT_SYMBOL(nfq_get_physoutdev);
+ 
+ /**
+  * nfq_get_indev_name - get the name of the interface the packet
+@@ -1107,13 +1081,12 @@ EXPORT_SYMBOL(nfq_get_physoutdev);
+ \endverbatim
+  *
+  */
+-int nfq_get_indev_name(struct nlif_handle *nlif_handle,
++int __EXPORTED nfq_get_indev_name(struct nlif_handle *nlif_handle,
+ 			struct nfq_data *nfad, char *name)
+ {
+ 	uint32_t ifindex = nfq_get_indev(nfad);
+ 	return nlif_index2name(nlif_handle, ifindex, name);
+ }
+-EXPORT_SYMBOL(nfq_get_indev_name);
+ 
+ /**
+  * nfq_get_physindev_name - get the name of the physical interface the
+@@ -1127,13 +1100,12 @@ EXPORT_SYMBOL(nfq_get_indev_name);
+  *
+  * \return  -1 in case of error, > 0 if it succeed. 
+  */
+-int nfq_get_physindev_name(struct nlif_handle *nlif_handle,
++int __EXPORTED nfq_get_physindev_name(struct nlif_handle *nlif_handle,
+ 			   struct nfq_data *nfad, char *name)
+ {
+ 	uint32_t ifindex = nfq_get_physindev(nfad);
+ 	return nlif_index2name(nlif_handle, ifindex, name);
+ }
+-EXPORT_SYMBOL(nfq_get_physindev_name);
+ 
+ /**
+  * nfq_get_outdev_name - get the name of the physical interface the
+@@ -1147,13 +1119,12 @@ EXPORT_SYMBOL(nfq_get_physindev_name);
+  *
+  * \return  -1 in case of error, > 0 if it succeed. 
+  */
+-int nfq_get_outdev_name(struct nlif_handle *nlif_handle,
++int __EXPORTED nfq_get_outdev_name(struct nlif_handle *nlif_handle,
+ 			struct nfq_data *nfad, char *name)
+ {
+ 	uint32_t ifindex = nfq_get_outdev(nfad);
+ 	return nlif_index2name(nlif_handle, ifindex, name);
+ }
+-EXPORT_SYMBOL(nfq_get_outdev_name);
+ 
+ /**
+  * nfq_get_physoutdev_name - get the name of the interface the
+@@ -1168,13 +1139,12 @@ EXPORT_SYMBOL(nfq_get_outdev_name);
+  * \return  -1 in case of error, > 0 if it succeed. 
+  */
+ 
+-int nfq_get_physoutdev_name(struct nlif_handle *nlif_handle,
++int __EXPORTED nfq_get_physoutdev_name(struct nlif_handle *nlif_handle,
+ 			    struct nfq_data *nfad, char *name)
+ {
+ 	uint32_t ifindex = nfq_get_physoutdev(nfad);
+ 	return nlif_index2name(nlif_handle, ifindex, name);
+ }
+-EXPORT_SYMBOL(nfq_get_physoutdev_name);
+ 
+ /**
+  * nfq_get_packet_hw
+@@ -1198,12 +1168,11 @@ EXPORT_SYMBOL(nfq_get_physoutdev_name);
+ 	} __attribute__ ((packed));
+ \endverbatim
+  */
+-struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad)
++struct nfqnl_msg_packet_hw __EXPORTED *nfq_get_packet_hw(struct nfq_data *nfad)
+ {
+ 	return nfnl_get_pointer_to_data(nfad->data, NFQA_HWADDR,
+ 					struct nfqnl_msg_packet_hw);
+ }
+-EXPORT_SYMBOL(nfq_get_packet_hw);
+ 
+ /**
+  * nfq_get_uid - get the UID of the user the packet belongs to
+@@ -1215,7 +1184,7 @@ EXPORT_SYMBOL(nfq_get_packet_hw);
+  *
+  * \return 1 if there is a UID available, 0 otherwise.
+  */
+-int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid)
++int __EXPORTED nfq_get_uid(struct nfq_data *nfad, uint32_t *uid)
+ {
+ 	if (!nfnl_attr_present(nfad->data, NFQA_UID))
+ 		return 0;
+@@ -1223,7 +1192,6 @@ int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid)
+ 	*uid = ntohl(nfnl_get_data(nfad->data, NFQA_UID, uint32_t));
+ 	return 1;
+ }
+-EXPORT_SYMBOL(nfq_get_uid);
+ 
+ /**
+  * nfq_get_gid - get the GID of the user the packet belongs to
+@@ -1235,7 +1203,7 @@ EXPORT_SYMBOL(nfq_get_uid);
+  *
+  * \return 1 if there is a GID available, 0 otherwise.
+  */
+-int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid)
++int __EXPORTED nfq_get_gid(struct nfq_data *nfad, uint32_t *gid)
+ {
+ 	if (!nfnl_attr_present(nfad->data, NFQA_GID))
+ 		return 0;
+@@ -1243,7 +1211,6 @@ int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid)
+ 	*gid = ntohl(nfnl_get_data(nfad->data, NFQA_GID, uint32_t));
+ 	return 1;
+ }
+-EXPORT_SYMBOL(nfq_get_gid);
+ 
+ /**
+  * nfq_get_secctx - get the security context for this packet
+@@ -1256,7 +1223,7 @@ EXPORT_SYMBOL(nfq_get_gid);
+  *
+  * \return -1 on error, otherwise > 0
+  */
+-int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata)
++int __EXPORTED nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata)
+ {
+ 	if (!nfnl_attr_present(nfad->data, NFQA_SECCTX))
+ 		return -1;
+@@ -1269,7 +1236,6 @@ int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata)
+ 
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfq_get_secctx);
+ 
+ /**
+  * nfq_get_payload - get payload 
+@@ -1282,7 +1248,7 @@ EXPORT_SYMBOL(nfq_get_secctx);
+  *
+  * \return -1 on error, otherwise > 0.
+  */
+-int nfq_get_payload(struct nfq_data *nfad, unsigned char **data)
++int __EXPORTED nfq_get_payload(struct nfq_data *nfad, unsigned char **data)
+ {
+ 	*data = (unsigned char *)
+ 		nfnl_get_pointer_to_data(nfad->data, NFQA_PAYLOAD, char);
+@@ -1291,7 +1257,6 @@ int nfq_get_payload(struct nfq_data *nfad, unsigned char **data)
+ 
+ 	return -1;
+ }
+-EXPORT_SYMBOL(nfq_get_payload);
+ 
+ /**
+  * @}
+@@ -1336,7 +1301,7 @@ do {								\
+  * would have been printed into the buffer (in case that there is enough
+  * room in it). See snprintf() return value for more information.
+  */
+-int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags)
++int __EXPORTED nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags)
+ {
+ 	struct nfqnl_msg_packet_hdr *ph;
+ 	struct nfqnl_msg_packet_hw *hwph;
+@@ -1489,7 +1454,6 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags)
+ 
+ 	return len;
+ }
+-EXPORT_SYMBOL(nfq_snprintf_xml);
+ 
+ /**
+  * @}
+diff --git a/src/nlmsg.c b/src/nlmsg.c
+index ba28c77..5582407 100644
+--- a/src/nlmsg.c
++++ b/src/nlmsg.c
+@@ -30,7 +30,7 @@
+  * @{
+  */
+ 
+-void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
++void __EXPORTED nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
+ {
+ 	struct nfqnl_msg_verdict_hdr vh = {
+ 		.verdict	= htonl(verdict),
+@@ -38,20 +38,17 @@ void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict)
+ 	};
+ 	mnl_attr_put(nlh, NFQA_VERDICT_HDR, sizeof(vh), &vh);
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_verdict_put);
+ 
+-void nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark)
++void __EXPORTED nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark)
+ {
+ 	mnl_attr_put_u32(nlh, NFQA_MARK, htonl(mark));
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_mark);
+ 
+-void
++void __EXPORTED
+ nfq_nlmsg_verdict_put_pkt(struct nlmsghdr *nlh, const void *pkt, uint32_t plen)
+ {
+ 	mnl_attr_put(nlh, NFQA_PAYLOAD, plen, pkt);
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt);
+ 
+ /**
+  * @}
+@@ -85,7 +82,7 @@ EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt);
+  *   given protocol family.  Both commands are ignored by Linux kernel 3.8 and
+  *   later versions.
+  */
+-void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
++void __EXPORTED nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
+ {
+ 	struct nfqnl_msg_config_cmd command = {
+ 		.command = cmd,
+@@ -93,9 +90,8 @@ void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
+ 	};
+ 	mnl_attr_put(nlh, NFQA_CFG_CMD, sizeof(command), &command);
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_cmd);
+ 
+-void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
++void __EXPORTED nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
+ {
+ 	struct nfqnl_msg_config_params params = {
+ 		.copy_range = htonl(range),
+@@ -103,13 +99,11 @@ void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range)
+ 	};
+ 	mnl_attr_put(nlh, NFQA_CFG_PARAMS, sizeof(params), &params);
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_params);
+ 
+-void nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen)
++void __EXPORTED nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen)
+ {
+ 	mnl_attr_put_u32(nlh, NFQA_CFG_QUEUE_MAXLEN, htonl(queue_maxlen));
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_qmaxlen);
+ 
+ /**
+  * @}
+@@ -179,12 +173,11 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data)
+  * This function returns MNL_CB_ERROR if any error occurs, or MNL_CB_OK on
+  * success.
+  */
+-int nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr)
++int __EXPORTED nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr)
+ {
+ 	return mnl_attr_parse(nlh, sizeof(struct nfgenmsg),
+ 			      nfq_pkt_parse_attr_cb, attr);
+ }
+-EXPORT_SYMBOL(nfq_nlmsg_parse);
+ 
+ /**
+  * @}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch
new file mode 100644
index 0000000..e717d5b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch
@@ -0,0 +1,382 @@
+From f58c5b09fb59baf07c942d373fc4d522b27e73c6 Mon Sep 17 00:00:00 2001
+From: Kevin Cernekee <cernekee@chromium.org>
+Date: Wed, 4 Jan 2017 14:30:26 -0800
+Subject: Use __EXPORTED rather than EXPORT_SYMBOL
+
+clang is sensitive to the ordering of
+__attribute__((visibility("default"))) relative to the function
+body.  gcc is not.  So if we try to re-declare an existing function
+with default visibility, clang prints a warning and generates
+a broken .so file in which nfct_helper_* are not exported to library
+callers.
+
+Move the attribute up into the function definition to make clang happy.
+
+Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ doxygen.cfg.in              |  2 +-
+ src/internal.h              |  5 ++-
+ src/libnetfilter_cthelper.c | 83 ++++++++++++++++++---------------------------
+ 3 files changed, 36 insertions(+), 54 deletions(-)
+
+Index: libnetfilter_cthelper-1.0.0/doxygen.cfg.in
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/doxygen.cfg.in
++++ libnetfilter_cthelper-1.0.0/doxygen.cfg.in
+@@ -72,7 +72,7 @@ RECURSIVE              = YES
+ EXCLUDE                = 
+ EXCLUDE_SYMLINKS       = NO
+ EXCLUDE_PATTERNS       = */.git/* .*.d
+-EXCLUDE_SYMBOLS        = EXPORT_SYMBOL
++EXCLUDE_SYMBOLS        = 
+ EXAMPLE_PATH           = 
+ EXAMPLE_PATTERNS       = 
+ EXAMPLE_RECURSIVE      = NO
+Index: libnetfilter_cthelper-1.0.0/src/internal.h
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/src/internal.h
++++ libnetfilter_cthelper-1.0.0/src/internal.h
+@@ -3,10 +3,9 @@
+ 
+ #include "config.h"
+ #ifdef HAVE_VISIBILITY_HIDDEN
+-#	define __visible	__attribute__((visibility("default")))
+-#	define EXPORT_SYMBOL(x)	typeof(x) (x) __visible
++#	define __EXPORTED	__attribute__((visibility("default")))
+ #else
+-#	define EXPORT_SYMBOL
++#	define __EXPORTED
+ #endif
+ 
+ #endif
+Index: libnetfilter_cthelper-1.0.0/src/libnetfilter_cthelper.c
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/src/libnetfilter_cthelper.c
++++ libnetfilter_cthelper-1.0.0/src/libnetfilter_cthelper.c
+@@ -99,17 +99,16 @@ struct nfct_helper {
+  * In case of success, this function returns a valid pointer, otherwise NULL
+  * s returned and errno is appropriately set.
+  */
+-struct nfct_helper *nfct_helper_alloc(void)
++struct nfct_helper __EXPORTED *nfct_helper_alloc(void)
+ {
+ 	return calloc(1, sizeof(struct nfct_helper));
+ }
+-EXPORT_SYMBOL(nfct_helper_alloc);
+ 
+ /**
+  * nfct_helper_free - release one helper object
+  * \param nfct_helper pointer to the helper object
+  */
+-void nfct_helper_free(struct nfct_helper *h)
++void __EXPORTED nfct_helper_free(struct nfct_helper *h)
+ {
+ 	int i;
+ 
+@@ -119,7 +118,6 @@ void nfct_helper_free(struct nfct_helper
+ 			free(h->expect_policy[i]);
+ 	}
+ }
+-EXPORT_SYMBOL(nfct_helper_free);
+ 
+ /**
+  * nfct_helper_policy_alloc - allocate a new helper policy object
+@@ -127,21 +125,19 @@ EXPORT_SYMBOL(nfct_helper_free);
+  * In case of success, this function returns a valid pointer, otherwise NULL
+  * s returned and errno is appropriately set.
+  */
+-struct nfct_helper_policy *nfct_helper_policy_alloc(void)
++struct nfct_helper_policy __EXPORTED *nfct_helper_policy_alloc(void)
+ {
+ 	return calloc(1, sizeof(struct nfct_helper_policy));
+ }
+-EXPORT_SYMBOL(nfct_helper_policy_alloc);
+ 
+ /**
+  * nfct_helper_free - release one helper policy object
+  * \param nfct_helper pointer to the helper object
+  */
+-void nfct_helper_policy_free(struct nfct_helper_policy *p)
++void __EXPORTED nfct_helper_policy_free(struct nfct_helper_policy *p)
+ {
+ 	free(p);
+ }
+-EXPORT_SYMBOL(nfct_helper_policy_free);
+ 
+ /**
+  * nfct_helper_policy_attr_set - set one attribute of the helper object
+@@ -149,7 +145,7 @@ EXPORT_SYMBOL(nfct_helper_policy_free);
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-void
++void __EXPORTED
+ nfct_helper_policy_attr_set(struct nfct_helper_policy *p,
+ 			    enum nfct_helper_policy_attr_type type,
+ 			    const void *data)
+@@ -170,7 +166,6 @@ nfct_helper_policy_attr_set(struct nfct_
+ 		break;
+ 	}
+ }
+-EXPORT_SYMBOL(nfct_helper_policy_attr_set);
+ 
+ /**
+  * nfct_helper_attr_set_str - set one attribute the helper object
+@@ -178,23 +173,21 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_se
+  * \param type attribute type you want to set
+  * \param name string that will be used to set this attribute
+  */
+-void
++void __EXPORTED
+ nfct_helper_policy_attr_set_str(struct nfct_helper_policy *p,
+ 				enum nfct_helper_policy_attr_type type,
+ 				const char *name)
+ {
+ 	nfct_helper_policy_attr_set(p, type, name);
+ }
+-EXPORT_SYMBOL(nfct_helper_policy_attr_set_str);
+ 
+-void
++void __EXPORTED
+ nfct_helper_policy_attr_set_u32(struct nfct_helper_policy *p,
+ 				enum nfct_helper_policy_attr_type type,
+ 				uint32_t value)
+ {
+ 	nfct_helper_policy_attr_set(p, type, &value);
+ }
+-EXPORT_SYMBOL(nfct_helper_policy_attr_set_u32);
+ 
+ /**
+  * nfct_helper_attr_set - set one attribute of the helper object
+@@ -202,7 +195,7 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_se
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-void
++void __EXPORTED
+ nfct_helper_attr_set(struct nfct_helper *h,
+ 		     enum nfct_helper_attr_type type, const void *data)
+ {
+@@ -250,7 +243,6 @@ nfct_helper_attr_set(struct nfct_helper
+ 		break;
+ 	}
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_set);
+ 
+ /**
+  * nfct_helper_attr_set_str - set one attribute the helper object
+@@ -258,44 +250,40 @@ EXPORT_SYMBOL(nfct_helper_attr_set);
+  * \param type attribute type you want to set
+  * \param name string that will be used to set this attribute
+  */
+-void
++void __EXPORTED
+ nfct_helper_attr_set_str(struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type,
+ 		    const char *name)
+ {
+ 	nfct_helper_attr_set(nfct_helper, type, name);
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_set_str);
+ 
+-void
++void __EXPORTED
+ nfct_helper_attr_set_u8(struct nfct_helper *nfct_helper,
+ 			 enum nfct_helper_attr_type type, uint8_t value)
+ {
+ 	nfct_helper_attr_set(nfct_helper, type, &value);
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_set_u8);
+ 
+-void
++void __EXPORTED
+ nfct_helper_attr_set_u16(struct nfct_helper *nfct_helper,
+ 			 enum nfct_helper_attr_type type, uint16_t value)
+ {
+ 	nfct_helper_attr_set(nfct_helper, type, &value);
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_set_u16);
+ 
+-void
++void __EXPORTED
+ nfct_helper_attr_set_u32(struct nfct_helper *nfct_helper,
+ 			 enum nfct_helper_attr_type type, uint32_t value)
+ {
+ 	nfct_helper_attr_set(nfct_helper, type, &value);
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_set_u32);
+ 
+ /**
+  * nfct_helper_attr_unset - unset one attribute the helper object
+  * \param nfct_helper pointer to the helper object
+  * \param type attribute type you want to set
+  */
+-void
++void __EXPORTED
+ nfct_helper_attr_unset(struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
+ {
+ 	switch(type) {
+@@ -307,7 +295,6 @@ nfct_helper_attr_unset(struct nfct_helpe
+ 		break;
+ 	}
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_unset);
+ 
+ /**
+  * nfct_helper_attr_get - get one attribute the helper object
+@@ -317,8 +304,9 @@ EXPORT_SYMBOL(nfct_helper_attr_unset);
+  * This function returns a valid pointer to the attribute data. If a
+  * unsupported attribute is used, this returns NULL.
+  */
+-const void *nfct_helper_attr_get(struct nfct_helper *helper,
+-				 enum nfct_helper_attr_type type)
++const void __EXPORTED *
++nfct_helper_attr_get(struct nfct_helper *helper,
++		     enum nfct_helper_attr_type type)
+ {
+ 	const void *ret = NULL;
+ 
+@@ -358,7 +346,6 @@ const void *nfct_helper_attr_get(struct
+ 	}
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_get);
+ 
+ /**
+  * nfct_helper_attr_get_str - get one attribute the helper object
+@@ -368,13 +355,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get);
+  * This function returns a valid pointer to the beginning of the string.
+  * If the attribute is unsupported, this returns NULL.
+  */
+-const char *
++const char __EXPORTED *
+ nfct_helper_attr_get_str(struct nfct_helper *nfct_helper,
+ 			 enum nfct_helper_attr_type type)
+ {
+ 	return (const char *)nfct_helper_attr_get(nfct_helper, type);
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_get_str);
+ 
+ /**
+  * nfct_helper_attr_get_u8 - get one attribute the helper object
+@@ -384,12 +370,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_str);
+  * This function returns a unsigned 8-bits integer. If the attribute is
+  * unsupported, this returns NULL.
+  */
+-uint8_t nfct_helper_attr_get_u8(struct nfct_helper *nfct_helper,
+-				  enum nfct_helper_attr_type type)
++uint8_t __EXPORTED
++nfct_helper_attr_get_u8(struct nfct_helper *nfct_helper,
++			enum nfct_helper_attr_type type)
+ {
+ 	return *((uint8_t *)nfct_helper_attr_get(nfct_helper, type));
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_get_u8);
+ 
+ /**
+  * nfct_helper_attr_get_u16 - get one attribute the helper object
+@@ -399,12 +385,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u8);
+  * This function returns a unsigned 16-bits integer. If the attribute is
+  * unsupported, this returns NULL.
+  */
+-uint16_t nfct_helper_attr_get_u16(struct nfct_helper *nfct_helper,
+-				  enum nfct_helper_attr_type type)
++uint16_t __EXPORTED
++nfct_helper_attr_get_u16(struct nfct_helper *nfct_helper,
++			 enum nfct_helper_attr_type type)
+ {
+ 	return *((uint16_t *)nfct_helper_attr_get(nfct_helper, type));
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_get_u16);
+ 
+ /**
+  * nfct_helper_attr_get_u32 - get one attribute the helper object
+@@ -414,12 +400,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u16);
+  * This function returns a unsigned 32-bits integer. If the attribute is
+  * unsupported, this returns NULL.
+  */
+-uint32_t nfct_helper_attr_get_u32(struct nfct_helper *nfct_helper,
+-				  enum nfct_helper_attr_type type)
++uint32_t __EXPORTED
++nfct_helper_attr_get_u32(struct nfct_helper *nfct_helper,
++			 enum nfct_helper_attr_type type)
+ {
+ 	return *((uint32_t *)nfct_helper_attr_get(nfct_helper, type));
+ }
+-EXPORT_SYMBOL(nfct_helper_attr_get_u32);
+ 
+ /**
+  * nfct_helper_snprintf - print helper object into one buffer
+@@ -431,9 +417,10 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u32);
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int nfct_helper_snprintf(char *buf, size_t size,
+-			 struct nfct_helper *helper,
+-			 unsigned int type, unsigned int flags)
++int __EXPORTED
++nfct_helper_snprintf(char *buf, size_t size,
++		     struct nfct_helper *helper,
++		     unsigned int type, unsigned int flags)
+ {
+ 	int ret;
+ 
+@@ -454,7 +441,6 @@ int nfct_helper_snprintf(char *buf, size
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfct_helper_snprintf);
+ 
+ /**
+  * @}
+@@ -490,7 +476,7 @@ EXPORT_SYMBOL(nfct_helper_snprintf);
+  * - Command NFNL_MSG_ACCT_DEL, to delete one specific nfct_helper object (if
+  *   unused, otherwise you hit EBUSY).
+  */
+-struct nlmsghdr *
++struct nlmsghdr __EXPORTED *
+ nfct_helper_nlmsg_build_hdr(char *buf, uint8_t cmd,
+ 			    uint16_t flags, uint32_t seq)
+ {
+@@ -509,7 +495,6 @@ nfct_helper_nlmsg_build_hdr(char *buf, u
+ 
+ 	return nlh;
+ }
+-EXPORT_SYMBOL(nfct_helper_nlmsg_build_hdr);
+ 
+ static void
+ nfct_helper_nlmsg_build_policy(struct nlmsghdr *nlh,
+@@ -530,7 +515,7 @@ nfct_helper_nlmsg_build_policy(struct nl
+  * \param nlh: netlink message that you want to use to add the payload.
+  * \param nfct_helper: pointer to a helper object
+  */
+-void
++void __EXPORTED
+ nfct_helper_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfct_helper *h)
+ {
+ 	struct nlattr *nest;
+@@ -593,7 +578,6 @@ nfct_helper_nlmsg_build_payload(struct n
+ 	if (h->bitset & (1 << NFCTH_ATTR_STATUS))
+ 		mnl_attr_put_u32(nlh, NFCTH_STATUS, ntohl(h->status));
+ }
+-EXPORT_SYMBOL(nfct_helper_nlmsg_build_payload);
+ 
+ static int
+ nfct_helper_nlmsg_parse_tuple_cb(const struct nlattr *attr, void *data)
+@@ -795,7 +779,7 @@ nfct_helper_nlmsg_parse_attr_cb(const st
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int
++int __EXPORTED
+ nfct_helper_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+ 				struct nfct_helper *h)
+ {
+@@ -832,7 +816,6 @@ nfct_helper_nlmsg_parse_payload(const st
+ 	}
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfct_helper_nlmsg_parse_payload);
+ 
+ /**
+  * @}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cttimeout-visibility-hidden.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cttimeout-visibility-hidden.patch
new file mode 100644
index 0000000..2c606c8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cttimeout-visibility-hidden.patch
@@ -0,0 +1,264 @@
+From d0c4e39d12f903e06db262656cff2e24d267bed7 Mon Sep 17 00:00:00 2001
+From: Kevin Cernekee <cernekee@chromium.org>
+Date: Wed, 4 Jan 2017 14:30:25 -0800
+Subject: Use __EXPORTED rather than EXPORT_SYMBOL
+
+clang is sensitive to the ordering of
+__attribute__((visibility("default"))) relative to the function
+body.  gcc is not.  So if we try to re-declare an existing function
+with default visibility, clang prints a warning and generates
+a broken .so file in which nfct_timeout_* are not exported to library
+callers.
+
+Move the attribute up into the function definition to make clang happy.
+
+Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ doxygen.cfg.in               |  2 +-
+ src/internal.h               |  5 ++---
+ src/libnetfilter_cttimeout.c | 44 +++++++++++++++++---------------------------
+ 3 files changed, 20 insertions(+), 31 deletions(-)
+
+diff --git a/doxygen.cfg.in b/doxygen.cfg.in
+index 8e5d449..09c3ce0 100644
+--- a/doxygen.cfg.in
++++ b/doxygen.cfg.in
+@@ -72,7 +72,7 @@ RECURSIVE              = YES
+ EXCLUDE                = 
+ EXCLUDE_SYMLINKS       = NO
+ EXCLUDE_PATTERNS       = */.git/* .*.d
+-EXCLUDE_SYMBOLS        = EXPORT_SYMBOL nfct_timeout _container_policy_cb
++EXCLUDE_SYMBOLS        = nfct_timeout _container_policy_cb
+ EXAMPLE_PATH           = 
+ EXAMPLE_PATTERNS       = 
+ EXAMPLE_RECURSIVE      = NO
+diff --git a/src/internal.h b/src/internal.h
+index 3a88d1a..5d78171 100644
+--- a/src/internal.h
++++ b/src/internal.h
+@@ -3,10 +3,9 @@
+ 
+ #include "config.h"
+ #ifdef HAVE_VISIBILITY_HIDDEN
+-#	define __visible	__attribute__((visibility("default")))
+-#	define EXPORT_SYMBOL(x)	typeof(x) (x) __visible
++#	define __EXPORTED	__attribute__((visibility("default")))
+ #else
+-#	define EXPORT_SYMBOL
++#	define __EXPORTED
+ #endif
+ 
+ #endif
+diff --git a/src/libnetfilter_cttimeout.c b/src/libnetfilter_cttimeout.c
+index 7844a1f..a0a7185 100644
+--- a/src/libnetfilter_cttimeout.c
++++ b/src/libnetfilter_cttimeout.c
+@@ -187,7 +187,7 @@ struct nfct_timeout {
+  * In case of success, this function returns a valid pointer, otherwise NULL
+  * s returned and errno is appropriately set.
+  */
+-struct nfct_timeout *nfct_timeout_alloc(void)
++struct nfct_timeout __EXPORTED *nfct_timeout_alloc(void)
+ {
+ 	struct nfct_timeout *t;
+ 
+@@ -197,19 +197,17 @@ struct nfct_timeout *nfct_timeout_alloc(void)
+ 
+ 	return t;
+ }
+-EXPORT_SYMBOL(nfct_timeout_alloc);
+ 
+ /**
+  * nfct_timeout_free - release one conntrack timeout object
+  * \param t pointer to the conntrack timeout object
+  */
+-void nfct_timeout_free(struct nfct_timeout *t)
++void __EXPORTED nfct_timeout_free(struct nfct_timeout *t)
+ {
+ 	if (t->timeout)
+ 		free(t->timeout);
+ 	free(t);
+ }
+-EXPORT_SYMBOL(nfct_timeout_free);
+ 
+ /**
+  * nfct_timeout_attr_set - set one attribute of the conntrack timeout object
+@@ -217,7 +215,7 @@ EXPORT_SYMBOL(nfct_timeout_free);
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data)
+ {
+ 	switch(type) {
+@@ -236,7 +234,6 @@ nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data)
+ 	t->attrset |= (1 << type);
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set);
+ 
+ /**
+  * nfct_timeout_attr_set_u8 - set one attribute of the conntrack timeout object
+@@ -244,12 +241,11 @@ EXPORT_SYMBOL(nfct_timeout_attr_set);
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set_u8(struct nfct_timeout *t, uint32_t type, uint8_t data)
+ {
+ 	return nfct_timeout_attr_set(t, type, &data);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set_u8);
+ 
+ /**
+  * nfct_timeout_attr_set_u16 - set one attribute of the conntrack timeout object
+@@ -257,23 +253,21 @@ EXPORT_SYMBOL(nfct_timeout_attr_set_u8);
+  * \param type attribute type you want to set
+  * \param data pointer to data that will be used to set this attribute
+  */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set_u16(struct nfct_timeout *t, uint32_t type, uint16_t data)
+ {
+ 	return nfct_timeout_attr_set(t, type, &data);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set_u16);
+ 
+ /**
+  * nfct_timeout_attr_unset - unset one attribute of the conntrack timeout object
+  * \param t pointer to the conntrack timeout object
+  * \param type attribute type you want to set
+  */
+-void nfct_timeout_attr_unset(struct nfct_timeout *t, uint32_t type)
++void __EXPORTED nfct_timeout_attr_unset(struct nfct_timeout *t, uint32_t type)
+ {
+ 	t->attrset &= ~(1 << type);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_unset);
+ 
+ /**
+  * nfct_timeout_policy_attr_set_u32 - set one attribute of the policy
+@@ -281,7 +275,7 @@ EXPORT_SYMBOL(nfct_timeout_attr_unset);
+  * \param type attribute type you want to set
+  * \param data data that will be used to set this attribute
+  */
+-int
++int __EXPORTED
+ nfct_timeout_policy_attr_set_u32(struct nfct_timeout *t,
+ 				 uint32_t type, uint32_t data)
+ {
+@@ -319,18 +313,17 @@ nfct_timeout_policy_attr_set_u32(struct nfct_timeout *t,
+ 
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_set_u32);
+ 
+ /**
+  * nfct_timeout_policy_attr_unset - unset one attribute of the policy
+  * \param t pointer to the conntrack timeout object
+  * \param type attribute type you want to set
+  */
+-void nfct_timeout_policy_attr_unset(struct nfct_timeout *t, uint32_t type)
++void __EXPORTED
++nfct_timeout_policy_attr_unset(struct nfct_timeout *t, uint32_t type)
+ {
+ 	t->attrset &= ~(1 << type);
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_unset);
+ 
+ /**
+  * nfct_timeout_policy_attr_to_name - get state name from protocol state number
+@@ -340,7 +333,8 @@ EXPORT_SYMBOL(nfct_timeout_policy_attr_unset);
+  * This function returns NULL if unsupported protocol or state number is passed.
+  * Otherwise, a pointer to valid string is returned.
+  */
+-const char *nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
++const char __EXPORTED *
++nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
+ {
+ 	if (timeout_protocol[l4proto].state_to_name == NULL) {
+ 		printf("no array state name\n");
+@@ -354,7 +348,6 @@ const char *nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
+ 
+ 	return timeout_protocol[l4proto].state_to_name[state];
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_to_name);
+ 
+ /**
+  * @}
+@@ -438,8 +431,9 @@ nfct_timeout_snprintf_default(char *buf, size_t size,
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
+-			  unsigned int type, unsigned int flags)
++int __EXPORTED
++nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
++		      unsigned int type, unsigned int flags)
+ {
+ 	int ret = 0;
+ 
+@@ -454,7 +448,6 @@ int nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
+ 
+ 	return ret;
+ }
+-EXPORT_SYMBOL(nfct_timeout_snprintf);
+ 
+ /**
+  * @}
+@@ -477,7 +470,7 @@ EXPORT_SYMBOL(nfct_timeout_snprintf);
+  * - CTNL_MSG_TIMEOUT_GET: get conntrack timeout object.
+  * - CTNL_MSG_TIMEOUT_DEL: delete conntrack timeout object.
+  */
+-struct nlmsghdr *
++struct nlmsghdr __EXPORTED *
+ nfct_timeout_nlmsg_build_hdr(char *buf, uint8_t cmd,
+ 			     uint16_t flags, uint32_t seq)
+ {
+@@ -496,14 +489,13 @@ nfct_timeout_nlmsg_build_hdr(char *buf, uint8_t cmd,
+ 
+ 	return nlh;
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_build_hdr);
+ 
+ /**
+  * nfct_timeout_nlmsg_build_payload - build payload from ct timeout object
+  * \param nlh: netlink message that you want to use to add the payload.
+  * \param t: pointer to a conntrack timeout object
+  */
+-void
++void __EXPORTED
+ nfct_timeout_nlmsg_build_payload(struct nlmsghdr *nlh,
+ 				 const struct nfct_timeout *t)
+ {
+@@ -532,7 +524,6 @@ nfct_timeout_nlmsg_build_payload(struct nlmsghdr *nlh,
+ 	}
+ 
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_build_payload);
+ 
+ static int
+ timeout_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data)
+@@ -629,7 +620,7 @@ timeout_parse_attr_data(struct nfct_timeout *t, const struct nlattr *nest)
+  * This function returns -1 in case that some mandatory attributes are
+  * missing. On sucess, it returns 0.
+  */
+-int
++int __EXPORTED
+ nfct_timeout_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+ 				 struct nfct_timeout *t)
+ {
+@@ -654,7 +645,6 @@ nfct_timeout_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+ 	}
+ 	return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_parse_payload);
+ 
+ /**
+  * @}
+-- 
+cgit v1.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-acct_1.0.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-acct_1.0.3.bb
new file mode 100644
index 0000000..974035c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-acct_1.0.3.bb
@@ -0,0 +1,17 @@
+SUMMARY = "libnetfilter_acct accounting infrastructure."
+DESCRIPTION = "libnetfilter_acct is the userspace library providing interface to extended accounting infrastructure."
+HOMEPAGE = "http://netfilter.org/projects/libnetfilter_acct/index.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+DEPENDS = "libnfnetlink libmnl"
+
+SRC_URI = "http://ftp.netfilter.org/pub/libnetfilter_acct/libnetfilter_acct-1.0.3.tar.bz2 \
+           file://0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch \
+"
+SRC_URI[md5sum] = "814b2972b2f5c740ff87510bc109168b"
+SRC_URI[sha256sum] = "4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a"
+
+S = "${WORKDIR}/libnetfilter_acct-${PV}"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.8.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.8.bb
new file mode 100644
index 0000000..cd89433
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.8.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Netfilter connection tracking library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter connection tracking state table"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_conntrack/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libmnl"
+
+SRC_URI = "https://www.netfilter.org/projects/libnetfilter_conntrack/files/libnetfilter_conntrack-${PV}.tar.bz2"
+SRC_URI[md5sum] = "3121b55acf97322db830da75d8407cba"
+SRC_URI[sha256sum] = "0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf"
+
+S = "${WORKDIR}/libnetfilter_conntrack-${PV}"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb
new file mode 100644
index 0000000..92cb23d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Netfilter connection tracking helper library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter user-space helper infrastructure"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_cthelper/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-${PV}.tar.bz2;name=tar \
+           file://libnetfilter-cthelper-visibility-hidden.patch \
+"
+SRC_URI[tar.md5sum] = "b2efab1a3a198a5add448960ba011acd"
+SRC_URI[tar.sha256sum] = "07618e71c4d9a6b6b3dc1986540486ee310a9838ba754926c7d14a17d8fccf3d"
+
+S = "${WORKDIR}/libnetfilter_cthelper-${PV}"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb
new file mode 100644
index 0000000..ff32f34
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Netfilter connection tracking timeout library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter fine-grain connection tracking timeout infrastructure"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libmnl"
+
+SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-${PV}.tar.bz2;name=tar \
+           file://libnetfilter-cttimeout-visibility-hidden.patch \
+"
+SRC_URI[tar.md5sum] = "7697437fc9ebb6f6b83df56a633db7f9"
+SRC_URI[tar.sha256sum] = "aeab12754f557cba3ce2950a2029963d817490df7edb49880008b34d7ff8feba"
+
+S = "${WORKDIR}/libnetfilter_cttimeout-${PV}"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
new file mode 100644
index 0000000..2f627d4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Netfilter logging library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to the Linux kernel netfilter log message (NFLOG)"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_log/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libmnl"
+SRCREV = "ba196a97e810746e5660fe3f57c87c0ed0f2b324"
+PV .= "+git${SRCPV}"
+
+SRC_URI = "git://git.netfilter.org/libnetfilter_log"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb
new file mode 100644
index 0000000..896cfdf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Netfilter packet queue access library"
+DESCRIPTION = "Userspace library providing a programming interface (API) to access the Linux kernel netfilter packet queue"
+HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_queue/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+DEPENDS = "libnfnetlink libmnl"
+
+SRCREV = "601abd1c71ccdf90753cf294c120ad43fb25dc54"
+
+SRC_URI = "git://git.netfilter.org/libnetfilter_queue \
+           file://0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0001-build-resolve-automake-1.12-warnings.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0001-build-resolve-automake-1.12-warnings.patch
new file mode 100644
index 0000000..00d95cd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0001-build-resolve-automake-1.12-warnings.patch
@@ -0,0 +1,28 @@
+From 2e5f2b81fb8cbe0d1cd33e58caa19ac308e1f847 Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Tue, 9 Oct 2012 15:59:48 +0200
+Subject: [PATCH 1/6] build: resolve automake-1.12 warnings
+
+am/ltlibrary.am: warning: 'libnfnetlink.la': linking libtool libraries
+using a non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac'
+
+Signed-off-by: Jan Engelhardt <jengelh@inai.de>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index ed549df..0926a1c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -7,6 +7,7 @@ AC_CANONICAL_HOST
+ 
+ AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
+ 	tar-pax no-dist-gzip dist-bzip2 1.6])
++m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+ 
+ dnl kernel style compile messages
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0002-src-get-source-code-license-header-in-sync-with-curr.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0002-src-get-source-code-license-header-in-sync-with-curr.patch
new file mode 100644
index 0000000..c2fb5e0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0002-src-get-source-code-license-header-in-sync-with-curr.patch
@@ -0,0 +1,49 @@
+From 5e6b6e23a8b04475c5a9de7eddb4c18103932fe5 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Wed, 7 Aug 2013 20:53:57 +0200
+Subject: [PATCH 2/6] src: get source code license header in sync with current
+ licensing terms
+
+Since (3956761 license: upgrade to GPLv2+), we upgraded to GPLv2+,
+propagate that changes to src/iftable.c and src/rtnl.c
+
+Reported-by: Thomas Woerner <twoerner@redhat.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ src/iftable.c | 2 +-
+ src/rtnl.c    | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/iftable.c b/src/iftable.c
+index 0325335..5976ed8 100644
+--- a/src/iftable.c
++++ b/src/iftable.c
+@@ -3,7 +3,7 @@
+  * (C) 2004 by Astaro AG, written by Harald Welte <hwelte@astaro.com>
+  * (C) 2008 by Pablo Neira Ayuso <pablo@netfilter.org>
+  *
+- * This software is Free Software and licensed under GNU GPLv2. 
++ * This software is Free Software and licensed under GNU GPLv2+.
+  */
+ 
+ /* IFINDEX handling */
+diff --git a/src/rtnl.c b/src/rtnl.c
+index 5ccb272..7b4ac7d 100644
+--- a/src/rtnl.c
++++ b/src/rtnl.c
+@@ -1,10 +1,10 @@
+ /* rtnl - rtnetlink utility functions
+  *
+  * (C) 2004 by Astaro AG, written by Harald Welte <hwelte@astaro.com>
+- * 
++ *
+  * Adapted to nfnetlink by Eric Leblond <eric@inl.fr>
+  *
+- * This software is free software and licensed under GNU GPLv2. 
++ * This software is free software and licensed under GNU GPLv2+.
+  *
+  */
+ 
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0003-configure-uclinux-is-also-linux.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0003-configure-uclinux-is-also-linux.patch
new file mode 100644
index 0000000..6cb7ed6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0003-configure-uclinux-is-also-linux.patch
@@ -0,0 +1,27 @@
+From b259fe13826414c1bd5328a25c8d6d60e20e65f2 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Tue, 10 Sep 2013 16:23:29 -0300
+Subject: [PATCH 3/6] configure: uclinux is also linux
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0926a1c..b979772 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,7 +18,7 @@ AC_DISABLE_STATIC
+ AM_PROG_LIBTOOL
+ 
+ case "$host" in 
+-*-*-linux*) ;;
++*-*-linux* | *-*-uclinux*) ;;
+ *) AC_MSG_ERROR([Linux only, dude!]);;
+ esac
+ 
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0004-libnfnetlink-initialize-attribute-padding-to-resolve.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0004-libnfnetlink-initialize-attribute-padding-to-resolve.patch
new file mode 100644
index 0000000..cf3a841
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0004-libnfnetlink-initialize-attribute-padding-to-resolve.patch
@@ -0,0 +1,39 @@
+From b142da8d2c9e2e2dfbe4e89e680dd124f6064ac8 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Mon, 3 Feb 2014 12:09:29 +0100
+Subject: [PATCH 4/6] libnfnetlink: initialize attribute padding to resolve
+ valgrind warnings
+
+==12195== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
+==12195==    at 0x51209C3: __sendto_nocancel (syscall-template.S:81)
+==12195==    by 0x53E4D12: nfnl_send (libnfnetlink.c:391)
+==12195==    by 0x53E6952: nfnl_query (libnfnetlink.c:1569)
+==12195==    by 0x4E344AF: __build_send_cfg_msg.isra.1 (libnetfilter_log.c:143)
+==12195==    by 0x4E34710: nflog_bind_group (libnetfilter_log.c:413)
+==12195==    by 0x400CB1: main (nfulnl_test.c:77)
+==12195==  Address 0x7fefff3e9 is on thread 1's stack
+
+This patch sets to zero the padding that is included to align the
+attribute payload.
+
+Reported-by: Ivan Homoliak <xhomol11@gmail.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ src/libnfnetlink.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
+index 4b2bcd0..398b7d7 100644
+--- a/src/libnfnetlink.c
++++ b/src/libnfnetlink.c
+@@ -809,6 +809,7 @@ int nfnl_addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
+ 	nfa->nfa_type = type;
+ 	nfa->nfa_len = len;
+ 	memcpy(NFA_DATA(nfa), data, alen);
++	memset((uint8_t *)nfa + nfa->nfa_len, 0, NFA_ALIGN(alen) - alen);
+ 	n->nlmsg_len = (NLMSG_ALIGN(n->nlmsg_len) + NFA_ALIGN(len));
+ 	return 0;
+ }
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0005-include-Sync-with-kernel-headers.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0005-include-Sync-with-kernel-headers.patch
new file mode 100644
index 0000000..383f0e8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0005-include-Sync-with-kernel-headers.patch
@@ -0,0 +1,110 @@
+From b10c90a61a5fc46f2be5aeecb9c96e84178f7717 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 16 May 2015 14:49:07 +0200
+Subject: [PATCH 5/6] include: Sync with kernel headers
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/libnfnetlink/linux_nfnetlink.h        | 44 ++++-----------------------
+ include/libnfnetlink/linux_nfnetlink_compat.h | 12 ++++----
+ 2 files changed, 12 insertions(+), 44 deletions(-)
+
+diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
+index 76a8550..44a38d6 100644
+--- a/include/libnfnetlink/linux_nfnetlink.h
++++ b/include/libnfnetlink/linux_nfnetlink.h
+@@ -25,9 +25,9 @@ enum nfnetlink_groups {
+ /* General form of address family dependent message.
+  */
+ struct nfgenmsg {
+-	u_int8_t  nfgen_family;		/* AF_xxx */
+-	u_int8_t  version;		/* nfnetlink version */
+-	u_int16_t    res_id;		/* resource id */
++	__u8  nfgen_family;		/* AF_xxx */
++	__u8  version;		/* nfnetlink version */
++	__be16    res_id;		/* resource id */
+ };
+ 
+ #define NFNETLINK_V0	0
+@@ -46,40 +46,8 @@ struct nfgenmsg {
+ #define NFNL_SUBSYS_CTNETLINK_EXP	2
+ #define NFNL_SUBSYS_QUEUE		3
+ #define NFNL_SUBSYS_ULOG		4
+-#define NFNL_SUBSYS_COUNT		5
++#define NFNL_SUBSYS_OSF			5
++#define NFNL_SUBSYS_IPSET		6
++#define NFNL_SUBSYS_COUNT		7
+ 
+-#ifdef __KERNEL__
+-
+-#include <linux/netlink.h>
+-#include <linux/capability.h>
+-#include <net/netlink.h>
+-
+-struct nfnl_callback
+-{
+-	int (*call)(struct sock *nl, struct sk_buff *skb, 
+-		struct nlmsghdr *nlh, struct nlattr *cda[]);
+-	const struct nla_policy *policy;	/* netlink attribute policy */
+-	const u_int16_t attr_count;		/* number of nlattr's */
+-};
+-
+-struct nfnetlink_subsystem
+-{
+-	const char *name;
+-	__u8 subsys_id;			/* nfnetlink subsystem ID */
+-	__u8 cb_count;			/* number of callbacks */
+-	const struct nfnl_callback *cb;	/* callback for individual types */
+-};
+-
+-extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
+-extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
+-
+-extern int nfnetlink_has_listeners(unsigned int group);
+-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, 
+-			  int echo);
+-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
+-
+-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
+-	MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
+-
+-#endif	/* __KERNEL__ */
+ #endif	/* _NFNETLINK_H */
+diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
+index e145176..74b9e55 100644
+--- a/include/libnfnetlink/linux_nfnetlink_compat.h
++++ b/include/libnfnetlink/linux_nfnetlink_compat.h
+@@ -1,6 +1,8 @@
+ #ifndef _NFNETLINK_COMPAT_H
+ #define _NFNETLINK_COMPAT_H
+-#ifndef __KERNEL__
++
++#include <linux/types.h>
++
+ /* Old nfnetlink macros for userspace */
+ 
+ /* nfnetlink groups: Up to 32 maximum */
+@@ -18,10 +20,9 @@
+  * ! nfnetlink use the same attributes methods. - J. Schulist.
+  */
+ 
+-struct nfattr
+-{
+-	u_int16_t nfa_len;
+-	u_int16_t nfa_type;	/* we use 15 bits for the type, and the highest
++struct nfattr {
++	__u16 nfa_len;
++	__u16 nfa_type;	/* we use 15 bits for the type, and the highest
+ 				 * bit to indicate whether the payload is nested */
+ };
+ 
+@@ -57,5 +58,4 @@ struct nfattr
+         + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+ #define NFM_PAYLOAD(n)  NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+ 
+-#endif /* ! __KERNEL__ */
+ #endif /* _NFNETLINK_COMPAT_H */
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0006-src-Use-stdint-types-everywhere.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0006-src-Use-stdint-types-everywhere.patch
new file mode 100644
index 0000000..72c9987
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink/0006-src-Use-stdint-types-everywhere.patch
@@ -0,0 +1,403 @@
+From 5cb589e246c91331ee6b3926b15f5e6cfc8ad95e Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 16 May 2015 14:59:57 +0200
+Subject: [PATCH 6/6] src: Use stdint types everywhere
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/libnfnetlink/libnfnetlink.h | 25 ++++++-------
+ src/iftable.c                       |  8 ++---
+ src/iftable.h                       |  4 +--
+ src/libnfnetlink.c                  | 72 ++++++++++++++++++-------------------
+ src/rtnl.c                          |  4 +--
+ src/rtnl.h                          |  2 +-
+ 6 files changed, 58 insertions(+), 57 deletions(-)
+
+diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h
+index 1d8c49d..cd0be3d 100644
+--- a/include/libnfnetlink/libnfnetlink.h
++++ b/include/libnfnetlink/libnfnetlink.h
+@@ -15,6 +15,7 @@
+ #define aligned_u64 unsigned long long __attribute__((aligned(8)))
+ #endif
+ 
++#include <stdint.h>
+ #include <sys/socket.h>	/* for sa_family_t */
+ #include <linux/netlink.h>
+ #include <libnfnetlink/linux_nfnetlink.h>
+@@ -55,7 +56,7 @@ struct nfnlhdr {
+ struct nfnl_callback {
+ 	int (*call)(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
+ 	void *data;
+-	u_int16_t attr_count;
++	uint16_t attr_count;
+ };
+ 
+ struct nfnl_handle;
+@@ -69,7 +70,7 @@ extern struct nfnl_handle *nfnl_open(void);
+ extern int nfnl_close(struct nfnl_handle *);
+ 
+ extern struct nfnl_subsys_handle *nfnl_subsys_open(struct nfnl_handle *, 
+-						   u_int8_t, u_int8_t, 
++						   uint8_t, uint8_t,
+ 						   unsigned int);
+ extern void nfnl_subsys_close(struct nfnl_subsys_handle *);
+ 
+@@ -88,8 +89,8 @@ extern int nfnl_sendiov(const struct nfnl_handle *nfnlh,
+ 			const struct iovec *iov, unsigned int num,
+ 			unsigned int flags);
+ extern void nfnl_fill_hdr(struct nfnl_subsys_handle *, struct nlmsghdr *,
+-			  unsigned int, u_int8_t, u_int16_t, u_int16_t,
+-			  u_int16_t);
++			  unsigned int, uint8_t, uint16_t, uint16_t,
++			  uint16_t);
+ extern __attribute__((deprecated)) int
+ nfnl_talk(struct nfnl_handle *, struct nlmsghdr *, pid_t,
+           unsigned, struct nlmsghdr *,
+@@ -103,8 +104,8 @@ nfnl_listen(struct nfnl_handle *,
+ /* receiving */
+ extern ssize_t nfnl_recv(const struct nfnl_handle *h, unsigned char *buf, size_t len);
+ extern int nfnl_callback_register(struct nfnl_subsys_handle *,
+-				  u_int8_t type, struct nfnl_callback *cb);
+-extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, u_int8_t type);
++				  uint8_t type, struct nfnl_callback *cb);
++extern int nfnl_callback_unregister(struct nfnl_subsys_handle *, uint8_t type);
+ extern int nfnl_handle_packet(struct nfnl_handle *, char *buf, int len);
+ 
+ /* parsing */
+@@ -180,12 +181,12 @@ extern int nfnl_query(struct nfnl_handle *h, struct nlmsghdr *nlh);
+ 
+ /* nfnl attribute handling functions */
+ extern int nfnl_addattr_l(struct nlmsghdr *, int, int, const void *, int);
+-extern int nfnl_addattr8(struct nlmsghdr *, int, int, u_int8_t);
+-extern int nfnl_addattr16(struct nlmsghdr *, int, int, u_int16_t);
+-extern int nfnl_addattr32(struct nlmsghdr *, int, int, u_int32_t);
++extern int nfnl_addattr8(struct nlmsghdr *, int, int, uint8_t);
++extern int nfnl_addattr16(struct nlmsghdr *, int, int, uint16_t);
++extern int nfnl_addattr32(struct nlmsghdr *, int, int, uint32_t);
+ extern int nfnl_nfa_addattr_l(struct nfattr *, int, int, const void *, int);
+-extern int nfnl_nfa_addattr16(struct nfattr *, int, int, u_int16_t);
+-extern int nfnl_nfa_addattr32(struct nfattr *, int, int, u_int32_t);
++extern int nfnl_nfa_addattr16(struct nfattr *, int, int, uint16_t);
++extern int nfnl_nfa_addattr32(struct nfattr *, int, int, uint32_t);
+ extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
+ #define nfnl_parse_nested(tb, max, nfa) \
+ 	nfnl_parse_attr((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
+@@ -197,7 +198,7 @@ extern int nfnl_parse_attr(struct nfattr **, int, struct nfattr *, int);
+ ({	(tail)->nfa_len = (void *) NLMSG_TAIL(nlh) - (void *) tail; })
+ 
+ extern void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa, 
+-				 u_int16_t type, u_int32_t len,
++				 uint16_t type, uint32_t len,
+ 				 unsigned char *val);
+ extern unsigned int nfnl_rcvbufsiz(const struct nfnl_handle *h, 
+ 				   unsigned int size);
+diff --git a/src/iftable.c b/src/iftable.c
+index 5976ed8..157f97b 100644
+--- a/src/iftable.c
++++ b/src/iftable.c
+@@ -27,10 +27,10 @@
+ struct ifindex_node {
+ 	struct list_head head;
+ 
+-	u_int32_t	index;
+-	u_int32_t	type;
+-	u_int32_t	alen;
+-	u_int32_t	flags;
++	uint32_t	index;
++	uint32_t	type;
++	uint32_t	alen;
++	uint32_t	flags;
+ 	char		addr[8];
+ 	char		name[16];
+ };
+diff --git a/src/iftable.h b/src/iftable.h
+index 8df7f24..655df6b 100644
+--- a/src/iftable.h
++++ b/src/iftable.h
+@@ -1,8 +1,8 @@
+ #ifndef _IFTABLE_H
+ #define _IFTABLE_H
+ 
+-int iftable_delete(u_int32_t dst, u_int32_t mask, u_int32_t gw, u_int32_t oif);
+-int iftable_insert(u_int32_t dst, u_int32_t mask, u_int32_t gw, u_int32_t oif);
++int iftable_delete(uint32_t dst, uint32_t mask, uint32_t gw, uint32_t oif);
++int iftable_insert(uint32_t dst, uint32_t mask, uint32_t gw, uint32_t oif);
+ 
+ int iftable_init(void);
+ void iftable_fini(void);
+diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
+index 398b7d7..df57533 100644
+--- a/src/libnfnetlink.c
++++ b/src/libnfnetlink.c
+@@ -72,9 +72,9 @@
+ 
+ struct nfnl_subsys_handle {
+ 	struct nfnl_handle 	*nfnlh;
+-	u_int32_t		subscriptions;
+-	u_int8_t		subsys_id;
+-	u_int8_t		cb_count;
++	uint32_t		subscriptions;
++	uint8_t			subsys_id;
++	uint8_t			cb_count;
+ 	struct nfnl_callback 	*cb;	/* array of callbacks */
+ };
+ 
+@@ -86,11 +86,11 @@ struct nfnl_handle {
+ 	int			fd;
+ 	struct sockaddr_nl	local;
+ 	struct sockaddr_nl	peer;
+-	u_int32_t		subscriptions;
+-	u_int32_t		seq;
+-	u_int32_t		dump;
+-	u_int32_t		rcv_buffer_size;	/* for nfnl_catch */
+-	u_int32_t		flags;
++	uint32_t		subscriptions;
++	uint32_t		seq;
++	uint32_t		dump;
++	uint32_t		rcv_buffer_size;	/* for nfnl_catch */
++	uint32_t		flags;
+ 	struct nlmsghdr 	*last_nlhdr;
+ 	struct nfnl_subsys_handle subsys[NFNL_MAX_SUBSYS+1];
+ };
+@@ -145,7 +145,7 @@ unsigned int nfnl_portid(const struct nfnl_handle *h)
+ static int recalc_rebind_subscriptions(struct nfnl_handle *nfnlh)
+ {
+ 	int i, err;
+-	u_int32_t new_subscriptions = nfnlh->subscriptions;
++	uint32_t new_subscriptions = nfnlh->subscriptions;
+ 
+ 	for (i = 0; i < NFNL_MAX_SUBSYS; i++)
+ 		new_subscriptions |= nfnlh->subsys[i].subscriptions;
+@@ -273,8 +273,8 @@ void nfnl_set_rcv_buffer_size(struct nfnl_handle *h, unsigned int size)
+  * a valid address that points to a nfnl_subsys_handle structure is returned.
+  */
+ struct nfnl_subsys_handle *
+-nfnl_subsys_open(struct nfnl_handle *nfnlh, u_int8_t subsys_id,
+-		 u_int8_t cb_count, u_int32_t subscriptions)
++nfnl_subsys_open(struct nfnl_handle *nfnlh, uint8_t subsys_id,
++		 uint8_t cb_count, uint32_t subscriptions)
+ {
+ 	struct nfnl_subsys_handle *ssh;
+ 
+@@ -435,10 +435,10 @@ int nfnl_sendiov(const struct nfnl_handle *nfnlh, const struct iovec *iov,
+  */
+ void nfnl_fill_hdr(struct nfnl_subsys_handle *ssh,
+ 		    struct nlmsghdr *nlh, unsigned int len, 
+-		    u_int8_t family,
+-		    u_int16_t res_id,
+-		    u_int16_t msg_type,
+-		    u_int16_t msg_flags)
++		    uint8_t family,
++		    uint16_t res_id,
++		    uint16_t msg_type,
++		    uint16_t msg_flags)
+ {
+ 	assert(ssh);
+ 	assert(nlh);
+@@ -815,7 +815,7 @@ int nfnl_addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
+ }
+ 
+ /**
+- * nfnl_nfa_addattr_l - Add variable length attribute to struct nfattr 
++ * nfnl_nfa_addattr_l - Add variable length attribute to struct nfattr
+  *
+  * @nfa: struct nfattr
+  * @maxlen: maximal length of nfattr buffer
+@@ -849,14 +849,14 @@ int nfnl_nfa_addattr_l(struct nfattr *nfa, int maxlen, int type,
+ }
+ 
+ /**
+- * nfnl_addattr8 - Add u_int8_t attribute to nlmsghdr
++ * nfnl_addattr8 - Add uint8_t attribute to nlmsghdr
+  *
+  * @n: netlink message header to which attribute is to be added
+  * @maxlen: maximum length of netlink message header
+  * @type: type of new attribute
+  * @data: content of new attribute
+  */
+-int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
++int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, uint8_t data)
+ {
+ 	assert(n);
+ 	assert(maxlen > 0);
+@@ -866,7 +866,7 @@ int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
+ }
+ 
+ /**
+- * nfnl_nfa_addattr16 - Add u_int16_t attribute to struct nfattr 
++ * nfnl_nfa_addattr16 - Add uint16_t attribute to struct nfattr
+  *
+  * @nfa: struct nfattr
+  * @maxlen: maximal length of nfattr buffer
+@@ -875,7 +875,7 @@ int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
+  *
+  */
+ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type, 
+-		       u_int16_t data)
++		       uint16_t data)
+ {
+ 	assert(nfa);
+ 	assert(maxlen > 0);
+@@ -885,7 +885,7 @@ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
+ }
+ 
+ /**
+- * nfnl_addattr16 - Add u_int16_t attribute to nlmsghdr
++ * nfnl_addattr16 - Add uint16_t attribute to nlmsghdr
+  *
+  * @n: netlink message header to which attribute is to be added
+  * @maxlen: maximum length of netlink message header
+@@ -894,7 +894,7 @@ int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
+  *
+  */
+ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
+-		   u_int16_t data)
++		   uint16_t data)
+ {
+ 	assert(n);
+ 	assert(maxlen > 0);
+@@ -904,7 +904,7 @@ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
+ }
+ 
+ /**
+- * nfnl_nfa_addattr32 - Add u_int32_t attribute to struct nfattr 
++ * nfnl_nfa_addattr32 - Add uint32_t attribute to struct nfattr
+  *
+  * @nfa: struct nfattr
+  * @maxlen: maximal length of nfattr buffer
+@@ -913,7 +913,7 @@ int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
+  *
+  */
+ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type, 
+-		       u_int32_t data)
++		       uint32_t data)
+ {
+ 	assert(nfa);
+ 	assert(maxlen > 0);
+@@ -923,7 +923,7 @@ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
+ }
+ 
+ /**
+- * nfnl_addattr32 - Add u_int32_t attribute to nlmsghdr
++ * nfnl_addattr32 - Add uint32_t attribute to nlmsghdr
+  *
+  * @n: netlink message header to which attribute is to be added
+  * @maxlen: maximum length of netlink message header
+@@ -932,7 +932,7 @@ int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
+  *
+  */
+ int nfnl_addattr32(struct nlmsghdr *n, int maxlen, int type,
+-		   u_int32_t data)
++		   uint32_t data)
+ {
+ 	assert(n);
+ 	assert(maxlen > 0);
+@@ -980,7 +980,7 @@ int nfnl_parse_attr(struct nfattr *tb[], int max, struct nfattr *nfa, int len)
+  *
+  */ 
+ void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa, 
+-			  u_int16_t type, u_int32_t len, unsigned char *val)
++			  uint16_t type, uint32_t len, unsigned char *val)
+ {
+ 	assert(iov);
+ 	assert(nfa);
+@@ -1115,7 +1115,7 @@ struct nlmsghdr *nfnl_get_msg_next(struct nfnl_handle *h,
+  * appropiately.
+  */
+ int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
+-			   u_int8_t type, struct nfnl_callback *cb)
++			   uint8_t type, struct nfnl_callback *cb)
+ {
+ 	assert(ssh);
+ 	assert(cb);
+@@ -1138,7 +1138,7 @@ int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
+  * On sucess, 0 is returned. On error, -1 is returned and errno is
+  * set appropiately.
+  */
+-int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, u_int8_t type)
++int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, uint8_t type)
+ {
+ 	assert(ssh);
+ 
+@@ -1161,8 +1161,8 @@ int nfnl_check_attributes(const struct nfnl_handle *h,
+ 	assert(nfa);
+ 
+ 	int min_len;
+-	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+-	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+ 	const struct nfnl_subsys_handle *ssh;
+ 	struct nfnl_callback *cb;
+ 
+@@ -1212,8 +1212,8 @@ static int __nfnl_handle_msg(struct nfnl_handle *h, struct nlmsghdr *nlh,
+ 			     int len)
+ {
+ 	struct nfnl_subsys_handle *ssh;
+-	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+-	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+ 	int err = 0;
+ 
+ 	if (subsys_id > NFNL_MAX_SUBSYS)
+@@ -1243,7 +1243,7 @@ int nfnl_handle_packet(struct nfnl_handle *h, char *buf, int len)
+ {
+ 
+ 	while (len >= NLMSG_SPACE(0)) {
+-		u_int32_t rlen;
++		uint32_t rlen;
+ 		struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
+ 
+ 		if (nlh->nlmsg_len < sizeof(struct nlmsghdr)
+@@ -1285,8 +1285,8 @@ static int nfnl_is_error(struct nfnl_handle *h, struct nlmsghdr *nlh)
+ static int nfnl_step(struct nfnl_handle *h, struct nlmsghdr *nlh)
+ {
+ 	struct nfnl_subsys_handle *ssh;
+-	u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
+-	u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
++	uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
++	uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
+ 
+ 	/* Is this an error message? */
+ 	if (nfnl_is_error(h, nlh)) {
+diff --git a/src/rtnl.c b/src/rtnl.c
+index 7b4ac7d..284eecd 100644
+--- a/src/rtnl.c
++++ b/src/rtnl.c
+@@ -30,7 +30,7 @@
+ #define rtnl_log(x, ...)
+ 
+ static inline struct rtnl_handler *
+-find_handler(struct rtnl_handle *rtnl_handle, u_int16_t type)
++find_handler(struct rtnl_handle *rtnl_handle, uint16_t type)
+ {
+ 	struct rtnl_handler *h;
+ 	for (h = rtnl_handle->handlers; h; h = h->next) {
+@@ -41,7 +41,7 @@ find_handler(struct rtnl_handle *rtnl_handle, u_int16_t type)
+ }
+ 
+ static int call_handler(struct rtnl_handle *rtnl_handle,
+-			u_int16_t type,
++			uint16_t type,
+ 			struct nlmsghdr *hdr)
+ {
+ 	struct rtnl_handler *h = find_handler(rtnl_handle, type);
+diff --git a/src/rtnl.h b/src/rtnl.h
+index 0c403dc..2cb22a8 100644
+--- a/src/rtnl.h
++++ b/src/rtnl.h
+@@ -7,7 +7,7 @@
+ struct rtnl_handler {
+ 	struct rtnl_handler *next;
+ 
+-	u_int16_t	nlmsg_type;
++	uint16_t	nlmsg_type;
+ 	int		(*handlefn)(struct nlmsghdr *h, void *arg);
+ 	void		*arg;
+ };
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb
new file mode 100644
index 0000000..f7951ff
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Low-level library for netfilter related kernel/userspace communication"
+DESCRIPTION = "libnfnetlink is the low-level library for netfilter related \
+kernel/userspace communication. It provides a generic messaging \
+infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log, \
+nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or \
+management tools in userspace."
+HOMEPAGE = "http://www.netfilter.org/projects/libnfnetlink/index.html"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "http://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-${PV}.tar.bz2;name=tar \
+           file://0001-build-resolve-automake-1.12-warnings.patch \
+           file://0002-src-get-source-code-license-header-in-sync-with-curr.patch \
+           file://0003-configure-uclinux-is-also-linux.patch \
+           file://0004-libnfnetlink-initialize-attribute-padding-to-resolve.patch \
+           file://0005-include-Sync-with-kernel-headers.patch \
+           file://0006-src-Use-stdint-types-everywhere.patch \
+           "
+SRC_URI[tar.md5sum] = "98927583d2016a9fb1936fed992e2c5e"
+SRC_URI[tar.sha256sum] = "f270e19de9127642d2a11589ef2ec97ef90a649a74f56cf9a96306b04817b51a"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch
new file mode 100644
index 0000000..f49ef2a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch
@@ -0,0 +1,631 @@
+From e03b003610a176d608da9a02e433e7ded7e4b75f Mon Sep 17 00:00:00 2001
+From: Todd Cunningham <tcunningham07@gmail.com>
+Date: Wed, 11 Dec 2019 10:18:56 +1000
+Subject: [PATCH] avoid naming local function as one of printf family
+
+Fixes build issues with clang
+error: no member named '__builtin___snprintf_chk' in 'struct expr_ops'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+
+Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com>
+Signed-off-by: Todd Cunningham <tcunningham07@gmail.com>
+---
+ include/expr_ops.h      | 2 +-
+ include/obj.h           | 2 +-
+ src/expr.c              | 4 ++--
+ src/expr/bitwise.c      | 2 +-
+ src/expr/byteorder.c    | 2 +-
+ src/expr/cmp.c          | 2 +-
+ src/expr/connlimit.c    | 2 +-
+ src/expr/counter.c      | 2 +-
+ src/expr/ct.c           | 2 +-
+ src/expr/dup.c          | 2 +-
+ src/expr/dynset.c       | 2 +-
+ src/expr/exthdr.c       | 2 +-
+ src/expr/fib.c          | 2 +-
+ src/expr/flow_offload.c | 2 +-
+ src/expr/fwd.c          | 2 +-
+ src/expr/hash.c         | 2 +-
+ src/expr/immediate.c    | 2 +-
+ src/expr/limit.c        | 2 +-
+ src/expr/log.c          | 2 +-
+ src/expr/lookup.c       | 2 +-
+ src/expr/masq.c         | 2 +-
+ src/expr/match.c        | 2 +-
+ src/expr/meta.c         | 2 +-
+ src/expr/nat.c          | 2 +-
+ src/expr/numgen.c       | 2 +-
+ src/expr/objref.c       | 2 +-
+ src/expr/osf.c          | 2 +-
+ src/expr/payload.c      | 2 +-
+ src/expr/queue.c        | 2 +-
+ src/expr/quota.c        | 2 +-
+ src/expr/range.c        | 2 +-
+ src/expr/redir.c        | 2 +-
+ src/expr/reject.c       | 2 +-
+ src/expr/rt.c           | 2 +-
+ src/expr/socket.c       | 2 +-
+ src/expr/synproxy.c     | 2 +-
+ src/expr/target.c       | 2 +-
+ src/expr/tproxy.c       | 2 +-
+ src/expr/tunnel.c       | 2 +-
+ src/expr/xfrm.c         | 2 +-
+ src/obj/counter.c       | 2 +-
+ src/obj/ct_expect.c     | 2 +-
+ src/obj/ct_helper.c     | 2 +-
+ src/obj/ct_timeout.c    | 2 +-
+ src/obj/limit.c         | 2 +-
+ src/obj/quota.c         | 2 +-
+ src/obj/secmark.c       | 2 +-
+ src/obj/synproxy.c      | 2 +-
+ src/obj/tunnel.c        | 2 +-
+ src/object.c            | 2 +-
+ 49 files changed, 50 insertions(+), 50 deletions(-)
+
+diff --git a/include/expr_ops.h b/include/expr_ops.h
+index a7f1b9a..d2946de 100644
+--- a/include/expr_ops.h
++++ b/include/expr_ops.h
+@@ -17,7 +17,7 @@ struct expr_ops {
+ 	const void *(*get)(const struct nftnl_expr *e, uint16_t type, uint32_t *data_len);
+ 	int 	(*parse)(struct nftnl_expr *e, struct nlattr *attr);
+ 	void	(*build)(struct nlmsghdr *nlh, const struct nftnl_expr *e);
+-	int	(*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e);
++	int	(*snprintf_)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e);
+ };
+ 
+ struct expr_ops *nftnl_expr_ops_lookup(const char *name);
+diff --git a/include/obj.h b/include/obj.h
+index 9394d79..08610d7 100644
+--- a/include/obj.h
++++ b/include/obj.h
+@@ -99,7 +99,7 @@ struct obj_ops {
+ 	const void *(*get)(const struct nftnl_obj *e, uint16_t type, uint32_t *data_len);
+ 	int	(*parse)(struct nftnl_obj *e, struct nlattr *attr);
+ 	void	(*build)(struct nlmsghdr *nlh, const struct nftnl_obj *e);
+-	int	(*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_obj *e);
++	int	(*snprintf_)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_obj *e);
+ };
+ 
+ extern struct obj_ops obj_ops_counter;
+diff --git a/src/expr.c b/src/expr.c
+index 80c4c36..b698a60 100644
+--- a/src/expr.c
++++ b/src/expr.c
+@@ -275,10 +275,10 @@ int nftnl_expr_snprintf(char *buf, size_t size, const struct nftnl_expr *expr,
+ 	if (size)
+ 		buf[0] = '\0';
+ 
+-	if (!expr->ops->snprintf)
++	if (!expr->ops->snprintf_)
+ 		return 0;
+ 
+-	ret = expr->ops->snprintf(buf + offset, remain, type, flags, expr);
++	ret = expr->ops->snprintf_(buf + offset, remain, type, flags, expr);
+ 	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
+ 
+ 	return offset;
+diff --git a/src/expr/bitwise.c b/src/expr/bitwise.c
+index c9d40df..27d644b 100644
+--- a/src/expr/bitwise.c
++++ b/src/expr/bitwise.c
+@@ -219,5 +219,5 @@ struct expr_ops expr_ops_bitwise = {
+ 	.get		= nftnl_expr_bitwise_get,
+ 	.parse		= nftnl_expr_bitwise_parse,
+ 	.build		= nftnl_expr_bitwise_build,
+-	.snprintf	= nftnl_expr_bitwise_snprintf,
++	.snprintf_	= nftnl_expr_bitwise_snprintf,
+ };
+diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c
+index efdfa2b..7ae9dfb 100644
+--- a/src/expr/byteorder.c
++++ b/src/expr/byteorder.c
+@@ -234,5 +234,5 @@ struct expr_ops expr_ops_byteorder = {
+ 	.get		= nftnl_expr_byteorder_get,
+ 	.parse		= nftnl_expr_byteorder_parse,
+ 	.build		= nftnl_expr_byteorder_build,
+-	.snprintf	= nftnl_expr_byteorder_snprintf,
++	.snprintf_	= nftnl_expr_byteorder_snprintf,
+ };
+diff --git a/src/expr/cmp.c b/src/expr/cmp.c
+index 86d7842..e3be442 100644
+--- a/src/expr/cmp.c
++++ b/src/expr/cmp.c
+@@ -216,5 +216,5 @@ struct expr_ops expr_ops_cmp = {
+ 	.get		= nftnl_expr_cmp_get,
+ 	.parse		= nftnl_expr_cmp_parse,
+ 	.build		= nftnl_expr_cmp_build,
+-	.snprintf	= nftnl_expr_cmp_snprintf,
++	.snprintf_	= nftnl_expr_cmp_snprintf,
+ };
+diff --git a/src/expr/connlimit.c b/src/expr/connlimit.c
+index 53af93b..6c8bc40 100644
+--- a/src/expr/connlimit.c
++++ b/src/expr/connlimit.c
+@@ -149,5 +149,5 @@ struct expr_ops expr_ops_connlimit = {
+ 	.get		= nftnl_expr_connlimit_get,
+ 	.parse		= nftnl_expr_connlimit_parse,
+ 	.build		= nftnl_expr_connlimit_build,
+-	.snprintf	= nftnl_expr_connlimit_snprintf,
++	.snprintf_  = nftnl_expr_connlimit_snprintf,
+ };
+diff --git a/src/expr/counter.c b/src/expr/counter.c
+index 89a602e..a32a69e 100644
+--- a/src/expr/counter.c
++++ b/src/expr/counter.c
+@@ -147,5 +147,5 @@ struct expr_ops expr_ops_counter = {
+ 	.get		= nftnl_expr_counter_get,
+ 	.parse		= nftnl_expr_counter_parse,
+ 	.build		= nftnl_expr_counter_build,
+-	.snprintf	= nftnl_expr_counter_snprintf,
++	.snprintf_	= nftnl_expr_counter_snprintf,
+ };
+diff --git a/src/expr/ct.c b/src/expr/ct.c
+index 124de9d..7bde179 100644
+--- a/src/expr/ct.c
++++ b/src/expr/ct.c
+@@ -273,5 +273,5 @@ struct expr_ops expr_ops_ct = {
+ 	.get		= nftnl_expr_ct_get,
+ 	.parse		= nftnl_expr_ct_parse,
+ 	.build		= nftnl_expr_ct_build,
+-	.snprintf	= nftnl_expr_ct_snprintf,
++	.snprintf_	= nftnl_expr_ct_snprintf,
+ };
+diff --git a/src/expr/dup.c b/src/expr/dup.c
+index 2bb35e5..d9bd4b1 100644
+--- a/src/expr/dup.c
++++ b/src/expr/dup.c
+@@ -154,5 +154,5 @@ struct expr_ops expr_ops_dup = {
+ 	.get		= nftnl_expr_dup_get,
+ 	.parse		= nftnl_expr_dup_parse,
+ 	.build		= nftnl_expr_dup_build,
+-	.snprintf	= nftnl_expr_dup_snprintf,
++	.snprintf_	= nftnl_expr_dup_snprintf,
+ };
+diff --git a/src/expr/dynset.c b/src/expr/dynset.c
+index 68115ba..6e43bb4 100644
+--- a/src/expr/dynset.c
++++ b/src/expr/dynset.c
+@@ -288,5 +288,5 @@ struct expr_ops expr_ops_dynset = {
+ 	.get		= nftnl_expr_dynset_get,
+ 	.parse		= nftnl_expr_dynset_parse,
+ 	.build		= nftnl_expr_dynset_build,
+-	.snprintf	= nftnl_expr_dynset_snprintf,
++	.snprintf_	= nftnl_expr_dynset_snprintf,
+ };
+diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
+index e5f714b..e68792b 100644
+--- a/src/expr/exthdr.c
++++ b/src/expr/exthdr.c
+@@ -276,5 +276,5 @@ struct expr_ops expr_ops_exthdr = {
+ 	.get		= nftnl_expr_exthdr_get,
+ 	.parse		= nftnl_expr_exthdr_parse,
+ 	.build		= nftnl_expr_exthdr_build,
+-	.snprintf	= nftnl_expr_exthdr_snprintf,
++	.snprintf_	= nftnl_expr_exthdr_snprintf,
+ };
+diff --git a/src/expr/fib.c b/src/expr/fib.c
+index 9475af4..8e7090d 100644
+--- a/src/expr/fib.c
++++ b/src/expr/fib.c
+@@ -213,5 +213,5 @@ struct expr_ops expr_ops_fib = {
+ 	.get		= nftnl_expr_fib_get,
+ 	.parse		= nftnl_expr_fib_parse,
+ 	.build		= nftnl_expr_fib_build,
+-	.snprintf	= nftnl_expr_fib_snprintf,
++	.snprintf_	= nftnl_expr_fib_snprintf,
+ };
+diff --git a/src/expr/flow_offload.c b/src/expr/flow_offload.c
+index 6ccec9a..c2f2478 100644
+--- a/src/expr/flow_offload.c
++++ b/src/expr/flow_offload.c
+@@ -134,5 +134,5 @@ struct expr_ops expr_ops_flow = {
+ 	.get		= nftnl_expr_flow_get,
+ 	.parse		= nftnl_expr_flow_parse,
+ 	.build		= nftnl_expr_flow_build,
+-	.snprintf	= nftnl_expr_flow_snprintf,
++	.snprintf_	= nftnl_expr_flow_snprintf,
+ };
+diff --git a/src/expr/fwd.c b/src/expr/fwd.c
+index cff8235..bcd7d3f 100644
+--- a/src/expr/fwd.c
++++ b/src/expr/fwd.c
+@@ -174,5 +174,5 @@ struct expr_ops expr_ops_fwd = {
+ 	.get		= nftnl_expr_fwd_get,
+ 	.parse		= nftnl_expr_fwd_parse,
+ 	.build		= nftnl_expr_fwd_build,
+-	.snprintf	= nftnl_expr_fwd_snprintf,
++	.snprintf_	= nftnl_expr_fwd_snprintf,
+ };
+diff --git a/src/expr/hash.c b/src/expr/hash.c
+index 2c801d2..a9f6e7e 100644
+--- a/src/expr/hash.c
++++ b/src/expr/hash.c
+@@ -241,5 +241,5 @@ struct expr_ops expr_ops_hash = {
+ 	.get		= nftnl_expr_hash_get,
+ 	.parse		= nftnl_expr_hash_parse,
+ 	.build		= nftnl_expr_hash_build,
+-	.snprintf	= nftnl_expr_hash_snprintf,
++	.snprintf_	= nftnl_expr_hash_snprintf,
+ };
+diff --git a/src/expr/immediate.c b/src/expr/immediate.c
+index 47106ae..ea86c88 100644
+--- a/src/expr/immediate.c
++++ b/src/expr/immediate.c
+@@ -235,5 +235,5 @@ struct expr_ops expr_ops_immediate = {
+ 	.get		= nftnl_expr_immediate_get,
+ 	.parse		= nftnl_expr_immediate_parse,
+ 	.build		= nftnl_expr_immediate_build,
+-	.snprintf	= nftnl_expr_immediate_snprintf,
++	.snprintf_	= nftnl_expr_immediate_snprintf,
+ };
+diff --git a/src/expr/limit.c b/src/expr/limit.c
+index 5872e27..0ce482f 100644
+--- a/src/expr/limit.c
++++ b/src/expr/limit.c
+@@ -216,5 +216,5 @@ struct expr_ops expr_ops_limit = {
+ 	.get		= nftnl_expr_limit_get,
+ 	.parse		= nftnl_expr_limit_parse,
+ 	.build		= nftnl_expr_limit_build,
+-	.snprintf	= nftnl_expr_limit_snprintf,
++	.snprintf_	= nftnl_expr_limit_snprintf,
+ };
+diff --git a/src/expr/log.c b/src/expr/log.c
+index bbe43d2..5506bc2 100644
+--- a/src/expr/log.c
++++ b/src/expr/log.c
+@@ -267,5 +267,5 @@ struct expr_ops expr_ops_log = {
+ 	.get		= nftnl_expr_log_get,
+ 	.parse		= nftnl_expr_log_parse,
+ 	.build		= nftnl_expr_log_build,
+-	.snprintf	= nftnl_expr_log_snprintf,
++	.snprintf_	= nftnl_expr_log_snprintf,
+ };
+diff --git a/src/expr/lookup.c b/src/expr/lookup.c
+index a495ac0..678868c 100644
+--- a/src/expr/lookup.c
++++ b/src/expr/lookup.c
+@@ -221,5 +221,5 @@ struct expr_ops expr_ops_lookup = {
+ 	.get		= nftnl_expr_lookup_get,
+ 	.parse		= nftnl_expr_lookup_parse,
+ 	.build		= nftnl_expr_lookup_build,
+-	.snprintf	= nftnl_expr_lookup_snprintf,
++	.snprintf_	= nftnl_expr_lookup_snprintf,
+ };
+diff --git a/src/expr/masq.c b/src/expr/masq.c
+index f6f3ceb..88292a6 100644
+--- a/src/expr/masq.c
++++ b/src/expr/masq.c
+@@ -169,5 +169,5 @@ struct expr_ops expr_ops_masq = {
+ 	.get		= nftnl_expr_masq_get,
+ 	.parse		= nftnl_expr_masq_parse,
+ 	.build		= nftnl_expr_masq_build,
+-	.snprintf	= nftnl_expr_masq_snprintf,
++	.snprintf_	= nftnl_expr_masq_snprintf,
+ };
+diff --git a/src/expr/match.c b/src/expr/match.c
+index 4fa74b2..249c6b5 100644
+--- a/src/expr/match.c
++++ b/src/expr/match.c
+@@ -198,5 +198,5 @@ struct expr_ops expr_ops_match = {
+ 	.get		= nftnl_expr_match_get,
+ 	.parse		= nftnl_expr_match_parse,
+ 	.build		= nftnl_expr_match_build,
+-	.snprintf	= nftnl_expr_match_snprintf,
++	.snprintf_	= nftnl_expr_match_snprintf,
+ };
+diff --git a/src/expr/meta.c b/src/expr/meta.c
+index 73f6efa..35d5ec5 100644
+--- a/src/expr/meta.c
++++ b/src/expr/meta.c
+@@ -226,5 +226,5 @@ struct expr_ops expr_ops_meta = {
+ 	.get		= nftnl_expr_meta_get,
+ 	.parse		= nftnl_expr_meta_parse,
+ 	.build		= nftnl_expr_meta_build,
+-	.snprintf	= nftnl_expr_meta_snprintf,
++	.snprintf_	= nftnl_expr_meta_snprintf,
+ };
+diff --git a/src/expr/nat.c b/src/expr/nat.c
+index 6b7d50e..be4a579 100644
+--- a/src/expr/nat.c
++++ b/src/expr/nat.c
+@@ -279,5 +279,5 @@ struct expr_ops expr_ops_nat = {
+ 	.get		= nftnl_expr_nat_get,
+ 	.parse		= nftnl_expr_nat_parse,
+ 	.build		= nftnl_expr_nat_build,
+-	.snprintf	= nftnl_expr_nat_snprintf,
++	.snprintf_	= nftnl_expr_nat_snprintf,
+ };
+diff --git a/src/expr/numgen.c b/src/expr/numgen.c
+index 4e0d541..5995ee3 100644
+--- a/src/expr/numgen.c
++++ b/src/expr/numgen.c
+@@ -195,5 +195,5 @@ struct expr_ops expr_ops_ng = {
+ 	.get		= nftnl_expr_ng_get,
+ 	.parse		= nftnl_expr_ng_parse,
+ 	.build		= nftnl_expr_ng_build,
+-	.snprintf	= nftnl_expr_ng_snprintf,
++	.snprintf_	= nftnl_expr_ng_snprintf,
+ };
+diff --git a/src/expr/objref.c b/src/expr/objref.c
+index 7388b18..e673ffd 100644
+--- a/src/expr/objref.c
++++ b/src/expr/objref.c
+@@ -210,5 +210,5 @@ struct expr_ops expr_ops_objref = {
+ 	.get		= nftnl_expr_objref_get,
+ 	.parse		= nftnl_expr_objref_parse,
+ 	.build		= nftnl_expr_objref_build,
+-	.snprintf	= nftnl_expr_objref_snprintf,
++	.snprintf_	= nftnl_expr_objref_snprintf,
+ };
+diff --git a/src/expr/osf.c b/src/expr/osf.c
+index 98d0df9..618b46e 100644
+--- a/src/expr/osf.c
++++ b/src/expr/osf.c
+@@ -161,5 +161,5 @@ struct expr_ops expr_ops_osf = {
+ 	.get		= nftnl_expr_osf_get,
+ 	.parse		= nftnl_expr_osf_parse,
+ 	.build		= nftnl_expr_osf_build,
+-	.snprintf	= nftnl_expr_osf_snprintf,
++	.snprintf_	= nftnl_expr_osf_snprintf,
+ };
+diff --git a/src/expr/payload.c b/src/expr/payload.c
+index 2192dad..37aacc4 100644
+--- a/src/expr/payload.c
++++ b/src/expr/payload.c
+@@ -266,5 +266,5 @@ struct expr_ops expr_ops_payload = {
+ 	.get		= nftnl_expr_payload_get,
+ 	.parse		= nftnl_expr_payload_parse,
+ 	.build		= nftnl_expr_payload_build,
+-	.snprintf	= nftnl_expr_payload_snprintf,
++	.snprintf_	= nftnl_expr_payload_snprintf,
+ };
+diff --git a/src/expr/queue.c b/src/expr/queue.c
+index 051ef71..b06feff 100644
+--- a/src/expr/queue.c
++++ b/src/expr/queue.c
+@@ -207,5 +207,5 @@ struct expr_ops expr_ops_queue = {
+ 	.get		= nftnl_expr_queue_get,
+ 	.parse		= nftnl_expr_queue_parse,
+ 	.build		= nftnl_expr_queue_build,
+-	.snprintf	= nftnl_expr_queue_snprintf,
++	.snprintf_	= nftnl_expr_queue_snprintf,
+ };
+diff --git a/src/expr/quota.c b/src/expr/quota.c
+index 39a92e6..41797be 100644
+--- a/src/expr/quota.c
++++ b/src/expr/quota.c
+@@ -161,5 +161,5 @@ struct expr_ops expr_ops_quota = {
+ 	.get		= nftnl_expr_quota_get,
+ 	.parse		= nftnl_expr_quota_parse,
+ 	.build		= nftnl_expr_quota_build,
+-	.snprintf	= nftnl_expr_quota_snprintf,
++	.snprintf_	= nftnl_expr_quota_snprintf,
+ };
+diff --git a/src/expr/range.c b/src/expr/range.c
+index d1d5083..b619cdf 100644
+--- a/src/expr/range.c
++++ b/src/expr/range.c
+@@ -227,5 +227,5 @@ struct expr_ops expr_ops_range = {
+ 	.get		= nftnl_expr_range_get,
+ 	.parse		= nftnl_expr_range_parse,
+ 	.build		= nftnl_expr_range_build,
+-	.snprintf	= nftnl_expr_range_snprintf,
++	.snprintf_	= nftnl_expr_range_snprintf,
+ };
+diff --git a/src/expr/redir.c b/src/expr/redir.c
+index 477659a..5c4ebeb 100644
+--- a/src/expr/redir.c
++++ b/src/expr/redir.c
+@@ -181,5 +181,5 @@ struct expr_ops expr_ops_redir = {
+ 	.get		= nftnl_expr_redir_get,
+ 	.parse		= nftnl_expr_redir_parse,
+ 	.build		= nftnl_expr_redir_build,
+-	.snprintf	= nftnl_expr_redir_snprintf,
++	.snprintf_	= nftnl_expr_redir_snprintf,
+ };
+diff --git a/src/expr/reject.c b/src/expr/reject.c
+index 141942e..a98990d 100644
+--- a/src/expr/reject.c
++++ b/src/expr/reject.c
+@@ -148,5 +148,5 @@ struct expr_ops expr_ops_reject = {
+ 	.get		= nftnl_expr_reject_get,
+ 	.parse		= nftnl_expr_reject_parse,
+ 	.build		= nftnl_expr_reject_build,
+-	.snprintf	= nftnl_expr_reject_snprintf,
++	.snprintf_	= nftnl_expr_reject_snprintf,
+ };
+diff --git a/src/expr/rt.c b/src/expr/rt.c
+index 0fce72d..32ace19 100644
+--- a/src/expr/rt.c
++++ b/src/expr/rt.c
+@@ -177,5 +177,5 @@ struct expr_ops expr_ops_rt = {
+ 	.get		= nftnl_expr_rt_get,
+ 	.parse		= nftnl_expr_rt_parse,
+ 	.build		= nftnl_expr_rt_build,
+-	.snprintf	= nftnl_expr_rt_snprintf,
++	.snprintf_	= nftnl_expr_rt_snprintf,
+ };
+diff --git a/src/expr/socket.c b/src/expr/socket.c
+index 96550d5..2394dbf 100644
+--- a/src/expr/socket.c
++++ b/src/expr/socket.c
+@@ -174,5 +174,5 @@ struct expr_ops expr_ops_socket = {
+ 	.get		= nftnl_expr_socket_get,
+ 	.parse		= nftnl_expr_socket_parse,
+ 	.build		= nftnl_expr_socket_build,
+-	.snprintf	= nftnl_expr_socket_snprintf,
++	.snprintf_	= nftnl_expr_socket_snprintf,
+ };
+diff --git a/src/expr/synproxy.c b/src/expr/synproxy.c
+index 245f4fb..9721029 100644
+--- a/src/expr/synproxy.c
++++ b/src/expr/synproxy.c
+@@ -166,5 +166,5 @@ struct expr_ops expr_ops_synproxy = {
+ 	.get		= nftnl_expr_synproxy_get,
+ 	.parse		= nftnl_expr_synproxy_parse,
+ 	.build		= nftnl_expr_synproxy_build,
+-	.snprintf	= nftnl_expr_synproxy_snprintf,
++	.snprintf_	= nftnl_expr_synproxy_snprintf,
+ };
+diff --git a/src/expr/target.c b/src/expr/target.c
+index 9100038..7180085 100644
+--- a/src/expr/target.c
++++ b/src/expr/target.c
+@@ -198,5 +198,5 @@ struct expr_ops expr_ops_target = {
+ 	.get		= nftnl_expr_target_get,
+ 	.parse		= nftnl_expr_target_parse,
+ 	.build		= nftnl_expr_target_build,
+-	.snprintf	= nftnl_expr_target_snprintf,
++	.snprintf_	= nftnl_expr_target_snprintf,
+ };
+diff --git a/src/expr/tproxy.c b/src/expr/tproxy.c
+index 3827b75..feabbbe 100644
+--- a/src/expr/tproxy.c
++++ b/src/expr/tproxy.c
+@@ -183,5 +183,5 @@ struct expr_ops expr_ops_tproxy = {
+ 	.get		= nftnl_expr_tproxy_get,
+ 	.parse		= nftnl_expr_tproxy_parse,
+ 	.build		= nftnl_expr_tproxy_build,
+-	.snprintf	= nftnl_expr_tproxy_snprintf,
++	.snprintf_	= nftnl_expr_tproxy_snprintf,
+ };
+diff --git a/src/expr/tunnel.c b/src/expr/tunnel.c
+index b2b8d72..1ed46d3 100644
+--- a/src/expr/tunnel.c
++++ b/src/expr/tunnel.c
+@@ -173,5 +173,5 @@ struct expr_ops expr_ops_tunnel = {
+ 	.get		= nftnl_expr_tunnel_get,
+ 	.parse		= nftnl_expr_tunnel_parse,
+ 	.build		= nftnl_expr_tunnel_build,
+-	.snprintf	= nftnl_expr_tunnel_snprintf,
++	.snprintf_	= nftnl_expr_tunnel_snprintf,
+ };
+diff --git a/src/expr/xfrm.c b/src/expr/xfrm.c
+index 8fe5438..b6b2772 100644
+--- a/src/expr/xfrm.c
++++ b/src/expr/xfrm.c
+@@ -239,5 +239,5 @@ struct expr_ops expr_ops_xfrm = {
+ 	.get		= nftnl_expr_xfrm_get,
+ 	.parse		= nftnl_expr_xfrm_parse,
+ 	.build		= nftnl_expr_xfrm_build,
+-	.snprintf	= nftnl_expr_xfrm_snprintf,
++	.snprintf_	= nftnl_expr_xfrm_snprintf,
+ };
+diff --git a/src/obj/counter.c b/src/obj/counter.c
+index 1baba4e..3710bce 100644
+--- a/src/obj/counter.c
++++ b/src/obj/counter.c
+@@ -145,5 +145,5 @@ struct obj_ops obj_ops_counter = {
+ 	.get		= nftnl_obj_counter_get,
+ 	.parse		= nftnl_obj_counter_parse,
+ 	.build		= nftnl_obj_counter_build,
+-	.snprintf	= nftnl_obj_counter_snprintf,
++	.snprintf_	= nftnl_obj_counter_snprintf,
+ };
+diff --git a/src/obj/ct_expect.c b/src/obj/ct_expect.c
+index c0bb5ba..953c08c 100644
+--- a/src/obj/ct_expect.c
++++ b/src/obj/ct_expect.c
+@@ -209,5 +209,5 @@ struct obj_ops obj_ops_ct_expect = {
+ 	.get		= nftnl_obj_ct_expect_get,
+ 	.parse		= nftnl_obj_ct_expect_parse,
+ 	.build		= nftnl_obj_ct_expect_build,
+-	.snprintf	= nftnl_obj_ct_expect_snprintf,
++	.snprintf_	= nftnl_obj_ct_expect_snprintf,
+ };
+diff --git a/src/obj/ct_helper.c b/src/obj/ct_helper.c
+index d91f636..2037461 100644
+--- a/src/obj/ct_helper.c
++++ b/src/obj/ct_helper.c
+@@ -166,5 +166,5 @@ struct obj_ops obj_ops_ct_helper = {
+ 	.get		= nftnl_obj_ct_helper_get,
+ 	.parse		= nftnl_obj_ct_helper_parse,
+ 	.build		= nftnl_obj_ct_helper_build,
+-	.snprintf	= nftnl_obj_ct_helper_snprintf,
++	.snprintf_	= nftnl_obj_ct_helper_snprintf,
+ };
+diff --git a/src/obj/ct_timeout.c b/src/obj/ct_timeout.c
+index e2e9991..a4f2dd2 100644
+--- a/src/obj/ct_timeout.c
++++ b/src/obj/ct_timeout.c
+@@ -330,5 +330,5 @@ struct obj_ops obj_ops_ct_timeout = {
+ 	.get		= nftnl_obj_ct_timeout_get,
+ 	.parse		= nftnl_obj_ct_timeout_parse,
+ 	.build		= nftnl_obj_ct_timeout_build,
+-	.snprintf	= nftnl_obj_ct_timeout_snprintf,
++	.snprintf_	= nftnl_obj_ct_timeout_snprintf,
+ };
+diff --git a/src/obj/limit.c b/src/obj/limit.c
+index 60b0159..538f37a 100644
+--- a/src/obj/limit.c
++++ b/src/obj/limit.c
+@@ -185,5 +185,5 @@ struct obj_ops obj_ops_limit = {
+ 	.get		= nftnl_obj_limit_get,
+ 	.parse		= nftnl_obj_limit_parse,
+ 	.build		= nftnl_obj_limit_build,
+-	.snprintf	= nftnl_obj_limit_snprintf,
++	.snprintf_	= nftnl_obj_limit_snprintf,
+ };
+diff --git a/src/obj/quota.c b/src/obj/quota.c
+index 1914037..585a088 100644
+--- a/src/obj/quota.c
++++ b/src/obj/quota.c
+@@ -161,5 +161,5 @@ struct obj_ops obj_ops_quota = {
+ 	.get		= nftnl_obj_quota_get,
+ 	.parse		= nftnl_obj_quota_parse,
+ 	.build		= nftnl_obj_quota_build,
+-	.snprintf	= nftnl_obj_quota_snprintf,
++	.snprintf_	= nftnl_obj_quota_snprintf,
+ };
+diff --git a/src/obj/secmark.c b/src/obj/secmark.c
+index e27b5fa..6241bee 100644
+--- a/src/obj/secmark.c
++++ b/src/obj/secmark.c
+@@ -133,5 +133,5 @@ struct obj_ops obj_ops_secmark = {
+ 	.get		= nftnl_obj_secmark_get,
+ 	.parse		= nftnl_obj_secmark_parse,
+ 	.build		= nftnl_obj_secmark_build,
+-	.snprintf	= nftnl_obj_secmark_snprintf,
++	.snprintf_	= nftnl_obj_secmark_snprintf,
+ };
+diff --git a/src/obj/tunnel.c b/src/obj/tunnel.c
+index 7ffade8..800eb3e 100644
+--- a/src/obj/tunnel.c
++++ b/src/obj/tunnel.c
+@@ -564,5 +564,5 @@ struct obj_ops obj_ops_tunnel = {
+ 	.get		= nftnl_obj_tunnel_get,
+ 	.parse		= nftnl_obj_tunnel_parse,
+ 	.build		= nftnl_obj_tunnel_build,
+-	.snprintf	= nftnl_obj_tunnel_snprintf,
++	.snprintf_	= nftnl_obj_tunnel_snprintf,
+ };
+diff --git a/src/object.c b/src/object.c
+index d8c87ee..5307d7e 100644
+--- a/src/object.c
++++ b/src/object.c
+@@ -370,7 +370,7 @@ static int nftnl_obj_snprintf_dflt(char *buf, size_t size,
+ 	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
+ 
+ 	if (obj->ops) {
+-		ret = obj->ops->snprintf(buf + offset, offset, type, flags,
++		ret = obj->ops->snprintf_(buf + offset, offset, type, flags,
+ 					 obj);
+ 		SNPRINTF_BUFFER_SIZE(ret, remain, offset);
+ 	}
+diff --git a/src/obj/synproxy.c b/src/obj/synproxy.c
+index 56ebc85..6b5380f 100644
+--- a/src/obj/synproxy.c
++++ b/src/obj/synproxy.c
+@@ -157,5 +157,5 @@ struct obj_ops obj_ops_synproxy = {
+ 	.get		= nftnl_obj_synproxy_get,
+ 	.parse		= nftnl_obj_synproxy_parse,
+ 	.build		= nftnl_obj_synproxy_build,
+-	.snprintf	= nftnl_obj_synproxy_snprintf,
++	.snprintf_	= nftnl_obj_synproxy_snprintf,
+ };
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb
new file mode 100644
index 0000000..4ff00bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Library for low-level interaction with nftables Netlink's API over libmnl"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26"
+SECTION = "libs"
+DEPENDS = "libmnl"
+
+SRCREV = "eedafeb6db330b8adff1b7cdd3dac325f9144195"
+SRC_URI = "git://git.netfilter.org/libnftnl \
+           file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nfacct/nfacct_1.0.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nfacct/nfacct_1.0.2.bb
new file mode 100644
index 0000000..3245455
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nfacct/nfacct_1.0.2.bb
@@ -0,0 +1,17 @@
+SUMMARY = "nfacct is the command line tool to create/retrieve/delete accounting objects"
+HOMEPAGE = "http://netfilter.org/projects/nfacct/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+UPSTREAM_CHECK_URI = "ftp://ftp.netfilter.org/pub/nfacct/"
+
+SRC_URI = "ftp://ftp.netfilter.org/pub/${BPN}/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "94faafdaaed85ca9220c5692be8a408e"
+SRC_URI[sha256sum] = "ecff2218754be318bce3c3a5d1775bab93bf4168b2c4aac465785de5655fbd69"
+DEPENDS = "libnfnetlink libmnl libnetfilter-acct"
+
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+
+inherit autotools pkgconfig
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.9.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.9.6.bb
new file mode 100644
index 0000000..41f7f4c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_0.9.6.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Netfilter Tables userspace utillites"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
+
+DEPENDS = "libmnl libnftnl bison-native \
+           ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
+
+# Ensure we reject the 0.099 version by matching at least two dots
+UPSTREAM_CHECK_REGEX = "nftables-(?P<pver>\d+(\.\d+){2,}).tar.bz2"
+
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2"
+SRC_URI[sha256sum] = "68d6fdfe8ab02303e6b1f13968a4022da5b0120110eaee3233d806857937b66e"
+
+inherit autotools manpages pkgconfig
+
+PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG[json] = "--with-json, --without-json, jansson"
+PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native"
+PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp"
+PACKAGECONFIG[python] = "--enable-python --with-python-bin=${PYTHON}, --with-python-bin="", python3"
+PACKAGECONFIG[readline] = "--with-cli=readline, --without-cli, readline"
+PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
+
+RRECOMMENDS_${PN} += "kernel-module-nf-tables"
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}"
+RDEPENDS_${PN}-python = "python3-core python3-json"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-irc/znc/znc_1.7.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-irc/znc/znc_1.7.5.bb
new file mode 100644
index 0000000..a3d4b7c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-irc/znc/znc_1.7.5.bb
@@ -0,0 +1,32 @@
+SUMMARY = "ZNC, an advanced IRC bouncer"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+DEPENDS = "openssl zlib icu"
+
+SRC_URI = "git://github.com/znc/znc.git;name=znc \
+           git://github.com/jimloco/Csocket.git;destsuffix=git/third_party/Csocket;name=Csocket \
+          "
+SRCREV_znc = "c7f72f8bc800115ac985e7e13eace78031cb1b50"
+SRCREV_Csocket = "e8d9e0bb248c521c2c7fa01e1c6a116d929c41b4"
+
+# This constructs a composite revision based on multiple SRCREV's.
+#
+SRCREV_FORMAT = "znc_Csocket"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# ZNC has a custom autogen.sh that states that this command is needed *and* expected to fail
+do_configure_prepend() {
+    automake --add-missing || true
+}
+
+do_install_append() {
+    sed -i -e 's|${DEBUG_PREFIX_MAP}||g; s|--sysroot=${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch
new file mode 100644
index 0000000..a9dc9dc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch
@@ -0,0 +1,29 @@
+From ce8faa3ee266ea69431805e6ed4bd7102d982508 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Thu, 12 Nov 2020 09:43:38 +0100
+Subject: [PATCH] compat: SYM_FUNC_{START,END} were backported to 5.4
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+
+Upstream-Status: Backport
+Fixes build failure in Dunfell.
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ compat/compat-asm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: src/compat/compat-asm.h
+===================================================================
+--- src.orig/compat/compat-asm.h
++++ src/compat/compat-asm.h
+@@ -40,7 +40,7 @@
+ #undef pull
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 76)
+ #define SYM_FUNC_START ENTRY
+ #define SYM_FUNC_END ENDPROC
+ #endif
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch
new file mode 100644
index 0000000..f01cfe4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch
@@ -0,0 +1,32 @@
+From 122f06bfd8fc7b06a0899fa9adc4ce8e06900d98 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Sun, 7 Mar 2021 08:14:33 -0700
+Subject: [PATCH] compat: icmp_ndo_send functions were backported extensively
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+
+Upstream-Status: Backport
+
+Fixes build with 5.4.103 update.
+/include/linux/icmpv6.h:56:6: note: previous declaration of 'icmpv6_ndo_send' was here
+|    56 | void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);
+
+Signed-of-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ src/compat/compat.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: src/compat/compat.h
+===================================================================
+--- src.orig/compat/compat.h
++++ src/compat/compat.h
+@@ -946,7 +946,7 @@ static inline int skb_ensure_writable(st
+ }
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 102) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 178) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 223) && LINUX_VERSION_CODE > KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 259) || defined(ISRHEL8) || defined(ISUBUNTU1804)
+ #if IS_ENABLED(CONFIG_NF_NAT)
+ #include <linux/ip.h>
+ #include <linux/icmpv6.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb
new file mode 100644
index 0000000..6ed988b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb
@@ -0,0 +1,30 @@
+require wireguard.inc
+
+SRCREV = "43f57dac7b8305024f83addc533c9eede6509129"
+
+SRC_URI = "git://git.zx2c4.com/wireguard-linux-compat \
+           file://0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch \
+           file://0001-compat-icmp_ndo_send-functions-were-backported-exten.patch "
+
+inherit module kernel-module-split
+
+DEPENDS = "virtual/kernel libmnl"
+
+# This module requires Linux 3.10 higher and several networking related
+# configuration options. For exact kernel requirements visit:
+# https://www.wireguard.io/install/#kernel-requirements
+
+EXTRA_OEMAKE_append = " \
+    KERNELDIR=${STAGING_KERNEL_DIR} \
+    "
+
+MAKE_TARGETS = "module"
+
+RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit"
+MODULE_NAME = "wireguard"
+
+module_do_install() {
+    install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}
+    install -m 0644 ${MODULE_NAME}.ko \
+    ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}/${MODULE_NAME}.ko
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb
new file mode 100644
index 0000000..f698b9a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb
@@ -0,0 +1,25 @@
+require wireguard.inc
+
+SRCREV = "a8063adc8ae9b4fc9848500e93f94bee8ad2e585"
+SRC_URI = "git://git.zx2c4.com/wireguard-tools"
+
+inherit bash-completion systemd pkgconfig
+
+DEPENDS += "wireguard-module libmnl"
+
+do_install () {
+    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
+        SYSTEMDUNITDIR="${systemd_unitdir}" \
+        WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
+        WITH_BASHCOMPLETION=yes \
+        WITH_WGQUICK=yes \
+        install
+}
+
+FILES_${PN} = " \
+    ${sysconfdir} \
+    ${systemd_unitdir} \
+    ${bindir} \
+"
+
+RDEPENDS_${PN} = "wireguard-module bash"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
new file mode 100644
index 0000000..a3a7867
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
@@ -0,0 +1,13 @@
+SUMMARY = "WireGuard is an extremely simple yet fast and modern VPN"
+DESCRIPTION="WireGuard is a secure network tunnel, operating at layer 3, \
+implemented as a kernel virtual network interface for Linux, which aims to \
+replace both IPsec for most use cases, as well as popular user space and/or \
+TLS-based solutions like OpenVPN, while being more secure, more performant, \
+and easier to use."
+SECTION = "networking"
+HOMEPAGE = "https://www.wireguard.io/"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git/src"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch
new file mode 100644
index 0000000..8376603
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch
@@ -0,0 +1,30 @@
+From 2ee0c51d81a0a08d64b64ab624074e5f7cd9615a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 00:07:32 -0700
+Subject: [PATCH] ftp: include sys/types.h for u_long
+
+fixes
+ftp.c:1091:2: error: unknown type name 'u_long'; did you mean 'long'?
+  u_long a1,a2,a3,a4,p1,p2;
+  ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ftp/ftp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ftp/ftp.c b/ftp/ftp.c
+index 7a56af6..5dcb513 100644
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
+@@ -43,6 +43,7 @@ char ftp_rcsid[] =
+ #include <sys/socket.h>
+ #include <sys/time.h>
+ #include <sys/file.h>
++#include <sys/types.h>
+ 
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch
new file mode 100644
index 0000000..5a47fd9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch
@@ -0,0 +1,28 @@
+This adds ARG_MAX define to be _SC_ARG_MAX
+
+Upstream-Status: Inappropriate.
+Most distros have their own verion for this fix.
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-ftp-0.17/ftp/glob.c
+===================================================================
+--- netkit-ftp-0.17.orig/ftp/glob.c
++++ netkit-ftp-0.17/ftp/glob.c
+@@ -50,6 +50,7 @@ char glob_rcsid[] =
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ 
+ #include "ftp_var.h"  /* for protos only */
+ #include "glob.h"
+@@ -57,6 +58,9 @@ char glob_rcsid[] =
+ #define	QUOTE 0200
+ #define	TRIM 0177
+ #define	eq(a,b)		(strcmp(a, b)==0)
++#ifndef ARG_MAX
++#define ARG_MAX (sysconf(_SC_ARG_MAX))
++#endif
+ #define	GAVSIZ		(ARG_MAX/6)
+ #define	isdir(d)	((d.st_mode & S_IFMT) == S_IFDIR)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb
new file mode 100644
index 0000000..cf306ec
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "netkit-ft includes the ftp client."
+SECTION = "net"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+LICENSE = "BSD-4-Clause"
+
+LIC_FILES_CHKSUM = "file://ftp/ftp.c;beginline=2;endline=3;md5=2d40a75a50d83b8f6317b3f53db72bfa"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}.orig.tar.gz;name=archive \
+           ${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}-31.debian.tar.xz;name=patch31 \
+           file://Add_ARG_MAX_define.patch \
+           file://0001-ftp-include-sys-types.h-for-u_long.patch \
+           "
+
+SRC_URI[archive.md5sum] = "94441610c9b86ef45c4c6ec609444060"
+SRC_URI[archive.sha256sum] = "61c913299b81a4671ff089aac821329f7db9bc111aa812993dd585798b700349"
+SRC_URI[patch31.md5sum] = "93d71e28ce70df69e080c7f90da63cac"
+SRC_URI[patch31.sha256sum] = "4edd46a32d70daa7ba00f0ebf0118dc5d17dff23d6e46aa21a2722be2e22d1c1"
+
+inherit autotools-brokensep
+
+CLEANBROKEN = "1"
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+}
+
+BINMODE = "0755"
+MANMODE = "0644"
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man5
+
+    install -m${BINMODE} ${S}/ftp/ftp ${D}${bindir}
+    ln -sf ftp ${D}${bindir}/pftp
+    install -m${MANMODE} ${S}/ftp/ftp.1 ${D}${mandir}/man1
+    ln -sf ftp.1 ${D}${mandir}/man1/pftp.1
+    install -m${MANMODE} ${S}/ftp/netrc.5 ${D}${mandir}/man5
+}
+
+PACKAGES = "${PN} ${PN}-doc ${BPN}-dbg"
+FILES_${PN} = "${bindir}/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+            ${bindir}/.debug"
+
+RDEPENDS_${PN} = "readline"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch
new file mode 100644
index 0000000..8bd77d2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch
@@ -0,0 +1,51 @@
+From 439e3e35f7fcbff1abb782de4b19b31e43ae3449 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 09:59:19 -0700
+Subject: [PATCH] rpcgen: Fix printf formats
+
+Fixes build with hardening flags
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ rpcgen/rpc_hout.c   | 2 +-
+ rpcgen/rpc_tblout.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c
+index 0ef52df..09a7b57 100644
+--- a/rpcgen/rpc_hout.c
++++ b/rpcgen/rpc_hout.c
+@@ -474,7 +474,7 @@ pdeclaration(const char *name, declaration *dec, int tab,
+ 			break;
+ 		}
+ 	}
+-	f_print(fout, separator );
++	f_print(fout, "%s", separator );
+ }
+ 
+ static int
+diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c
+index d64bfde..fd62a52 100644
+--- a/rpcgen/rpc_tblout.c
++++ b/rpcgen/rpc_tblout.c
+@@ -99,7 +99,7 @@ write_table(const definition *def)
+ 		} 
+ 		else {
+ 			expected = 1;
+-			f_print(fout, null_entry);
++			f_print(fout, "%s", null_entry);
+ 		}
+ 		for (proc = vp->procs; proc != NULL; proc = proc->next) {
+ 			current = atoi(proc->proc_num);
+@@ -139,7 +139,7 @@ write_table(const definition *def)
+ 		}
+ 
+ 		/* print the table trailer */
+-		f_print(fout, tbl_end);
++		f_print(fout, "%s", tbl_end);
+ 		f_print(fout, tbl_nproc, progvers, progvers, progvers);
+ 	}
+ }
+-- 
+2.13.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch
new file mode 100644
index 0000000..d54cea9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch
@@ -0,0 +1,39 @@
+This fixes an issue when building with gcc 4.x
+
+https://github.com/openembedded/openembedded/tree/master/recipes/netkit-rpc/netkit-rpc
+
+Upstream-status: Backported
+
+Signed-off-By: Armin Kuster <akuster808@gmail.com>
+
+--- netkit-rpc-0.17/rpcgen/rpc_cout.c~gcc4
++++ netkit-rpc-0.17/rpcgen/rpc_cout.c
+@@ -101,8 +101,6 @@
+ 	case DEF_TYPEDEF:
+ 		emit_typedef(def);
+ 		break;
+-	default:
+-	  /* can't happen */
+ 	}
+ 	print_trailer();
+ }
+@@ -664,9 +662,6 @@
+ 	   decl->name,decl->array_max);
+   emit_single_in_line(decl,flag,REL_VECTOR);
+     f_print(fout,"\t\t   }\n\t\t };\n");
+-
+-  default:
+-    /* ?... do nothing I guess */
+   }
+ }
+ 
+--- netkit-rpc-0.17/rpcgen/rpc_hout.c~gcc4
++++ netkit-rpc-0.17/rpcgen/rpc_hout.c
+@@ -106,8 +106,6 @@
+ 		f_print(fout, "\n");
+ 		pprogramdef(def);
+ 		break;
+-	  default:
+-	    /* ?... shouldn't happen I guess */
+ 	}
+ }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
new file mode 100644
index 0000000..ebe867d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "netkit-rpc includes rpcinfo and rpcgen."
+HOMEPAGE = "http://ftp.linux.org.uk/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "SPL-1.0"
+LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89"
+
+DEPENDS += "libtirpc"
+SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \
+           file://gcc4.patch \
+           file://0001-rpcgen-Fix-printf-formats.patch \
+           "
+SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642"
+SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b"
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LIBS += "-ltirpc"
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    echo "LDFLAGS=${LDFLAGS}" > MCONFIG
+    echo "CC=${CC}" >> MCONFIG
+    echo "LD=${LD}" >> MCONFIG
+    echo "CFLAGS=${CFLAGS}" >> MCONFIG
+    echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+    echo "LIBS=${LIBS}" >> MCONFIG
+}
+
+do_compile () {
+    oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}'
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man8
+
+    # remove strip flag
+    sed -i 's/install -s/install/' rpcinfo/Makefile
+    sed -i 's/install -s/install/' rpcgen/Makefile
+
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch
new file mode 100644
index 0000000..285667b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch
@@ -0,0 +1,35 @@
+From a7831a16c3e0e1463d5eb08a58af152cb75ca976 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Mon, 15 Apr 2019 06:05:58 +0000
+Subject: [PATCH] Fix CVE-2019-7282 and CVE-2019-7283
+
+Description: Fix CVE-2018-20685 and CVE-2019-6111
+Bug-Debian: https://bugs.debian.org/920486
+Origin: https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2#diff-9f340c228413d5a9a9206ea2ed2bc624R1114
+
+Upstream-Status: Backport [Debian]
+[https://sources.debian.org/src/netkit-rsh/0.17-20/debian/patches/fix-CVE-2018-20685-and-CVE-2019-6111.patch]
+
+CVE: CVE-2019-7282 CVE-2019-7283
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ rcp/rcp.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/rcp/rcp.c b/rcp/rcp.c
+index ca61c18..77d8ff8 100644
+--- a/rcp/rcp.c
++++ b/rcp/rcp.c
+@@ -740,6 +740,11 @@ sink(int argc, char *argv[])
+ 			size = size * 10 + (*cp++ - '0');
+ 		if (*cp++ != ' ')
+ 			SCREWUP("size not delimited");
++		if (*cp == '\0' || strchr(cp, '/') != NULL ||
++		    strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
++			error("error: unexpected filename: %s", cp);
++			exit(1);
++		}
+ 		if (targisdir) {
+ 			static char *namebuf;
+ 			static int cursize;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
new file mode 100644
index 0000000..1d3631d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
@@ -0,0 +1,27 @@
+fix host variable when rsh is renamed to other.
+
+Upstream-Status: Pending
+
+If rsh is renamed to other, like rsh.netkit, host variable is assigned to
+rsh.netkit, which is wrong.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ rsh/rsh.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/rsh/rsh.c b/rsh/rsh.c
+index ac594f9..11f533e 100644
+--- a/rsh/rsh.c
++++ b/rsh/rsh.c
+@@ -100,7 +100,6 @@ main(int argc, char *argv[])
+ #else
+ 	if (!strcmp(p, "rsh")) asrsh = 1;
+ #endif
+-	else host = p;
+ 
+ 	/* handle "rsh host flags" */
+ 	if (!host && argc > 2 && argv[1][0] != '-') {
+-- 
+1.7.5.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch
new file mode 100644
index 0000000..cd6df62
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch
@@ -0,0 +1,34 @@
+Fix build issue do to Deprecate union wait and remove support from wait functions [BZ #19613]
+
+| rlogin.c: In function 'catch_child':
+| rlogin.c:463:13: error: storage size of 'status' isn't known
+|   union wait status;
+
+https://sourceware.org/ml/libc-alpha/2016-02/msg00342.html
+
+Upstream-Status: Inappropriate [ no upstream maintaner ]
+
+Signed-off-by Armin Kuster <akuster@mvista.com>
+
+Index: netkit-rsh-0.17/rlogin/rlogin.c
+===================================================================
+--- netkit-rsh-0.17.orig/rlogin/rlogin.c
++++ netkit-rsh-0.17/rlogin/rlogin.c
+@@ -460,7 +460,7 @@ writeroob(int ignore)
+ void
+ catch_child(int ignore)
+ {
+-	union wait status;
++	int status;
+ 	int pid;
+ 
+ 	(void)ignore;
+@@ -471,7 +471,7 @@ catch_child(int ignore)
+ 			return;
+ 		/* if the child (reader) dies, just quit */
+ 		if (pid < 0 || (pid == childpid && !WIFSTOPPED(status)))
+-			done((int)(status.w_termsig | status.w_retcode));
++            done((int)(WTERMSIG(status) | WEXITSTATUS(status)));
+ 	}
+ 	/* NOTREACHED */
+ }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
new file mode 100644
index 0000000..efd060f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
@@ -0,0 +1,30 @@
+make rexec support ipv6
+
+Upstream-status: Pending
+
+rexec equals rexec_af(... ,AF_INET) which only support ipv4,
+use rexec_af(..., AF_UNSPEC) to support both ipv6 and ipv4.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ rexec/rexec.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rexec/rexec.c b/rexec/rexec.c
+index 0913c02..9c8f769 100644
+--- a/rexec/rexec.c
++++ b/rexec/rexec.c
+@@ -214,8 +214,8 @@ int main(int argc, char *argv[])
+     passwd = getpass("Password: ");
+   }
+ 
+-  if ( (sock = rexec(&host, port_exec, user_name, passwd, command, 
+-		     p_to_aux_sock)) < 0 )
++  if ( (sock = rexec_af(&host, port_exec, user_name, passwd, command, 
++		     p_to_aux_sock, AF_UNSPEC)) < 0 )
+  {
+     fprintf(stderr,"%s: Error in rexec system call: ",argv[0]);
+     perror(NULL);
+-- 
+1.7.4.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch
new file mode 100644
index 0000000..fdd535b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch
@@ -0,0 +1,39 @@
+netkit-rsh:
+Allow to build with no PAM enabled.
+
+Upstream-Status: Inappropriate [ no upstream maintaner ]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-rsh-0.17/rshd/rshd.c
+===================================================================
+--- netkit-rsh-0.17.orig/rshd/rshd.c
++++ netkit-rsh-0.17/rshd/rshd.c
+@@ -110,9 +110,11 @@ extern	char	**environ;
+ static void error(const char *fmt, ...);
+ static void doit(struct sockaddr *fromp, socklen_t fromlen);
+ static char *getstr(char *, size_t, const char *);
++#ifdef USE_PAM
+ static int err_conv(
+ 	int, const struct pam_message **, struct pam_response **, void *
+ );
++#endif /* USE_PAM */
+ 
+ extern int _check_rhosts_file;
+ 
+@@ -256,6 +258,7 @@ static void stderr_parent(int sock, int
+ }
+ 
+ 
++#ifdef USE_PAM
+ static int err_conv(
+ 	int num_msg, const struct pam_message **msg,
+ 	struct pam_response **resp, void *appdata_ptr
+@@ -266,6 +269,7 @@ static int err_conv(
+ 	(void) appdata_ptr;
+ 	return PAM_CONV_ERR;
+ }
++#endif
+ 
+ static struct passwd *doauth(const char *remuser, 
+ 			     const char *hostname, 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
new file mode 100644
index 0000000..94e5dda
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
@@ -0,0 +1,10 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rexec" must be
+# listed in /etc/securetty.
+auth       required     pam_nologin.so
+auth       required     pam_env.so
+auth       include      common-auth
+account    include      common-account
+session	   optional     pam_keyinit.so    force revoke
+session    include      common-session
+session    required     pam_loginuid.so
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
new file mode 100644
index 0000000..7354360
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
@@ -0,0 +1,20 @@
+# default: off
+# description:
+# Rexecd is the server for the rexec program. The server provides remote 
+# execution facilities with authentication based on user names and 
+# passwords.
+#
+service exec
+{
+	socket_type	= stream
+	protocol	= tcp
+	flags		= NAMEINARGS
+	wait		= no
+	user		= root
+	group		= root
+	log_on_success	+= USERID
+	log_on_failure	+= USERID
+	server		= /usr/sbin/tcpd
+	server_args	= /usr/sbin/in.rexecd
+	disable		= yes
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
new file mode 100644
index 0000000..b30f139
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
@@ -0,0 +1,12 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rlogin" must be
+# listed in /etc/securetty.
+auth       required     pam_nologin.so
+auth       required     pam_securetty.so
+auth       required     pam_env.so
+auth       include      common-auth
+account    include      common-account
+password   include      common-password
+session	   optional     pam_keyinit.so    force revoke
+session    include      common-session
+session    required     pam_loginuid.so
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
new file mode 100644
index 0000000..70493e6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
@@ -0,0 +1,23 @@
+# default: off
+# description:
+# Rlogind is a server for the rlogin program. The server provides remote 
+# execution with authentication based on privileged port numbers from trusted
+# host
+#
+service login
+{
+	socket_type	= stream
+	protocol	= tcp
+	flags		= NAMEINARGS
+	wait		= no
+	user		= root
+	group		= root
+	log_on_success	+= USERID
+	log_on_failure	+= USERID
+	server		= /usr/sbin/tcpd
+	server_args	= /usr/sbin/in.rlogind -a
+	disable		= yes
+}
+							
+							
+							
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch
new file mode 100644
index 0000000..c12ee9b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch
@@ -0,0 +1,77 @@
+This fixes a build issue caused by linking order.
+
+Upstream-Status: Inappropriate
+Most distos have there own verison of this fix. This was derived by
+* Fix link order to list libraries after the objects that require them
+(LP: #771080).
+
+-- Colin Watson <cjwatson@ubuntu.com>  Tue, 13 Sep 2011 10:07:08 +0100
+
+
+signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: netkit-rsh-0.17/rsh/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rsh/Makefile
++++ netkit-rsh-0.17/rsh/Makefile
+@@ -6,7 +6,7 @@ include ../MRULES
+ OBJS = rsh.o
+ 
+ rsh: $(OBJS)
+-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+ 
+ install: rsh
+ 	install -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR)
+Index: netkit-rsh-0.17/rshd/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rshd/Makefile
++++ netkit-rsh-0.17/rshd/Makefile
+@@ -11,7 +11,7 @@ LIBS += -ldl -lpam
+ endif
+ 
+ rshd: $(OBJS)
+-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+ 
+ install: rshd
+ 	install -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd
+Index: netkit-rsh-0.17/rlogin/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rlogin/Makefile
++++ netkit-rsh-0.17/rlogin/Makefile
+@@ -7,7 +7,7 @@ PROG=rlogin
+ OBJS=rlogin.o
+ 
+ $(PROG): $(OBJS)
+-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+ 
+ install: $(PROG)
+ 	install -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR)
+Index: netkit-rsh-0.17/rlogind/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rlogind/Makefile
++++ netkit-rsh-0.17/rlogind/Makefile
+@@ -13,7 +13,7 @@ LIBS += -ldl -lpam -lpam_misc
+ endif
+ 
+ rlogind: $(OBJS)
+-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+ 
+ rlogind.o: pathnames.h logwtmp.h rlogind.h ../version.h
+ logwtmp.o: logwtmp.h
+Index: netkit-rsh-0.17/rexecd/Makefile
+===================================================================
+--- netkit-rsh-0.17.orig/rexecd/Makefile
++++ netkit-rsh-0.17/rexecd/Makefile
+@@ -24,7 +24,7 @@ endif
+ CFLAGS += -DRESTRICT_FTP=1
+ 
+ rexecd: rexecd.o
+-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
++	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
+ 
+ install: rexecd
+ 	install -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
new file mode 100644
index 0000000..072327a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
@@ -0,0 +1,10 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rsh" must be
+# listed in /etc/securetty.
+auth       required     pam_nologin.so
+auth       required     pam_securetty.so
+auth       required     pam_env.so
+account    include      common-account
+session	   optional     pam_keyinit.so    force revoke
+session    include      common-session
+session    required     pam_loginuid.so
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
new file mode 100644
index 0000000..a842eb9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
@@ -0,0 +1,21 @@
+# default: off
+# description:
+# The rshd server is a server for the rcmd(3) routine and, 
+# consequently, for the rsh(1) program. The server provides 
+# remote execution facilities with authentication based on 
+# privileged port numbers from trusted hosts.
+#
+service shell
+{
+	socket_type	= stream
+	protocol	= tcp
+	flags		= NAMEINARGS
+	wait		= no
+	user		= root
+	group		= root
+	log_on_success	+= USERID
+	log_on_failure	+= USERID
+	server		= /usr/sbin/tcpd
+	server_args	= /usr/sbin/in.rshd -aL
+	disable		= yes
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
new file mode 100644
index 0000000..70fb4cf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
@@ -0,0 +1,105 @@
+DESCRIPTION = "netkit-rsh includes the rsh daemon and client."
+SECTION = "net"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+LICENSE = "BSD-4-Clause"
+DEPENDS = "xinetd libgcrypt virtual/crypt"
+
+LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \
+            ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \
+            file://rsh-redone_link_order_file.patch \
+            file://no_pam_build_fix.patch \
+            file://rexec.xinetd.netkit \
+            file://rlogin.xinetd.netkit \
+            file://rsh.xinetd.netkit \
+            file://netkit-rsh-0.17-rexec-ipv6.patch \
+            file://fix-host-variable.patch \
+            file://fixup_wait3_api_change.patch \
+            file://CVE-2019-7282-and-CVE-2019-7283.patch \
+"
+
+SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096"
+SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669"
+SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3"
+SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9"
+
+# Other support files
+PAM_SRC_URI = "file://rexec.pam \
+    file://rlogin.pam \
+    file://rsh.pam \
+"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+inherit pkgconfig update-alternatives
+
+CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations"
+LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam"
+
+COMPATIBLE_HOST_libc-musl = 'null'
+
+do_configure () {
+    ./configure --prefix=${prefix} --exec-prefix=${exec_prefix}
+    echo "INSTALLROOT=${D}" > MCONFIG
+
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
+        echo "USE_PAM=1" >> MCONFIG
+    fi
+
+    # didn't want to patch these next changes
+    sed -i 's/netkit-//' ${S}/rsh/pathnames.h
+    sed -i 's/netkit-//' ${S}/rcp/pathnames.h
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man8
+    install -d ${D}${sysconfdir}/xinetd.d
+
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'SUIDMODE=4755' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
+        install -d ${D}${sysconfdir}/pam.d
+        install -m 0644 debian/hosts.equiv ${D}/${sysconfdir}
+        install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec
+        install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin
+        install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
+    fi
+    cp ${WORKDIR}/rexec.xinetd.netkit  ${D}/${sysconfdir}/xinetd.d/rexec
+    cp ${WORKDIR}/rlogin.xinetd.netkit  ${D}/${sysconfdir}/xinetd.d/rlogin
+    cp ${WORKDIR}/rsh.xinetd.netkit  ${D}/${sysconfdir}/xinetd.d/rsh
+}
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+                   ${sbindir}/.debug ${bindir}/.debug"
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN}-client = "rcp rexec rlogin rsh"
+ALTERNATIVE_${PN}-server = "rshd rexecd rlogind"
+ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd"
+ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd"
+ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd"
+ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
+ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind"
+ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
+
+RCONFLICTS_${PN}-server += "inetutils-rshd"
+RPROVIDES_${PN}-server = "rshd"
+
+RDEPENDS_${PN}-server = "xinetd"
+RDEPENDS_${PN}-server += "tcp-wrappers"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
new file mode 100644
index 0000000..3655a57
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
@@ -0,0 +1,120 @@
+From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 11 May 2018 12:20:03 -0700
+Subject: [PATCH] Link with libtirpc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure                 | 2 +-
+ rpc.rusersd/rusers_proc.c | 7 +------
+ rpc.rusersd/rusersd.c     | 6 +-----
+ rup/rup.c                 | 2 +-
+ 4 files changed, 4 insertions(+), 13 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -92,7 +92,6 @@ else
+     echo -n 'Checking if C compiler works... '
+     if (
+           $CC __conftest.c -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+          echo 'yes'
+      else
+@@ -146,8 +145,7 @@ else
+ 
+ fi
+ 
+-LDFLAGS=
+-LIBS=
++LIBS="$LIBS -ltirpc"
+ 
+ rm -f __conftest*
+ 
+@@ -172,13 +170,11 @@ int main() {
+ EOF
+ if (
+       $CC $CFLAGS  __conftest.c  -o __conftest || exit 1
+-      ./__conftest || exit 1
+    ) >/dev/null 2>&1; then
+     echo 'yes'
+ else
+     if (
+           $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c  -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-D__USE_BSD_SIGNAL'
+         CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
+@@ -231,7 +227,6 @@ if (
+ else
+     if (
+           $CC $CFLAGS -D_GNU_SOURCE __conftest.c  -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-D_GNU_SOURCE'
+         CFLAGS="$CFLAGS -D_GNU_SOURCE"
+@@ -262,20 +257,17 @@ int main() {
+ EOF
+ if (
+       $CC $CFLAGS  __conftest.c $LIBBSD -o __conftest || exit 1
+-      ./__conftest || exit 1
+    ) >/dev/null 2>&1; then
+     echo 'ok'
+ else
+     if (
+           $CC $CFLAGS  __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-lsnprintf'
+         LIBS="$LIBS -lsnprintf"
+     else
+         if (
+               $CC $CFLAGS  __conftest.c -ldb $LIBBSD -o __conftest || exit 1
+-              ./__conftest || exit 1
+            ) >/dev/null 2>&1; then
+             echo '-ldb'
+             LIBS="$LIBS -ldb"
+--- a/rpc.rusersd/rusers_proc.c
++++ b/rpc.rusersd/rusers_proc.c
+@@ -57,12 +57,7 @@ char rp_rcsid[] =
+ 	#define RUT_TIME ut_time
+ #endif
+ 
+-/* Glibc strikes again */
+-#ifdef __GLIBC__
+-	#include <rpcsvc/rusers.h>
+-#else
+-	#include "rusers.h"
+-#endif 
++#include "rusers.h"
+ 
+ void rusers_service(struct svc_req *rqstp, SVCXPRT *transp);
+ 
+--- a/rpc.rusersd/rusersd.c
++++ b/rpc.rusersd/rusersd.c
+@@ -38,11 +38,7 @@ char rusersd_rcsid[] =
+ #include <rpc/pmap_clnt.h>
+ #include <unistd.h>
+ #include <grp.h>
+-#ifdef __GLIBC__
+-	#include <rpcsvc/rusers.h>
+-#else
+-	#include "rusers.h"
+-#endif
++#include "rusers.h"
+ 
+ #include "../version.h"
+ 
+--- a/rup/rup.c
++++ b/rup/rup.c
+@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07
+ 
+ #undef FSHIFT			/* Use protocol's shift and scale values */
+ #undef FSCALE
+-#include <rpcsvc/rstat.h>
++#include "rstat.h"
+ 
+ #include "../version.h"
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
new file mode 100644
index 0000000..d85178d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
@@ -0,0 +1,30 @@
+From c23cc112a480f90950de5cf1de09b1a7e732bf21 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 15 Dec 2014 18:31:13 -0800
+Subject: [PATCH] rpc.rusersd/Makefile: fix parallel build issue
+
+Fixed:
+rusers.x: No such file or directory
+Makefile:44: recipe for target 'rusers_xdr.c' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ rpc.rusersd/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpc.rusersd/Makefile b/rpc.rusersd/Makefile
+index 792f528..65a424a 100644
+--- a/rpc.rusersd/Makefile
++++ b/rpc.rusersd/Makefile
+@@ -40,5 +40,5 @@ rusers.x:
+ rusers.h: $(RUSERSX) rusers.x
+ 	$(RPCGEN) -h -o rusers.h rusers.x
+ 
+-rusers_xdr.c: $(RUSERSX)
++rusers_xdr.c: $(RUSERSX) rusers.x
+ 	$(RPCGEN) -c -C -o rusers_xdr.c rusers.x
+-- 
+1.7.9.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
new file mode 100644
index 0000000..c39faef
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
@@ -0,0 +1,72 @@
+DESCRIPTION = "netkit-rusers includes rusers - Displays who is logged in to machines on local network \
+    rusersd - Logged in users server"
+HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e"
+DEPENDS = " tcp-wrappers libtirpc rpcbind rpcsvc-proto rpcsvc-proto-native"
+
+SRC_URI = "http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
+           http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \
+           file://rpc.rusersd-Makefile-fix-parallel-build-issue.patch \
+           file://0001-Link-with-libtirpc.patch \
+"
+
+SRC_URI[archive.md5sum] = "dc99a80b9fde2ab427c874f88f1c1602"
+SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bbccafe198c24b6d"
+SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc"
+SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067"
+
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+
+EXTRA_OEMAKE = "RUSERSX=${STAGING_INCDIR}/rpcsvc/rusers.x"
+
+do_configure () {
+    ./configure --prefix=${prefix} --installroot=${D} --with-c-compiler="${CC}"
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man8
+    install -d ${D}${sysconfdir}/xinetd.d
+
+    sed -i 's/install -s/install/' rusers/Makefile
+    sed -i 's/install -s/install/' rup/Makefile
+    sed -i 's/install -s/install/' rpc.rusersd/Makefile
+
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+
+    # create the xinetd config file
+    cat >rusersd.conf <<EOF
+ service rusersd
+ {
+    disable     = yes
+    type        = RPC
+    rpc_version = 1-2
+    socket_type = dgram
+    protocol    = udp
+    wait        = yes
+    user        = root
+    server      = ${sbindir}/rpc.rusersd
+ }
+EOF
+    install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd
+}
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+            ${bindir}/.debug ${sbindir}/.debug"
+
+RDEPENDS_${PN}-server += "tcp-wrappers xinetd rpcbind"
+
+# http://errors.yoctoproject.org/Errors/Details/186962/
+COMPATIBLE_HOST_libc-musl = 'null'
+PNBLACKLIST[netkit-rusers] = "Fails to build rup.c:51:10: fatal error: rstat.h: No such file or directory"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
new file mode 100644
index 0000000..b1325b3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
@@ -0,0 +1,46 @@
+From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:11:33 -0700
+Subject: [PATCH 1/2] Add missing include path to -I options
+
+Fixes errors like
+| rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found
+| #include <protocols/rwhod.h>
+|          ^~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ rwho/Makefile  | 1 +
+ rwhod/Makefile | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/rwho/Makefile b/rwho/Makefile
+index 6f86388..67b28d4 100644
+--- a/rwho/Makefile
++++ b/rwho/Makefile
+@@ -6,6 +6,7 @@ include ../MRULES
+ rwho: rwho.o
+ 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+ 
++CFLAGS += -I../include
+ rwho.o: ../version.h
+ 
+ install: rwho
+diff --git a/rwhod/Makefile b/rwhod/Makefile
+index 772b641..9034218 100644
+--- a/rwhod/Makefile
++++ b/rwhod/Makefile
+@@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1)
+ CFLAGS += -D_GNU_SOURCE
+ endif
+ 
++CFLAGS += -I../include
++
+ OBJS = rwhod.o
+ 
+ rwhod: $(OBJS)
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
new file mode 100644
index 0000000..349a135
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
@@ -0,0 +1,72 @@
+From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:13:17 -0700
+Subject: [PATCH 2/2] Fix build issues found with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ruptime/ruptime.c | 1 +
+ rwho/rwho.c       | 1 +
+ rwhod/rwhod.c     | 5 +++--
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/ruptime/ruptime.c
++++ b/ruptime/ruptime.c
+@@ -53,6 +53,7 @@ char ruptime_rcsid[] =
+ #include <string.h>
+ #include <errno.h>
+ #include <time.h>
++#include <fcntl.h>
+ 
+ struct hs {
+ 	char	hs_hostname[MAXHOSTNAMELEN];
+--- a/rwho/rwho.c
++++ b/rwho/rwho.c
+@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/0
+ #include <assert.h>
+ #include <stdio.h>
+ #include <time.h>
++#include <fcntl.h>
+ #include <protocols/rwhod.h>
+ 
+ #include "../version.h"
+--- a/rwhod/rwhod.c
++++ b/rwhod/rwhod.c
+@@ -76,6 +76,7 @@ char rcsid[] =
+ #include <grp.h>
+ #include <time.h>
+ #include <stdint.h>
++#include <fcntl.h>
+ 
+ #include "../version.h"
+ 
+@@ -102,7 +103,7 @@ struct	nlist nl[] = {
+ static void	broadcaster(void);
+ static int	configure(int s);
+ static int	verify(const char *name);
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) &&  (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ static int	getloadavg(double ptr[3], int n);
+ #endif
+ 
+@@ -549,7 +550,7 @@ sendpacket(struct whod *wd)
+ 	}
+ }
+ 
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ /*
+  * Taken from:
+  *
+--- a/include/protocols/rwhod.h
++++ b/include/protocols/rwhod.h
+@@ -37,6 +37,7 @@
+ #ifndef _RWHOD_H_
+ #define	_RWHOD_H_
+ 
++#include <stdint.h>
+ /*
+  * rwho protocol packet format.
+  */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
new file mode 100755
index 0000000..f641903
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:        rwhod
+# Required-Start:  $network $remote_fs $syslog
+# Required-Stop:   $network $remote_fs $syslog
+# Default-Start:   2 3 4 5
+# Default-Stop:    0 1 6
+# Short-Description: Server for rwho and ruptime services
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/rwhod
+PIDFILE=/var/run/rwhod.pid
+CONF_FILE="/etc/default/rwhod"
+DESC="Who daemon "
+# default options. Change them in /etc/default/rwhod
+RWHOD_OPTIONS="-b"
+
+# rwhod	init.d script for ntpdc from ntp.isc.org
+test -f $DAEMON || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+[ -r $CONF_FILE ] && . $CONF_FILE
+
+startdaemon(){
+	echo -n "Starting $DESC" " rwhod "
+	start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $RWHOD_OPTIONS
+	echo "done"
+}
+stopdaemon(){
+	echo -n "Stopping $DESC" " rwhod "
+	start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+	echo "done"
+}
+
+case "$1" in
+  start)
+	startdaemon
+	;;
+  stop)
+	stopdaemon
+	;;
+  force-reload)
+	stopdaemon
+	startdaemon
+	;;
+  restart)
+	stopdaemon
+	sleep 1
+	startdaemon
+	;;
+  reload)
+	stopdaemon
+	sleep 1
+	startdaemon
+	;;
+  status)
+	status /usr/sbin/rwhod;
+	exit $?
+	;;
+  *)
+	echo "Usage: rwhod { start | stop | status | restart | reload }" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
new file mode 100644
index 0000000..62d3a94
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
@@ -0,0 +1,2 @@
+#Options for the rwhod daemon.
+RWHOD_OPTIONS="-b"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
new file mode 100644
index 0000000..ad543b0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
@@ -0,0 +1,109 @@
+DESCRIPTION = "netkit-rwho includes, ruptime rwho and rwhod (Daemon to maintain data for rwho/ruptime)"
+HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://rwho/rwho.c;beginline=2;endline=3;md5=5a85f13c0142d72fc378e00f15da5b9e"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;name=archive \
+           ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;subdir=${BP};name=patch13 \
+           file://rwhod \
+           file://rwhod.default \
+           file://0001-Add-missing-include-path-to-I-options.patch \
+           file://0002-Fix-build-issues-found-with-musl.patch \
+           "
+SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75"
+SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7"
+SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9"
+SRC_URI[patch13.sha256sum] = "53aefa27d98b565bf756db57120c03bd224a238e45699d92076420272a6eba8e"
+
+inherit autotools-brokensep useradd update-rc.d update-alternatives
+
+CFLAGS += " -D_GNU_SOURCE"
+
+# Unlike other Debian packages, net-tools *.diff.gz contains another series of
+# patches maintained by quilt. So manually apply them before applying other local
+# patches. Also remove all temp files before leaving, because do_patch() will pop
+# up all previously applied patches in the start
+do_patch[depends] += "quilt-native:do_populate_sysroot"
+netkit_do_patch() {
+        cd ${S}
+        # it's important that we only pop the existing patches when they've
+        # been applied, otherwise quilt will climb the directory tree
+        # and reverse out some completely different set of patches
+        if [ -d ${S}/patches ]; then
+                # whilst this is the default directory, doing it like this
+                # defeats the directory climbing that quilt will otherwise
+                # do; note the directory must exist to defeat this, hence
+                # the test inside which we operate
+                QUILT_PATCHES=${S}/patches quilt pop -a
+        fi
+        if [ -d ${S}/.pc-${BPN} ]; then
+                rm -rf ${S}/.pc
+                mv ${S}/.pc-${BPN} ${S}/.pc
+                QUILT_PATCHES=${S}/debian/patches quilt pop -a
+                rm -rf ${S}/.pc ${S}/debian
+        fi
+        QUILT_PATCHES=${S}/debian/patches quilt push -a
+        mv ${S}/.pc ${S}/.pc-${BPN}
+}
+
+do_unpack[cleandirs] += "${S}"
+
+python do_patch() {
+    bb.build.exec_func('netkit_do_patch', d)
+    bb.build.exec_func('patch_do_patch', d)
+}
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+}
+
+do_install () {
+    # rwho & ruptime
+    install -d ${D}${bindir}
+    install -d ${D}${mandir}/man1
+    #rwhod
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man8
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/default
+    sed -i 's/install -s/install/' rwho/Makefile
+    sed -i 's/install -s/install/' ruptime/Makefile
+    sed -i 's/install -s/install/' rwhod/Makefile
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+
+    install -m 0644 ${WORKDIR}/rwhod.default ${D}${sysconfdir}/default/rwhod
+    install -m 755 ${WORKDIR}/rwhod ${D}${sysconfdir}/init.d
+
+    mkdir -p -m 755 ${D}${localstatedir}/spool/rwho
+    chown -R rwhod ${D}${localstatedir}/spool/rwho
+}
+
+pkg_postinst_${PN}-server() {
+    ${sysconfdir}/init.d/rwhod start
+}
+
+pkg_postrm_${PN}-server() {
+    ${sysconfdir}/init.d/rwhod stop
+}
+
+INITSCRIPT_NAME = "rwhod"
+INITSCRIPT_PARAM = "defaults 85 15"
+
+USERADD_PACKAGES = "${PN}-server"
+GROUPADD_PARAM_${PN}-server = "--system rwhod"
+USERADD_PARAM_${PN}-server = "--system -g rwhod --home-dir  ${localstatedir}/spool/rwho \
+        --no-create-home  --shell /bin/false rwhod"
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${localstatedir} ${sysconfdir}/default/* ${sysconfdir}/init.d/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+            ${bindir}/.debug ${sbindir}/.debug"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch
new file mode 100644
index 0000000..945785d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch
@@ -0,0 +1,114 @@
+From 06ed6a6bf25a22902846097d6b6c97e070c2c326 Mon Sep 17 00:00:00 2001
+From: Seiichi Ishitsuka <ishitsuka.sc@ncos.nec.co.jp>
+Date: Fri, 1 Jun 2018 14:27:35 +0900
+Subject: [PATCH] telnetd: Fix deadlock on cleanup
+
+The cleanup function in telnetd is called both directly and on SIGCHLD
+signals. This, unfortunately, triggered a deadlock in eglibc 2.9 while
+running on a 2.6.31.11 kernel.
+
+What we were seeing is hangs like these:
+
+  (gdb) bt
+  #0  0xb7702424 in __kernel_vsyscall ()
+  #1  0xb7658e61 in __lll_lock_wait_private () from ./lib/libc.so.6
+  #2  0xb767e7b5 in _L_lock_15 () from ./lib/libc.so.6
+  #3  0xb767e6e0 in utmpname () from ./lib/libc.so.6
+  #4  0xb76bcde7 in logout () from ./lib/libutil.so.1
+  #5  0x0804c827 in cleanup ()
+  #6  <signal handler called>
+  #7  0xb7702424 in __kernel_vsyscall ()
+  #8  0xb7641003 in __fcntl_nocancel () from ./lib/libc.so.6
+  #9  0xb767e0c3 in getutline_r_file () from ./lib/libc.so.6
+  #10 0xb767d675 in getutline_r () from ./lib/libc.so.6
+  #11 0xb76bce42 in logout () from ./lib/libutil.so.1
+  #12 0x0804c827 in cleanup ()
+  #13 0x0804a0b5 in telnet ()
+  #14 0x0804a9c3 in main ()
+
+and what has happened here is that the user closes the telnet session
+via the escape character. This causes telnetd to call cleanup in frame
+the SIGCHLD signal is delivered while telnetd is executing cleanup.
+
+Telnetd then calls the signal handler for SIGCHLD, which is cleanup().
+Ouch. The actual deadlock is in libc. getutline_r in frame #10 gets the
+__libc_utmp_lock lock, and utmpname above does the same thing in frame
+
+The fix registers the SIGCHLD handler as cleanup_sighandler, and makes
+cleanup disable the SIGCHLD signal before calling cleanup_sighandler.
+
+Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
+
+The patch was imported from the Ubuntu netkit-telnet package.
+(https://bugs.launchpad.net/ubuntu/+source/netkit-telnet/+bug/507455)
+
+A previous patch declaring attributes of functions, but it is not used
+in upstream.
+
+Signed-off-by: Seiichi Ishitsuka <ishitsuka.sc@ncos.nec.co.jp>
+---
+ telnetd/ext.h      |  1 +
+ telnetd/sys_term.c | 17 ++++++++++++++++-
+ telnetd/telnetd.c  |  2 +-
+ 3 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/telnetd/ext.h b/telnetd/ext.h
+index b98d6ec..08f9d07 100644
+--- a/telnetd/ext.h
++++ b/telnetd/ext.h
+@@ -97,6 +97,7 @@ void add_slc(int, int, int);
+ void check_slc(void);
+ void change_slc(int, int, int);
+ void cleanup(int);
++void cleanup_sighandler(int);
+ void clientstat(int, int, int);
+ void copy_termbuf(char *, int);
+ void deferslc(void);
+diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c
+index 5b4aa84..c4fb0f7 100644
+--- a/telnetd/sys_term.c
++++ b/telnetd/sys_term.c
+@@ -719,7 +719,7 @@ static void addarg(struct argv_stuff *avs, const char *val) {
+  * This is the routine to call when we are all through, to
+  * clean up anything that needs to be cleaned up.
+  */
+-void cleanup(int sig) {
++void cleanup_sighandler(int sig) {
+     char *p;
+     (void)sig;
+ 
+@@ -742,3 +742,18 @@ void cleanup(int sig) {
+     shutdown(net, 2);
+     exit(0);
+ }
++
++void cleanup(int sig) {
++    sigset_t mask, oldmask;
++
++    /* Set up the mask of signals to temporarily block. */
++    sigemptyset (&mask);
++    sigaddset (&mask, SIGCHLD);
++
++    /* Block SIGCHLD while running cleanup */
++    sigprocmask (SIG_BLOCK, &mask, &oldmask);
++
++    cleanup_sighandler(sig);
++    /* Technically not needed since cleanup_sighandler exits */
++    sigprocmask (SIG_UNBLOCK, &mask, NULL);
++}
+diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
+index 9ace838..788919c 100644
+--- a/telnetd/telnetd.c
++++ b/telnetd/telnetd.c
+@@ -833,7 +833,7 @@ void telnet(int f, int p)
+     signal(SIGTTOU, SIG_IGN);
+ #endif
+     
+-    signal(SIGCHLD, cleanup);
++    signal(SIGCHLD, cleanup_sighandler);
+     
+ #ifdef TIOCNOTTY
+     {
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
new file mode 100644
index 0000000..f2f1b12
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
@@ -0,0 +1,66 @@
+From 7a3095d1e9b7c73f9dca56250f433bcfc7cb660e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 10:15:34 -0700
+Subject: [PATCH] telnet/telnetd: Fix print format strings
+
+Fixes build with hardening flags
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ telnet/utilities.cc | 6 +++---
+ telnetd/utility.c   | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/telnet/utilities.cc b/telnet/utilities.cc
+index 66839ab..36f0731 100644
+--- a/telnet/utilities.cc
++++ b/telnet/utilities.cc
+@@ -583,17 +583,17 @@ void printsub(int direction, unsigned char *pointer, int length) {
+ 			case ENV_VAR:
+ 			    if (pointer[1] == TELQUAL_SEND)
+ 				goto def_case;
+-			    fprintf(NetTrace, "\" VAR " + noquote);
++			    fprintf(NetTrace, "%s", "\" VAR " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_VALUE:
+-			    fprintf(NetTrace, "\" VALUE " + noquote);
++			    fprintf(NetTrace, "%s", "\" VALUE " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_ESC:
+-			    fprintf(NetTrace, "\" ESC " + noquote);
++			    fprintf(NetTrace, "%s", "\" ESC " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index 29b7da1..75314cb 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -909,17 +909,17 @@ printsub(char direction, unsigned char *pointer, int length)
+ 			case ENV_VAR:
+ 			    if (pointer[1] == TELQUAL_SEND)
+ 				goto def_case;
+-			    netoprintf("\" VAR " + noquote);
++			    netoprintf("%s", "\" VAR " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_VALUE:
+-			    netoprintf("\" VALUE " + noquote);
++			    netoprintf("%s", "\" VALUE " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_ESC:
+-			    netoprintf("\" ESC " + noquote);
++			    netoprintf("%s", "\" ESC " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+-- 
+2.13.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch
new file mode 100644
index 0000000..8f983e4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch
@@ -0,0 +1,56 @@
+From 9c81c8e5bc7782e8ae12c078615abc3c896059f2 Mon Sep 17 00:00:00 2001
+From: Julius Hemanth Pitti <jpitti@cisco.com>
+Date: Tue, 14 Jul 2020 22:34:19 -0700
+Subject: [PATCH] telnetd/utility.c: Fix buffer overflow in netoprintf
+
+As per man page of vsnprintf, when formated
+string size is greater than "size"(2nd argument),
+then vsnprintf returns size of formated string,
+not "size"(2nd argument).
+
+netoprintf() was not handling a case where
+return value of vsnprintf is greater than
+"size"(2nd argument), results in buffer overflow
+while adjusting "nfrontp" pointer to point
+beyond "netobuf" buffer.
+
+Here is one such case where "nfrontp"
+crossed boundaries of "netobuf", and
+pointing to another global variable.
+
+(gdb) p &netobuf[8255]
+$5 = 0x55c93afe8b1f <netobuf+8255> ""
+(gdb) p nfrontp
+$6 = 0x55c93afe8c20 <terminaltype> "\377"
+(gdb) p &terminaltype
+$7 = (char **) 0x55c93afe8c20 <terminaltype>
+(gdb)
+
+This resulted in crash of telnetd service
+with segmentation fault.
+
+Though this is DoS security bug, I couldn't
+find any CVE ID for this.
+
+Upstream-Status: Pending
+
+Signed-off-by: Julius Hemanth Pitti <jpitti@cisco.com>
+---
+ telnetd/utility.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index b9a46a6..4811f14 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -66,7 +66,7 @@ netoprintf(const char *fmt, ...)
+       len = vsnprintf(nfrontp, maxsize, fmt, ap);
+       va_end(ap);
+ 
+-      if (len<0 || len==maxsize) {
++      if (len<0 || len>=maxsize) {
+ 	 /* didn't fit */
+ 	 netflush();
+       }
+--
+2.19.1
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch
new file mode 100644
index 0000000..d21c602
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch
@@ -0,0 +1,112 @@
+From 6ab007dbb1958371abff2eaaad2b26da89b3c74e Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Fri, 24 Apr 2020 09:43:44 +0800
+Subject: [PATCH] telnetd/utility.c: fix CVE-2020-10188
+
+Upstream-Status: Backport
+[Fedora: https://src.fedoraproject.org/rpms/telnet/raw/master/f/telnet-0.17-overflow-exploit.patch]
+
+CVE: CVE-2020-10188
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ telnetd/utility.c | 32 +++++++++++++++++++++-----------
+ 1 file changed, 21 insertions(+), 11 deletions(-)
+
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index 75314cb..b9a46a6 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -169,31 +169,38 @@ void 	ptyflush(void)
+  */
+ static
+ char *
+-nextitem(char *current)
++nextitem(char *current, const char *endp)
+ {
++    if (current >= endp) {
++        return NULL;
++    }
+     if ((*current&0xff) != IAC) {
+ 	return current+1;
+     }
++    if (current+1 >= endp) {
++        return NULL;
++    }
+     switch (*(current+1)&0xff) {
+     case DO:
+     case DONT:
+     case WILL:
+     case WONT:
+-	return current+3;
++	return current+3 <= endp ? current+3 : NULL;
+     case SB:		/* loop forever looking for the SE */
+ 	{
+ 	    register char *look = current+2;
+ 
+-	    for (;;) {
++	    while (look < endp) {
+ 		if ((*look++&0xff) == IAC) {
+-		    if ((*look++&0xff) == SE) {
++		    if (look < endp && (*look++&0xff) == SE) {
+ 			return look;
+ 		    }
+ 		}
+ 	    }
++	    return NULL;
+ 	}
+     default:
+-	return current+2;
++	return current+2 <= endp ? current+2 : NULL;
+     }
+ }  /* end of nextitem */
+ 
+@@ -219,7 +226,7 @@ void netclear(void)
+     register char *thisitem, *next;
+     char *good;
+ #define	wewant(p)	((nfrontp > p) && ((*p&0xff) == IAC) && \
+-				((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))
++				(nfrontp > p+1 && (((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))))
+ 
+ #if	defined(ENCRYPT)
+     thisitem = nclearto > netobuf ? nclearto : netobuf;
+@@ -227,7 +234,7 @@ void netclear(void)
+     thisitem = netobuf;
+ #endif
+ 
+-    while ((next = nextitem(thisitem)) <= nbackp) {
++    while ((next = nextitem(thisitem, nbackp)) != NULL && next <= nbackp) {
+ 	thisitem = next;
+     }
+ 
+@@ -239,20 +246,23 @@ void netclear(void)
+     good = netobuf;	/* where the good bytes go */
+ #endif
+ 
+-    while (nfrontp > thisitem) {
++    while (thisitem != NULL && nfrontp > thisitem) {
+ 	if (wewant(thisitem)) {
+ 	    int length;
+ 
+ 	    next = thisitem;
+ 	    do {
+-		next = nextitem(next);
+-	    } while (wewant(next) && (nfrontp > next));
++		next = nextitem(next, nfrontp);
++	    } while (next != NULL && wewant(next) && (nfrontp > next));
++	    if (next == NULL) {
++		next = nfrontp;
++	    }
+ 	    length = next-thisitem;
+ 	    bcopy(thisitem, good, length);
+ 	    good += length;
+ 	    thisitem = next;
+ 	} else {
+-	    thisitem = nextitem(thisitem);
++	    thisitem = nextitem(thisitem, nfrontp);
+ 	}
+     }
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch
new file mode 100644
index 0000000..7fff8cf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch
@@ -0,0 +1,1217 @@
+From f09a6460a62aacb87bb8683d16aa3ce55848bf7e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 28 Nov 2014 07:06:24 +0900
+Subject: [PATCH 1/2] To aviod buffer overflow in telnet
+
+This patch is from Fedora.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ telnet/Makefile     |   4 +-
+ telnet/commands.cc  | 270 +++++++++++++++++++++++++++++++++++-----------------
+ telnet/defines.h    |   2 +
+ telnet/externs.h    |   7 +-
+ telnet/main.cc      |  65 ++++++++++---
+ telnet/netlink.cc   |  78 +++++++++------
+ telnet/netlink.h    |   7 +-
+ telnet/network.cc   |   1 +
+ telnet/proto.h      |   2 +-
+ telnet/ring.cc      |   2 +-
+ telnet/ring.h       |   2 +-
+ telnet/sys_bsd.cc   |  11 +++
+ telnet/telnet.1     |  37 +++++--
+ telnet/telnet.cc    |  45 +++++----
+ telnet/terminal.cc  |  17 +++-
+ telnet/utilities.cc |   2 +
+ 16 files changed, 380 insertions(+), 172 deletions(-)
+
+diff --git a/telnet/Makefile b/telnet/Makefile
+index cef866f..39249e1 100644
+--- a/telnet/Makefile
++++ b/telnet/Makefile
+@@ -7,7 +7,7 @@ include ../MRULES
+ 
+ # -DAUTHENTICATE
+ CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
+-LIBS += $(LIBTERMCAP)
++LIBS = $(LIBTERMCAP)
+ 
+ SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
+ 	terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
+@@ -22,7 +22,7 @@ depend:
+ 	$(CXX) $(CXXFLAGS) -MM $(SRCS) >depend.mk
+ 
+ install: telnet
+-	install -s -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR)
++	install -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR)
+ 	install -m$(MANMODE) telnet.1 $(INSTALLROOT)$(MANDIR)/man1
+ 
+ clean:
+diff --git a/telnet/commands.cc b/telnet/commands.cc
+index d92bccd..02c593e 100644
+--- a/telnet/commands.cc
++++ b/telnet/commands.cc
+@@ -86,10 +86,6 @@ char cmd_rcsid[] =
+ 
+ #define HELPINDENT ((int) sizeof ("connect"))
+ 
+-#ifndef       MAXHOSTNAMELEN
+-#define       MAXHOSTNAMELEN 64
+-#endif        MAXHOSTNAMELEN
+-
+ #if	defined(HAS_IPPROTO_IP) && defined(IP_TOS)
+ int tos = -1;
+ #endif	/* defined(HAS_IPPROTO_IP) && defined(IP_TOS) */
+@@ -98,7 +94,7 @@ static unsigned long sourceroute(char *arg, char **cpp, int *lenp);
+ 
+ 
+ char	*hostname;
+-static char _hostname[MAXHOSTNAMELEN];
++static char *_hostname;
+ 
+ //typedef int (*intrtn_t)(int argc, const char *argv[]);
+ 
+@@ -161,7 +157,7 @@ class command_entry {
+ 	assert(argc>=1);
+ 	if (nargs>=0 && argc!=nargs+1) {
+ 	    fprintf(stderr, "Wrong number of arguments for command.\n");
+-	    fprintf(stderr, "Try %s ? for help\n", argv[0]);
++	    fprintf(stderr, "Try ? %s for help\n", argv[0]);
+ 	    return 0;    /* is this right? */
+ 	}
+ 	if (nargs==-2) {
+@@ -480,6 +476,7 @@ static int send_wontcmd(const char *name, const char *) {
+ int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) {
+     char **cpp;
+     extern char *telopts[];
++    long opt;
+ 
+     if (isprefix(name, "help") || isprefix(name, "?")) {
+ 	register int col, len;
+@@ -506,16 +503,23 @@ int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) {
+ 					name, cmd);
+ 	return 0;
+     }
++
++    opt = cpp - telopts;
+     if (cpp == 0) {
+-	fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n",
++	char *end;
++
++	opt = strtol(name, &end, 10);
++	if (*end || opt < 0 || opt > 255) {
++	    fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n",
+ 					name, cmd);
+-	return 0;
++	    return 0;
++	}
+     }
+     if (!connected) {
+ 	printf("?Need to be connected first.\n");
+ 	return 0;
+     }
+-    (*func)(cpp - telopts, 1);
++    (*func)(opt, 1);
+     return 1;
+ }
+ 
+@@ -689,9 +693,9 @@ static struct togglelist Togglelist[] = {
+       "print encryption debugging information" },
+ #endif
+ 
+-    { "skiprc", "don't read ~/.telnetrc file",
++    { "skiprc", "don't read the telnetrc files",
+       NULL, &skiprc,
+-      "read ~/.telnetrc file" },
++      "read the telnetrc files" },
+     { "binary",
+       "sending and receiving of binary data",
+       togbinary, NULL,
+@@ -1615,15 +1619,20 @@ void ayt_status(int) {
+ #endif
+ 
+ int tn(int argc, const char *argv[]) {
+-    register struct hostent *host = 0;
+     struct sockaddr_in sn;
+-    struct servent *sp = 0;
+     char *srp = NULL;
+     int srlen;
+-
+-    const char *cmd, *volatile user = 0;
++    int family = 0;
++    const char *cmd, *volatile user = 0, *srchostp = 0;
+     const char *portp = NULL;
+     char *hostp = NULL;
++    char *resolv_hostp;
++    struct addrinfo hints;
++    struct addrinfo *hostaddr = 0;
++    int res;
++    char name[NI_MAXHOST];
++    char service[NI_MAXSERV];
++    struct addrinfo *tmpaddr;
+ 
+     /* clear the socket address prior to use */
+     memset(&sn, 0, sizeof(sn));
+@@ -1632,6 +1641,10 @@ int tn(int argc, const char *argv[]) {
+ 	printf("?Already connected to %s\n", hostname);
+ 	return 0;
+     }
++    if (_hostname) {
++	delete[] _hostname;
++	_hostname = 0;
++    }
+     if (argc < 2) {
+ 	(void) strcpy(line, "open ");
+ 	printf("(to) ");
+@@ -1657,11 +1670,33 @@ int tn(int argc, const char *argv[]) {
+ 	    --argc;
+ 	    continue;
+ 	}
++	if (strcmp(*argv, "-b") == 0) {
++	    --argc; ++argv;
++	    if (argc == 0)
++		goto usage;
++	    srchostp = *argv++;
++	    --argc;
++	    continue;
++	}
+ 	if (strcmp(*argv, "-a") == 0) {
+ 	    --argc; ++argv;
+ 	    autologin = 1;
+ 	    continue;
+ 	}
++	if (strcmp(*argv, "-6") == 0) {
++	    --argc; ++argv;
++#ifdef AF_INET6
++	    family = AF_INET6;
++#else
++	    puts("IPv6 unsupported");
++#endif
++	    continue;
++	}
++	if (strcmp(*argv, "-4") == 0) {
++	    --argc; ++argv;
++	    family = AF_INET;
++	    continue;
++	}
+ 	if (hostp == 0) {
+ 	    /* this leaks memory - FIXME */
+ 	    hostp = strdup(*argv++);
+@@ -1680,6 +1715,8 @@ int tn(int argc, const char *argv[]) {
+     if (hostp == 0)
+ 	goto usage;
+ 
++    resolv_hostp = hostp;
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+     if (hostp[0] == '@' || hostp[0] == '!') {
+ 	if ((hostname = strrchr(hostp, ':')) == NULL)
+@@ -1696,78 +1733,122 @@ int tn(int argc, const char *argv[]) {
+ 	} else {
+ 	    sn.sin_addr.s_addr = temp;
+ 	    sn.sin_family = AF_INET;
++	    /*
++	     * For source route we just make sure to get the IP given
++	     * on the command line when looking up the port.
++	     */
++	    resolv_hostp = inet_ntoa(sn.sin_addr);
+ 	}
+     } 
+-    else {
+-#endif
+-	if (inet_aton(hostp, &sn.sin_addr)) {
+-	    sn.sin_family = AF_INET;
+-	    strcpy(_hostname, hostp);
+-	    hostname = _hostname;
+-	} 
+-	else {
+-	    host = gethostbyname(hostp);
+-	    if (host) {
+-		sn.sin_family = host->h_addrtype;
+-		if (host->h_length > (int)sizeof(sn.sin_addr)) {
+-		    host->h_length = sizeof(sn.sin_addr);
+-		}
+-#if	defined(h_addr)		/* In 4.3, this is a #define */
+-		memcpy((caddr_t)&sn.sin_addr,
+-				host->h_addr_list[0], host->h_length);
+-#else	/* defined(h_addr) */
+-		memcpy((caddr_t)&sn.sin_addr, host->h_addr, host->h_length);
+-#endif	/* defined(h_addr) */
+-		strncpy(_hostname, host->h_name, sizeof(_hostname));
+-		_hostname[sizeof(_hostname)-1] = '\0';
+-		hostname = _hostname;
+-	    } else {
+-		herror(hostp);
+-		return 0;
+-	    }
+-	}
+-#if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+-    }
+ #endif
++
++    /* User port or the default name of telnet. */
+     if (portp) {
+ 	if (*portp == '-') {
+ 	    portp++;
+ 	    telnetport = 1;
+-	} else
++	} else {
+ 	    telnetport = 0;
+-	sn.sin_port = atoi(portp);
+-	if (sn.sin_port == 0) {
+-	    sp = getservbyname(portp, "tcp");
+-	    if (sp)
+-		sn.sin_port = sp->s_port;
+-	    else {
+-		printf("%s: bad port number\n", portp);
+-		return 0;
++	    if (*portp >='0' && *portp<='9') {
++	       char *end;
++	       long int p;
++
++	       p=strtol(portp, &end, 10);
++	       if (ERANGE==errno && (LONG_MIN==p || LONG_MAX==p)) {
++	          fprintf(stderr, "telnet: port %s overflows\n", portp);
++		  return 0;
++	       } else if (p<=0 || p>=65536) {
++	          fprintf(stderr, "telnet: port %s out of range\n", portp);
++		  return 0;
++	       }
+ 	    }
+-	} 
+-	else {
+-	    sn.sin_port = htons(sn.sin_port);
+ 	}
+-    } 
++    }
+     else {
+-	if (sp == 0) {
+-	    sp = getservbyname("telnet", "tcp");
+-	    if (sp == 0) {
+-		fprintf(stderr, "telnet: tcp/telnet: unknown service\n");
+-		return 0;
+-	    }
+-	    sn.sin_port = sp->s_port;
+-	}
++	portp = "telnet";
+ 	telnetport = 1;
+     }
+-    printf("Trying %s...\n", inet_ntoa(sn.sin_addr));
++
++    /* We only understand SOCK_STREAM sockets. */
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_NUMERICHOST;
++    hints.ai_family = family;
++
++    if (srchostp) {
++	res = getaddrinfo(srchostp, "0", &hints, &hostaddr);
++	if (res) {
++	    fprintf(stderr, "telnet: could not resolve %s: %s\n", srchostp,
++		    gai_strerror(res));
++	    return 0;
++	}
++	hints.ai_family = hostaddr->ai_family;
++	res = nlink.bind(hostaddr);
++	freeaddrinfo(hostaddr);
++	if (res < 0)
++	    return 0;
++    }
++        
++    /* Resolve both the host and service simultaneously. */
++    res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr);
++    if (res == EAI_NONAME) {
++	hints.ai_flags = AI_CANONNAME;
++	res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr);
++    } else if (hostaddr) {
++	hostaddr->ai_canonname = 0;
++    }
++    if (res || !hostaddr) {
++	fprintf(stderr, "telnet: could not resolve %s/%s: %s\n", resolv_hostp, portp, gai_strerror(res));
++	return 0;
++    }
++     
++    /* Try to connect to every listed round robin IP. */
++    tmpaddr = hostaddr;
++    errno = 0;
+     do {
+-	int x = nlink.connect(debug, host, &sn, srp, srlen, tos);
+-	if (!x) return 0;
+-	else if (x==1) continue;
++	int x;
++
++	if (!tmpaddr) {
++	    if (errno)
++		perror("telnet: Unable to connect to remote host");
++	    else
++		fputs("telnet: Unable to connect to remote host: "
++		      "Bad port number\n", stderr);
++err:
++	    freeaddrinfo(hostaddr);
++	    return 0;
++	}
++
++	if (tmpaddr->ai_family == AF_UNIX) {
++nextaddr:
++	    tmpaddr = tmpaddr->ai_next;
++	    continue;
++	}
++
++	getnameinfo(tmpaddr->ai_addr, tmpaddr->ai_addrlen,
++		    name, sizeof(name), service, sizeof(service),
++		    NI_NUMERICHOST | NI_NUMERICSERV);
++
++	printf("Trying %s...\n", name);
++	x = nlink.connect(debug, tmpaddr, srp, srlen, tos);
++	if (!x)
++	    goto err;
++	else if (x==1)
++	    goto nextaddr;
++
+ 	connected++;
+     } while (connected == 0);
+-    cmdrc(hostp, hostname);
++    if (tmpaddr->ai_canonname == 0) {
++	hostname = new char[strlen(hostp)+1];
++	strcpy(hostname, hostp);
++    }
++    else {
++	hostname = new char[strlen(tmpaddr->ai_canonname)+1];
++	strcpy(hostname, tmpaddr->ai_canonname);
++    }
++
++    cmdrc(hostp, hostname, portp);
++    freeaddrinfo(hostaddr);
+     if (autologin && user == NULL) {
+ 	struct passwd *pw;
+ 
+@@ -2013,30 +2094,21 @@ static int help(command_table *tab, int argc, const char *argv[]) {
+     return 0;
+ }
+ 
+-static char *rcname = 0;
+-static char rcbuf[128];
+-
+-void cmdrc(const char *m1, const char *m2) {
++static void readrc(const char *m1, const char *m2, const char *port,
++		   const char *rcname)
++{
+     FILE *rcfile;
+     int gotmachine = 0;
+     int l1 = strlen(m1);
+     int l2 = strlen(m2);
+-    char m1save[64];
+-
+-    if (skiprc) return;
++    int lport = strlen(port);
++    char m1save[l1 + 1];
++    char portsave[lport + 1];
+ 
+     strcpy(m1save, m1);
+     m1 = m1save;
+-
+-    if (rcname == 0) {
+-	rcname = getenv("HOME");
+-	if (rcname)
+-	    strcpy(rcbuf, rcname);
+-	else
+-	    rcbuf[0] = '\0';
+-	strcat(rcbuf, "/.telnetrc");
+-	rcname = rcbuf;
+-    }
++    strcpy(portsave, port);
++    port = portsave;
+ 
+     rcfile = fopen(rcname, "r");
+     if (!rcfile) return;
+@@ -2061,6 +2133,13 @@ void cmdrc(const char *m1, const char *m2) {
+ 		strncpy(line, &line[7], sizeof(line) - 7);
+ 	    else
+ 		continue;
++
++	    if (line[0] == ':') {
++		if (!strncasecmp(&line[1], port, lport))
++		    continue;
++		strncpy(line, &line[lport + 1], sizeof(line) - lport - 1);
++	    }
++
+ 	    if (line[0] != ' ' && line[0] != '\t' && line[0] != '\n')
+ 		continue;
+ 	    gotmachine = 1;
+@@ -2073,6 +2152,21 @@ void cmdrc(const char *m1, const char *m2) {
+     fclose(rcfile);
+ }
+ 
++void cmdrc(const char *m1, const char *m2, const char *port) {
++    char *rcname = NULL;
++
++    if (skiprc) return;
++
++    readrc(m1, m2, port, "/etc/telnetrc");
++    if (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1)
++      {
++        perror ("asprintf");
++        return;
++      }
++    readrc(m1, m2, port, rcname);
++    free (rcname);
++}
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+ 
+ /*
+diff --git a/telnet/defines.h b/telnet/defines.h
+index 2784400..d5edc46 100644
+--- a/telnet/defines.h
++++ b/telnet/defines.h
+@@ -50,3 +50,5 @@
+ #define	MODE_COMMAND_LINE(m)	((m)==-1)
+ 
+ #define	CONTROL(x)	((x)&0x1f)		/* CTRL(x) is not portable */
++
++#define MODE_OUT8	0x8000			/* binary mode sans -opost */
+diff --git a/telnet/externs.h b/telnet/externs.h
+index 955df79..0730e8a 100644
+--- a/telnet/externs.h
++++ b/telnet/externs.h
+@@ -48,9 +48,7 @@
+ typedef unsigned char cc_t;
+ #endif
+ 
+-#ifdef __linux__
+ #include <unistd.h>   /* get _POSIX_VDISABLE */
+-#endif
+ 
+ #ifndef	_POSIX_VDISABLE
+ #error "Please fix externs.h to define _POSIX_VDISABLE"
+@@ -60,7 +58,8 @@ typedef unsigned char cc_t;
+ 
+ extern int autologin;		/* Autologin enabled */
+ extern int skiprc;		/* Don't process the ~/.telnetrc file */
+-extern int eight;		/* use eight bit mode (binary in and/or out */
++extern int eight;		/* use eight bit mode (binary in and/or out) */
++extern int binary;		/* use binary option (in and/or out) */
+ extern int flushout;		/* flush output */
+ extern int connected;		/* Are we connected to the other side? */
+ extern int globalmode;		/* Mode tty should be in */
+@@ -225,6 +224,8 @@ cc_t *tcval(int);
+ 
+ //#if 0
+ extern struct termios new_tc;
++extern struct termios old_tc;
++
+ 
+ #define termEofChar		new_tc.c_cc[VEOF]
+ #define termEraseChar		new_tc.c_cc[VERASE]
+diff --git a/telnet/main.cc b/telnet/main.cc
+index b67f2ce..b626e54 100644
+--- a/telnet/main.cc
++++ b/telnet/main.cc
+@@ -45,7 +45,10 @@ char main_rcsid[] =
+ 
+ #include <sys/types.h>
+ #include <getopt.h>
++#include <stdlib.h>
+ #include <string.h>
++#include <netdb.h>
++#include <errno.h>
+ 
+ #include "ring.h"
+ #include "externs.h"
+@@ -80,12 +83,13 @@ tninit(void)
+ void usage(void) {
+     fprintf(stderr, "Usage: %s %s%s%s%s\n",
+ 	    prompt,
+-	    " [-8] [-E] [-L] [-a] [-d] [-e char] [-l user] [-n tracefile]",
+-	    "\n\t",
++	    "[-4] [-6] [-8] [-E] [-L] [-a] [-d] [-e char] [-l user]",
++	    "\n\t[-n tracefile] [ -b addr ]",
+ #ifdef TN3270
++	    "\n\t"
+ 	    "[-noasynch] [-noasynctty] [-noasyncnet] [-r] [-t transcom]\n\t",
+ #else
+-	    "[-r] ",
++	    " [-r] ",
+ #endif
+ 	    "[host-name [port]]"
+ 	);
+@@ -102,7 +106,8 @@ main(int argc, char *argv[])
+ 	extern char *optarg;
+ 	extern int optind;
+ 	int ch;
+-	char *user;
++	char *user, *srcaddr;
++	int family;
+ 
+ 	tninit();		/* Clear out things */
+ #if	defined(CRAY) && !defined(__STDC__)
+@@ -110,21 +115,38 @@ main(int argc, char *argv[])
+ #endif
+ 
+ 	TerminalSaveState();
++	if ((old_tc.c_cflag & (CSIZE|PARENB)) != CS8)
++		eight = 0;
+ 
+ 	if ((prompt = strrchr(argv[0], '/'))!=NULL)
+ 		++prompt;
+ 	else
+ 		prompt = argv[0];
+ 
+-	user = NULL;
++	user = srcaddr = NULL;
++	family = 0;
+ 
+ 	rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE;
+ 	autologin = -1;
+ 
+-	while ((ch = getopt(argc, argv, "8EKLS:X:ade:k:l:n:rt:x")) != EOF) {
++	while ((ch = getopt(argc, argv,
++			    "4678EKLS:X:ab:de:k:l:n:rt:x")) != EOF) {
+ 		switch(ch) {
++		case '4':
++			family = AF_INET;
++			break;
++		case '6':
++#ifdef AF_INET6
++			family = AF_INET6;
++#else
++			fputs("IPv6 unsupported\n", stderr);
++#endif
++			break;
++		case '7':
++			eight = 0;	/* 7-bit ouput and input */
++			break;
+ 		case '8':
+-			eight = 3;	/* binary output and input */
++			binary = 3;	/* binary output and input */
+ 			break;
+ 		case 'E':
+ 			rlogin = escapechar = _POSIX_VDISABLE;
+@@ -133,23 +155,26 @@ main(int argc, char *argv[])
+ 		        //autologin = 0;
+ 			break;
+ 		case 'L':
+-			eight |= 2;	/* binary output only */
++			binary |= 2;	/* binary output only */
+ 			break;
+ 		case 'S':
+ 		    {
+-#ifdef	HAS_GETTOS
+ 			extern int tos;
++			int num;
+ 
+-			if ((tos = parsetos(optarg, "tcp")) < 0)
++#ifdef	HAS_GETTOS
++			if ((num = parsetos(optarg, "tcp")) < 0) {
++#else
++			errno = 0;
++			num = strtol(optarg, 0, 0);
++			if (errno) {
++#endif
+ 				fprintf(stderr, "%s%s%s%s\n",
+ 					prompt, ": Bad TOS argument '",
+ 					optarg,
+ 					"; will try to use default TOS");
+-#else
+-			fprintf(stderr,
+-			   "%s: Warning: -S ignored, no parsetos() support.\n",
+-								prompt);
+-#endif
++			} else
++				tos = num;
+ 		    }
+ 			break;
+ 		case 'X':
+@@ -210,6 +235,9 @@ main(int argc, char *argv[])
+ 				"%s: -x ignored, no encryption support.\n",
+ 				prompt);
+ 			break;
++		case 'b':
++			srcaddr = optarg;
++			break;
+ 		case '?':
+ 		default:
+ 			usage();
+@@ -233,6 +261,13 @@ main(int argc, char *argv[])
+ 			*argp++ = "-l";
+ 			*argp++ = user;
+ 		}
++		if (srcaddr) {
++			*argp++ = "-b";
++			*argp++ = srcaddr;
++		}
++		if (family) {
++			*argp++ = family == AF_INET ? "-4" : "-6";
++		}
+ 		*argp++ = argv[0];		/* host */
+ 		if (argc > 1)
+ 			*argp++ = argv[1];	/* port */
+diff --git a/telnet/netlink.cc b/telnet/netlink.cc
+index f439cff..f839747 100644
+--- a/telnet/netlink.cc
++++ b/telnet/netlink.cc
+@@ -79,22 +79,61 @@ void netlink::close(int doshutdown) {
+ 	shutdown(net, 2);
+     }
+     ::close(net);
++    net = -1;
+ }
+ 
+-int netlink::connect(int debug, struct hostent *host, 
+-		     struct sockaddr_in *sn, 
+-		     char *srcroute, int srlen, int tos) 
++int netlink::bind(struct addrinfo *addr)
+ {
+-    int on=1;
++    int res;
++
++    res = socket(addr->ai_family);
++    if (res < 2) {
++	if (res == 1)
++	    perror("telnet: socket");
++	return -1;
++    }
++
++    if (::bind(net, addr->ai_addr, addr->ai_addrlen) < 0) {
++	perror("telnet: bind");
++	return -1;
++    }
++
++    return 0;
++}
++
++int netlink::socket(int family)
++{
++    if (this->family != family)
++	close(0);
+ 
+-    net = socket(AF_INET, SOCK_STREAM, 0);
+     if (net < 0) {
+-	perror("telnet: socket");
+-	return 0;
++	this->family = family;
++	net = ::socket(family, SOCK_STREAM, 0);
++	if (net < 0) {
++	    if (errno == EAFNOSUPPORT)
++		return 1;
++	    perror("telnet: socket");
++	    return 0;
++	}
+     }
+ 
++    return 2;
++}
++
++int netlink::connect(int debug, struct addrinfo *addr, 
++		     char *srcroute, int srlen, int tos) 
++{
++    int on=1;
++    int res;
++
++    res = socket(addr->ai_family);
++    if (res < 2)
++	return res;
++
+ #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP)
+     if (srcroute) {
++	if (addr->ai_family != AF_INET)
++	    fputs("Source route is only supported for IPv4\n", stderr);
+ 	if (setsockopt(net, IPPROTO_IP, IP_OPTIONS, srcroute, srlen) < 0)
+ 	    perror("setsockopt (IP_OPTIONS)");
+     }
+@@ -108,7 +147,7 @@ int netlink::connect(int debug, struct hostent *host,
+ #endif
+     if (tos < 0) tos = 020;	/* Low Delay bit */
+     if (tos && (setsockopt(net, IPPROTO_IP, IP_TOS, &tos, sizeof(int)) < 0)
+-	&& (errno != ENOPROTOOPT))
++	&& (errno != ENOPROTOOPT) && (errno != EOPNOTSUPP))
+ 	perror("telnet: setsockopt (IP_TOS) (ignored)");
+ #endif	/* defined(IPPROTO_IP) && defined(IP_TOS) */
+ 
+@@ -116,27 +155,8 @@ int netlink::connect(int debug, struct hostent *host,
+ 	perror("setsockopt (SO_DEBUG)");
+     }
+     
+-    if (::connect(net, (struct sockaddr *)sn, sizeof(*sn)) < 0) {
+-#if defined(h_addr)		/* In 4.3, this is a #define */
+-	if (host && host->h_addr_list[1]) {
+-	    int oerrno = errno;
+-	    
+-	    fprintf(stderr, "telnet: connect to address %s: ",
+-		    inet_ntoa(sn->sin_addr));
+-	    errno = oerrno;
+-	    perror(NULL);
+-	    host->h_addr_list++;
+-	    if (host->h_length > (int)sizeof(sn->sin_addr)) {
+-		host->h_length = sizeof(sn->sin_addr);
+-	    }
+-	    memcpy(&sn->sin_addr, host->h_addr_list[0], host->h_length);
+-	    close(net);
+-	    return 1;
+-	}
+-#endif	/* defined(h_addr) */
+-
+-	perror("telnet: Unable to connect to remote host");
+-	return 0;
++    if (::connect(net, addr->ai_addr, addr->ai_addrlen) < 0) {
++	return 1;
+     }
+     return 2;
+ }
+diff --git a/telnet/netlink.h b/telnet/netlink.h
+index 9852b30..0ac8a08 100644
+--- a/telnet/netlink.h
++++ b/telnet/netlink.h
+@@ -1,13 +1,16 @@
+ 
+ class netlink {
++ private:
++    int family;
+  protected:
+     int net;
+  public:
+     netlink();
+     ~netlink();
+ 
+-    int connect(int debug, struct hostent *host, 
+-		struct sockaddr_in *sin, 
++    int bind(struct addrinfo *hostaddr);
++    int socket(int family);
++    int connect(int debug, struct addrinfo *hostaddr, 
+ 		char *srcroute, int srlen,
+ 		int tos);
+     void close(int doshutdown);
+diff --git a/telnet/network.cc b/telnet/network.cc
+index 6a2c374..0dcf3e2 100644
+--- a/telnet/network.cc
++++ b/telnet/network.cc
+@@ -40,6 +40,7 @@ char net_rcsid[] =
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <arpa/telnet.h>
+ 
+diff --git a/telnet/proto.h b/telnet/proto.h
+index 8be4a39..92f2419 100644
+--- a/telnet/proto.h
++++ b/telnet/proto.h
+@@ -13,7 +13,7 @@ int TerminalWindowSize(long *rows, long *cols);
+ void auth_encrypt_user(char *);
+ void auth_name(unsigned char *, int);
+ void auth_printsub(unsigned char *, int, unsigned char *, int);
+-void cmdrc(const char *m1, const char *m2);
++void cmdrc(const char *, const char *, const char *);
+ void env_init(void);
+ int getconnmode(void);
+ void init_network(void);
+diff --git a/telnet/ring.cc b/telnet/ring.cc
+index be57396..772c6c5 100644
+--- a/telnet/ring.cc
++++ b/telnet/ring.cc
+@@ -165,7 +165,7 @@ int ringbuf::flush() {
+ 
+ /////////////////////////////////////////////////// supply //////////////
+ 
+-void ringbuf::printf(const char *format, ...) {
++void ringbuf::xprintf(const char *format, ...) {
+     char xbuf[256];
+     va_list ap;
+     va_start(ap, format);
+diff --git a/telnet/ring.h b/telnet/ring.h
+index 15d3f3f..049377e 100644
+--- a/telnet/ring.h
++++ b/telnet/ring.h
+@@ -83,7 +83,7 @@ class ringbuf {
+     // manual supply
+     void putch(char c) { write(&c, 1); }
+     void write(const char *buffer, int ct);
+-    void printf(const char *format, ...);
++    void xprintf(const char *format, ...);
+     int empty_count() { return size - count; }
+ 
+     // automatic supply
+diff --git a/telnet/sys_bsd.cc b/telnet/sys_bsd.cc
+index 93fba7e..a8c9aab 100644
+--- a/telnet/sys_bsd.cc
++++ b/telnet/sys_bsd.cc
+@@ -189,18 +189,25 @@ void NetSetPgrp(int fd) {
+  * Various signal handling routines.
+  */
+ 
++#if 0
+ static void deadpeer(int /*sig*/) {
+     setcommandmode();
+     siglongjmp(peerdied, -1);
+ }
++#endif
+ 
+ static void intr(int /*sig*/) {
+     if (localchars) {
+ 	intp();
+     }
+     else {
++#if 0
+         setcommandmode();
+ 	siglongjmp(toplevel, -1);
++#else
++	signal(SIGINT, SIG_DFL);
++	raise(SIGINT);
++#endif
+     }
+ }
+ 
+@@ -214,6 +221,8 @@ static void intr2(int /*sig*/) {
+ 	    sendabort();
+ 	return;
+     }
++    signal(SIGQUIT, SIG_DFL);
++    raise(SIGQUIT);
+ }
+ 
+ #ifdef	SIGWINCH
+@@ -238,7 +247,9 @@ void ayt(int sig) {
+ void sys_telnet_init(void) {
+     signal(SIGINT, intr);
+     signal(SIGQUIT, intr2);
++#if 0
+     signal(SIGPIPE, deadpeer);
++#endif
+ #ifdef	SIGWINCH
+     signal(SIGWINCH, sendwin);
+ #endif
+diff --git a/telnet/telnet.1 b/telnet/telnet.1
+index 54a47fb..8365e42 100644
+--- a/telnet/telnet.1
++++ b/telnet/telnet.1
+@@ -42,8 +42,9 @@
+ protocol
+ .Sh SYNOPSIS
+ .Nm telnet
+-.Op Fl 8ELadr
++.Op Fl 468ELadr
+ .Op Fl S Ar tos
++.Op Fl b Ar address
+ .Op Fl e Ar escapechar
+ .Op Fl l Ar user
+ .Op Fl n Ar tracefile
+@@ -68,6 +69,10 @@ command implicitly; see the description below.
+ .Pp
+ Options:
+ .Bl -tag -width indent
++.It Fl 4
++Force IPv4 address resolution.
++.It Fl 6
++Force IPv6 address resolution.
+ .It Fl 8
+ Request 8-bit operation. This causes an attempt to negotiate the
+ .Dv TELNET BINARY
+@@ -89,6 +94,8 @@ of the
+ option if supported by the remote system. The username is retrieved
+ via
+ .Xr getlogin 3 .
++.It Fl b Ar address
++Use bind(2) on the local socket to bind it to a specific local address.
+ .It Fl d
+ Sets the initial value of the
+ .Ic debug
+@@ -474,17 +481,29 @@ protocol without making a mess. Protocol negotiation can be forced by
+ placing a dash before the port number.
+ .Pp
+ After establishing a connection, any commands associated with the
+-remote host in the user's
++remote host in
++.Pa /etc/telnetrc
++and the user's
+ .Pa .telnetrc
+-file are executed.
++file are executed, in that order.
+ .Pp
+-The format of the .telnetrc file is as follows: Lines beginning with a
++The format of the telnetrc files is as follows: Lines beginning with a
+ #, and blank lines, are ignored.  The rest of the file should consist
+ of hostnames and sequences of
+ .Nm telnet
+ commands to use with that host. Commands should be one per line,
+ indented by whitespace; lines beginning without whitespace are
+-interpreted as hostnames. Upon connecting to a particular host, the
++interpreted as hostnames.  Lines beginning with the special hostname
++.Ql DEFAULT
++will apply to all hosts.  Hostnames including
++.Ql DEFAULT
++may be followed immediately by a colon and a port number or string.
++If a port is specified it must match exactly with what is specified
++on the command line.  If no port was specified on the command line,
++then the value
++.Ql telnet
++is used.
++Upon connecting to a particular host, the
+ commands associated with that host are executed.
+ .It Ic quit
+ Close any open session and exit
+@@ -1184,9 +1203,7 @@ escape sequences are preceded by a '*' to aid in locating them.
+ When the skiprc toggle is
+ .Dv TRUE ,
+ .Tn telnet
+-does not read the 
+-.Pa \&.telnetrc
+-file.  The initial value for this toggle is
++does not read the telnetrc files.  The initial value for this toggle is
+ .Dv FALSE.
+ .It Ic termdata
+ Toggles the display of all terminal data (in hexadecimal format).
+@@ -1239,7 +1256,9 @@ to the other side via the
+ .Dv TELNET ENVIRON
+ option.
+ .Sh FILES
+-.Bl -tag -width ~/.telnetrc -compact
++.Bl -tag -width /etc/telnetrc -compact
++.It Pa /etc/telnetrc
++global telnet startup values
+ .It Pa ~/.telnetrc
+ user customized telnet startup values
+ .El
+diff --git a/telnet/telnet.cc b/telnet/telnet.cc
+index 4fc3b1f..7eca811 100644
+--- a/telnet/telnet.cc
++++ b/telnet/telnet.cc
+@@ -88,7 +88,8 @@ char	do_dont_resp[256];
+ char	will_wont_resp[256];
+ 
+ int
+-eight = 0,
++  eight = 3,
++  binary = 0,
+   autologin = 0,	/* Autologin anyone? */
+   skiprc = 0,
+   connected,
+@@ -639,14 +640,14 @@ static const char *gettermname(void) {
+   if (resettermname) {
+     resettermname = 0;
+     tname = env_getvalue("TERM", 0);
+-    if (!tname || my_setupterm(tname, 1, &err)) {
++    if (!tname /* || my_setupterm(tname, 1, &err) */) {
+       termbuf[0] = 0;
+       tname = "UNKNOWN";
+     }
+     mklist(termbuf, tname, termtypes);
+     next = 0;
+   }
+-  if (next==termtypes.num()) next = 0;
++  if (next==termtypes.num()-1) next = 0;
+   return termtypes[next++];
+ }
+ /*
+@@ -681,7 +682,7 @@ static void suboption(void) {
+       }
+ #endif /* TN3270 */
+       name = gettermname();
+-      netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
++      netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
+ 		      TELQUAL_IS, name, IAC, SE);
+     }
+     break;
+@@ -693,7 +694,7 @@ static void suboption(void) {
+     if (SB_GET() == TELQUAL_SEND) {
+       long oospeed, iispeed;
+       TerminalSpeeds(&iispeed, &oospeed);
+-      netoring.printf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, 
++      netoring.xprintf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, 
+ 		      TELQUAL_IS, oospeed, iispeed, IAC, SE);
+     }
+     break;
+@@ -780,7 +781,7 @@ static void suboption(void) {
+ 	send_wont(TELOPT_XDISPLOC, 1);
+ 	break;
+       }
+-      netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
++      netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
+ 		      TELQUAL_IS, dp, IAC, SE);
+     }
+     break;
+@@ -798,7 +799,7 @@ void lm_will(unsigned char *cmd, int len) {
+     return;
+   }
+   
+-  netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, 
++  netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, 
+ 		  DONT, cmd[0], IAC, SE);
+ }
+ 
+@@ -815,7 +816,7 @@ void lm_do(unsigned char *cmd, int len) {
+     /*@*/	printf("lm_do: no command!!!\n");	/* Should not happen... */
+     return;
+   }
+-  netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, 
++  netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, 
+ 		  WONT, cmd[0], IAC, SE);
+ }
+ 
+@@ -838,7 +839,7 @@ void lm_mode(unsigned char *cmd, int len, int init) {
+     k |= MODE_ACK;
+   }
+   
+-  netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE,
++  netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE,
+ 		  k, IAC, SE);
+   
+   setconnmode(0);	/* set changed mode */
+@@ -933,11 +934,11 @@ void slc_mode_import(int def) {
+ 
+ void slc_import(int def) {
+   if (def) {
+-    netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++    netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ 		    LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE);
+   }
+   else {
+-    netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
++    netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE,
+ 		    LM_SLC, 0, SLC_VARIABLE, 0, IAC, SE);
+   }
+ }
+@@ -1050,6 +1051,7 @@ void slc_check(void) {
+ 
+ 
+ unsigned char slc_reply[128];
++unsigned char const * const slc_reply_eom = &slc_reply[sizeof(slc_reply)];
+ unsigned char *slc_replyp;
+ 
+ void slc_start_reply(void) {
+@@ -1061,6 +1063,14 @@ void slc_start_reply(void) {
+ }
+ 
+ void slc_add_reply(int func, int flags, int value) {
++  /* A sequence of up to 6 bytes my be written for this member of the SLC
++   * suboption list by this function.  The end of negotiation command,
++   * which is written by slc_end_reply(), will require 2 additional
++   * bytes.  Do not proceed unless there is sufficient space for these
++   * items.
++   */
++  if (&slc_replyp[6+2] > slc_reply_eom)
++    return;
+   if ((*slc_replyp++ = func) == IAC)
+     *slc_replyp++ = IAC;
+   if ((*slc_replyp++ = flags) == IAC)
+@@ -1142,6 +1152,7 @@ void env_opt(unsigned char *buf, int len) {
+   }
+ }
+ 
++/* OPT_REPLY_SIZE must be a multiple of 2. */
+ #define	OPT_REPLY_SIZE	256
+ unsigned char *opt_reply;
+ unsigned char *opt_replyp;
+@@ -1173,6 +1184,7 @@ void env_opt_start_info(void) {
+ 
+ void env_opt_add(const char *ep) {
+   const char *vp;
++  const unsigned char *tp;
+   unsigned char c;
+   
+   if (opt_reply == NULL)		/*XXX*/
+@@ -1185,11 +1197,12 @@ void env_opt_add(const char *ep) {
+     return;
+   }
+   vp = env_getvalue(ep, 1);
+-  if (opt_replyp + (vp ? strlen(vp) : 0) + strlen(ep) + 6 > opt_replyend)
++  tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6;
++  if (tp > opt_replyend)
+     {
+       register int len;
+-      opt_replyend += OPT_REPLY_SIZE;
+-      len = opt_replyend - opt_reply;
++      len = ((tp - opt_reply) + OPT_REPLY_SIZE - 1) & ~(OPT_REPLY_SIZE - 1);
++      opt_replyend = opt_reply + len;
+       opt_reply = (unsigned char *)realloc(opt_reply, len);
+       if (opt_reply == NULL) {
+ 	/*@*/			printf("env_opt_add: realloc() failed!!!\n");
+@@ -1740,8 +1753,8 @@ void telnet(const char * /*user*/) {
+     send_do(TELOPT_STATUS, 1);
+     if (env_getvalue("DISPLAY", 0))
+       send_will(TELOPT_XDISPLOC, 1);
+-    if (eight)
+-      tel_enter_binary(eight);
++    if (binary)
++      tel_enter_binary(binary);
+   }
+ #endif /* !defined(TN3270) */
+   
+diff --git a/telnet/terminal.cc b/telnet/terminal.cc
+index 9eb47ae..764f18f 100644
+--- a/telnet/terminal.cc
++++ b/telnet/terminal.cc
+@@ -45,6 +45,8 @@ char terminal_rcsid[] =
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
+ 
+ #include "ring.h"
+ #include "defines.h"
+@@ -155,9 +157,11 @@ int getconnmode(void) {
+     if (localflow)
+ 	mode |= MODE_FLOW;
+ 
+-    if (my_want_state_is_will(TELOPT_BINARY))
++    if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY))
+ 	mode |= MODE_INBIN;
+ 
++    if (eight & 2)
++	mode |= MODE_OUT8;
+     if (his_want_state_is_will(TELOPT_BINARY))
+ 	mode |= MODE_OUTBIN;
+ 
+@@ -449,10 +453,13 @@ void TerminalNewMode(int f)
+ 		// breaks SunOS.
+ 	 	tmp_tc.c_iflag |= ISTRIP;
+ 	}
+-	if (f & MODE_OUTBIN) {
++	if (f & (MODE_OUTBIN|MODE_OUT8)) {
+ 		tmp_tc.c_cflag &= ~(CSIZE|PARENB);
+ 		tmp_tc.c_cflag |= CS8;
+-		tmp_tc.c_oflag &= ~OPOST;
++		if (f & MODE_OUTBIN)
++			tmp_tc.c_oflag &= ~OPOST;
++		else
++			tmp_tc.c_oflag |= OPOST;
+ 	} else {
+ 		tmp_tc.c_cflag &= ~(CSIZE|PARENB);
+ 		tmp_tc.c_cflag |= old_tc.c_cflag & (CSIZE|PARENB);
+@@ -468,7 +475,7 @@ void TerminalNewMode(int f)
+ 
+ #ifdef	SIGINFO
+ 	signal(SIGINFO, ayt);
+-#endif	SIGINFO
++#endif	/* SIGINFO */
+ 
+ #if defined(NOKERNINFO)
+ 	tmp_tc.c_lflag |= NOKERNINFO;
+@@ -504,7 +511,7 @@ void TerminalNewMode(int f)
+ 
+ #ifdef	SIGINFO
+ 	signal(SIGINFO, ayt_status);
+-#endif	SIGINFO
++#endif	/* SIGINFO */
+ 
+ #ifdef	SIGTSTP
+ 	signal(SIGTSTP, SIG_DFL);
+diff --git a/telnet/utilities.cc b/telnet/utilities.cc
+index 0448f0a..66839ab 100644
+--- a/telnet/utilities.cc
++++ b/telnet/utilities.cc
+@@ -47,6 +47,8 @@ char util_rcsid[] =
+ #include <sys/socket.h>
+ #include <unistd.h>
+ #include <ctype.h>
++#include <string.h>
++#include <stdlib.h>
+ 
+ #include "ring.h"
+ #include "defines.h"
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch
new file mode 100644
index 0000000..b9a98f1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch
@@ -0,0 +1,41 @@
+From 31362e4c0d02b4a2b952ad0dd32acfb573c442f3 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 28 Nov 2014 07:17:40 +0900
+Subject: [PATCH 2/2] WARNING Fix and modify "CFLAGS"
+
+WARNING: QA Issue: File '/usr/sbin/in.telnetd' from netkit-telnet was 
+already stripped, this will prevent future debugging! [already-stripped]
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ telnetd/Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/telnetd/Makefile b/telnetd/Makefile
+index 72650b4..a4cf9fa 100644
+--- a/telnetd/Makefile
++++ b/telnetd/Makefile
+@@ -9,7 +9,8 @@ include ../MRULES
+ # take out -DPARANOID_TTYS.
+ 
+ CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
+-	   -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
++	   -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS \
++	   -DLOGIN_WRAPPER=\"/${libdir}/telnetlogin\"
+ # LIBS += $(LIBTERMCAP)
+ 
+ OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
+@@ -27,7 +28,7 @@ $(OBJS): defs.h ext.h pathnames.h telnetd.h logwtmp.h logout.h setproctitle.h
+ telnetd.o: ../version.h
+ 
+ install: telnetd
+-	install -s -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd
++	install -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd
+ 	install -m$(MANMODE) issue.net.5 $(INSTALLROOT)$(MANDIR)/man5/
+ 	install -m$(MANMODE) telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/in.telnetd.8
+ 	ln -sf in.telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/telnetd.8
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch
new file mode 100644
index 0000000..b3fe36b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch
@@ -0,0 +1,48 @@
+To support the cross-compile
+
+Upstream-Status: Pending
+
+make the configure to support the cross-compile, by only to compile the
+target, and not to run it
+
+Roy Li <rongqing.li@windriver.com>
+Index: netkit-telnet-0.17/configure
+===================================================================
+--- netkit-telnet-0.17.orig/configure	2008-11-23 22:01:26.000000000 +0100
++++ netkit-telnet-0.17/configure	2008-11-23 22:05:00.000000000 +0100
+@@ -94,7 +94,7 @@
+     echo -n 'Checking if C compiler works... '
+     if (
+           $CC __conftest.c -o __conftest || exit 1
+-          ./__conftest || exit 1
++          # Idiots belong shot! ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+          echo 'yes'
+      else
+@@ -141,7 +141,7 @@
+     echo -n 'Checking if C++ compiler works... '
+     if (
+           $CXX __conftest.cc -o __conftest || exit 1
+-          ./__conftest || exit 1
++          # Iditios belong shot! ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+          echo 'yes'
+      else
+@@ -284,7 +284,7 @@
+ else
+     if (
+           $CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc  -o __conftest || exit 1
+-          ./__conftest || exit 1
++          # running still does not work./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-D__USE_BSD_SIGNAL'
+         CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
+@@ -501,7 +501,7 @@
+ EOF
+ if (
+       $CXX $CXXFLAGS  __conftest.cc $LIBBSD -o __conftest || exit 1
+-      ./__conftest || exit 1
++      # argh! morons!./__conftest || exit 1
+    ) >/dev/null 2>&1; then
+     echo 'ok'
+ else
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd
new file mode 100644
index 0000000..12204c7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd
@@ -0,0 +1,14 @@
+# default: on
+# description: The telnet server serves telnet sessions; it uses \
+#	unencrypted username/password pairs for authentication.
+service telnet
+{
+	flags		= REUSE
+	socket_type	= stream
+	wait		= no
+	user		= root
+	server		= /usr/sbin/in.telnetd
+	log_on_failure	+= USERID
+	disable		= yes
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
new file mode 100644
index 0000000..08dd532
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
@@ -0,0 +1,71 @@
+DESCRIPTION = "netkit-telnet includes the telnet daemon and client."
+HOMEPAGE = "http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SECTION = "net"
+DEPENDS = "ncurses"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef"
+
+SRC_URI = "http://ftp.linux.org.uk/pub/linux/Networking/netkit/${BP}.tar.gz \
+           file://To-aviod-buffer-overflow-in-telnet.patch \
+           file://Warning-fix-in-the-step-of-install.patch \
+           file://telnet-xinetd \
+           file://cross-compile.patch \
+           file://0001-telnet-telnetd-Fix-print-format-strings.patch \
+           file://0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch \
+           file://CVE-2020-10188.patch \
+           file://0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch \
+           "
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar"
+
+EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
+    MANMODE=644 MANDIR=${mandir}"
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \
+        -e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \
+        -e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \
+        -i MCONFIG
+}
+
+do_compile () {
+    oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnet
+    oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' LIBS=-lutil SUB=telnetd
+    oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnetlogin
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 0755 telnet/telnet ${D}${bindir}/telnet.${PN}
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man5
+    install -d ${D}${mandir}/man8
+    oe_runmake SUB=telnetd install
+    rm -rf ${D}${mandir}/man1
+    install -D -m 4750 ${B}/telnetlogin/telnetlogin ${D}/${libdir}/telnetlogin
+    # fix up hardcoded paths
+    sed -i -e 's,/usr/sbin/,${sbindir}/,' ${WORKDIR}/telnet-xinetd
+    install -d  ${D}/etc/xinetd.d/
+    install -p -m644 ${WORKDIR}/telnet-xinetd ${D}/etc/xinetd.d/telnet
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "telnet"
+ALTERNATIVE_LINK_NAME[telnet] = "${bindir}/telnet"
+ALTERNATIVE_TARGET[telnet] = "${bindir}/telnet.${PN}"
+
+ALTERNATIVE_${PN}-doc = "telnetd.8"
+ALTERNATIVE_LINK_NAME[telnetd.8] = "${mandir}/man8/telnetd.8"
+
+SRC_URI[md5sum] = "d6beabaaf53fe6e382c42ce3faa05a36"
+SRC_URI[sha256sum] = "9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00"
+FILES_${PN} += "${sbindir}/in.* ${libdir}/* ${sysconfdir}/xinetd.d/*"
+
+# http://errors.yoctoproject.org/Errors/Details/186954/
+COMPATIBLE_HOST_libc-musl = 'null'
+RCONFLICTS_${PN} = "inetutils-telnetd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
new file mode 100644
index 0000000..7893690
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch
@@ -0,0 +1,27 @@
+From fa57e161fc953264a75d50a787cb83983e60acc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:30:02 -0700
+Subject: [PATCH] tftp: Include missing fcntl.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tftp/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tftp/main.c b/tftp/main.c
+index 8c54843..5c9b698 100644
+--- a/tftp/main.c
++++ b/tftp/main.c
+@@ -63,6 +63,7 @@ char main_rcsid[] =
+ #include <ctype.h>
+ #include <netdb.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ 
+ #include "tftpsubs.h"  /* for mysignal() */
+ 
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf
new file mode 100644
index 0000000..7bc6ca9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf
@@ -0,0 +1,11 @@
+service tftp
+{
+    disable        = no
+    socket_type    = dgram
+    port           = 69
+    protocol       = udp
+    wait           = yes
+    user           = nobody
+    server         = /usr/sbin/in.tftpd
+    server_args    = /tftpboot
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
new file mode 100644
index 0000000..92c13e8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
@@ -0,0 +1,55 @@
+SUMMARY = "tftp - Trivial file transfer protocol client"
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+DEPENDS = "tcp-wrappers"
+
+LIC_FILES_CHKSUM = "file://tftp/tftp.c;beginline=2;endline=3;md5=84d2cfe1e60863a7d82648734ba4d30c"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
+           ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \
+           file://tftp.conf \
+           file://0001-tftp-Include-missing-fcntl.h.patch \
+           "
+
+SRC_URI[archive.md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8"
+SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d"
+SRC_URI[patch18.md5sum] = "cb29e7a33dd85105ba6e6ec4f971e42c"
+SRC_URI[patch18.sha256sum] = "092437d27b4fa88c044ef6290372fee5ce06d223607f0e22a6e527065c8930e7"
+
+inherit autotools-brokensep
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    echo "CFLAGS=${CFLAGS}" > MCONFIG
+}
+
+do_compile () {
+    oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' 'CFLAGS=${CFLAGS}'
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man8
+    install -d ${D}${sysconfdir}/xinetd.d
+
+    sed -i 's/install -s/install/' tftp/Makefile
+    sed -i 's/install -s/install/' tftpd/Makefile
+
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+
+    install ${WORKDIR}/tftp.conf ${D}/${sysconfdir}/xinetd.d/tftp
+}
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}/xinetd.d/*"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+    ${bindir}/.debug ${sbindir}/.debug"
+
+RDEPENDS_${PN}-server = "tcp-wrappers xinetd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb
new file mode 100644
index 0000000..6dd15ad
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Babel is a loop-avoiding distance-vector routing protocol"
+DESCRIPTION = "\
+Babel is a loop-avoiding distance-vector routing protocol for IPv6 and \
+IPv4 with fast convergence properties. It is based on the ideas in DSDV, AODV \
+and Cisco's EIGRP, but is designed to work well not only in wired networks \
+but also in wireless mesh networks, and has been extended with support \
+for overlay networks. Babel is in the process of becoming an IETF Standard. \
+"
+HOMEPAGE = "https://www.irif.fr/~jch/software/babel/"
+SECTION = "net"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=411a48ac3c2e9e0911b8dd9aed26f754"
+
+SRC_URI = "git://github.com/jech/babeld.git;protocol=git"
+SRCREV = "0835d5d894ea016ab7b81562466cade2c51a12d4"
+
+UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+do_compile () {
+	oe_runmake babeld
+}
+
+do_install () {
+	oe_runmake install.minimal PREFIX=${D}
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/dante/dante_1.4.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/dante/dante_1.4.1.bb
new file mode 100644
index 0000000..cfe71dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/dante/dante_1.4.1.bb
@@ -0,0 +1,49 @@
+SECTION = "console/utils"
+SUMMARY = "A free SOCKS server"
+DESCRIPTION = "Dante consists of a SOCKS server and a SOCKS client,\
+implementing RFC 1928 and related standards. It is a flexible product\
+that can be used to provide convenient and secure network\
+connectivity. Once installed, Dante can in most cases be made\
+transparent to clients, providing functionality somewhat similar to\
+what could be described as a non-transparent Layer 4 router."
+HOMEPAGE = "http://www.inet.no/dante/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=221118dda731fe93a85d0ed973467249"
+
+SRC_URI = "https://www.inet.no/dante/files/dante-${PV}.tar.gz \
+          "
+SRC_URI[md5sum] = "68c2ce12119e12cea11a90c7a80efa8f"
+SRC_URI[sha256sum] = "b6d232bd6fefc87d14bf97e447e4fcdeef4b28b16b048d804b50b48f261c4f53"
+
+# without --without-gssapi, config.log will contain reference to /usr/lib
+# as a consequence of GSSAPI path being set to /usr by default.
+# --with-gssapi-path=PATH specify gssapi path
+# --without-gssapi        disable gssapi support
+# --enable-release        build prerelease as full release
+EXTRA_OECONF += "--without-gssapi --sbindir=${bindir}"
+
+DEPENDS += "flex-native bison-native libpam"
+
+inherit autotools-brokensep features_check
+
+REQUIRED_DISTRO_FEATURES = "pam"
+
+EXTRA_AUTORECONF = "-I ${S}"
+
+PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap"
+PACKAGECONFIG[krb5] = ",--without-krb5,krb5"
+
+PACKAGECONFIG ??= ""
+
+do_install_append() {
+    install -d ${D}${sysconfdir}
+    cp ${S}/example/sock[sd].conf ${D}${sysconfdir}
+}
+
+PACKAGES =+ "${PN}-sockd ${PN}-libdsocks "
+
+FILES_${PN}-libdsocks = "${libdir}/libdsocks.so"
+FILES_${PN}-sockd = "${bindir}/sockd ${sysconfdir}/sockd.conf"
+
+INSANE_SKIP_${PN}-libdsocks = "dev-elf"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-Fix-testcnx-expired-CA-data.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-Fix-testcnx-expired-CA-data.patch
new file mode 100644
index 0000000..354d3dc
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-Fix-testcnx-expired-CA-data.patch
@@ -0,0 +1,746 @@
+From c892c87dc50e036af4e35de0321e6f37a70b25d2 Mon Sep 17 00:00:00 2001
+From: Ovidiu Panait <ovidiu.panait@windriver.com>
+Date: Tue, 23 Jun 2020 14:17:56 +0300
+Subject: [PATCH] Fix testcnx expired CA data
+
+Upstream-Status: Backport [http://www.freediameter.net/hg/freeDiameter/rev/eff5bb332b5a]
+
+Authored-by: Sebastien Decugis <sdecugis@freediameter.net>
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ tests/testcnx.c | 707 ++++++++++++++++++++++++++++++++++----------------------
+ 1 file changed, 425 insertions(+), 282 deletions(-)
+
+diff --git a/tests/testcnx.c b/tests/testcnx.c
+index e1826c9..809d89a 100644
+--- a/tests/testcnx.c
++++ b/tests/testcnx.c
+@@ -53,300 +53,443 @@
+ 
+ 
+ /* The cryptographic data */
+-static char ca_data[] =		"-----BEGIN CERTIFICATE-----\n"
+-				"MIIEqjCCA5KgAwIBAgIJANKgDwdlDYQDMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD\n"
+-				"VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNV\n"
+-				"BAoMBFdJREUxDzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293\n"
+-				"YWRkaWN0Lm9yZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDAe\n"
+-				"Fw0wOTEwMDUwODUxNDRaFw0xOTEwMDMwODUxNDRaMIGUMQswCQYDVQQGEwJKUDEO\n"
+-				"MAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUx\n"
+-				"DzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293YWRkaWN0Lm9y\n"
+-				"ZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDCCASIwDQYJKoZI\n"
+-				"hvcNAQEBBQADggEPADCCAQoCggEBAM5c6w4NnngTvGNWcJzbo0Kklp+kvUNQNgGu\n"
+-				"myvz826qPp07HTSyJrIcgFnuYDR0Nd130Ot9u5osqpQhHTvolxDE87Tii8i3hJSj\n"
+-				"TTY9K0ZwGb4AZ6QkuyMXS1jtOY657HqjpGZqT/2Syh0i7dM/hqSXFw0SPbyq+W1H\n"
+-				"SVFWa1CTkPywFWAzwdr5WKah77uZ1dxWqgPgUdcZOiIQtLRp5n3fg40Nwso5YdwS\n"
+-				"64+ebBX1pkhrCQ8AGc8O61Ep1JTXcO7jqQmPgzjiN+FeostI1Dp73S3MqleTAHjR\n"
+-				"hqZ77VF7nkroMM9btMHJBaxnfwc2ewULUJwnuOiGWrvMq/9Z4J8CAwEAAaOB/DCB\n"
+-				"+TAdBgNVHQ4EFgQUkqpVn7N3gmiJ7X5zQ2bki+7qv4UwgckGA1UdIwSBwTCBvoAU\n"
+-				"kqpVn7N3gmiJ7X5zQ2bki+7qv4WhgZqkgZcwgZQxCzAJBgNVBAYTAkpQMQ4wDAYD\n"
+-				"VQQIDAVUb2t5bzEQMA4GA1UEBwwHS29nYW5laTENMAsGA1UECgwEV0lERTEPMA0G\n"
+-				"A1UECwwGQUFBIFdHMR8wHQYDVQQDDBZjaGF2cm91eC5jb3dhZGRpY3Qub3JnMSIw\n"
+-				"IAYJKoZIhvcNAQkBFhNzZGVjdWdpc0BuaWN0LmdvLmpwggkA0qAPB2UNhAMwDAYD\n"
+-				"VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAJy0XLk8j8YLSTt2/VMy9TAUx\n"
+-				"esXUiZj0Ung+gkr7A1K0NnwYxDzG2adMhf13upHoydu2ErLMmD6F77x+QuY/q7nc\n"
+-				"ZvO0tvcoAP6ToSDwiypU5dnTmnfkgwVwzFkNCi1sGRosEm8c/c/8MfK0I0nVdj1/\n"
+-				"BIkIG7tTDVi9JvkWYl0UlSKWTZKrntVwCmscfC02DGb+GoLbO9+QmiNM5Y3yOYZ4\n"
+-				"Pc7SSoKLL0rwJBmpPNs7boYsweeSuCAVu0shRfgC90odXcej2EN5ETfCuU1evXNW\n"
+-				"5cA+zZsDK/nWJwxBaW0CxAHX579FElFWlK4+BnzhZRdDhmJDnN5dh4ekJGM6Lg==\n"
+-				"-----END CERTIFICATE-----\n";
++static char ca_data[] =		""
++"-----BEGIN CERTIFICATE-----\n"
++"MIIFljCCA36gAwIBAgIJAIicnqmf2SGHMA0GCSqGSIb3DQEBCwUAMF8xFzAVBgNV\n"
++"BAMMDmNhLmxvY2FsZG9tYWluMQswCQYDVQQGEwJGUjEMMAoGA1UECAwDQmRSMQww\n"
++"CgYDVQQHDANBaXgxCzAJBgNVBAoMAmZEMQ4wDAYDVQQLDAVUZXN0czAgFw0xOTEx\n"
++"MjQxNzA2NDNaGA8yMTE5MTAzMTE3MDY0M1owXzEXMBUGA1UEAwwOY2EubG9jYWxk\n"
++"b21haW4xCzAJBgNVBAYTAkZSMQwwCgYDVQQIDANCZFIxDDAKBgNVBAcMA0FpeDEL\n"
++"MAkGA1UECgwCZkQxDjAMBgNVBAsMBVRlc3RzMIICIjANBgkqhkiG9w0BAQEFAAOC\n"
++"Ag8AMIICCgKCAgEAyj+ATbTTOkXkhnMgp4PQOcN8AppX8yKYFyWKlYfaoq1CGWhR\n"
++"zMuvlgKymGPmuYDwI2ap5z9GbMeQzhq/lnz2jg37E0aWhgPEbMDknjMMgrS5N0m0\n"
++"Z7Lqhj/JVcuhxKWTtPPbAaNMZFNJ+MZkI3tGPXNaih6qNGQKFplkv22HsIdvnvlB\n"
++"RQ0blcaJ9KYEaDeBjjX8fjkUsxw7gHNw2Gi3O0XiftNqNywrYrLzyuKZ6T3Tq9Xp\n"
++"KilwhymC3b/MiqXHeYSAHLRw3qCoaPAx01NESgr1sGoMcKyxoAkzvXsVw0fIpO5n\n"
++"pShEeOf+/ID+tWJ7EG1G13fsYXTiawsNMjHcnhrtr7lYC43/xiyjAr4V5Uf51Dt4\n"
++"aQWbEGOGJr4jniFt0Wis8MFrAYRekyV5ytJ6YCWt5nRs6Aujs8yjD89cGBddixfr\n"
++"7NfwR/dZsv7h5cufdfh8W2jzMt9DeAHM5WANIwFhrI4rfMCKS4bG9BFCAD1wEbhg\n"
++"7k/wcyOBXDIR1W1yP3SmrQRL/JiOW5jU76VQAURnmqnM9ayUdWKfROhoWuoMRIMT\n"
++"IHLxkotlQUECbGZX8gzkvlnxeogPH8KVul99USpDGU66H+RUxVOUNIPGhiZUy6KU\n"
++"nFQUHXXF1PB5U8JfhdOp5ODHDY0quUDG3FXpyf0NsNcbYzb8WWssLreIthcCAwEA\n"
++"AaNTMFEwHQYDVR0OBBYEFFYkMOz0TqjaKeuXQMYy7Q+H9fYAMB8GA1UdIwQYMBaA\n"
++"FFYkMOz0TqjaKeuXQMYy7Q+H9fYAMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN\n"
++"AQELBQADggIBAHV7IfJgmmxvsal+C6m3exoeQwlwQP5+5xF8L+FpUyJj0TWukteM\n"
++"JurAESZL7SRqBHt3XGXnNf+ghs+/hkWIoYoFj7cermN3sDqZgSqB0eOUlWEuT+bR\n"
++"NUxjb1W890ok7CqN0m7qs72oYSN53De1526sfkdpc8xEiy2UGjiwIdc/3uZ3md+I\n"
++"LOpRHoXUrw1rurmi2/F/oyDjmm9ABicNb4B8e7u1gyrdKB2H5z2HRgUbI1sf/l9I\n"
++"7u17zrieJQ7wcBlfGfjee+Iop6/ZhZdhyF5grv7OA/YgNgTl3C3MBH22912tHj4o\n"
++"3Sxpqt2q0x80Lv4nhrlnVywwp5s1tyDG8LTcOcPpjQwI8zuCTOAZIzgTarFF0/G6\n"
++"NN+ZSl+RUdPNN3g0Eo2KB7QxPsSEsHmgS00I/YPhGp6kHcD8WRij253A9odXxKL+\n"
++"P4nCbgIP/YGdHbRTTzlVMjHHSWbtWwEYzTIcn+2bHFXBQB7TE0MrlqaN4h+3UZ2r\n"
++"YCt0qyql/RJQ+txHAp43WoEg3i8regit3F6h9plDtXpodVacMREofeWlyv1zG5nD\n"
++"fjXqkb27a0tcY19OOrOU4QBks3bYLPjr4RReOvI6DSKtcXyptbjxMNihrsNpzfhH\n"
++"CQ6aE6Uebc0z+DEH5g9cc7l+RlQkeOmTEXhNIuR9JVt1H4O5YXDwKZ86\n"
++"-----END CERTIFICATE-----\n"
++;
+ 				
+ /* Client:
+-				Certificate:
+-				    Data:
+-        				Version: 3 (0x2)
+-        				Serial Number: 5 (0x5)
+-        				Signature Algorithm: sha1WithRSAEncryption
+-        				Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp
+-        				Validity
+-        				    Not Before: Oct 27 04:04:05 2009 GMT
+-        				    Not After : Oct 25 04:04:05 2019 GMT
+-        				Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=client.test/emailAddress=client@test
+-        				Subject Public Key Info:
+-        				    Public Key Algorithm: rsaEncryption
+-        				    RSA Public Key: (1024 bit)
+-                				Modulus (1024 bit):
+-                				    00:bd:eb:50:1e:9d:7a:cd:9d:bb:e7:bc:4e:38:4a:
+-                				    b2:cc:9e:b4:89:77:01:ef:d1:c6:19:29:00:fe:ce:
+-                				    3c:62:05:13:b1:8c:ff:31:7a:0f:c1:2e:4b:3c:0c:
+-                				    40:1e:36:4e:76:da:0a:64:43:fc:1e:ea:0c:97:b2:
+-                				    57:9c:9c:8c:90:bd:eb:23:7b:b8:b7:5c:03:ed:6f:
+-                				    48:55:8a:88:08:38:c5:cd:33:b7:ab:a8:3a:6f:7f:
+-                				    13:10:65:a5:50:b9:f4:8b:cc:2e:e9:79:58:a6:11:
+-                				    f0:58:45:41:ef:36:b3:35:cb:14:ec:82:0c:ad:11:
+-                				    6a:ea:64:ef:28:a2:6e:47:45
+-                				Exponent: 65537 (0x10001)
+-        				X509v3 extensions:
+-        				    X509v3 Basic Constraints: 
+-                				CA:FALSE
+-        				    Netscape Comment: 
+-                				OpenSSL Generated Certificate
+-        				    X509v3 Subject Key Identifier: 
+-                				BE:B3:89:4F:9D:8F:6C:20:C4:D0:3E:6A:05:11:82:50:54:49:70:A2
+-        				    X509v3 Authority Key Identifier: 
+-                				keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85
++Certificate:
++    Data:
++        Version: 3 (0x2)
++        Serial Number: 1 (0x1)
++    Signature Algorithm: sha256WithRSAEncryption
++        Issuer: CN=ca.localdomain, C=FR, ST=BdR, L=Aix, O=fD, OU=Tests
++        Validity
++            Not Before: Nov 24 17:06:43 2019 GMT
++            Not After : Oct 31 17:06:43 2119 GMT
++        Subject: C=FR, ST=BdR, O=fD, OU=Tests, CN=client.test
++        Subject Public Key Info:
++            Public Key Algorithm: rsaEncryption
++                Public-Key: (2048 bit)
++                Modulus:
++                    00:c2:e8:d6:a4:27:56:e5:cb:c9:c1:cb:8e:19:f2:
++                    79:35:96:ca:f2:54:ac:3e:8f:be:8e:77:44:13:c3:
++                    fd:74:21:45:bb:9e:65:f1:9d:46:af:cc:1e:af:fa:
++                    d5:93:91:38:32:0e:3c:b7:5b:a3:9c:7d:4c:94:0a:
++                    66:3a:5d:0c:8e:1f:22:59:0d:dd:a6:de:c1:91:0a:
++                    8c:70:c0:c6:2c:c1:6f:68:29:45:b4:d5:14:74:8d:
++                    31:bb:74:1e:2d:b6:78:74:0b:95:bd:96:35:1d:24:
++                    1f:7d:c9:d5:fa:5a:b6:27:87:38:cc:f4:8d:a3:98:
++                    d9:ff:32:a3:53:db:eb:b5:e5:69:a9:2b:f4:da:ec:
++                    bd:96:f0:80:46:0d:f9:48:03:39:25:4b:a3:2f:7b:
++                    59:81:8b:6e:17:67:2e:3b:84:e9:ff:ac:33:7c:60:
++                    34:10:00:c9:7b:1f:11:e6:b7:a1:57:01:46:44:ae:
++                    2d:8c:ba:d6:08:3d:5d:98:d3:66:74:d8:15:fe:75:
++                    09:61:24:5c:a2:a2:b3:0b:bd:b6:ef:98:b4:07:8d:
++                    86:ae:29:87:7b:98:3a:3f:ef:4f:f6:c2:ab:40:32:
++                    91:06:eb:8e:c8:9d:36:45:84:d4:d3:f5:85:89:ed:
++                    2f:6f:e0:40:a3:d9:0b:e2:a7:80:b1:04:ef:27:70:
++                    9a:f1
++                Exponent: 65537 (0x10001)
++        X509v3 extensions:
++            X509v3 Basic Constraints: 
++                CA:FALSE
++            Netscape Comment: 
++                OpenSSL Generated Certificate
++            X509v3 Subject Key Identifier: 
++                52:E8:18:E1:33:09:C4:AF:65:24:25:C4:72:A8:07:BB:B7:3B:C0:31
++            X509v3 Authority Key Identifier: 
++                keyid:56:24:30:EC:F4:4E:A8:DA:29:EB:97:40:C6:32:ED:0F:87:F5:F6:00
+ 
+-				    Signature Algorithm: sha1WithRSAEncryption
+-        				a3:88:f5:15:b5:ad:20:60:a1:85:19:3f:b9:5e:1e:be:31:7f:
+-        				84:7a:c2:18:3a:63:6a:67:1f:46:86:4d:10:d6:1d:ad:a2:c8:
+-        				0b:95:33:fa:e4:05:f4:b8:70:34:77:f7:85:6e:70:46:ac:39:
+-        				54:a9:5f:ea:5e:d1:33:bb:c9:a3:42:81:41:90:25:b5:92:8b:
+-        				e8:6e:3e:97:06:dd:9a:cc:29:61:34:5a:d3:1c:5d:ad:d1:a3:
+-        				eb:6a:47:b4:d0:c2:17:89:e1:e2:2d:36:18:50:1a:e7:d4:fc:
+-        				38:2e:47:0b:39:50:87:2f:aa:07:64:f8:9a:4d:47:01:da:10:
+-        				d8:97:c7:a6:13:bc:0e:ca:63:c1:f2:09:fb:f8:6a:a4:5f:08:
+-        				b5:ad:ed:4f:71:b9:89:7f:43:27:85:72:e7:8d:a8:4a:cc:f6:
+-        				36:ca:8a:ae:82:b5:a8:42:41:99:87:84:7c:f0:90:fd:ca:96:
+-        				37:a2:e0:d9:fa:dd:a4:c9:f1:50:b7:e5:e6:8f:af:83:8c:23:
+-        				b6:20:cc:66:e3:08:60:13:02:8f:42:3a:07:91:a7:38:b2:72:
+-        				16:fd:bd:a9:60:f0:e2:9f:23:f3:c0:99:e3:17:bc:00:7c:b3:
+-        				89:9c:ea:fa:3e:f6:69:a1:98:c2:ec:46:da:70:b6:f9:c3:93:
+-        				a7:fc:36:dd
++    Signature Algorithm: sha256WithRSAEncryption
++         7c:1f:50:97:70:ee:43:3c:e6:3e:ec:17:f5:78:d8:32:d4:73:
++         e9:bd:e2:9a:b4:47:d7:c8:e5:0f:38:d3:14:a8:18:ac:fa:8e:
++         8e:68:80:95:8e:0b:5b:09:25:d4:83:b6:65:ca:8e:d7:a4:31:
++         c1:86:00:cc:1f:c1:60:0f:c2:f1:84:fe:30:9b:f1:d1:1a:96:
++         d8:ae:e2:eb:28:87:7d:59:07:84:fe:c5:86:e8:41:12:98:a2:
++         d9:d3:bd:ce:63:79:43:62:bd:13:74:fa:a4:24:48:7a:f5:e9:
++         d9:d5:07:2e:33:f0:f5:0a:ab:49:41:ae:94:5c:06:bd:2e:5d:
++         e8:b3:72:e4:76:13:3e:36:0d:a0:bc:f5:a2:b0:17:da:75:0b:
++         ec:bd:0b:5b:86:a9:5f:b4:e3:3a:fa:ab:cd:4e:03:06:16:a8:
++         50:10:65:56:60:bb:c4:96:e3:64:b3:7d:e6:5c:92:23:5c:18:
++         cf:e7:f7:a1:0f:ac:99:25:b1:9b:67:63:44:30:ab:01:5b:73:
++         6d:09:80:60:c3:4b:80:04:b9:d2:47:17:ac:b7:93:58:f6:7c:
++         7c:fe:79:07:4d:20:57:68:c1:33:70:65:48:b5:c2:ac:9b:10:
++         67:63:1d:d1:28:0b:6e:07:c5:95:bd:d9:5c:42:f2:33:fa:38:
++         b1:02:3d:e2:91:b0:2c:04:66:21:35:86:68:70:06:88:a3:e3:
++         43:b1:11:24:bc:33:ea:11:45:29:b0:7c:4c:25:62:7e:75:07:
++         6f:58:4d:33:25:57:d8:8f:40:11:f2:66:8f:8d:6c:c6:9d:b6:
++         d6:b5:96:75:09:b7:57:b0:6f:ed:ac:f7:9f:42:58:ce:cf:2f:
++         3c:65:6d:eb:c2:d6:ae:ed:b5:37:03:24:ed:dd:bd:53:c5:93:
++         e2:64:b3:8f:8f:8b:37:bf:fd:e4:de:b5:48:7e:64:6c:a1:a6:
++         c6:af:72:5c:d0:46:ee:0d:82:18:c9:bb:3e:39:f7:49:90:0c:
++         73:ae:23:a4:2f:f3:ff:dd:99:d0:ea:66:d8:f0:97:e9:88:05:
++         48:83:3d:18:a5:0c:7c:5d:17:9d:9c:cc:4d:3c:cb:46:a9:dc:
++         d0:69:5f:c0:73:50:2e:ea:42:f7:a1:41:e8:09:fa:56:54:15:
++         f4:71:e1:bd:99:07:73:94:88:2e:fb:2e:f4:b6:5d:af:a6:81:
++         42:3e:4c:b5:da:ab:52:6b:36:9b:66:a1:01:09:ec:c9:d9:1b:
++         b0:18:8f:c1:de:7f:fa:a9:83:9f:f0:9d:b0:84:80:83:f6:0e:
++         25:a7:82:55:af:63:e1:e5:85:9b:ef:ee:d7:12:ff:09:fc:41:
++         ed:ae:f5:25:c9:e6:cd:73
+ */
+-static char client_cert_data[] ="-----BEGIN CERTIFICATE-----\n"
+-				"MIIDiTCCAnGgAwIBAgIBBTANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n"
+-				"DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n"
+-				"MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n"
+-				"cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n"
+-				"MDQwNDA1WhcNMTkxMDI1MDQwNDA1WjCBgTELMAkGA1UEBhMCSlAxDjAMBgNVBAgM\n"
+-				"BVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURFMQ8wDQYDVQQL\n"
+-				"DAZBQUEgV0cxFDASBgNVBAMMC2NsaWVudC50ZXN0MRowGAYJKoZIhvcNAQkBFgtj\n"
+-				"bGllbnRAdGVzdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvetQHp16zZ27\n"
+-				"57xOOEqyzJ60iXcB79HGGSkA/s48YgUTsYz/MXoPwS5LPAxAHjZOdtoKZEP8HuoM\n"
+-				"l7JXnJyMkL3rI3u4t1wD7W9IVYqICDjFzTO3q6g6b38TEGWlULn0i8wu6XlYphHw\n"
+-				"WEVB7zazNcsU7IIMrRFq6mTvKKJuR0UCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg\n"
+-				"hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O\n"
+-				"BBYEFL6ziU+dj2wgxNA+agURglBUSXCiMB8GA1UdIwQYMBaAFJKqVZ+zd4Joie1+\n"
+-				"c0Nm5Ivu6r+FMA0GCSqGSIb3DQEBBQUAA4IBAQCjiPUVta0gYKGFGT+5Xh6+MX+E\n"
+-				"esIYOmNqZx9Ghk0Q1h2tosgLlTP65AX0uHA0d/eFbnBGrDlUqV/qXtEzu8mjQoFB\n"
+-				"kCW1kovobj6XBt2azClhNFrTHF2t0aPrake00MIXieHiLTYYUBrn1Pw4LkcLOVCH\n"
+-				"L6oHZPiaTUcB2hDYl8emE7wOymPB8gn7+GqkXwi1re1PcbmJf0MnhXLnjahKzPY2\n"
+-				"yoqugrWoQkGZh4R88JD9ypY3ouDZ+t2kyfFQt+Xmj6+DjCO2IMxm4whgEwKPQjoH\n"
+-				"kac4snIW/b2pYPDinyPzwJnjF7wAfLOJnOr6PvZpoZjC7EbacLb5w5On/Dbd\n"
+-				"-----END CERTIFICATE-----\n";
+-static char client_priv_data[] ="-----BEGIN RSA PRIVATE KEY-----\n"
+-				"MIICXgIBAAKBgQC961AenXrNnbvnvE44SrLMnrSJdwHv0cYZKQD+zjxiBROxjP8x\n"
+-				"eg/BLks8DEAeNk522gpkQ/we6gyXslecnIyQvesje7i3XAPtb0hViogIOMXNM7er\n"
+-				"qDpvfxMQZaVQufSLzC7peVimEfBYRUHvNrM1yxTsggytEWrqZO8oom5HRQIDAQAB\n"
+-				"AoGBAIYnsOLPby3LnC5n8AEHkyHDgdgQvsd/MSYYtuFHIZRD7dNfu+xhQru9TdvO\n"
+-				"84Pj7K07/FczRuc3gUmu6wBv/UIP9To15RHZh+/n537nybGus5S4IYKVvap477To\n"
+-				"0rQDf9ec27iw77gxb7moQ9Otuxwbv0h0Z+1EVLI8d8jHOq0BAkEA9YNr0R+7KXBS\n"
+-				"48yT43g5HpOFkTZzNXWVdpSvYGneb56wslk5Eatp235I4uz/a7Rej5v99W0M3nSe\n"
+-				"/AgHfYn75QJBAMYH/pBx/WkrLj+pPaARlNwInCIC5zUhr6B0IKCt2tvy5eyuc5sd\n"
+-				"AoTFaU+cSI+ZqsRzY8jMKkonktxBg48oJ+ECQQCt4AtlqcFVkbVCm8pJGQXq/7Ni\n"
+-				"qlthiwr1Vkv2TkQ4bPza8pGWT/3Cc2ePPyWN08n8jw+G11p72cAW4mDbqfN5AkEA\n"
+-				"mNYKrkiLn+NnqlJf8W4gSUGL3uQGtYbuGRQHKnuDckWhFm39YzWcgAQsJvkjN1EN\n"
+-				"7thvpsWLzfeE7ODTPGVtgQJATObxYJOt6rms3fAStwuXW3ET77TA1ja4XsUEe5Yu\n"
+-				"JpcQOruJb9XwndqzNbL0dSUePb9gFiBCGKYOyreNTTRTmw==\n"
+-				"-----END RSA PRIVATE KEY-----\n";
++static char client_cert_data[] = ""
++"-----BEGIN CERTIFICATE-----\n"
++"MIIEpTCCAo2gAwIBAgIBATANBgkqhkiG9w0BAQsFADBfMRcwFQYDVQQDDA5jYS5s\n"
++"b2NhbGRvbWFpbjELMAkGA1UEBhMCRlIxDDAKBgNVBAgMA0JkUjEMMAoGA1UEBwwD\n"
++"QWl4MQswCQYDVQQKDAJmRDEOMAwGA1UECwwFVGVzdHMwIBcNMTkxMTI0MTcwNjQz\n"
++"WhgPMjExOTEwMzExNzA2NDNaME4xCzAJBgNVBAYTAkZSMQwwCgYDVQQIDANCZFIx\n"
++"CzAJBgNVBAoMAmZEMQ4wDAYDVQQLDAVUZXN0czEUMBIGA1UEAwwLY2xpZW50LnRl\n"
++"c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDC6NakJ1bly8nBy44Z\n"
++"8nk1lsryVKw+j76Od0QTw/10IUW7nmXxnUavzB6v+tWTkTgyDjy3W6OcfUyUCmY6\n"
++"XQyOHyJZDd2m3sGRCoxwwMYswW9oKUW01RR0jTG7dB4ttnh0C5W9ljUdJB99ydX6\n"
++"WrYnhzjM9I2jmNn/MqNT2+u15WmpK/Ta7L2W8IBGDflIAzklS6Mve1mBi24XZy47\n"
++"hOn/rDN8YDQQAMl7HxHmt6FXAUZEri2MutYIPV2Y02Z02BX+dQlhJFyiorMLvbbv\n"
++"mLQHjYauKYd7mDo/70/2wqtAMpEG647InTZFhNTT9YWJ7S9v4ECj2Qvip4CxBO8n\n"
++"cJrxAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wg\n"
++"R2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRS6BjhMwnEr2UkJcRyqAe7\n"
++"tzvAMTAfBgNVHSMEGDAWgBRWJDDs9E6o2inrl0DGMu0Ph/X2ADANBgkqhkiG9w0B\n"
++"AQsFAAOCAgEAfB9Ql3DuQzzmPuwX9XjYMtRz6b3imrRH18jlDzjTFKgYrPqOjmiA\n"
++"lY4LWwkl1IO2ZcqO16QxwYYAzB/BYA/C8YT+MJvx0RqW2K7i6yiHfVkHhP7FhuhB\n"
++"Epii2dO9zmN5Q2K9E3T6pCRIevXp2dUHLjPw9QqrSUGulFwGvS5d6LNy5HYTPjYN\n"
++"oLz1orAX2nUL7L0LW4apX7TjOvqrzU4DBhaoUBBlVmC7xJbjZLN95lySI1wYz+f3\n"
++"oQ+smSWxm2djRDCrAVtzbQmAYMNLgAS50kcXrLeTWPZ8fP55B00gV2jBM3BlSLXC\n"
++"rJsQZ2Md0SgLbgfFlb3ZXELyM/o4sQI94pGwLARmITWGaHAGiKPjQ7ERJLwz6hFF\n"
++"KbB8TCVifnUHb1hNMyVX2I9AEfJmj41sxp221rWWdQm3V7Bv7az3n0JYzs8vPGVt\n"
++"68LWru21NwMk7d29U8WT4mSzj4+LN7/95N61SH5kbKGmxq9yXNBG7g2CGMm7Pjn3\n"
++"SZAMc64jpC/z/92Z0Opm2PCX6YgFSIM9GKUMfF0XnZzMTTzLRqnc0GlfwHNQLupC\n"
++"96FB6An6VlQV9HHhvZkHc5SILvsu9LZdr6aBQj5MtdqrUms2m2ahAQnsydkbsBiP\n"
++"wd5/+qmDn/CdsISAg/YOJaeCVa9j4eWFm+/u1xL/CfxB7a71JcnmzXM=\n"
++"-----END CERTIFICATE-----\n"
++				;
++static char client_priv_data[] = ""
++"-----BEGIN RSA PRIVATE KEY-----\n"
++"MIIEpAIBAAKCAQEAwujWpCdW5cvJwcuOGfJ5NZbK8lSsPo++jndEE8P9dCFFu55l\n"
++"8Z1Gr8wer/rVk5E4Mg48t1ujnH1MlApmOl0Mjh8iWQ3dpt7BkQqMcMDGLMFvaClF\n"
++"tNUUdI0xu3QeLbZ4dAuVvZY1HSQffcnV+lq2J4c4zPSNo5jZ/zKjU9vrteVpqSv0\n"
++"2uy9lvCARg35SAM5JUujL3tZgYtuF2cuO4Tp/6wzfGA0EADJex8R5rehVwFGRK4t\n"
++"jLrWCD1dmNNmdNgV/nUJYSRcoqKzC72275i0B42GrimHe5g6P+9P9sKrQDKRBuuO\n"
++"yJ02RYTU0/WFie0vb+BAo9kL4qeAsQTvJ3Ca8QIDAQABAoIBAG0X+hvDUSYqHHF2\n"
++"R8FKMIHINyvQLOCPgG8pXldZ2eFIRkmvbQwBpfD75SlG0ohYPgX2ZhGTH06V62jp\n"
++"MTL1pfNehdEmq6uc/ub56oWpwMKIOp0ojLWclmhuJynu4n1fpqf9XADTtELtVxsG\n"
++"/9ezMkWJsEc3kpfBFDN82mIztAkItp+p/pChvc48p725AdOf8ZLlXW0rYKfv1J6l\n"
++"4VGb2iYwokQJkx0FcgP1uo1m6Pk2xbKW6acn4g8hsvoOZ6MeJ1/Gh6hJjaQ6hw2i\n"
++"Xs2effT8ZH0kDq/GikC+U+QJa3lvUdph9rtIYEL1z0WCUk+t7AsjtfqVPzuqYFO2\n"
++"UKqteGECgYEA768K7sD0q+bH/P8tFALd+Ynj1bPdBOTsqPCaRiQeC8omoYpovI3z\n"
++"bKEqehQA4OQ4PERrysOCQU4G+n/XV20LbvdfNx655swFhNLwbNbPfp6p6eLzfks3\n"
++"52FP8B10scM7OCheHiGhyvxObTZjeVZ15eUYx8OaLCRiU9tPAuuo/5UCgYEA0C2E\n"
++"bf+56XY+fxnRR6sNkVL4ztjWRku+zKTAikxu7GA9ueNBmkXSBVcTL1rj0aErOc+Z\n"
++"IcUmCVoH67txmXed54NhTx7F7R+K1MBSfFS9WPMuOHfoOO0B4pH2V03bZf14WaAJ\n"
++"a14WNRCHhp7bgkGPzJINi+X810dIXxw0/fBkhu0CgYBeaF4wCMTW6QIg/wnsdeyl\n"
++"G9EoHb6S7PDi4lKCCjvjfO6WdoQmsOsPALRQfYyTCJG1+2VR6oxl2KwbAzv47bSx\n"
++"MrLIbUvgQsBxvvyAgmQchbZ7r68lMc+FTelEtPWAB1xOFGhuCeVGpPbnQaMQ6iNq\n"
++"OED4fm09sd8hFKMcjWJ1uQKBgQCxgw6YaWXS4EP8RzyAGyiPkaudXaKhAHeqspWH\n"
++"mBNBtfMMbe8DqKOkcBJo39zBZOeh/RY7iIudj8qPRR9h2HCp+Api1/+36ZyNO41a\n"
++"fTuT/JCeEAjRea+Qzhu7aCU7+33DFsbRacIP749QyGau1E7VBnlMoIkP3LWmfDvn\n"
++"iTN/JQKBgQC2va9Ou4NNWu1VyFMO1BOo0Tw3FSPCqsZ+5iPHztw/b98EIkM72Ran\n"
++"kcMwgXOMTnBN5GuGdvTARVs/PvYaHkcD7YPFR32yT1JVSOtRt6AQ+EJkVj9trPzM\n"
++"Q6TrU0XBPpoXkOSDi0tLFbzdLbJLLbtIDGJfvETYNq4lTKMnvJ2hBQ==\n"
++"-----END RSA PRIVATE KEY-----\n"
++				;
+ 				
+ /* Server:
+-				Certificate:
+-				    Data:
+-        				Version: 3 (0x2)
+-        				Serial Number: 4 (0x4)
+-        				Signature Algorithm: sha1WithRSAEncryption
+-        				Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp
+-        				Validity
+-        				    Not Before: Oct 27 04:03:39 2009 GMT
+-        				    Not After : Oct 25 04:03:39 2019 GMT
+-        				Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=serv.test/emailAddress=serv@test
+-        				Subject Public Key Info:
+-        				    Public Key Algorithm: rsaEncryption
+-        				    RSA Public Key: (1024 bit)
+-                				Modulus (1024 bit):
+-                				    00:a6:f7:1c:a9:90:5b:fa:c8:f6:a3:04:0c:d0:8b:
+-                				    45:c3:90:f7:2d:c2:c9:d7:bd:66:8a:7c:1c:51:89:
+-                				    40:9e:cd:70:57:cb:00:47:a3:e8:76:8b:00:b3:c9:
+-                				    c3:0d:b1:b9:2a:08:9f:52:92:82:d3:18:c1:d8:d1:
+-                				    b8:1e:fd:71:fe:23:ec:19:e9:6d:9d:fd:ae:88:bc:
+-                				    39:44:7a:37:ad:c6:88:d1:64:7c:b1:d4:3c:a9:30:
+-                				    c4:de:51:02:c4:48:4f:25:3e:2f:93:ae:25:32:66:
+-                				    9a:dc:f4:44:45:ff:7f:12:49:97:0d:01:8d:13:9a:
+-                				    d3:8f:9e:2d:62:95:02:0a:c7
+-                				Exponent: 65537 (0x10001)
+-        				X509v3 extensions:
+-        				    X509v3 Basic Constraints: 
+-                				CA:FALSE
+-        				    Netscape Comment: 
+-                				OpenSSL Generated Certificate
+-        				    X509v3 Subject Key Identifier: 
+-                				0C:33:C4:7F:39:D0:34:FF:F8:61:A1:46:8B:49:1D:A3:57:B3:4D:58
+-        				    X509v3 Authority Key Identifier: 
+-                				keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85
++Certificate:
++    Data:
++        Version: 3 (0x2)
++        Serial Number: 2 (0x2)
++    Signature Algorithm: sha256WithRSAEncryption
++        Issuer: CN=ca.localdomain, C=FR, ST=BdR, L=Aix, O=fD, OU=Tests
++        Validity
++            Not Before: Nov 24 17:06:43 2019 GMT
++            Not After : Oct 31 17:06:43 2119 GMT
++        Subject: C=FR, ST=BdR, O=fD, OU=Tests, CN=server.test
++        Subject Public Key Info:
++            Public Key Algorithm: rsaEncryption
++                Public-Key: (2048 bit)
++                Modulus:
++                    00:a4:d4:cf:09:7c:35:02:38:34:ee:80:fd:bf:a0:
++                    d2:f9:37:c2:3f:1c:3e:74:ac:38:c4:53:ce:f6:c2:
++                    03:31:b8:2c:8e:b0:b5:f5:58:34:4b:ef:1d:ef:b6:
++                    f0:66:1e:48:54:f1:b7:d5:53:13:98:81:00:a0:60:
++                    84:f8:f2:bd:d1:d0:74:95:d8:eb:41:77:c2:ec:48:
++                    5c:fa:fe:0c:ab:af:75:47:18:fa:96:27:cb:06:d8:
++                    01:af:05:67:cc:10:ae:71:36:7b:6b:d7:fb:c9:c7:
++                    e3:6a:e3:20:c3:2f:9e:5e:ef:68:2c:a5:80:c1:77:
++                    85:ef:c0:0b:d4:00:57:07:e9:c4:fc:b1:df:93:64:
++                    eb:1f:36:e3:81:74:e7:8c:91:8a:3d:09:60:dd:f5:
++                    9c:93:21:49:9c:45:6f:6f:3a:d3:39:5c:5c:54:ed:
++                    8c:d5:d8:28:d4:58:46:e7:6b:b2:93:09:62:8a:9c:
++                    c7:23:dc:7f:71:93:8b:7e:11:67:73:52:3f:99:ea:
++                    ec:9f:0e:6b:d3:0a:be:48:c2:c9:6b:05:a3:f4:d7:
++                    20:73:83:43:f3:7b:17:1a:fb:73:36:7e:22:a0:68:
++                    bc:63:ea:02:0f:7c:05:92:15:8b:b2:dc:89:a9:3d:
++                    ac:31:d5:29:4b:0d:95:b7:2c:8e:6a:61:7b:f4:c5:
++                    cf:cf
++                Exponent: 65537 (0x10001)
++        X509v3 extensions:
++            X509v3 Basic Constraints: 
++                CA:FALSE
++            Netscape Comment: 
++                OpenSSL Generated Certificate
++            X509v3 Subject Key Identifier: 
++                79:F6:AB:D6:1F:AF:03:E0:02:90:D8:EB:0E:D2:D4:0F:01:60:43:33
++            X509v3 Authority Key Identifier: 
++                keyid:56:24:30:EC:F4:4E:A8:DA:29:EB:97:40:C6:32:ED:0F:87:F5:F6:00
+ 
+-				    Signature Algorithm: sha1WithRSAEncryption
+-        				87:f5:49:a6:04:f9:98:9a:f1:1a:68:ce:06:ae:4c:0c:08:eb:
+-        				ba:98:e7:3f:df:22:7f:35:88:1d:b7:8a:f3:89:a3:68:0d:53:
+-        				45:eb:23:a1:dd:6b:dc:b0:80:58:0c:10:0b:49:74:ea:a8:b6:
+-        				8c:2e:c6:73:dc:7a:74:c7:59:3e:79:5a:d2:5c:15:0b:f1:d8:
+-        				19:37:2a:c0:22:75:10:3f:4c:e9:a1:e0:eb:b2:9e:09:70:3d:
+-        				2a:4c:fe:9c:99:36:4b:aa:6c:e1:8b:9c:aa:e1:29:1f:49:6b:
+-        				14:db:12:ae:cf:68:4a:dd:03:e1:3b:ad:79:b4:54:84:1d:bb:
+-        				ac:45:c4:85:f1:03:65:65:96:23:ae:e7:97:3c:5c:db:ce:55:
+-        				34:5d:c3:73:ec:cd:f6:0f:a5:81:5f:c2:ab:a3:42:fa:36:7f:
+-        				83:ef:db:0f:cd:62:0b:ea:d9:4f:73:35:68:5f:23:d5:0a:be:
+-        				ff:7f:23:9a:af:0d:a5:f8:3e:3a:f0:63:1c:e1:d2:96:81:cf:
+-        				7b:5a:6b:d0:9b:67:56:9e:aa:a9:e8:f1:6c:fb:54:2b:1a:f4:
+-        				ef:16:5a:be:1d:a9:c8:d6:cc:f7:42:8c:fe:83:2c:84:8c:80:
+-        				fb:1c:88:f6:35:1c:ae:43:72:fa:68:30:9c:25:8b:db:2c:84:
+-        				87:76:9d:b9
++    Signature Algorithm: sha256WithRSAEncryption
++         c8:69:0d:53:52:2c:5f:d9:8a:e9:96:98:27:8f:88:51:df:51:
++         d2:fb:5c:7a:25:bb:4f:80:7a:8a:e9:f7:16:c0:d6:7e:8a:4c:
++         78:81:2b:63:8f:bf:98:f2:91:fc:a7:a0:81:64:f3:c9:20:ab:
++         52:fc:68:24:05:59:3e:ae:47:7b:c0:e1:97:7c:25:73:6b:a0:
++         34:bd:90:61:62:51:67:1e:6c:1e:2d:8c:e1:bd:d6:a6:ba:d9:
++         a9:8b:7a:c8:76:d0:25:83:28:5f:9c:1d:d5:ab:40:ce:0c:8e:
++         96:8c:95:ba:bd:2f:fc:f3:81:80:15:5c:7d:5f:d2:28:bd:ea:
++         68:3e:df:95:df:4a:1c:f3:fc:4d:f4:87:25:f1:4b:b2:7d:f3:
++         ba:17:4a:2d:be:6d:a6:d6:f5:b0:cf:fc:2c:ec:5f:70:b5:30:
++         3d:2c:c3:dc:33:b8:c8:2e:90:7e:62:2c:51:51:bf:91:80:a8:
++         b6:f7:8d:3d:69:03:f4:07:ca:8c:8a:75:f0:4b:1b:44:eb:d1:
++         76:fd:61:e1:7d:f7:35:6e:04:3b:5e:c9:a9:f1:d9:7b:ee:43:
++         31:84:74:66:18:71:b6:b6:c7:98:3a:42:a6:03:ac:a6:b7:56:
++         8c:76:a5:13:33:71:31:0c:43:b8:27:17:7c:c8:3c:0f:3d:16:
++         86:0e:13:87:00:5b:af:9c:c3:e3:e7:37:fc:3e:07:54:63:53:
++         af:d6:91:dd:1d:e2:25:d8:57:b0:bc:db:a8:2a:f8:23:e9:15:
++         1e:01:f3:e3:37:e4:21:85:48:35:66:d0:6e:72:96:ca:09:d7:
++         26:99:d5:5d:fa:b2:39:94:15:d6:29:45:e7:5c:c6:ea:61:8f:
++         4d:6a:68:32:93:b1:1d:b2:28:8a:b0:43:b7:17:c4:81:eb:4e:
++         ef:91:ed:ca:d9:d8:fa:b2:e1:c8:9b:21:27:cf:77:83:98:10:
++         af:54:09:9f:ce:6b:63:bd:f9:f8:00:97:3f:53:89:50:dc:6d:
++         e9:45:42:18:46:91:3d:b5:60:45:9d:17:b1:69:71:a4:69:5e:
++         18:65:cf:06:90:df:5b:db:60:57:ed:de:5c:ef:e8:05:d4:a7:
++         10:c9:13:32:e3:b3:c3:70:fc:4e:2f:22:a4:40:e1:e3:8f:aa:
++         fc:f6:d6:d6:1d:9a:54:32:9c:01:11:68:69:e7:2a:9f:ca:57:
++         60:f8:6c:bd:ff:5c:d4:0a:e4:45:f7:6a:3c:40:cc:27:e3:d0:
++         ae:9f:24:de:cc:5d:70:0e:b2:31:a5:62:65:6e:cd:0a:1c:41:
++         f4:45:ec:bb:47:f8:2d:80:0c:6f:62:42:8e:12:90:5a:98:56:
++         bc:b8:2f:0e:31:d4:f8:f3
+ */
+-static char server_cert_data[] ="-----BEGIN CERTIFICATE-----\n"
+-				"MIIDhDCCAmygAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n"
+-				"DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n"
+-				"MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n"
+-				"cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n"
+-				"MDQwMzM5WhcNMTkxMDI1MDQwMzM5WjB9MQswCQYDVQQGEwJKUDEOMAwGA1UECAwF\n"
+-				"VG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUxDzANBgNVBAsM\n"
+-				"BkFBQSBXRzESMBAGA1UEAwwJc2Vydi50ZXN0MRgwFgYJKoZIhvcNAQkBFglzZXJ2\n"
+-				"QHRlc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKb3HKmQW/rI9qMEDNCL\n"
+-				"RcOQ9y3Cyde9Zop8HFGJQJ7NcFfLAEej6HaLALPJww2xuSoIn1KSgtMYwdjRuB79\n"
+-				"cf4j7BnpbZ39roi8OUR6N63GiNFkfLHUPKkwxN5RAsRITyU+L5OuJTJmmtz0REX/\n"
+-				"fxJJlw0BjROa04+eLWKVAgrHAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4\n"
+-				"QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQM\n"
+-				"M8R/OdA0//hhoUaLSR2jV7NNWDAfBgNVHSMEGDAWgBSSqlWfs3eCaIntfnNDZuSL\n"
+-				"7uq/hTANBgkqhkiG9w0BAQUFAAOCAQEAh/VJpgT5mJrxGmjOBq5MDAjrupjnP98i\n"
+-				"fzWIHbeK84mjaA1TResjod1r3LCAWAwQC0l06qi2jC7Gc9x6dMdZPnla0lwVC/HY\n"
+-				"GTcqwCJ1ED9M6aHg67KeCXA9Kkz+nJk2S6ps4YucquEpH0lrFNsSrs9oSt0D4Tut\n"
+-				"ebRUhB27rEXEhfEDZWWWI67nlzxc285VNF3Dc+zN9g+lgV/Cq6NC+jZ/g+/bD81i\n"
+-				"C+rZT3M1aF8j1Qq+/38jmq8Npfg+OvBjHOHSloHPe1pr0JtnVp6qqejxbPtUKxr0\n"
+-				"7xZavh2pyNbM90KM/oMshIyA+xyI9jUcrkNy+mgwnCWL2yyEh3aduQ==\n"
+-				"-----END CERTIFICATE-----\n";
+-static char server_priv_data[] ="-----BEGIN RSA PRIVATE KEY-----\n"
+-				"MIICXQIBAAKBgQCm9xypkFv6yPajBAzQi0XDkPctwsnXvWaKfBxRiUCezXBXywBH\n"
+-				"o+h2iwCzycMNsbkqCJ9SkoLTGMHY0bge/XH+I+wZ6W2d/a6IvDlEejetxojRZHyx\n"
+-				"1DypMMTeUQLESE8lPi+TriUyZprc9ERF/38SSZcNAY0TmtOPni1ilQIKxwIDAQAB\n"
+-				"AoGAZv3Ddm0P79CLIt9asEFY1VvUvSuMqkGwwPfx1/HcJJkBFYapM4fN22G/Gyf3\n"
+-				"47ifSWhsLtklTeXVnVMwSh14dJaJQuSEnaFnUUWfjiRbEAXZnMFwAIiaszEZbPap\n"
+-				"NUNpcGl06FZrphYAMkjOVUfjCjfOZDAvL4JGpo271Zx4l0ECQQDYoFFQpBCPx0PK\n"
+-				"TWUmvatXI/Amo94XkGfofbdeeI8PiAJBO5UI6rmjjIVwsJwO9dQb/IlP1/OnBeJv\n"
+-				"p9YW5uixAkEAxVAOKu7mpGu0Q/K2iEUUYDX9YHf253kgkdIDF4iZk4Tcecjoxuru\n"
+-				"fIWu9dMtyDVV+HT2X4cNEnO1/oS3kJII9wJBAJkdwDwiqz4lV6o/yFZ4zAoc8dsu\n"
+-				"CoZXYMq5SYox5tTQit928OHLn4mVgqBjhPsiEVnyx0+zUZpmE2ZemHm5nxECQHfE\n"
+-				"FBVzVYRP6+eil7E3XRrZKqc3qiLunxpkA4RxYebtKnaxwLmdOI1VB9InEQ8JcNmT\n"
+-				"BUkOzJx6p+mJ3XJfchkCQQDWmbMYYJajsjlS4YpdUUj7cBSotA6vtkNVHFr0/ak/\n"
+-				"S+tLkMNuruaInWizK+BKYTIJLlQDf5u5NTrw41vye5Hv\n"
+-				"-----END RSA PRIVATE KEY-----\n";
++static char server_cert_data[] = ""
++"-----BEGIN CERTIFICATE-----\n"
++"MIIEpTCCAo2gAwIBAgIBAjANBgkqhkiG9w0BAQsFADBfMRcwFQYDVQQDDA5jYS5s\n"
++"b2NhbGRvbWFpbjELMAkGA1UEBhMCRlIxDDAKBgNVBAgMA0JkUjEMMAoGA1UEBwwD\n"
++"QWl4MQswCQYDVQQKDAJmRDEOMAwGA1UECwwFVGVzdHMwIBcNMTkxMTI0MTcwNjQz\n"
++"WhgPMjExOTEwMzExNzA2NDNaME4xCzAJBgNVBAYTAkZSMQwwCgYDVQQIDANCZFIx\n"
++"CzAJBgNVBAoMAmZEMQ4wDAYDVQQLDAVUZXN0czEUMBIGA1UEAwwLc2VydmVyLnRl\n"
++"c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCk1M8JfDUCODTugP2/\n"
++"oNL5N8I/HD50rDjEU872wgMxuCyOsLX1WDRL7x3vtvBmHkhU8bfVUxOYgQCgYIT4\n"
++"8r3R0HSV2OtBd8LsSFz6/gyrr3VHGPqWJ8sG2AGvBWfMEK5xNntr1/vJx+Nq4yDD\n"
++"L55e72gspYDBd4XvwAvUAFcH6cT8sd+TZOsfNuOBdOeMkYo9CWDd9ZyTIUmcRW9v\n"
++"OtM5XFxU7YzV2CjUWEbna7KTCWKKnMcj3H9xk4t+EWdzUj+Z6uyfDmvTCr5Iwslr\n"
++"BaP01yBzg0Pzexca+3M2fiKgaLxj6gIPfAWSFYuy3ImpPawx1SlLDZW3LI5qYXv0\n"
++"xc/PAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wg\n"
++"R2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBR59qvWH68D4AKQ2OsO0tQP\n"
++"AWBDMzAfBgNVHSMEGDAWgBRWJDDs9E6o2inrl0DGMu0Ph/X2ADANBgkqhkiG9w0B\n"
++"AQsFAAOCAgEAyGkNU1IsX9mK6ZaYJ4+IUd9R0vtceiW7T4B6iun3FsDWfopMeIEr\n"
++"Y4+/mPKR/KeggWTzySCrUvxoJAVZPq5He8Dhl3wlc2ugNL2QYWJRZx5sHi2M4b3W\n"
++"prrZqYt6yHbQJYMoX5wd1atAzgyOloyVur0v/POBgBVcfV/SKL3qaD7fld9KHPP8\n"
++"TfSHJfFLsn3zuhdKLb5tptb1sM/8LOxfcLUwPSzD3DO4yC6QfmIsUVG/kYCotveN\n"
++"PWkD9AfKjIp18EsbROvRdv1h4X33NW4EO17JqfHZe+5DMYR0ZhhxtrbHmDpCpgOs\n"
++"prdWjHalEzNxMQxDuCcXfMg8Dz0Whg4ThwBbr5zD4+c3/D4HVGNTr9aR3R3iJdhX\n"
++"sLzbqCr4I+kVHgHz4zfkIYVINWbQbnKWygnXJpnVXfqyOZQV1ilF51zG6mGPTWpo\n"
++"MpOxHbIoirBDtxfEgetO75HtytnY+rLhyJshJ893g5gQr1QJn85rY735+ACXP1OJ\n"
++"UNxt6UVCGEaRPbVgRZ0XsWlxpGleGGXPBpDfW9tgV+3eXO/oBdSnEMkTMuOzw3D8\n"
++"Ti8ipEDh44+q/PbW1h2aVDKcARFoaecqn8pXYPhsvf9c1ArkRfdqPEDMJ+PQrp8k\n"
++"3sxdcA6yMaViZW7NChxB9EXsu0f4LYAMb2JCjhKQWphWvLgvDjHU+PM=\n"
++"-----END CERTIFICATE-----\n"
++				;
++static char server_priv_data[] = ""
++"-----BEGIN RSA PRIVATE KEY-----\n"
++"MIIEogIBAAKCAQEApNTPCXw1Ajg07oD9v6DS+TfCPxw+dKw4xFPO9sIDMbgsjrC1\n"
++"9Vg0S+8d77bwZh5IVPG31VMTmIEAoGCE+PK90dB0ldjrQXfC7Ehc+v4Mq691Rxj6\n"
++"lifLBtgBrwVnzBCucTZ7a9f7ycfjauMgwy+eXu9oLKWAwXeF78AL1ABXB+nE/LHf\n"
++"k2TrHzbjgXTnjJGKPQlg3fWckyFJnEVvbzrTOVxcVO2M1dgo1FhG52uykwliipzH\n"
++"I9x/cZOLfhFnc1I/mersnw5r0wq+SMLJawWj9Ncgc4ND83sXGvtzNn4ioGi8Y+oC\n"
++"D3wFkhWLstyJqT2sMdUpSw2VtyyOamF79MXPzwIDAQABAoIBAC6uushD7jtnsc4O\n"
++"qE8afEXq/c+j7yhaEmXAGrCWOBNfxvbOo2oOBhmvajoXBLTXRMMSBm+bbMRXXNcP\n"
++"Hvnmvc3rjOlXmyFaitEimXrYcrw5ICz3rRjTwlN439ky3bfUzaLwvDnJ3NzECOuf\n"
++"0gqVtPPMOCPU58djU4KYUIFFa2Co5v474RKBKNv18QuxGg6NWkPZhMAp1S0uAm+w\n"
++"lwnpSXzS5X0qDC/EklZ9JLlGvvLZKreoWbk+sMv0x/jykwxI567hQq6hRoQ32YM+\n"
++"+d/hBDSm69zf0om/XTFMzUSs5ss3TZyVujTTquTKktXzIT3gX+e7SMrt/fJi5ofr\n"
++"39ijMRECgYEA2Ye77hHLEf57hf/tTK4gV4KUhatQTI5Rfa1WD1Z+jr99H/hiJw8f\n"
++"dKeu8KUkU5REYFznu0fU/hSHXAxQf6Ae2NtM7uYbTEUgbuUKfG+8CT0UqWHkTtIB\n"
++"egUc8ZD580VcM/WkK1A7if688COvwGYqrilq3kJYPwDmYsQBrJ/9uWcCgYEAwfs7\n"
++"Kbt/g3Y7xaSyvLTTMgWrUGHSRV70vOPYe9qOEkU1HdMKhFQxbUfolfXEHq/gK/G5\n"
++"KjxghUkN86T4h7xOXaiM1uYCioVmfIfV2ye95n9jdMvAz+W2z6chYLQs33R0AW7D\n"
++"wI+yk7S0EeeAbygL5GtDLz1NNUYsAe4zA/g07VkCgYBznUC096AGoErmnW9yIdnu\n"
++"qOhnYvX6uml1cnsbC82X8Q5/v3Prbo45YiYIoLz97v+od7hyQWti32ZR9fmS23eJ\n"
++"qoTpNEOt9c+XIQTBvmEiR+SDYhQGEHfYcn8/pN4z/dlThGsM2kfKwCmLOGxgxexJ\n"
++"RJoYJwrf8YqBU8vQA/jGYQKBgFzZ7sXZE/5PN+kxHsUpIPaOtCPzzvyZqThJL7SJ\n"
++"NvwT2IsAG8afrlEK3I/7ZfbyZLFkMSfAYssp3t3DF5uRTUmThmbPDmRT2my9cGZI\n"
++"raOJUofzh8V7xXe8HkP1uozzZxvQcy7XGbmOA6uWTmnml1qs5SnVhAF+J059QDok\n"
++"MuFxAoGAQAwkelYrjyHFIxCX4/5/o36FsSKWRnvzGVhPlUZ6lPMVSsBYuTqfNDZv\n"
++"K3UFwXsqiepM4Mso1TNEmoj5OhlJRkUi2WQPcvCzhuNZOBrtENxeLvjzMkIv3QfN\n"
++"PtGTm8nE7MyIChUCfsGwh1yfhGfT9s1yeRUpYCjGkD2lC2/fmmI=\n"
++"-----END RSA PRIVATE KEY-----\n"
++				;
+ 
+ /* Expired:
+-				Certificate:
+-				    Data:
+-        				Version: 3 (0x2)
+-        				Serial Number: 6 (0x6)
+-        				Signature Algorithm: sha1WithRSAEncryption
+-        				Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp
+-        				Validity
+-        				    Not Before: Oct 27 04:06:35 2009 GMT
+-        				    Not After : Oct 28 04:06:35 2009 GMT
+-        				Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=expired.test/emailAddress=expired@test
+-        				Subject Public Key Info:
+-        				    Public Key Algorithm: rsaEncryption
+-        				    RSA Public Key: (1024 bit)
+-                				Modulus (1024 bit):
+-                				    00:e3:17:15:54:85:dc:cf:c7:a0:32:4a:49:7d:55:
+-                				    75:9b:29:15:db:7e:87:17:d9:0e:65:44:53:d7:19:
+-                				    37:27:c7:c6:fe:c6:dc:72:2b:dc:86:1a:ff:24:6c:
+-                				    63:3f:75:9c:0a:14:e1:70:06:79:d4:b9:26:d4:68:
+-                				    4c:28:38:ba:34:60:56:02:3d:94:55:4a:1f:4e:5a:
+-                				    f0:a5:71:4c:3e:71:69:39:ad:bc:aa:55:35:fb:73:
+-                				    5b:5f:6c:30:71:8e:8a:b6:a5:06:cc:ee:dd:29:c7:
+-                				    52:0d:a7:9c:0f:a1:ba:52:11:e2:1b:b9:74:6b:08:
+-                				    87:11:d2:ec:a9:ac:63:63:4f
+-                				Exponent: 65537 (0x10001)
+-        				X509v3 extensions:
+-        				    X509v3 Basic Constraints: 
+-                				CA:FALSE
+-        				    Netscape Comment: 
+-                				OpenSSL Generated Certificate
+-        				    X509v3 Subject Key Identifier: 
+-                				1C:AF:66:42:5B:AD:AA:A5:9B:D9:AE:3A:C1:5A:AC:2F:CC:CE:22:6C
+-        				    X509v3 Authority Key Identifier: 
+-                				keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85
++Certificate:
++    Data:
++        Version: 3 (0x2)
++        Serial Number: 3 (0x3)
++    Signature Algorithm: sha256WithRSAEncryption
++        Issuer: CN=ca.localdomain, C=FR, ST=BdR, L=Aix, O=fD, OU=Tests
++        Validity
++            Not Before: Nov 23 17:29:33 2019 GMT
++            Not After : Nov 24 17:29:33 2019 GMT
++        Subject: C=FR, ST=BdR, O=fD, OU=Tests, CN=expired.test
++        Subject Public Key Info:
++            Public Key Algorithm: rsaEncryption
++                Public-Key: (2048 bit)
++                Modulus:
++                    00:e8:11:78:5c:1a:9f:60:46:dc:0a:f7:71:6c:39:
++                    0c:b7:5d:b9:08:92:d8:a7:aa:b5:34:26:a6:07:18:
++                    65:f9:77:16:31:f4:d9:fd:fe:88:3e:d1:10:9b:e3:
++                    f0:15:cc:ea:4e:1f:33:7d:a0:06:5c:65:41:db:d0:
++                    99:ce:99:4d:22:8d:bf:0d:aa:f1:30:f8:43:19:02:
++                    9d:2d:14:90:db:08:55:92:f4:7e:4d:46:fa:3a:39:
++                    43:c2:a6:6a:75:a7:52:f1:92:ba:2d:df:ba:ca:c8:
++                    fb:53:e1:3b:fd:b6:6f:50:7a:bf:de:4b:24:13:52:
++                    31:de:a0:1f:35:2e:02:12:bd:15:70:51:8a:62:61:
++                    74:41:16:aa:22:41:ac:83:dd:a1:2b:bc:62:ab:e3:
++                    6d:1c:53:73:2e:70:55:f5:f0:54:27:2d:b4:31:41:
++                    90:b9:4b:3b:15:b8:16:dc:67:cb:4f:ea:2a:fe:69:
++                    13:7f:22:df:a8:96:6d:eb:42:cb:ca:ad:8b:18:5f:
++                    b4:a3:4e:96:80:c4:33:8b:7b:0c:11:86:7d:22:9f:
++                    3e:ed:7d:ca:e8:e0:1a:fa:80:b0:8d:58:c9:ef:37:
++                    5a:a1:d4:df:1f:ac:45:5b:66:7d:92:be:25:53:ef:
++                    1b:e4:68:77:66:36:9c:87:c9:82:20:64:dc:f5:1a:
++                    64:77
++                Exponent: 65537 (0x10001)
++        X509v3 extensions:
++            X509v3 Basic Constraints: 
++                CA:FALSE
++            Netscape Comment: 
++                OpenSSL Generated Certificate
++            X509v3 Subject Key Identifier: 
++                03:44:CB:35:55:E0:87:7B:6F:3F:A5:06:19:70:99:F2:21:B1:C2:48
++            X509v3 Authority Key Identifier: 
++                keyid:56:24:30:EC:F4:4E:A8:DA:29:EB:97:40:C6:32:ED:0F:87:F5:F6:00
+ 
+-				    Signature Algorithm: sha1WithRSAEncryption
+-        				60:8f:55:55:59:82:0f:64:cb:b8:11:c8:44:ce:bf:69:07:0d:
+-        				be:c2:34:be:42:6a:78:15:39:9f:be:8a:17:d6:43:42:c9:7c:
+-        				f1:6d:5d:aa:c3:1b:4d:b0:f0:b6:73:46:2a:87:cd:55:56:a3:
+-        				6d:cc:de:a8:28:6a:53:85:9e:e5:68:b7:3c:f5:72:13:7b:d0:
+-        				21:f2:91:49:35:e0:37:1e:28:19:d5:1b:cc:e1:32:1e:7f:b0:
+-        				86:df:43:a4:47:0f:29:0b:eb:51:60:9a:f5:ca:50:f4:2d:59:
+-        				cd:fc:50:9d:29:ed:45:98:de:a2:5c:d1:b5:7a:34:ad:7a:73:
+-        				48:8b:a2:9b:89:8e:4a:2e:2a:04:19:d6:62:6a:0d:f0:96:f2:
+-        				f0:d0:22:77:3b:7f:b1:2a:f4:3b:17:47:5e:38:07:09:65:ad:
+-        				1d:ea:46:69:6a:96:b6:6b:3b:5c:cc:6e:30:d7:cb:53:69:59:
+-        				c2:63:78:2b:03:d4:d4:f7:17:29:99:9a:43:ff:78:0a:af:42:
+-        				c5:b3:8d:09:38:5b:30:70:28:c1:97:ab:fd:7f:87:9a:ec:f2:
+-        				97:44:ff:f5:b9:41:30:d1:c6:32:98:69:34:c4:39:30:6f:e2:
+-        				d3:b2:70:97:66:ee:41:f5:ae:0f:09:f0:ed:60:96:67:a9:8a:
+-        				cd:d6:95:f2
++    Signature Algorithm: sha256WithRSAEncryption
++         9c:d1:af:3c:6c:41:1c:fe:dd:e2:60:b0:af:0b:f4:ea:64:e0:
++         e3:13:54:ee:23:93:fb:61:88:a8:9d:9e:21:e8:6b:68:b0:3f:
++         82:5b:95:22:ac:7b:06:d9:b4:49:b6:bd:4f:2e:4b:4a:cc:97:
++         b3:c4:1b:31:fd:60:ae:ca:54:aa:1f:a1:0b:f0:84:66:5f:02:
++         83:cf:bc:43:aa:5f:f6:fb:17:52:9d:f0:0e:2a:d7:f3:76:63:
++         ca:59:ce:20:84:c5:c9:3a:bb:e7:8e:d8:04:95:4e:84:76:52:
++         6d:fb:e1:fb:ae:23:64:a9:a1:34:c2:a2:8a:62:69:31:1d:88:
++         ef:f1:e3:ba:d3:23:8f:e3:93:0d:a8:5e:51:ce:fa:af:2c:68:
++         52:40:66:84:f0:4d:cc:1b:6f:dc:fc:c7:ee:85:18:4c:ec:96:
++         31:4f:36:69:ba:05:ed:27:a2:bb:b1:51:de:e9:46:ea:22:67:
++         8d:ee:85:60:19:f7:5b:0e:cb:4b:04:cc:ea:17:c9:59:dd:c0:
++         59:03:9d:4a:94:fa:97:47:51:95:34:a3:1e:c2:f1:ff:af:d9:
++         04:48:bd:6e:6c:01:ab:5f:76:77:a3:42:3d:24:9c:00:32:1f:
++         f1:65:38:78:da:c8:5d:65:df:5f:9c:26:18:51:2e:56:33:73:
++         7d:d3:dc:dc:3b:7a:d2:28:cb:58:92:13:bb:f8:a2:96:c0:64:
++         27:c1:06:03:c3:41:28:3e:ee:c3:a6:aa:f2:20:1b:4b:78:6a:
++         14:a7:eb:c5:60:ba:06:fb:1d:d5:68:c7:03:62:72:e2:dd:27:
++         a8:5a:dc:e8:c2:12:ba:66:9a:72:ce:a8:a3:c2:dc:b4:20:13:
++         65:68:c4:bc:40:06:2a:ed:a8:95:70:9e:be:7f:d8:59:8f:bc:
++         14:6a:37:9e:84:c0:c2:fb:bd:18:5d:d1:2a:25:8d:10:e1:51:
++         48:66:1e:8a:c4:0f:e5:0f:46:af:e3:5c:5e:a7:45:4b:3b:e3:
++         1b:bd:f9:b7:75:05:b4:39:3b:38:69:00:04:86:e7:fa:6d:20:
++         5d:e7:ff:39:a5:73:5c:9c:0b:50:1d:d2:76:20:b9:28:3b:a5:
++         e1:24:e8:a0:85:94:39:15:8b:c8:d4:76:9e:79:82:46:56:4f:
++         f4:3c:18:54:2a:77:82:9b:17:0c:4f:aa:e1:28:53:19:1c:1e:
++         92:f9:8d:06:82:c5:5a:40:46:79:a4:68:54:82:d0:5f:33:1e:
++         e1:83:dd:c2:57:ac:88:5a:31:71:b7:45:23:89:99:d6:8c:33:
++         96:72:2f:6c:ee:46:31:24:ed:68:48:1d:05:b7:a2:d7:a8:5b:
++         41:1b:1d:15:39:14:69:79
+ */
+-static char expired_cert_data[]="-----BEGIN CERTIFICATE-----\n"
+-				"MIIDizCCAnOgAwIBAgIBBjANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n"
+-				"DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n"
+-				"MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n"
+-				"cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n"
+-				"MDQwNjM1WhcNMDkxMDI4MDQwNjM1WjCBgzELMAkGA1UEBhMCSlAxDjAMBgNVBAgM\n"
+-				"BVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURFMQ8wDQYDVQQL\n"
+-				"DAZBQUEgV0cxFTATBgNVBAMMDGV4cGlyZWQudGVzdDEbMBkGCSqGSIb3DQEJARYM\n"
+-				"ZXhwaXJlZEB0ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjFxVUhdzP\n"
+-				"x6AySkl9VXWbKRXbfocX2Q5lRFPXGTcnx8b+xtxyK9yGGv8kbGM/dZwKFOFwBnnU\n"
+-				"uSbUaEwoOLo0YFYCPZRVSh9OWvClcUw+cWk5rbyqVTX7c1tfbDBxjoq2pQbM7t0p\n"
+-				"x1INp5wPobpSEeIbuXRrCIcR0uyprGNjTwIDAQABo3sweTAJBgNVHRMEAjAAMCwG\n"
+-				"CWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNV\n"
+-				"HQ4EFgQUHK9mQlutqqWb2a46wVqsL8zOImwwHwYDVR0jBBgwFoAUkqpVn7N3gmiJ\n"
+-				"7X5zQ2bki+7qv4UwDQYJKoZIhvcNAQEFBQADggEBAGCPVVVZgg9ky7gRyETOv2kH\n"
+-				"Db7CNL5CangVOZ++ihfWQ0LJfPFtXarDG02w8LZzRiqHzVVWo23M3qgoalOFnuVo\n"
+-				"tzz1chN70CHykUk14DceKBnVG8zhMh5/sIbfQ6RHDykL61FgmvXKUPQtWc38UJ0p\n"
+-				"7UWY3qJc0bV6NK16c0iLopuJjkouKgQZ1mJqDfCW8vDQInc7f7Eq9DsXR144Bwll\n"
+-				"rR3qRmlqlrZrO1zMbjDXy1NpWcJjeCsD1NT3FymZmkP/eAqvQsWzjQk4WzBwKMGX\n"
+-				"q/1/h5rs8pdE//W5QTDRxjKYaTTEOTBv4tOycJdm7kH1rg8J8O1glmepis3WlfI=\n"
+-				"-----END CERTIFICATE-----\n";
+-static char expired_priv_data[]="-----BEGIN RSA PRIVATE KEY-----\n"
+-				"MIICXgIBAAKBgQDjFxVUhdzPx6AySkl9VXWbKRXbfocX2Q5lRFPXGTcnx8b+xtxy\n"
+-				"K9yGGv8kbGM/dZwKFOFwBnnUuSbUaEwoOLo0YFYCPZRVSh9OWvClcUw+cWk5rbyq\n"
+-				"VTX7c1tfbDBxjoq2pQbM7t0px1INp5wPobpSEeIbuXRrCIcR0uyprGNjTwIDAQAB\n"
+-				"AoGASwPoDui9XYHTIGm7xwRA+kVjLAOq+qy//aHJlEeHGcP7r1PfpHNqwH4QhGat\n"
+-				"jlv6dLYbFld9TVDwS8A8UBkVIPLWnCysd5tF2A4C5akx6ouW6HliW/JheYrgl8AV\n"
+-				"PVeR3bm91UbnpC0ABVlw87jp1Ovyr60Suo4jsoJz+CyTa2ECQQD0LJWpnwn1jIlR\n"
+-				"DGkLi7F3E70JJcdhTWzBjGFD+Na+/2ZO0MKLhK+O1WUkKa0oi+e5P1JOnGIpTI8c\n"
+-				"BJOO415RAkEA7hauapYuqGI/auSPH8/nFB5z1G94RTxo2a5THKcG5MqS/8N3ubFj\n"
+-				"i2PPS0lEYVjqoHEsZUsMnDmXp6KDKMAfnwJBAIp+T1UqM8fmsmwaEerOjRXxSCNM\n"
+-				"Hk5+T9Vn/jNDjOpAipLhrbbcx4bIWtmsGd8Jm6Fi3RhhcvvhxLorjlZZeEECQQCf\n"
+-				"IaPD88sNmlUewdLzhUbCiLQMadCuHflKfRxpyy1tYAQuVFxCTdDlynkzra25ju+K\n"
+-				"+vmcXjP4evnk/lbBtt+rAkEAgOr4Apgs3nMppngPV5yFx0NDqH2n8PlEAM1Il4Qs\n"
+-				"IuuK18v0KwlUGAfEEmCiNh1e1qkLmD0CnI2QjYAjcLQUhw==\n"
+-				"-----END RSA PRIVATE KEY-----\n";
++static char expired_cert_data[]= ""
++"-----BEGIN CERTIFICATE-----\n"
++"MIIEpDCCAoygAwIBAgIBAzANBgkqhkiG9w0BAQsFADBfMRcwFQYDVQQDDA5jYS5s\n"
++"b2NhbGRvbWFpbjELMAkGA1UEBhMCRlIxDDAKBgNVBAgMA0JkUjEMMAoGA1UEBwwD\n"
++"QWl4MQswCQYDVQQKDAJmRDEOMAwGA1UECwwFVGVzdHMwHhcNMTkxMTIzMTcyOTMz\n"
++"WhcNMTkxMTI0MTcyOTMzWjBPMQswCQYDVQQGEwJGUjEMMAoGA1UECAwDQmRSMQsw\n"
++"CQYDVQQKDAJmRDEOMAwGA1UECwwFVGVzdHMxFTATBgNVBAMMDGV4cGlyZWQudGVz\n"
++"dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgReFwan2BG3Ar3cWw5\n"
++"DLdduQiS2KeqtTQmpgcYZfl3FjH02f3+iD7REJvj8BXM6k4fM32gBlxlQdvQmc6Z\n"
++"TSKNvw2q8TD4QxkCnS0UkNsIVZL0fk1G+jo5Q8KmanWnUvGSui3fusrI+1PhO/22\n"
++"b1B6v95LJBNSMd6gHzUuAhK9FXBRimJhdEEWqiJBrIPdoSu8YqvjbRxTcy5wVfXw\n"
++"VCcttDFBkLlLOxW4Ftxny0/qKv5pE38i36iWbetCy8qtixhftKNOloDEM4t7DBGG\n"
++"fSKfPu19yujgGvqAsI1Yye83WqHU3x+sRVtmfZK+JVPvG+Rod2Y2nIfJgiBk3PUa\n"
++"ZHcCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH\n"
++"ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFANEyzVV4Id7bz+lBhlwmfIh\n"
++"scJIMB8GA1UdIwQYMBaAFFYkMOz0TqjaKeuXQMYy7Q+H9fYAMA0GCSqGSIb3DQEB\n"
++"CwUAA4ICAQCc0a88bEEc/t3iYLCvC/TqZODjE1TuI5P7YYionZ4h6GtosD+CW5Ui\n"
++"rHsG2bRJtr1PLktKzJezxBsx/WCuylSqH6EL8IRmXwKDz7xDql/2+xdSnfAOKtfz\n"
++"dmPKWc4ghMXJOrvnjtgElU6EdlJt++H7riNkqaE0wqKKYmkxHYjv8eO60yOP45MN\n"
++"qF5RzvqvLGhSQGaE8E3MG2/c/MfuhRhM7JYxTzZpugXtJ6K7sVHe6UbqImeN7oVg\n"
++"GfdbDstLBMzqF8lZ3cBZA51KlPqXR1GVNKMewvH/r9kESL1ubAGrX3Z3o0I9JJwA\n"
++"Mh/xZTh42shdZd9fnCYYUS5WM3N909zcO3rSKMtYkhO7+KKWwGQnwQYDw0EoPu7D\n"
++"pqryIBtLeGoUp+vFYLoG+x3VaMcDYnLi3SeoWtzowhK6Zppyzqijwty0IBNlaMS8\n"
++"QAYq7aiVcJ6+f9hZj7wUajeehMDC+70YXdEqJY0Q4VFIZh6KxA/lD0av41xep0VL\n"
++"O+Mbvfm3dQW0OTs4aQAEhuf6bSBd5/85pXNcnAtQHdJ2ILkoO6XhJOighZQ5FYvI\n"
++"1HaeeYJGVk/0PBhUKneCmxcMT6rhKFMZHB6S+Y0GgsVaQEZ5pGhUgtBfMx7hg93C\n"
++"V6yIWjFxt0UjiZnWjDOWci9s7kYxJO1oSB0Ft6LXqFtBGx0VORRpeQ==\n"
++"-----END CERTIFICATE-----\n"
++
++				;
++static char expired_priv_data[]= ""
++"-----BEGIN RSA PRIVATE KEY-----\n"
++"MIIEowIBAAKCAQEA6BF4XBqfYEbcCvdxbDkMt125CJLYp6q1NCamBxhl+XcWMfTZ\n"
++"/f6IPtEQm+PwFczqTh8zfaAGXGVB29CZzplNIo2/DarxMPhDGQKdLRSQ2whVkvR+\n"
++"TUb6OjlDwqZqdadS8ZK6Ld+6ysj7U+E7/bZvUHq/3kskE1Ix3qAfNS4CEr0VcFGK\n"
++"YmF0QRaqIkGsg92hK7xiq+NtHFNzLnBV9fBUJy20MUGQuUs7FbgW3GfLT+oq/mkT\n"
++"fyLfqJZt60LLyq2LGF+0o06WgMQzi3sMEYZ9Ip8+7X3K6OAa+oCwjVjJ7zdaodTf\n"
++"H6xFW2Z9kr4lU+8b5Gh3Zjach8mCIGTc9RpkdwIDAQABAoIBADS9c6sK6dmJgQyE\n"
++"+6PquzcY96o5JT/FjfTSK71FEDfHlqW3zarpo7ES9kFXZgKuVTl34c3VBl0NLhB0\n"
++"sd+/+0W1DQxgIvxMD4OpkmriV6FPnZMOOX36eXet9/ZOt7cRVcpM3D78r4jScDu5\n"
++"3lZklZumqeAtF3/EmEzN+wms8Q+stltBR3xo7pbvmllI41Igq0UAHmbAodKBhsXc\n"
++"RorKLGsVsE4EeM5tTw1Ca5wmLZ2FvJC30eAkCzB5VkdAEiRfwooT+lwM9BjMJ8he\n"
++"2cVGMRcYW+52t9WMUG8z4zbvHg3WsBwKHgc6AQ9A6al7bh/end6rowiqUKRgo1a0\n"
++"3cKIznECgYEA98eWvy0JIUp6kb4FzfCC3moyIroPCloadgQfPCFDpC88zK4K6LQg\n"
++"qdGpWWCyNpz/MsEr8moWo9UXZo9kxoMQXS+siR8MzEff2QMHH646ZOHmODvneTL6\n"
++"pOWbcCKUofJDPXB+jk9Jbeqcq3eaTxE72girt2Fc28Z2WTqyQ03M2hsCgYEA78Rx\n"
++"dNxNpncsdBeWglxr4/gbDYi5QMZ/GDIRXEMCkqiHsGmW/7LVSfWwU/kDsBFKtMA0\n"
++"qZdNApSuhhgSP6Sae3bwoJE6iLSSzZ2eIpAOR6uBQA20UxS85cdEtRNx4HgTmoQc\n"
++"fl+zPiKeAnd0sllxzzD/uFkMm3q6dx1Qnq7JhNUCgYA1FezlLqfrGwLhoL2rnqDb\n"
++"OBNfv08jn6RVrpJmlpXgYkJ7c7pgmt74ozPOM1pbOw2t+RcKS9Jn7WqjDYvAwCnM\n"
++"XT9w7VcXmTqLSwvGrNRT8tYZLDRukg6DL7I6tx3zCG2Bh02F/dS0mPRSBEDqOb4B\n"
++"+6OWmWSEraODgIDazJtcCwKBgE7whU4tTh91cxxRu8r1tMvcnsOI9T0fXS7RJSgU\n"
++"I9+3Pt1VFlLfRRvRmRk8jftE5iy2b2A6oS8tVnxtpmxvvDDUCwtCZVwm34J012CX\n"
++"vyvXinlVSb5kwICCZ9uaKE74GbQwtNTimzfk29MCE1i43CCUCE1gfCcgdA3NiAKG\n"
++"l3B1AoGBANpEOZLSVd/XfBfw8dwPdtC9wjMqHcKTOuaqaCXSiKKMn2vnaSRIs08U\n"
++"rhj3Qzm6p33Hsxm3WibwcW7pBTC2vsa9DBv6ZJcXeB2qmmDxpIydVn64yd6WD3+M\n"
++"bvEZZHKFcDcjAeoP6RJiFb+wppk3byqxjjSUr1JhKg1NtWriOSo7\n"
++"-----END RSA PRIVATE KEY-----\n"
++				;
+ 
+ /* Unknown CA certificate :
+ 				Certificate:
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch
new file mode 100644
index 0000000..d5e242a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch
@@ -0,0 +1,97 @@
+From d527a0b7b63e43263384540b5525714484bb089f Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 3 Sep 2018 14:40:56 +0800
+Subject: [PATCH] libfdcore/sctp.c: update the old sctp api check
+
+The initial sctp api check for freediameter as below:
+ ===
+ commit d3c5e991cb532ea09684d69fb4d0d58e9bc39a0c
+  Author: Sebastien Decugis <sdecugis@freediameter.net>
+  Date:   Mon Jun 3 12:05:37 2013 +0800
+    
+    Add some compliancy to RFC6458. Not tested however as Ubuntu does not support this yet
+    
+    [snip]
+    +/* Use old draft-ietf-tsvwg-sctpsocket-17 API ? If not defined, RFC6458 API will be used */
+    +/* #define OLD_SCTP_SOCKET_API */
+    +
+    +/* Automatically fallback to old API if some of the new symbols are not defined */
+    +#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO)))
+    +# define OLD_SCTP_SOCKET_API
+    +#endif
+ ===
+
+SCTP_RECVRCVINFO is defined in <linux/sctp.h>,
+but <linux/sctp.h> is't included in the source code
+previouly. So defined(SCTP_RECVRCVINFO) can be 0 
+and it make old sctp socket api definiton in effect 
+as below:
+ # define OLD_SCTP_SOCKET_API
+
+After lksctp-tools upgrade to 1.0.18, there is below
+commit introduced:
+===
+commit 3c8bd0d26b64611c690f33f5802c734b0642c1d8
+Author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Date:   Tue Apr 17 20:17:14 2018 -0300
+
+    sctp.h: make use kernel UAPI header
+
+    and with that, remove tons of duplicated declarations. These were
+    lagging behind the kernel header, which is always the most updated one,
+    and as the library is intended to be run only on Linux, there is no
+    reason that we cannot re-use what is in there.
+
+    That said, this patch drops all duplicated declarations and includes
+    linux/sctp.h to bring them into lksctp-tools.
+
+    Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+
+ [snip]
+ #include <stdint.h>
+ #include <linux/types.h>
+ #include <sys/socket.h>
++#include <linux/sctp.h>
+ [snip]
+===
+
+And above logic make defined(SCTP_RECVRCVINFO) to
+be 1 and the old sctp socket api macro as below
+won't be defined.
+ # define OLD_SCTP_SOCKET_API
+
+And it encouters below build error:
+| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1262:9: error: 'SCTP_SEND_FAILED_EVENT' undeclared (first use in this function); did you mean 'SCTP_SEND_FAILED'?
+    case SCTP_SEND_FAILED_EVENT:
+         ^~~~~~~~~~~~~~~~~~~~~~
+         SCTP_SEND_FAILED
+| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1262:9: note: each undeclared identifier is reported only once for each function it appears in
+| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1274:9: error: 'SCTP_NOTIFICATIONS_STOPPED_EVENT' undeclared (first use in this function); did you mean 'SCTP_AUTHENTICATION_EVENT'?
+    case SCTP_NOTIFICATIONS_STOPPED_EVENT:
+
+Update the old sctp socket api check to fix
+the above build error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ libfdcore/sctp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c
+index c80a497..83440c7 100644
+--- a/libfdcore/sctp.c
++++ b/libfdcore/sctp.c
+@@ -48,7 +48,7 @@
+ /* #define OLD_SCTP_SOCKET_API */
+ 
+ /* Automatically fallback to old API if some of the new symbols are not defined */
+-#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO))) 
++#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_NOTIFICATIONS_STOPPED_EVENT)) || (!defined(SCTP_SNDINFO)))
+ # define OLD_SCTP_SOCKET_API
+ #endif
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch
new file mode 100644
index 0000000..71a5a1a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch
@@ -0,0 +1,223 @@
+Replace murmurhash algorithm with Robert Jenkin's hash algorithm
+
+Upstream-Status: Pending
+
+From test result, murmurhash algorithm does not work in big endian
+processor, so replace it with Robert Jenkin's hash which has worked
+in linux kernel for many years and has more adaptability.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ libfdproto/ostr.c |  192 +++++++++++++++++++++--------------------------------
+ 1 file changed, 74 insertions(+), 118 deletions(-)
+
+diff --git a/libfdproto/ostr.c b/libfdproto/ostr.c
+index 8f29b48..ce1f4dd 100644
+--- a/libfdproto/ostr.c
++++ b/libfdproto/ostr.c
+@@ -430,128 +430,84 @@ after_proto:
+ 
+ 
+ /********************************************************************************************************/
+-/* Hash function -- credits to Austin Appleby, thank you ^^ */
+-/* See http://murmurhash.googlepages.com for more information on this function */
+-
+-/* the strings are NOT always aligned properly (ex: received in RADIUS message), so we use the aligned MurmurHash2 function as needed */
+-#define _HASH_MIX(h,k,m) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; }
+-uint32_t fd_os_hash ( uint8_t * string, size_t len )
++/*
++ * Robert Jenkin's hash function.
++ * http://burtleburtle.net/bob/hash/evahash.html
++ * This is in the public domain.
++ */
++#define mix(a, b, c)						\
++	do {							\
++		a = a - b;  a = a - c;  a = a ^ (c >> 13);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 8);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 13);	\
++		a = a - b;  a = a - c;  a = a ^ (c >> 12);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 16);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 5);	\
++		a = a - b;  a = a - c;  a = a ^ (c >> 3);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 10);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 15);	\
++	} while (0)
++
++unsigned hash_rjenkins(const char *str, unsigned length)
+ {
+-	uint32_t hash = len;
+-	uint8_t * data = string;
+-	
+-	const unsigned int m = 0x5bd1e995;
+-	const int r = 24;
+-	int align = (long)string & 3;
+-	
+-	if (!align || (len < 4)) {
+-		/* In case data is aligned, MurmurHash2 function */
+-		while(len >= 4)
+-		{
+-			/* Mix 4 bytes at a time into the hash */
+-			uint32_t k = *(uint32_t *)data;	/* We don't care about the byte order */
+-
+-			_HASH_MIX(hash, k, m);
+-
+-			data += 4;
+-			len -= 4;
+-		}
+-
+-		/* Handle the last few bytes of the input */
+-		switch(len) {
+-			case 3: hash ^= data[2] << 16;
+-			case 2: hash ^= data[1] << 8;
+-			case 1: hash ^= data[0];
+-	        		hash *= m;
+-		}
+-		
+-	} else {
+-		/* Unaligned data, use alignment-safe slower version */
+-		
+-		/* Pre-load the temp registers */
+-		uint32_t t = 0, d = 0;
+-		switch(align)
+-		{
+-			case 1: t |= data[2] << 16;
+-			case 2: t |= data[1] << 8;
+-			case 3: t |= data[0];
+-		}
+-		t <<= (8 * align);
+-
+-		data += 4-align;
+-		len -= 4-align;
+-		
+-		/* From this point, "data" can be read by chunks of 4 bytes */
+-		
+-		int sl = 8 * (4-align);
+-		int sr = 8 * align;
+-
+-		/* Mix */
+-		while(len >= 4)
+-		{
+-			uint32_t k;
+-			
+-			d = *(unsigned int *)data;
+-			k = (t >> sr) | (d << sl);
+-
+-			_HASH_MIX(hash, k, m);
+-
+-			t = d;
+-
+-			data += 4;
+-			len -= 4;
+-		}
+-
+-		/* Handle leftover data in temp registers */
+-		d = 0;
+-		if(len >= align)
+-		{
+-			uint32_t k;
+-			
+-			switch(align)
+-			{
+-			case 3: d |= data[2] << 16;
+-			case 2: d |= data[1] << 8;
+-			case 1: d |= data[0];
+-			}
+-
+-			k = (t >> sr) | (d << sl);
+-			_HASH_MIX(hash, k, m);
+-
+-			data += align;
+-			len -= align;
+-
+-			/* Handle tail bytes */
+-
+-			switch(len)
+-			{
+-			case 3: hash ^= data[2] << 16;
+-			case 2: hash ^= data[1] << 8;
+-			case 1: hash ^= data[0];
+-					hash *= m;
+-			};
+-		}
+-		else
+-		{
+-			switch(len)
+-			{
+-			case 3: d |= data[2] << 16;
+-			case 2: d |= data[1] << 8;
+-			case 1: d |= data[0];
+-			case 0: hash ^= (t >> sr) | (d << sl);
+-					hash *= m;
+-			}
+-		}
+-
++	const unsigned char *k = (const unsigned char *)str;
++	uint32_t a, b, c;  /* the internal state */
++	uint32_t len;      /* how many key bytes still need mixing */
++
++	/* Set up the internal state */
++	len = length;
++	a = 0x9e3779b9;      /* the golden ratio; an arbitrary value */
++	b = a;
++	c = 0;               /* variable initialization of internal state */
++
++	/* handle most of the key */
++	while (len >= 12) {
++		a = a + (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] << 16) +
++			 ((uint32_t)k[3] << 24));
++		b = b + (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] << 16) +
++			 ((uint32_t)k[7] << 24));
++		c = c + (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10] << 16) +
++			 ((uint32_t)k[11] << 24));
++		mix(a, b, c);
++		k = k + 12;
++		len = len - 12;
++	}
+ 
++	/* handle the last 11 bytes */
++	c = c + length;
++	switch (len) {            /* all the case statements fall through */
++	case 11:
++		c = c + ((uint32_t)k[10] << 24);
++	case 10:
++		c = c + ((uint32_t)k[9] << 16);
++	case 9:
++		c = c + ((uint32_t)k[8] << 8);
++		/* the first byte of c is reserved for the length */
++	case 8:
++		b = b + ((uint32_t)k[7] << 24);
++	case 7:
++		b = b + ((uint32_t)k[6] << 16);
++	case 6:
++		b = b + ((uint32_t)k[5] << 8);
++	case 5:
++		b = b + k[4];
++	case 4:
++		a = a + ((uint32_t)k[3] << 24);
++	case 3:
++		a = a + ((uint32_t)k[2] << 16);
++	case 2:
++		a = a + ((uint32_t)k[1] << 8);
++	case 1:
++		a = a + k[0];
++		/* case 0: nothing left to add */
+ 	}
++	mix(a, b, c);
+ 
+-	/* Do a few final mixes of the hash to ensure the last few
+-	   bytes are well-incorporated. */
+-	hash ^= hash >> 13;
+-	hash *= m;
+-	hash ^= hash >> 15;
++	return c;
++}
+ 
+-	return hash;
++uint32_t fd_os_hash ( uint8_t * string, size_t len )
++{
++	return hash_rjenkins(string, len); 
+ } 
+ 
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf
new file mode 100644
index 0000000..7b56d74
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf
@@ -0,0 +1,250 @@
+# This is a sample configuration file for freeDiameter daemon.
+
+# Most of the options can be omitted, as they default to reasonable values.
+# Only TLS-related options must be configured properly in usual setups.
+
+# It is possible to use "include" keyword to import additional files
+# e.g.: include "/etc/freeDiameter.d/*.conf"
+# This is exactly equivalent as copy & paste the content of the included file(s) 
+# where the "include" keyword is found.
+
+
+##############################################################
+##  Peer identity and realm 
+
+# The Diameter Identity of this daemon.
+# This must be a valid FQDN that resolves to the local host.
+# Default: hostname's FQDN
+#Identity = "aaa.koganei.freediameter.net";
+
+# The Diameter Realm of this daemon.
+# Default: the domain part of Identity (after the first dot).
+#Realm = "koganei.freediameter.net";
+
+##############################################################
+##  Transport protocol configuration
+
+# The port this peer is listening on for incoming connections (TCP and SCTP).
+# Default: 3868. Use 0 to disable.
+#Port = 3868;
+
+# The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP).
+# See TLS_old_method for more information about TLS flavours.
+# Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter.
+# Default: 5868. Use 0 to disable.
+#SecPort = 5868;
+
+# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed 
+# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the 
+# CER/CEA exchange on a dedicated secure port.
+# This parameter only affects outgoing connections. 
+# The setting can be also defined per-peer (see Peers configuration section).
+# Default: use RFC6733 method with separate port for TLS.
+#TLS_old_method;
+
+# Disable use of TCP protocol (only listen and connect over SCTP)
+# Default : TCP enabled
+#No_TCP;
+
+# Disable use of SCTP protocol (only listen and connect over TCP)
+# Default : SCTP enabled
+#No_SCTP;
+# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
+
+# Prefer TCP instead of SCTP for establishing new connections.
+# This setting may be overwritten per peer in peer configuration blocs.
+# Default : SCTP is attempted first.
+#Prefer_TCP;
+
+# Default number of streams per SCTP associations.
+# This setting may be overwritten per peer basis.
+# Default : 30 streams
+#SCTP_streams = 30;
+
+##############################################################
+##  Endpoint configuration
+
+# Disable use of IP addresses (only IPv6)
+# Default : IP enabled
+#No_IP;
+
+# Disable use of IPv6 addresses (only IP)
+# Default : IPv6 enabled
+#No_IPv6;
+
+# Specify local addresses the server must bind to
+# Default : listen on all addresses available.
+#ListenOn = "202.249.37.5";
+#ListenOn = "2001:200:903:2::202:1";
+#ListenOn = "fe80::21c:5ff:fe98:7d62%eth0";
+
+
+##############################################################
+##  Server configuration
+
+# How many Diameter peers are allowed to be connecting at the same time ?
+# This parameter limits the number of incoming connections from the time
+# the connection is accepted until the first CER is received.
+# Default: 5 unidentified clients in paralel.
+#ThreadsPerServer = 5;
+
+##############################################################
+##  TLS Configuration
+
+# TLS is managed by the GNUTLS library in the freeDiameter daemon.
+# You may find more information about parameters and special behaviors
+# in the relevant documentation.
+# http://www.gnu.org/software/gnutls/manual/
+
+# Credentials of the local peer
+# The X509 certificate and private key file to use for the local peer.
+# The files must contain PKCS-1 encoded RSA key, in PEM format.
+# (These parameters are passed to gnutls_certificate_set_x509_key_file function)
+# Default : NO DEFAULT
+#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
+#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
+
+# Certificate authority / trust anchors
+# The file containing the list of trusted Certificate Authorities (PEM list)
+# (This parameter is passed to gnutls_certificate_set_x509_trust_file function)
+# The directive can appear several times to specify several files.
+# Default : GNUTLS default behavior
+#TLS_CA = "<file.PEM>";
+
+# Certificate Revocation List file
+# The information about revoked certificates.
+# The file contains a list of trusted CRLs in PEM format. They should have been verified before. 
+# (This parameter is passed to gnutls_certificate_set_x509_crl_file function)
+# Note: openssl CRL format might have interoperability issue with GNUTLS format.
+# Default : GNUTLS default behavior
+#TLS_CRL = "<file.PEM>";
+
+# GNU TLS Priority string
+# This string allows to configure the behavior of GNUTLS key exchanges 
+# algorithms. See gnutls_priority_init function documentation for information.
+# You should also refer to the Diameter required TLS support here:
+#   http://tools.ietf.org/html/rfc6733#section-13.1
+# Default : "NORMAL"
+# Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL";
+#TLS_Prio = "NORMAL";
+
+# Diffie-Hellman parameters size
+# Set the number of bits for generated DH parameters
+# Valid value should be 768, 1024, 2048, 3072 or 4096.
+# (This parameter is passed to gnutls_dh_params_generate2 function, 
+# it usually should match RSA key size)
+# Default : 1024
+#TLS_DH_Bits = 1024;
+
+# Alternatively, you can specify a file to load the PKCS#3 encoded
+# DH parameters directly from. This accelerates the daemon start 
+# but is slightly less secure. If this file is provided, the
+# TLS_DH_Bits parameters has no effect.
+# Default : no default.
+#TLS_DH_File = "<file.PEM>";
+
+
+##############################################################
+##  Timers configuration
+
+# The Tc timer of this peer.
+# It is the delay before a new attempt is made to reconnect a disconnected peer.
+# The value is expressed in seconds. The recommended value is 30 seconds.
+# Default: 30
+#TcTimer = 30;
+
+# The Tw timer of this peer.
+# It is the delay before a watchdog message is sent, as described in RFC 3539.
+# The value is expressed in seconds. The default value is 30 seconds. Value must
+# be greater or equal to 6 seconds. See details in the RFC.
+# Default: 30
+#TwTimer = 30;
+
+##############################################################
+##  Applications configuration
+
+# Disable the relaying of Diameter messages?
+# For messages not handled locally, the default behavior is to forward the
+# message to another peer if any is available, according to the routing 
+# algorithms. In addition the "0xffffff" application is advertised in CER/CEA 
+# exchanges.
+# Default: Relaying is enabled.
+#NoRelay;
+
+# Number of server threads that can handle incoming messages at the same time.
+# Default: 4
+#AppServThreads = 4;
+
+# Other applications are configured by loaded extensions.
+
+##############################################################
+##  Extensions configuration
+
+#  The freeDiameter framework merely provides support for
+# Diameter Base Protocol. The specific application behaviors,
+# as well as advanced functions, are provided
+# by loadable extensions (plug-ins).
+#  These extensions may in addition receive the name of a 
+# configuration file, the format of which is extension-specific.
+#
+# Format:
+#LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ;
+#
+# Examples:
+#LoadExtension = "extensions/sample.fdx";
+#LoadExtension = "extensions/sample.fdx":"conf/sample.conf";
+
+# Extensions are named as follow:
+# dict_* for extensions that add content to the dictionary definitions.
+# dbg_*  for extensions useful only to retrieve more information on the framework execution.
+# acl_*  : Access control list, to control which peers are allowed to connect.
+# rt_*   : routing extensions that impact how messages are forwarded to other peers.
+# app_*  : applications, these extensions usually register callbacks to handle specific messages.
+# test_* : dummy extensions that are useful only in testing environments.
+
+
+# The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some
+# information about some events. This extension does not actually use a configuration file
+# but receives directly a parameter in the string passed to the extension. Here are some examples:
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages.
+# The four digits respectively control: connections, routing decisions, sent/received messages, errors.
+# The values for each digit are:
+#  0 - default - keep the default behavior
+#  1 - quiet   - remove any specific log
+#  2 - compact - display only a summary of the information
+#  4 - full    - display the complete information on a single long line
+#  8 - tree    - display the complete information in an easier to read format spanning several lines.
+
+
+##############################################################
+##  Peers configuration
+
+#  The local server listens for incoming connections. By default,
+# all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl).
+# 
+#  In addition to incoming connections, the local peer can
+# be configured to establish and maintain connections to some 
+# Diameter nodes and allow connections from these nodes.
+#  This is achieved with the ConnectPeer directive described below.
+#
+# Note that the configured Diameter Identity MUST match
+# the information received inside CEA, or the connection will be aborted.
+#
+# Format:
+#ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ;
+# Parameters that can be specified in the peer's parameter list:
+#  No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method;
+#  No_TLS;       # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions).
+#  Port = 5868;  # The port to connect to
+#  TcTimer = 30;
+#  TwTimer = 30;
+#  ConnectTo = "202.249.37.5";
+#  ConnectTo = "2001:200:903:2::202:1";
+#  TLS_Prio = "NORMAL";
+#  Realm = "realm.net"; # Reject the peer if it does not advertise this realm.
+# Examples:
+#ConnectPeer = "aaa.wide.ad.jp";
+#ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ;
+##############################################################
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init
new file mode 100755
index 0000000..e63a42a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          freediameter
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Short-Description: Start freeDiameter daemon at boot time
+# Description:       Start the freeDiameter daemon at boot time.
+#       freeDiameter is an extensible implementation of the Diameter protocol,
+#       designed for Authentication, Authorization and Accounting. Diameter is
+#       an evolution of the RADIUS protocol.
+### END INIT INFO#
+DAEMON=/usr/bin/freeDiameterd
+CONF=/etc/freeDiameter/freeDiameter.conf
+NAME=freediameter
+DESC="freeDiameter daemon"
+
+. /etc/init.d/functions
+start() {
+	[ -x $DAEMON ] || exit 5
+	echo -n $"Starting $DAEMON: "
+	start-stop-daemon -S -b -x ${DAEMON} && success || failure
+	retval=$?
+	echo ""
+	return $retval
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	start-stop-daemon -K -x $DAEMON
+	retval=$?
+	echo ""
+	return $retval
+}
+
+restart() {
+	stop
+	sleep 3
+	start
+}
+
+rh_status() {
+	status $DAEMON
+}
+
+rh_status_q() {
+	rh_status > /dev/null 2>&1
+}
+
+case "$1" in
+  start)
+	rh_status_q && exit 0
+	start
+	;;
+  stop)
+	rh_status_q || exit 0
+	stop
+	;;
+  restart)
+	restart
+	;;
+  status)
+	rh_status
+	;;
+  *)
+	echo $"Usage: $prog {start|stop|status|restart}"
+	exit 2
+esac
+
+exit $?
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service
new file mode 100644
index 0000000..514481b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=freediameter daemon
+After=network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/freediameter.pid
+ExecStart=@BINDIR@/freeDiameterd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch
new file mode 100644
index 0000000..151037d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch
@@ -0,0 +1,22 @@
+CMakeLists: add an option to install tests
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Original author: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index da8da1b..de04059 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -113,4 +113,9 @@ ENDFOREACH( TEST )
+ ####
+ ## INSTALL section ##
+ 
+-# we do not install the tests
++# install the tests
++SET(INSTALL_TEST_SUFFIX       /opt/${FD_PROJECT_NAME}-tests   CACHE PATH "Directory where the test binary is installed.")
++
++INSTALL(TARGETS ${TEST_LIST}
++        RUNTIME DESTINATION ${INSTALL_TEST_SUFFIX}
++        COMPONENT freeDiameter-common)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch
new file mode 100644
index 0000000..ea857af
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch
@@ -0,0 +1,72 @@
+freediameter ptest cases testmesg_stress.c and testloadext.c need load
+extensions both build time and runtime. Then they search extensions with
+build directory that causes runtime failures.
+
+Pass an environment variable to define runtime extension path.
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff -Nur freeDiameter-1.2.0.orig/tests/testloadext.c freeDiameter-1.2.0/tests/testloadext.c
+--- freeDiameter-1.2.0.orig/tests/testloadext.c	2014-02-19 17:33:24.785405032 +0800
++++ freeDiameter-1.2.0/tests/testloadext.c	2014-02-19 20:08:03.871403924 +0800
+@@ -49,7 +49,7 @@
+ {
+ 	DIR *dir;
+ 	struct dirent *dp;
+-	char fullname[512];
++	char fullname[1024];
+ 	int pathlen;
+ 
+ 	/* First, initialize the daemon modules */
+@@ -57,11 +57,16 @@
+ 	CHECK( 0, fd_queues_init()  );
+ 	CHECK( 0, fd_msg_init()  );
+ 	CHECK( 0, fd_rtdisp_init()  );
+-	
++
++	char *ext_dir = getenv("EXTENSIONS_DIR");
++	if (ext_dir)
++		pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir);
++	else
++		pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++
+ 	/* Find all extensions which have been compiled along the test */
+-	TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions");
+-	CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
+-	pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++	TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++	CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );
+ 	
+ 	while ((dp = readdir (dir)) != NULL) {
+ 		char * dot = strrchr(dp->d_name, '.');
+diff -Nur freeDiameter-1.2.0.orig/tests/testmesg_stress.c freeDiameter-1.2.0/tests/testmesg_stress.c
+--- freeDiameter-1.2.0.orig/tests/testmesg_stress.c	2014-02-19 17:33:24.785405032 +0800
++++ freeDiameter-1.2.0/tests/testmesg_stress.c	2014-02-19 20:08:03.928403924 +0800
+@@ -67,15 +67,20 @@
+ {
+ 	DIR *dir;
+ 	struct dirent *dp;
+-	char fullname[512];
++	char fullname[1024];
+ 	int pathlen;
+ 	struct fd_list all_extensions = FD_LIST_INITIALIZER(all_extensions);
+ 	struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends);
+ 
++	char *ext_dir = getenv("EXTENSIONS_DIR");
++	if (ext_dir)
++		pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir);
++	else
++		pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++
+ 	/* Find all extensions which have been compiled along the test */
+-	LOG_D("Loading %s*.fdx from: '%s'", BUILD_DIR "/extensions", prefix ?: "");
+-	CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
+-	pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++	TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++	CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );
+ 	
+ 	while ((dp = readdir (dir)) != NULL) {
+ 		char * dot = strrchr(dp->d_name, '.');
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest
new file mode 100644
index 0000000..d0ca8d9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if ! lsmod | grep -q sctp && ! modprobe sctp 2>/dev/null; then
+        echo "Couldn't load kernel module sctp."
+        echo "Test cases testsctp and testcnx will fail."
+        echo
+fi
+
+export EXTENSIONS_DIR=$EXTENSIONS_DIR
+cmake  -E cmake_echo_color --cyan "Running tests..."
+ctest --force-new-ctest-process
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.3.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.3.2.bb
new file mode 100644
index 0000000..fcbde85
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.3.2.bb
@@ -0,0 +1,140 @@
+SUMMARY = "An open source implementation of the diameter protocol"
+DESCRIPTION = "\
+freeDiameter is an open source Diameter protocol implementation \
+(RFC3588). It provides an extensible platform for deploying a \
+Diameter network for your Authentication, Authorization and \
+Accounting needs."
+
+HOMEPAGE = "http://www.freediameter.net"
+
+DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools virtual/kernel bison-native"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+fd_pkgname = "freeDiameter"
+
+SRC_URI = "\
+    http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \
+    file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \
+    file://freediameter.service \
+    file://freediameter.init \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://install_test.patch file://run-ptest file://pass-ptest-env.patch', '', d)} \
+    file://freeDiameter.conf \
+    file://0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch \
+    file://0001-Fix-testcnx-expired-CA-data.patch \
+    "
+
+SRC_URI[md5sum] = "73ce230b4789f9f28fff77cbc83c65af"
+SRC_URI[sha256sum] = "ce05b4bf2a04cd2f472e77ba4b86fbfca690bfc83e51da8ce0e575804b763eda"
+
+S = "${WORKDIR}/${fd_pkgname}-${PV}"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=69bdc1d97648a2d35914563fcbbb361a"
+
+PTEST_PATH = "${libdir}/${fd_pkgname}/ptest"
+
+inherit cmake pkgconfig update-rc.d ptest systemd
+
+EXTRA_OECMAKE = " \
+    -DDEFAULT_CONF_PATH:PATH=${sysconfdir}/${fd_pkgname} \
+    -DBUILD_DBG_MONITOR:BOOL=ON  \
+    -DBUILD_TEST_APP:BOOL=ON \
+    -DBUILD_TESTING:BOOL=ON \
+    -DBUILD_APP_RADGW:BOOL=ON \
+    -DBUILD_APP_REDIRECT:BOOL=ON \
+    -DBUILD_TEST_ACCT:BOOL=ON \
+    -DBUILD_TEST_NETEMUL:BOOL=ON \
+    -DBUILD_TEST_RT_ANY:BOOL=ON \
+    -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \
+    -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \
+    -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \
+    -DCMAKE_SKIP_RPATH:BOOL=ON \
+"
+# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX
+# specify it on cmd line will fix the SET bug in CMakeList.txt
+
+# -DBUILD_APP_ACCT:BOOL=ON This needs POSTGRESQL support
+
+# -DBUILD_APP_DIAMEAP:BOOL=ON  -DBUILD_APP_SIP:BOOL=ON -DBUILD_TEST_SIP:BOOL=ON
+# These need MySQL support
+
+# -DBUILD_DBG_INTERACTIVE:BOOL=ON This needs SWIG support
+
+# -DALL_EXTENSIONS=ON will enable all
+
+FD_KEY ?="${BPN}.key"
+FD_PEM ?= "${BPN}.pem"
+FD_CA ?= "${BPN}.pem"
+FD_DH_PEM ?= "${BPN}-dh.pem"
+FD_HOSTNAME ?= "${MACHINE}"
+FD_REALM ?= "openembedded.org"
+
+do_install_append() {
+    # install the sample configuration files
+    install -d -m 0755 ${D}${sysconfdir}/${fd_pkgname}
+    for i in ${S}/doc/*.conf.sample; do
+        install -m 0644 $i ${D}${sysconfdir}/${fd_pkgname}/
+    done
+    mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \
+       ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample
+    install -d ${D}${sysconfdir}/freeDiameter
+	 install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf
+
+    # install daemon init related files
+    install -d -m 0755 ${D}${sysconfdir}/default
+    install -d -m 0755 ${D}${sysconfdir}/init.d
+    install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \
+      ${D}${sysconfdir}/default/${BPN}
+    install -m 0755 ${WORKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN}
+
+    # install for systemd
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/freediameter.service ${D}${systemd_system_unitdir}
+    sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/*.service
+
+    cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <<EOF
+## OE specific ##
+#Identity="${FD_HOSTNAME}";
+Identity = "${FD_HOSTNAME}.${FD_REALM}";
+Realm = "${FD_REALM}";
+Port = 30868;
+SecPort = 30869;
+TLS_Cred = "/etc/freeDiameter/${FD_PEM}" , "/etc/freeDiameter/${FD_KEY}";
+TLS_CA = "/etc/freeDiameter/${FD_CA}";
+TLS_DH_File = "/etc/freeDiameter/${FD_DH_PEM}";
+EOF
+
+    # create self cert
+    openssl req -x509 -config ${STAGING_DIR_NATIVE}/etc/ssl/openssl.cnf -newkey rsa:4096 -sha256 -nodes -out ${D}${sysconfdir}/freeDiameter/${FD_PEM} -keyout ${D}${sysconfdir}/freeDiameter/${FD_KEY} -days 3650 -subj '/CN=${FD_HOSTNAME}.${FD_REALM}'
+    openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024
+
+}
+
+do_install_ptest() {
+    sed -i "s#\(EXTENSIONS_DIR=\).*\$#\1${libdir}/${fd_pkgname}/#" ${D}${PTEST_PATH}/run-ptest
+    mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/
+    rmdir ${D}${PTEST_PATH}-tests
+    install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/
+}
+
+FILES_${PN}-dbg += "${libdir}/${fd_pkgname}/.debug/*"
+
+# include the extensions in main package
+FILES_${PN} += "${libdir}/${fd_pkgname}/*"
+
+RDEPENDS_${PN}  = "glib-2.0 gnutls libidn"
+RDEPENDS_${PN} += "openssl openssl-conf openssl-engines"
+RRECOMMENDS_${PN} += "kernel-module-tipc kernel-module-sctp" 
+RRECOMMENDS_${PN} += "kernel-module-udp-tunnel kernel-module-ipip"
+RDEPENDS_${PN}-ptest = "cmake"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "${BPN}"
+INITSCRIPT_PARAMS$_${PN} = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "freediameter.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CONFFILES_${PN} = "${sysconfdir}/freediameter.conf"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch
new file mode 100644
index 0000000..692c344
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch
@@ -0,0 +1,60 @@
+From 89ea6ac4a8840e8c2be0140a9805c6522c6c5280 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Wed, 28 Jun 2017 17:30:00 -0500
+Subject: [PATCH 01/11] Create subroutine for cleaning recent interfaces
+
+Moves functionality for cleaning the list of recent
+interfaces into its own subroutine.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 0e10bd5..ffc9696 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -856,6 +856,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
+     return err;
+ }
+ 
++// Clean up any interfaces that have been hanging around on the RecentInterfaces list for more than a minute
++mDNSlocal void CleanRecentInterfaces(void)
++{
++    PosixNetworkInterface **ri = &gRecentInterfaces;
++    const mDNSs32 utc = mDNSPlatformUTC();
++    while (*ri)
++    {
++        PosixNetworkInterface *pi = *ri;
++        if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next;
++        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); }
++    }
++}
++
+ // Creates a PosixNetworkInterface for the interface whose IP address is
+ // intfAddr and whose name is intfName and registers it with mDNS core.
+ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, const char *intfName, int intfIndex)
+@@ -1010,16 +1023,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
+ 
+     // Clean up.
+     if (intfList != NULL) free_ifi_info(intfList);
+-
+-    // Clean up any interfaces that have been hanging around on the RecentInterfaces list for more than a minute
+-    PosixNetworkInterface **ri = &gRecentInterfaces;
+-    const mDNSs32 utc = mDNSPlatformUTC();
+-    while (*ri)
+-    {
+-        PosixNetworkInterface *pi = *ri;
+-        if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next;
+-        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); }
+-    }
++    CleanRecentInterfaces();
+ 
+     return err;
+ }
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch
new file mode 100644
index 0000000..21ba318
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch
@@ -0,0 +1,58 @@
+From a2148df99ddcd122247f95c4cbcce5c4118581a1 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Wed, 28 Jun 2017 17:30:00 -0500
+Subject: [PATCH 02/11] Create subroutine for tearing down an interface
+
+Creates a subroutine for tearing down an interface.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index ffc9696..5e5b2cd 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -591,6 +591,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf)
+     gRecentInterfaces = intf;
+ }
+ 
++mDNSlocal void TearDownInterface(mDNS *const m, PosixNetworkInterface *intf)
++{
++    mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation);
++    if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName);
++    FreePosixNetworkInterface(intf);
++
++    num_registered_interfaces--;
++    if (num_registered_interfaces == 0) {
++        num_pkts_accepted = 0;
++        num_pkts_rejected = 0;
++    }
++}
++
+ // Grab the first interface, deregister it, free it, and repeat until done.
+ mDNSlocal void ClearInterfaceList(mDNS *const m)
+ {
+@@ -599,13 +612,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m)
+     while (m->HostInterfaces)
+     {
+         PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces);
+-        mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation);
+-        if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName);
+-        FreePosixNetworkInterface(intf);
++        TearDownInterface(m, intf);
+     }
+-    num_registered_interfaces = 0;
+-    num_pkts_accepted = 0;
+-    num_pkts_rejected = 0;
++
++    assert(num_registered_interfaces == 0);
+ }
+ 
+ // Sets up a send/receive socket.
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch
new file mode 100644
index 0000000..8c0e6bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch
@@ -0,0 +1,50 @@
+From 71a7c728ae0d8143b66aa40decca74ebaa9aa2ce Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Wed, 28 Jun 2017 17:30:00 -0500
+Subject: [PATCH 03/11] Track interface socket family
+
+Tracks the socket family associated with the interface.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 1 +
+ mDNSPosix/mDNSPosix.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 5e5b2cd..8fe22be 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -918,6 +918,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
+         // Set up the extra fields in PosixNetworkInterface.
+         assert(intf->intfName != NULL);         // intf->intfName already set up above
+         intf->index                = intfIndex;
++        intf->sa_family            = intfAddr->sa_family;
+         intf->multicastSocket4     = -1;
+ #if HAVE_IPV6
+         intf->multicastSocket6     = -1;
+diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h
+index ca60d80..f77c185 100644
+--- a/mDNSPosix/mDNSPosix.h
++++ b/mDNSPosix/mDNSPosix.h
+@@ -19,6 +19,7 @@
+ #define __mDNSPlatformPosix_h
+ 
+ #include <signal.h>
++#include <sys/socket.h>
+ #include <sys/time.h>
+ 
+ #ifdef  __cplusplus
+@@ -40,6 +41,7 @@ struct PosixNetworkInterface
+     const char *            intfName;
+     PosixNetworkInterface * aliasIntf;
+     int index;
++    sa_family_t sa_family;
+     int multicastSocket4;
+ #if HAVE_IPV6
+     int multicastSocket6;
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch
new file mode 100644
index 0000000..05ad49b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch
@@ -0,0 +1,177 @@
+From e1f483510a1011e37540fdee8f3bc36111fa45a0 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Thu, 13 Jul 2017 09:00:00 -0500
+Subject: [PATCH 04/11] Use list for changed interfaces
+
+Uses a linked list to store the index of changed network interfaces
+instead of a bitfield. This allows for network interfaces with an
+index greater than 31 (an index of 36 was seen on Android).
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 67 +++++++++++++++++++++++++++++++++----------
+ 1 file changed, 52 insertions(+), 15 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 8fe22be..699855a 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -75,6 +75,14 @@ struct IfChangeRec
+ };
+ typedef struct IfChangeRec IfChangeRec;
+ 
++// Used to build a list of network interface indices
++struct NetworkInterfaceIndex
++{
++    int if_index;
++    struct NetworkInterfaceIndex *Next;
++};
++typedef struct NetworkInterfaceIndex NetworkInterfaceIndex;
++
+ // Note that static data is initialized to zero in (modern) C.
+ static fd_set gEventFDs;
+ static int gMaxFD;                              // largest fd in gEventFDs
+@@ -1071,6 +1079,32 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
+     return err;
+ }
+ 
++mDNSlocal mDNSBool ListContainsInterfaceIndex(GenLinkedList *list, int if_index)
++{
++    NetworkInterfaceIndex *item;
++
++    for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next)
++    {
++        if (if_index == item->if_index) return mDNStrue;
++    }
++
++    return mDNSfalse;
++}
++
++mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
++{
++    NetworkInterfaceIndex *item;
++
++    if (ListContainsInterfaceIndex(list, if_index)) return;
++
++    item = malloc(sizeof *item);
++    if (item == NULL) return;
++
++    item->if_index = if_index;
++    item->Next = NULL;
++    AddToTail(list, item);
++}
++
+ #if MDNS_DEBUGMSGS
+ mDNSlocal void      PrintNetLinkMsg(const struct nlmsghdr *pNLMsg)
+ {
+@@ -1098,14 +1132,13 @@ mDNSlocal void      PrintNetLinkMsg(const struct nlmsghdr *pNLMsg)
+ }
+ #endif
+ 
+-mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
++mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *changedInterfaces)
+ // Read through the messages on sd and if any indicate that any interface records should
+ // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0.
+ {
+     ssize_t readCount;
+     char buff[4096];
+     struct nlmsghdr         *pNLMsg = (struct nlmsghdr*) buff;
+-    mDNSu32 result = 0;
+ 
+     // The structure here is more complex than it really ought to be because,
+     // unfortunately, there's no good way to size a buffer in advance large
+@@ -1141,9 +1174,9 @@ mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
+ 
+         // Process the NetLink message
+         if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
+-            result |= 1 << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index;
++            AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index);
+         else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
+-            result |= 1 << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index;
++            AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index);
+ 
+         // Advance pNLMsg to the next message in the buffer
+         if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE)
+@@ -1154,8 +1187,6 @@ mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
+         else
+             break;  // all done!
+     }
+-
+-    return result;
+ }
+ 
+ #else // USES_NETLINK
+@@ -1187,14 +1218,13 @@ mDNSlocal void      PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg)
+ }
+ #endif
+ 
+-mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
++mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *changedInterfaces)
+ // Read through the messages on sd and if any indicate that any interface records should
+ // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0.
+ {
+     ssize_t readCount;
+     char buff[4096];
+     struct ifa_msghdr       *pRSMsg = (struct ifa_msghdr*) buff;
+-    mDNSu32 result = 0;
+ 
+     readCount = read(sd, buff, sizeof buff);
+     if (readCount < (ssize_t) sizeof(struct ifa_msghdr))
+@@ -1209,12 +1239,10 @@ mDNSlocal mDNSu32       ProcessRoutingNotification(int sd)
+         pRSMsg->ifam_type == RTM_IFINFO)
+     {
+         if (pRSMsg->ifam_type == RTM_IFINFO)
+-            result |= 1 << ((struct if_msghdr*) pRSMsg)->ifm_index;
++            AddInterfaceIndexToList(changedInterfaces, ((struct if_msghdr*) pRSMsg)->ifm_index);
+         else
+-            result |= 1 << pRSMsg->ifam_index;
++            AddInterfaceIndexToList(changedInterfaces, pRSMsg->ifam_index);
+     }
+-
+-    return result;
+ }
+ 
+ #endif // USES_NETLINK
+@@ -1224,7 +1252,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
+ {
+     IfChangeRec     *pChgRec = (IfChangeRec*) context;
+     fd_set readFDs;
+-    mDNSu32 changedInterfaces = 0;
++    GenLinkedList changedInterfaces;
++    NetworkInterfaceIndex *changedInterface;
+     struct timeval zeroTimeout = { 0, 0 };
+ 
+     (void)fd; // Unused
+@@ -1233,17 +1262,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
+     FD_ZERO(&readFDs);
+     FD_SET(pChgRec->NotifySD, &readFDs);
+ 
++    InitLinkedList(&changedInterfaces, offsetof(NetworkInterfaceIndex, Next));
++
+     do
+     {
+-        changedInterfaces |= ProcessRoutingNotification(pChgRec->NotifySD);
++        ProcessRoutingNotification(pChgRec->NotifySD, &changedInterfaces);
+     }
+     while (0 < select(pChgRec->NotifySD + 1, &readFDs, (fd_set*) NULL, (fd_set*) NULL, &zeroTimeout));
+ 
+     // Currently we rebuild the entire interface list whenever any interface change is
+     // detected. If this ever proves to be a performance issue in a multi-homed
+     // configuration, more care should be paid to changedInterfaces.
+-    if (changedInterfaces)
++    if (changedInterfaces.Head != NULL)
+         mDNSPlatformPosixRefreshInterfaceList(pChgRec->mDNS);
++
++    while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL)
++    {
++        RemoveFromList(&changedInterfaces, changedInterface);
++        free(changedInterface);
++    }
+ }
+ 
+ // Register with either a Routing Socket or RtNetLink to listen for interface changes.
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0005-Handle-noisy-netlink-sockets.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0005-Handle-noisy-netlink-sockets.patch
new file mode 100644
index 0000000..f2b171e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0005-Handle-noisy-netlink-sockets.patch
@@ -0,0 +1,212 @@
+From 92025cab86619f548bf3eb816a1804ef40507ca7 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Mon, 24 Jul 2017 09:38:55 -0500
+Subject: [PATCH 05/11] Handle noisy netlink sockets
+
+The POSIX implementation currently clears all network interfaces
+when netlink indicates that there has been a change. This causes
+the following problems:
+
+  1) Applications are informed that all of the services they are
+     tracking have been removed.
+  2) Increases network load because the client must re-query for
+     all records it is interested in.
+
+This changes netlink notification handling by:
+
+  1) Always comparing with the latest interface list returned
+     by the OS.
+  2) Confirming that the interface has been changed in a way
+     that we care about.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 143 +++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 133 insertions(+), 10 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 699855a..59a8b8c 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -1247,14 +1247,38 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+ 
+ #endif // USES_NETLINK
+ 
++// Test whether the given PosixNetworkInterface matches the given struct ifi_info
++mDNSlocal mDNSBool InterfacesMatch(PosixNetworkInterface *intf, struct ifi_info *ifi)
++{
++    mDNSBool match = mDNSfalse;
++    mDNSAddr ip, mask;
++
++    if((intf->index == ifi->ifi_index) &&
++       (intf->sa_family == ifi->ifi_addr->sa_family) &&
++       (strcmp(intf->coreIntf.ifname, ifi->ifi_name) == 0))
++        {
++        SockAddrTomDNSAddr(ifi->ifi_addr,    &ip,   NULL);
++        SockAddrTomDNSAddr(ifi->ifi_netmask, &mask, NULL);
++
++        match = mDNSSameAddress(&intf->coreIntf.ip, &ip) &&
++                mDNSSameAddress(&intf->coreIntf.mask, &mask);
++        }
++
++    return match;
++}
++
+ // Called when data appears on interface change notification socket
+ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
+ {
+     IfChangeRec     *pChgRec = (IfChangeRec*) context;
++    mDNS            *m = pChgRec->mDNS;
+     fd_set readFDs;
+     GenLinkedList changedInterfaces;
+     NetworkInterfaceIndex *changedInterface;
+     struct timeval zeroTimeout = { 0, 0 };
++    struct ifi_info *ifi_list, **ifi, *ifi_free, *ifi_loop4 = NULL;
++    PosixNetworkInterface *intf, *intfNext;
++    mDNSBool found, foundav4;
+ 
+     (void)fd; // Unused
+     (void)filter; // Unused
+@@ -1270,12 +1294,115 @@ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
+     }
+     while (0 < select(pChgRec->NotifySD + 1, &readFDs, (fd_set*) NULL, (fd_set*) NULL, &zeroTimeout));
+ 
+-    // Currently we rebuild the entire interface list whenever any interface change is
+-    // detected. If this ever proves to be a performance issue in a multi-homed
+-    // configuration, more care should be paid to changedInterfaces.
+-    if (changedInterfaces.Head != NULL)
+-        mDNSPlatformPosixRefreshInterfaceList(pChgRec->mDNS);
++    CleanRecentInterfaces();
++
++    if (changedInterfaces.Head == NULL) goto cleanup;
++
++    ifi_list = get_ifi_info(AF_INET, mDNStrue);
++    if (ifi_list == NULL) goto cleanup;
++
++#if HAVE_IPV6
++    /* Link the IPv6 list to the end of the IPv4 list */
++    ifi = &ifi_list;
++    while (*ifi != NULL) ifi = &(*ifi)->ifi_next;
++    *ifi = get_ifi_info(AF_INET6, mDNStrue);
++#endif
++
++    for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = intfNext)
++    {
++        intfNext = (PosixNetworkInterface*)(intf->coreIntf.next);
++
++        // Loopback interface(s) are handled later
++        if (intf->coreIntf.Loopback) continue;
++
++        found = mDNSfalse;
++        for (ifi = &ifi_list; *ifi != NULL; ifi = &(*ifi)->ifi_next)
++        {
++            if (InterfacesMatch(intf, *ifi))
++            {
++                found = mDNStrue;
++
++                // Removes unchanged from ifi_list
++                ifi_free = *ifi;
++                *ifi = (*ifi)->ifi_next;
++                ifi_free->ifi_next = NULL;
++                free_ifi_info(ifi_free);
++
++                break;
++            }
++        }
++
++        // Removes changed and old interfaces from m->HostInterfaces
++        if (!found) TearDownInterface(m, intf);
++    }
++
++    // Add new and changed interfaces in ifi_list
++    // Save off loopback interface in case it is needed later
++    for (ifi = &ifi_list; *ifi != NULL; ifi = &(*ifi)->ifi_next)
++    {
++        if ((ifi_loop4 == NULL) &&
++            ((*ifi)->ifi_addr->sa_family == AF_INET) &&
++            ((*ifi)->ifi_flags & IFF_UP) &&
++            ((*ifi)->ifi_flags & IFF_LOOPBACK))
++        {
++            ifi_loop4 = *ifi;
++            continue;
++        }
++
++        if (     (((*ifi)->ifi_addr->sa_family == AF_INET)
++#if HAVE_IPV6
++                  || ((*ifi)->ifi_addr->sa_family == AF_INET6)
++#endif
++                  ) && ((*ifi)->ifi_flags & IFF_UP)
++                    && !((*ifi)->ifi_flags & IFF_POINTOPOINT)
++                    && !((*ifi)->ifi_flags & IFF_LOOPBACK))
++        {
++            SetupOneInterface(m, *ifi);
++        }
++    }
++
++    // Determine if there is at least one non-loopback IPv4 interface. This is to work around issues
++    // with multicast loopback on IPv6 interfaces -- see corresponding logic in SetupInterfaceList().
++    foundav4 = mDNSfalse;
++    for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = (PosixNetworkInterface*)(intf->coreIntf.next))
++    {
++        if (intf->sa_family == AF_INET && !intf->coreIntf.Loopback)
++        {
++            foundav4 = mDNStrue;
++            break;
++        }
++    }
++
++    if (foundav4)
++    {
++        for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = intfNext)
++        {
++            intfNext = (PosixNetworkInterface*)(intf->coreIntf.next);
++            if (intf->coreIntf.Loopback) TearDownInterface(m, intf);
++        }
++    }
++    else
++    {
++        found = mDNSfalse;
++
++        for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = (PosixNetworkInterface*)(intf->coreIntf.next))
++        {
++            if (intf->coreIntf.Loopback)
++            {
++                found = mDNStrue;
++                break;
++            }
++        }
++
++        if (!found && (ifi_loop4 != NULL))
++        {
++            SetupOneInterface(m, ifi_loop4);
++        }
++    }
++
++    if (ifi_list != NULL) free_ifi_info(ifi_list);
+ 
++cleanup:
+     while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL)
+     {
+         RemoveFromList(&changedInterfaces, changedInterface);
+@@ -1400,15 +1527,11 @@ mDNSexport void mDNSPlatformClose(mDNS *const m)
+ #endif
+ }
+ 
+-// This is used internally by InterfaceChangeCallback.
+-// It's also exported so that the Standalone Responder (mDNSResponderPosix)
++// This is exported so that the Standalone Responder (mDNSResponderPosix)
+ // can call it in response to a SIGHUP (mainly for debugging purposes).
+ mDNSexport mStatus mDNSPlatformPosixRefreshInterfaceList(mDNS *const m)
+ {
+     int err;
+-    // This is a pretty heavyweight way to process interface changes --
+-    // destroying the entire interface list and then making fresh one from scratch.
+-    // We should make it like the OS X version, which leaves unchanged interfaces alone.
+     ClearInterfaceList(m);
+     err = SetupInterfaceList(m);
+     return PosixErrorToStatus(err);
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
new file mode 100644
index 0000000..b461a60
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
@@ -0,0 +1,51 @@
+From 157d67f152777754c059ced7511352102f23ffae Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Mon, 24 Jul 2017 09:39:18 -0500
+Subject: [PATCH 06/11] Remove unneeded function
+
+Removes a function we no longer need by integrating it into the only
+function that calls it. This was originally separated so that we could
+only process network interfaces that netlink indicated had been changed,
+this has since been extended to test for all network intefaces.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 59a8b8c..3fc5451 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -1079,24 +1079,15 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
+     return err;
+ }
+ 
+-mDNSlocal mDNSBool ListContainsInterfaceIndex(GenLinkedList *list, int if_index)
++mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
+ {
+     NetworkInterfaceIndex *item;
+ 
+     for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next)
+     {
+-        if (if_index == item->if_index) return mDNStrue;
++        if (if_index == item->if_index) return;
+     }
+ 
+-    return mDNSfalse;
+-}
+-
+-mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
+-{
+-    NetworkInterfaceIndex *item;
+-
+-    if (ListContainsInterfaceIndex(list, if_index)) return;
+-
+     item = malloc(sizeof *item);
+     if (item == NULL) return;
+ 
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0007-Indicate-loopback-interface-to-mDNS-core.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0007-Indicate-loopback-interface-to-mDNS-core.patch
new file mode 100644
index 0000000..86201c6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0007-Indicate-loopback-interface-to-mDNS-core.patch
@@ -0,0 +1,129 @@
+From 07a9401d84804d7f0181aa4fb0f13a54b2a1c9a8 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Tue, 1 Aug 2017 17:06:01 -0500
+Subject: [PATCH 07/11] Indicate loopback interface to mDNS core
+
+Tells the mDNS core if an interface is a loopback interface,
+similar to AddInterfaceToList() in the MacOS implementation.
+Also reorganizes SetupOneInterface() to use a const struct
+rather than growing its parameter list again.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 37 ++++++++++++++++++-------------------
+ 1 file changed, 18 insertions(+), 19 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 3fc5451..798ab10 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -889,16 +889,14 @@ mDNSlocal void CleanRecentInterfaces(void)
+ 
+ // Creates a PosixNetworkInterface for the interface whose IP address is
+ // intfAddr and whose name is intfName and registers it with mDNS core.
+-mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, const char *intfName, int intfIndex)
++mDNSlocal int SetupOneInterface(mDNS *const m, struct ifi_info *const ifi)
+ {
+     int err = 0;
+     PosixNetworkInterface *intf;
+     PosixNetworkInterface *alias = NULL;
+ 
+     assert(m != NULL);
+-    assert(intfAddr != NULL);
+-    assert(intfName != NULL);
+-    assert(intfMask != NULL);
++    assert(ifi != NULL);
+ 
+     // Allocate the interface structure itself.
+     intf = (PosixNetworkInterface*)calloc(1, sizeof(*intf));
+@@ -907,26 +905,27 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
+     // And make a copy of the intfName.
+     if (err == 0)
+     {
+-        intf->intfName = strdup(intfName);
++        intf->intfName = strdup(ifi->ifi_name);
+         if (intf->intfName == NULL) { assert(0); err = ENOMEM; }
+     }
+ 
+     if (err == 0)
+     {
+         // Set up the fields required by the mDNS core.
+-        SockAddrTomDNSAddr(intfAddr, &intf->coreIntf.ip, NULL);
+-        SockAddrTomDNSAddr(intfMask, &intf->coreIntf.mask, NULL);
++        SockAddrTomDNSAddr(ifi->ifi_addr, &intf->coreIntf.ip, NULL);
++        SockAddrTomDNSAddr(ifi->ifi_netmask, &intf->coreIntf.mask, NULL);
+ 
+         //LogMsg("SetupOneInterface: %#a %#a",  &intf->coreIntf.ip,  &intf->coreIntf.mask);
+-        strncpy(intf->coreIntf.ifname, intfName, sizeof(intf->coreIntf.ifname));
++        strncpy(intf->coreIntf.ifname, ifi->ifi_name, sizeof(intf->coreIntf.ifname));
+         intf->coreIntf.ifname[sizeof(intf->coreIntf.ifname)-1] = 0;
+         intf->coreIntf.Advertise = m->AdvertiseLocalAddresses;
+         intf->coreIntf.McastTxRx = mDNStrue;
++        intf->coreIntf.Loopback = ((ifi->ifi_flags & IFF_LOOPBACK) != 0) ? mDNStrue : mDNSfalse;
+ 
+         // Set up the extra fields in PosixNetworkInterface.
+         assert(intf->intfName != NULL);         // intf->intfName already set up above
+-        intf->index                = intfIndex;
+-        intf->sa_family            = intfAddr->sa_family;
++        intf->index                = ifi->ifi_index;
++        intf->sa_family            = ifi->ifi_addr->sa_family;
+         intf->multicastSocket4     = -1;
+ #if HAVE_IPV6
+         intf->multicastSocket6     = -1;
+@@ -936,17 +935,17 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
+         intf->coreIntf.InterfaceID = (mDNSInterfaceID)alias;
+ 
+         if (alias != intf)
+-            debugf("SetupOneInterface: %s %#a is an alias of %#a", intfName, &intf->coreIntf.ip, &alias->coreIntf.ip);
++            debugf("SetupOneInterface: %s %#a is an alias of %#a", ifi->ifi_name, &intf->coreIntf.ip, &alias->coreIntf.ip);
+     }
+ 
+     // Set up the multicast socket
+     if (err == 0)
+     {
+-        if (alias->multicastSocket4 == -1 && intfAddr->sa_family == AF_INET)
+-            err = SetupSocket(intfAddr, MulticastDNSPort, intf->index, &alias->multicastSocket4);
++        if (alias->multicastSocket4 == -1 && ifi->ifi_addr->sa_family == AF_INET)
++            err = SetupSocket(ifi->ifi_addr, MulticastDNSPort, intf->index, &alias->multicastSocket4);
+ #if HAVE_IPV6
+-        else if (alias->multicastSocket6 == -1 && intfAddr->sa_family == AF_INET6)
+-            err = SetupSocket(intfAddr, MulticastDNSPort, intf->index, &alias->multicastSocket6);
++        else if (alias->multicastSocket6 == -1 && ifi->ifi_addr->sa_family == AF_INET6)
++            err = SetupSocket(ifi->ifi_addr, MulticastDNSPort, intf->index, &alias->multicastSocket6);
+ #endif
+     }
+ 
+@@ -973,8 +972,8 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
+     }
+     else
+     {
+-        // Use intfName instead of intf->intfName in the next line to avoid dereferencing NULL.
+-        debugf("SetupOneInterface: %s %#a failed to register %d", intfName, &intf->coreIntf.ip, err);
++        // Use ifi->ifi_name instead of intf->intfName in the next line to avoid dereferencing NULL.
++        debugf("SetupOneInterface: %s %#a failed to register %d", ifi->ifi_name, &intf->coreIntf.ip, err);
+         if (intf) { FreePosixNetworkInterface(intf); intf = NULL; }
+     }
+ 
+@@ -1023,7 +1022,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
+                 }
+                 else
+                 {
+-                    if (SetupOneInterface(m, i->ifi_addr, i->ifi_netmask, i->ifi_name, i->ifi_index) == 0)
++                    if (SetupOneInterface(m, i) == 0)
+                         if (i->ifi_addr->sa_family == AF_INET)
+                             foundav4 = mDNStrue;
+                 }
+@@ -1037,7 +1036,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
+         // In the interim, we skip loopback interface only if we found at least one v4 interface to use
+         // if ((m->HostInterfaces == NULL) && (firstLoopback != NULL))
+         if (!foundav4 && firstLoopback)
+-            (void) SetupOneInterface(m, firstLoopback->ifi_addr, firstLoopback->ifi_netmask, firstLoopback->ifi_name, firstLoopback->ifi_index);
++            (void) SetupOneInterface(m, firstLoopback);
+     }
+ 
+     // Clean up.
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch
new file mode 100644
index 0000000..fdc5105
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch
@@ -0,0 +1,39 @@
+From 0fcc0f210f3a9310a1963de640b384ce866410fd Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Wed, 9 Aug 2017 09:16:58 -0500
+Subject: [PATCH 08/11] Mark deleted interfaces as being changed
+
+Netlink notification handling ignores messages for deleted links,
+RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu-
+mentation (http://www.infradead.org/~tgr/libnl/doc/route.html)
+RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot.
+There was likely a mixup in the original implementation, so this
+change replaces handling for RTM_GETLINK with RTM_DELLINK.
+
+Testing and Verification Instructions:
+  1. Use ip-link to add and remove a VLAN interface and verify
+     that mDNSResponder handles the deleted link.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 798ab10..a8a57df 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -1163,7 +1163,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+ #endif
+ 
+         // Process the NetLink message
+-        if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
++        if (pNLMsg->nlmsg_type == RTM_DELLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
+             AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index);
+         else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
+             AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index);
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch
new file mode 100644
index 0000000..362d697
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch
@@ -0,0 +1,45 @@
+From 38cff19781f81586926b02f0fd1cb36c040395e0 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Thu, 10 Aug 2017 08:21:53 -0500
+Subject: [PATCH 09/11] Fix possible NULL dereference
+
+Fixes a possible NULL dereference if memory for
+the PosixNetworkInterface could not be allocated.
+Other logic seems to prevent dereferencing this
+variable if NULL, but this instance seems to have
+been overlooked.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index a8a57df..3243ed4 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -951,12 +951,15 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct ifi_info *const ifi)
+ 
+     // If interface is a direct link, address record will be marked as kDNSRecordTypeKnownUnique
+     // and skip the probe phase of the probe/announce packet sequence.
+-    intf->coreIntf.DirectLink = mDNSfalse;
++    if (err == 0)
++    {
++        intf->coreIntf.DirectLink = mDNSfalse;
+ #ifdef DIRECTLINK_INTERFACE_NAME
+-    if (strcmp(intfName, STRINGIFY(DIRECTLINK_INTERFACE_NAME)) == 0)
+-        intf->coreIntf.DirectLink = mDNStrue;
++        if (strcmp(intfName, STRINGIFY(DIRECTLINK_INTERFACE_NAME)) == 0)
++            intf->coreIntf.DirectLink = mDNStrue;
+ #endif
+-    intf->coreIntf.SupportsUnicastMDNSResponse = mDNStrue;
++        intf->coreIntf.SupportsUnicastMDNSResponse = mDNStrue;
++    }
+ 
+     // The interface is all ready to go, let's register it with the mDNS core.
+     if (err == 0)
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch
new file mode 100644
index 0000000..b9b0157
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch
@@ -0,0 +1,62 @@
+From 382b3b924e43abd1bdc5792918161d0922666691 Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Thu, 10 Aug 2017 08:27:32 -0500
+Subject: [PATCH 10/11] Handle errors from socket calls
+
+Adds handling for socket() or read() returning a
+negative value (indicating an error has occurred).
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 3243ed4..84af26b 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -1129,7 +1129,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+ // Read through the messages on sd and if any indicate that any interface records should
+ // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0.
+ {
+-    ssize_t readCount;
++    ssize_t readVal, readCount;
+     char buff[4096];
+     struct nlmsghdr         *pNLMsg = (struct nlmsghdr*) buff;
+ 
+@@ -1138,7 +1138,10 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+     // enough to hold all pending data and so avoid message fragmentation.
+     // (Note that FIONREAD is not supported on AF_NETLINK.)
+ 
+-    readCount = read(sd, buff, sizeof buff);
++    readVal = read(sd, buff, sizeof buff);
++    if (readVal < 0) return;
++    readCount = readVal;
++
+     while (1)
+     {
+         // Make sure we've got an entire nlmsghdr in the buffer, and payload, too.
+@@ -1154,7 +1157,9 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+                 pNLMsg = (struct nlmsghdr*) buff;
+ 
+                 // read more data
+-                readCount += read(sd, buff + readCount, sizeof buff - readCount);
++                readVal = read(sd, buff + readCount, sizeof buff - readCount);
++                if (readVal < 0) return;
++                readCount += readVal;
+                 continue;                   // spin around and revalidate with new readCount
+             }
+             else
+@@ -1429,6 +1434,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void)
+     int err;
+     int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+     struct sockaddr_in s5353;
++    if (s < 0) return mDNSfalse;
+     s5353.sin_family      = AF_INET;
+     s5353.sin_port        = MulticastDNSPort.NotAnInteger;
+     s5353.sin_addr.s_addr = 0;
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
new file mode 100644
index 0000000..d64fb35
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
@@ -0,0 +1,51 @@
+From 19de26db69408f02241e232b39224589a0f630df Mon Sep 17 00:00:00 2001
+From: Nate Karstens <nate.karstens@garmin.com>
+Date: Thu, 10 Aug 2017 08:46:03 -0500
+Subject: [PATCH 11/11] Change a dynamic allocation to file-scope variable
+
+Changes a variable from being dynamically-allocated to being
+statically-allocated at the file scope. Addresses a Coverity
+issue where it appeared that the memory was being leaked.
+
+Upstream-Status: Submitted [dts@apple.com]
+
+Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
+---
+ mDNSPosix/mDNSPosix.c | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 84af26b..b7795ed 100644
+--- a/mDNSPosix/mDNSPosix.c
++++ b/mDNSPosix/mDNSPosix.c
+@@ -91,6 +91,7 @@ static sigset_t gEventSignalSet;                // Signals which event loop list
+ static sigset_t gEventSignals;                  // Signals which were received while inside loop
+ 
+ static PosixNetworkInterface *gRecentInterfaces;
++static IfChangeRec gChgRec;
+ 
+ // ***************************************************************************
+ // Globals (for debugging)
+@@ -1412,16 +1413,11 @@ cleanup:
+ mDNSlocal mStatus WatchForInterfaceChange(mDNS *const m)
+ {
+     mStatus err;
+-    IfChangeRec *pChgRec;
+ 
+-    pChgRec = (IfChangeRec*) mDNSPlatformMemAllocate(sizeof *pChgRec);
+-    if (pChgRec == NULL)
+-        return mStatus_NoMemoryErr;
+-
+-    pChgRec->mDNS = m;
+-    err = OpenIfNotifySocket(&pChgRec->NotifySD);
++    gChgRec.mDNS = m;
++    err = OpenIfNotifySocket(&gChgRec.NotifySD);
+     if (err == 0)
+-        err = mDNSPosixAddFDToEventLoop(pChgRec->NotifySD, InterfaceChangeCallback, pChgRec);
++        err = mDNSPosixAddFDToEventLoop(gChgRec.NotifySD, InterfaceChangeCallback, &gChgRec);
+ 
+     return err;
+ }
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch
new file mode 100644
index 0000000..4ab9d23
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/build.patch
@@ -0,0 +1,167 @@
+From 43b6e98c9c37afd0d914949dcff4eab81f5a995f Mon Sep 17 00:00:00 2001
+From: Brendan Le Foll <brendan.le.foll@intel.com>
+Date: Tue, 3 Mar 2015 11:42:57 +0000
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ mDNSPosix/Makefile | 54 +++++++++++++++++++++++++-----------------------------
+ 1 file changed, 25 insertions(+), 29 deletions(-)
+
+diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
+index 4f98e90..8ac97ad 100755
+--- a/mDNSPosix/Makefile
++++ b/mDNSPosix/Makefile
+@@ -50,6 +50,7 @@
+ 
+ LIBVERS = 1
+ 
++POSIXDIR = ../mDNSPosix
+ COREDIR = ../mDNSCore
+ SHAREDDIR ?= ../mDNSShared
+ JDK = /usr/jdk
+@@ -58,11 +59,11 @@ CC = @cc
+ BISON = @bison
+ FLEX = @flex
+ ST = @strip
+-LD = ld -shared
++LD =@LD
+ CP = cp
+ RM = rm
+ LN = ln -s -f
+-CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
++CFLAGS_COMMON = -I$(POSIXDIR) -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
+ CFLAGS_PTHREAD =
+ LINKOPTS =
+ LINKOPTS_PTHREAD = -lpthread
+@@ -70,7 +71,7 @@ LDSUFFIX = so
+ JAVACFLAGS_OS = -fPIC -shared -ldns_sd
+ 
+ # Set up diverging paths for debug vs. prod builds
+-DEBUG=0
++DEBUG?=1
+ ifeq ($(DEBUG),1)
+ CFLAGS_DEBUG = -g -DMDNS_DEBUGMSGS=2
+ OBJDIR = objects/debug
+@@ -213,7 +214,7 @@ endif
+ endif
+ endif
+ 
+-CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
++CFLAGS_BUILD = $(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
+ 
+ #############################################################################
+ 
+@@ -249,8 +250,7 @@ Daemon: setup $(BUILDDIR)/mdnsd
+ 	@echo "Responder daemon done"
+ 
+ $(BUILDDIR)/mdnsd: $(DAEMONOBJS)
+-	$(CC) -o $@ $+ $(LINKOPTS)
+-	@$(STRIP) $@
++	$(CC) -o $@ $+
+ 
+ # libdns_sd target builds the client library
+ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+@@ -259,22 +259,18 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+ CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
+ 
+ $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
+-	@$(LD) $(LINKOPTS) -o $@ $+
+-	@$(STRIP) $@
++	$(LD) -shared $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+
+ 
+-Clients: setup libdns_sd ../Clients/build/dns-sd
++Clients: setup libdns_sd
++	@$(MAKE) -C ../Clients DEBUG=${DEBUG}
+ 	@echo "Clients done"
+ 
+-../Clients/build/dns-sd:
+-	@$(MAKE) -C ../Clients
+-
+ # nss_mdns target builds the Name Service Switch module
+ nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE)
+ 	@echo "Name Service Switch module done"
+ 
+ $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o
+-	@$(LD) $(LINKOPTS) -o $@ $+
+-	@$(STRIP) $@
++	$(LD) -shared $(LINKOPTS) -o $@ $+
+ 
+ #############################################################################
+ 
+@@ -470,55 +466,55 @@ dnsextd: setup $(BUILDDIR)/dnsextd
+ 	@echo "dnsextd done"
+ 
+ $(BUILDDIR)/mDNSClientPosix:         $(APPOBJ)     $(OBJDIR)/Client.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSResponderPosix:      $(COMMONOBJ)  $(OBJDIR)/Responder.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ)  $(OBJDIR)/ProxyResponder.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(BUILDDIR)/mDNSIdentify:            $(SPECIALOBJ) $(OBJDIR)/Identify.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(OBJDIR)/Identify.c.o:              $(COREDIR)/mDNS.c # Note: Identify.c textually imports mDNS.c
+ 
+ $(BUILDDIR)/mDNSNetMonitor:          $(SPECIALOBJ) $(OBJDIR)/NetMonitor.c.o
+-	$(CC) $+ -o $@ $(LINKOPTS)
++	$(CC) $+ -o $@
+ 
+ $(OBJDIR)/NetMonitor.c.o:            $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c
+ 
+ $(BUILDDIR)/dnsextd:                 $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o
+-	$(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD)
++	$(CC) $+ -o $@ $(LINKOPTS_PTHREAD)
+ 
+ #############################################################################
+ 
+ # Implicit rules
+ $(OBJDIR)/%.c.o:	%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.o:	$(COREDIR)/%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.threadsafe.o:	%.c
+-	$(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.threadsafe.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
++	$(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $<
+ 
+ $(OBJDIR)/%.c.so.o:	%.c
+-	$(CC) $(CFLAGS) -c -fPIC -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $<
+ 
+ $(OBJDIR)/%.c.so.o:	$(SHAREDDIR)/%.c
+-	$(CC) $(CFLAGS) -c -fPIC -o $@ $<
++	$(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $<
+ 
+ $(OBJDIR)/%.y.o: $(SHAREDDIR)/%.y
+ 	$(BISON)              -o $(OBJDIR)/$*.c -d $<
+-	$(CC) $(CFLAGS) -c -o $@ $(OBJDIR)/$*.c
++	$(CC) $(CFLAGS_BUILD) -c -o $@ $(OBJDIR)/$*.c
+ 
+ $(OBJDIR)/%.l.o: $(SHAREDDIR)/%.l
+ 	$(FLEX) $(FLEXFLAGS_OS) -i             -o$(OBJDIR)/$*.l.c $<
+-	$(CC) $(CFLAGS) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c
++	$(CC) $(CFLAGS_BUILD) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c
+-- 
+2.9.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service
new file mode 100644
index 0000000..531d142
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/files/mdns.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zero-configuration networking
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/bin/rm -f /var/run/mdnsd.pid
+ExecStart=/usr/sbin/mdnsd
+ExecReload=/bin/kill -HUP $MAINPID
+PIDFile=/var/run/mdnsd.pid
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_878.270.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_878.270.2.bb
new file mode 100644
index 0000000..ce31233
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_878.270.2.bb
@@ -0,0 +1,114 @@
+SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol"
+DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks."
+HOMEPAGE = "http://developer.apple.com/networking/bonjour/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf"
+
+COMPATIBLE_HOST_libc-musl = 'null'
+
+RPROVIDES_${PN} += "libdns_sd.so"
+
+SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
+           file://build.patch;patchdir=.. \
+           file://mdns.service \
+           file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch;patchdir=.. \
+           file://0002-Create-subroutine-for-tearing-down-an-interface.patch;patchdir=.. \
+           file://0003-Track-interface-socket-family.patch;patchdir=.. \
+           file://0004-Use-list-for-changed-interfaces.patch;patchdir=.. \
+           file://0005-Handle-noisy-netlink-sockets.patch;patchdir=.. \
+           file://0006-Remove-unneeded-function.patch;patchdir=.. \
+           file://0007-Indicate-loopback-interface-to-mDNS-core.patch;patchdir=.. \
+           file://0008-Mark-deleted-interfaces-as-being-changed.patch;patchdir=.. \
+           file://0009-Fix-possible-NULL-dereference.patch;patchdir=.. \
+           file://0010-Handle-errors-from-socket-calls.patch;patchdir=.. \
+           file://0011-Change-a-dynamic-allocation-to-file-scope-variable.patch;patchdir=.. \
+           "
+SRC_URI[md5sum] = "4e139a8e1133349006b0436291c9e29b"
+SRC_URI[sha256sum] = "2cef0ee9900504c5277fb81de0a28e6c0835fe482ebecf1067c6864f5c4eda74"
+
+# CVE-2007-0613 is not applicable as it only affects Apple products
+# i.e. ichat,mdnsresponder, instant message framework and MacOS.
+# Also, https://www.exploit-db.com/exploits/3230 shows the part of code
+# affected by CVE-2007-0613 which is not preset in upstream source code.
+# Hence, CVE-2007-0613 does not affect other Yocto implementations and
+# is not reported for other distros can be marked whitelisted.
+# Links:
+# https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613
+# https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613
+# https://security-tracker.debian.org/tracker/CVE-2007-0613
+# https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613
+CVE_CHECK_WHITELIST += "CVE-2007-0613"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix"
+
+EXTRA_OEMAKE += "os=linux DEBUG=0 'CC=${CC}' 'LD=${CCLD} ${LDFLAGS}'"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_install () {
+    install -d ${D}${sbindir}
+    install -m 0755 build/prod/mdnsd ${D}${sbindir}
+
+    install -d ${D}${libdir}
+    cp build/prod/libdns_sd.so ${D}${libdir}/libdns_sd.so.1
+    chmod 0644 ${D}${libdir}/libdns_sd.so.1
+    ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so
+
+    install -d ${D}${includedir}
+    install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir}
+
+    install -d ${D}${mandir}/man8
+    install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8
+
+    install -d ${D}${bindir}
+    install -m 0755 ../Clients/build/dns-sd ${D}${bindir}
+
+    install -d ${D}${libdir}
+    oe_libinstall -C build/prod -so libnss_mdns-0.2 ${D}${libdir}
+    ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2
+
+    install -d ${D}${sysconfdir}
+    install -m 0644 nss_mdns.conf ${D}${sysconfdir}
+
+    install -d ${D}${mandir}/man5
+    install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5
+
+    install -d ${D}${mandir}/man8
+    install -m 0644 libnss_mdns.8 ${D}${mandir}/man8
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_unitdir}/system/
+}
+
+pkg_postinst_${PN} () {
+    sed -e '/^hosts:/s/\s*\<mdns\>//' \
+        -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \
+        -i $D/etc/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+    sed -e '/^hosts:/s/\s*\<mdns\>//' \
+        -e '/^hosts:/s/\s*mdns//' \
+        -i $D/etc/nsswitch.conf
+}
+
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "mdns.service"
+
+FILES_${PN} += "${systemd_unitdir}/system/mdns.service"
+FILES_${PN} += "${libdir}/libdns_sd.so.1 \
+                ${bindir}/dns-sd \
+                ${libdir}/libnss_mdns-0.2.so \
+                ${sysconfdir}/nss_mdns.conf"
+
+FILES_${PN}-dev += "${libdir}/libdns_sd.so \
+                    ${includedir}/dns_sd.h "
+
+FILES_${PN}-man += "${mandir}/man8/mdnsd.8 \
+                    ${mandir}/man5/nss_mdns.conf.5 \
+                    ${mandir}/man8/libnss_mdns.8"
+
+PACKAGES = "${PN} ${PN}-dev ${PN}-man ${PN}-dbg"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
new file mode 100755
index 0000000..4799546
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/init
@@ -0,0 +1,66 @@
+#! /bin/sh
+# /etc/init.d/snmpd: start snmp daemon.
+
+. /etc/init.d/functions
+
+# Defaults
+export MIBDIRS=/usr/share/snmp/mibs
+SNMPDRUN=yes
+SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid'
+TRAPDRUN=no
+TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
+PIDFILE=/var/run/snmpd.pid
+SPIDFILE=/var/run/snmptrapd.pid
+
+# Reads config file if exists (will override defaults above)
+[ -r /etc/default/snmpd ] && . /etc/default/snmpd
+
+[ "$SNMPDRUN" = "yes" ] && { test -x /usr/sbin/snmpd || exit 0; }
+[ "$TRAPDRUN" = "yes" ] && { test -x /usr/sbin/snmptrapd || exit 0; }
+
+case "$1" in
+  start)
+    echo -n "Starting network management services:"
+    if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf -a ! -f "$PIDFILE" ]; then
+	start-stop-daemon -o --start --quiet --name snmpd --pidfile "$PIDFILE" \
+		--exec /usr/sbin/snmpd -- $SNMPDOPTS
+	echo -n " snmpd"
+    fi
+    if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf -a ! -f "$SPIDFILE" ]; then
+	start-stop-daemon -o --start --quiet --name snmptrapd  --pidfile "$SPIDFILE" \
+		 --exec /usr/sbin/snmptrapd -- $TRAPDOPTS
+	echo -n " snmptrapd"
+    fi
+    echo "."
+
+    test ! -x /sbin/restorecon || /sbin/restorecon -FR /var/lib/net-snmp
+    ;;
+  stop)
+    echo -n "Stopping network management services:"
+    if [ -f  "$PIDFILE" ] ; then
+	start-stop-daemon -o --stop  --quiet --pidfile $PIDFILE --name snmpd
+    fi
+    echo -n " snmpd"
+    if [ -f "$SPIDFILE" ] ; then
+	start-stop-daemon -o --stop  --quiet --pidfile $SPIDFILE --name snmptrapd
+	rm -rf $SPIDFILE
+    fi
+    echo -n " snmptrapd"
+    echo "."
+    ;;
+  status)
+    status /usr/sbin/snmpd;
+    exit $?
+    ;;
+  restart|reload|force-reload)
+    $0 stop
+    # Allow the daemons time to exit completely.
+    sleep 2
+    $0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/snmpd {start|stop|status|restart|reload|force-reload}"
+    exit 1
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf
new file mode 100644
index 0000000..728171c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmpd.conf
@@ -0,0 +1,422 @@
+###############################################################################
+#
+# EXAMPLE.conf:
+#   An example configuration file for configuring the ucd-snmp snmpd agent.
+#
+###############################################################################
+#
+# This file is intended to only be an example.  If, however, you want
+# to use it, it should be placed in /etc/snmp/snmpd.conf.
+# When the snmpd agent starts up, this is where it will look for it.
+#
+# You might be interested in generating your own snmpd.conf file using
+# the "snmpconf" program (perl script) instead.  It's a nice menu
+# based interface to writing well commented configuration files.  Try it!
+#
+# Note: This file is automatically generated from EXAMPLE.conf.def.
+# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
+# configure & make, and then make sure you read the EXAMPLE.conf file
+# instead, as it will tailor itself to your configuration.
+
+# All lines beginning with a '#' are comments and are intended for you
+# to read.  All other lines are configuration commands for the agent.
+
+#
+# PLEASE: read the snmpd.conf(5) manual page as well!
+#
+
+
+###############################################################################
+# Access Control
+###############################################################################
+
+# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
+# KNOWN AT YOUR SITE.  YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
+# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
+
+# By far, the most common question I get about the agent is "why won't
+# it work?", when really it should be "how do I configure the agent to
+# allow me to access it?"
+#
+# By default, the agent responds to the "public" community for read
+# only access, if run out of the box without any configuration file in 
+# place.  The following examples show you other ways of configuring
+# the agent so that you can change the community names, and give
+# yourself write access as well.
+#
+# The following lines change the access permissions of the agent so
+# that the COMMUNITY string provides read-only access to your entire
+# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
+# localhost (127.0.0.1, not its real ipaddress).
+#
+# For more information, read the FAQ as well as the snmpd.conf(5)
+# manual page.
+
+####
+# First, map the community name (COMMUNITY) into a security name
+# (local and mynetwork, depending on where the request is coming
+# from):
+
+#       sec.name  source          community
+com2sec paranoid  default         public
+#com2sec readonly  default         public
+#com2sec readwrite default         private
+
+####
+# Second, map the security names into group names:
+
+#             	sec.model  sec.name
+group MyROSystem v1        paranoid
+group MyROSystem v2c       paranoid
+group MyROSystem usm       paranoid
+group MyROGroup v1         readonly
+group MyROGroup v2c        readonly
+group MyROGroup usm        readonly
+group MyRWGroup v1         readwrite
+group MyRWGroup v2c        readwrite
+group MyRWGroup usm        readwrite
+
+####
+# Third, create a view for us to let the groups have rights to:
+
+#           incl/excl subtree                          mask
+view all    included  .1                               80
+view system included  .iso.org.dod.internet.mgmt.mib-2.system
+
+####
+# Finally, grant the 2 groups access to the 1 view with different
+# write permissions:
+
+#                context sec.model sec.level match  read   write  notif
+access MyROSystem ""     any       noauth    exact  system none   none
+access MyROGroup ""      any       noauth    exact  all    none   none
+access MyRWGroup ""      any       noauth    exact  all    all    none
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# System contact information
+#
+
+# It is also possible to set the sysContact and sysLocation system
+# variables through the snmpd.conf file.  **PLEASE NOTE** that setting
+# the value of these objects here makes these objects READ-ONLY
+# (regardless of any access control settings).  Any attempt to set the
+# value of an object whose value is given here will fail with an error
+# status of notWritable.
+
+syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
+syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
+
+# Example output of snmpwalk:
+#   % snmpwalk -v 1 -c public localhost system
+#   system.sysDescr.0 = "SunOS name sun4c"
+#   system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
+#   system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
+#   system.sysContact.0 = "Me <me@somewhere.org>"
+#   system.sysName.0 = "name"
+#   system.sysLocation.0 = "Right here, right now."
+#   system.sysServices.0 = 72
+
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Process checks.
+#
+#  The following are examples of how to use the agent to check for
+#  processes running on the host.  The syntax looks something like:
+#
+#  proc NAME [MAX=0] [MIN=0]
+#
+#  NAME:  the name of the process to check for.  It must match
+#         exactly (ie, http will not find httpd processes).
+#  MAX:   the maximum number allowed to be running.  Defaults to 0.
+#  MIN:   the minimum number to be running.  Defaults to 0.
+
+#
+#  Examples:
+#
+
+#  Make sure mountd is running
+#proc mountd
+
+#  Make sure there are no more than 4 ntalkds running, but 0 is ok too.
+#proc ntalkd 4
+
+#  Make sure at least one sendmail, but less than or equal to 10 are running.
+#proc sendmail 10 1
+
+#  A snmpwalk of the prTable would look something like this:
+# 
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.2
+# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
+# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
+# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
+# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
+# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
+# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
+# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
+# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
+# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
+# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
+# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
+# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
+# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
+#
+#  Note that the errorFlag for mountd is set to 1 because one is not
+#  running (in this case an rpc.mountd is, but thats not good enough),
+#  and the ErrMessage tells you what's wrong.  The configuration
+#  imposed in the snmpd.conf file is also shown.  
+# 
+#  Special Case:  When the min and max numbers are both 0, it assumes
+#  you want a max of infinity and a min of 1.
+#
+
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Executables/scripts
+#
+
+#
+#  You can also have programs run by the agent that return a single
+#  line of output and an exit code.  Here are two examples.
+#
+#  exec NAME PROGRAM [ARGS ...]
+#
+#  NAME:     A generic name.
+#  PROGRAM:  The program to run.  Include the path!
+#  ARGS:     optional arguments to be passed to the program
+
+# a simple hello world
+#exec echotest /bin/echo hello world
+
+# Run a shell script containing:
+#
+# #!/bin/sh
+# echo hello world
+# echo hi there
+# exit 35
+#
+# Note:  this has been specifically commented out to prevent
+# accidental security holes due to someone else on your system writing
+# a /tmp/shtest before you do.  Uncomment to use it.
+#
+#exec shelltest /bin/sh /tmp/shtest
+
+# Then, 
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8
+# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
+# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
+# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
+# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
+# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
+# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
+# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
+# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
+# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
+# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
+# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
+# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0
+
+# Note that the second line of the /tmp/shtest shell script is cut
+# off.  Also note that the exit status of 35 was returned.
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# disk checks
+#
+
+# The agent can check the amount of available disk space, and make
+# sure it is above a set limit.  
+
+# disk PATH [MIN=DEFDISKMINIMUMSPACE]
+#
+# PATH:  mount path to the disk in question.
+# MIN:   Disks with space below this value will have the Mib's errorFlag set.
+#        Default value = DEFDISKMINIMUMSPACE.
+
+# Check the / partition and make sure it contains at least 10 megs.
+
+#disk / 10000
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9
+# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
+# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F 
+# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
+# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
+# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
+# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
+# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
+# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
+# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
+# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# load average checks
+#
+
+# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
+#
+# 1MAX:   If the 1 minute load average is above this limit at query
+#         time, the errorFlag will be set.
+# 5MAX:   Similar, but for 5 min average.
+# 15MAX:  Similar, but for 15 min average.
+
+# Check for loads:
+#load 12 14 14
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.10
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
+# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
+# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39 
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31 
+# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36 
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
+# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Extensible sections.
+# 
+
+# This alleviates the multiple line output problem found in the
+# previous executable mib by placing each mib in its own mib table:
+
+# Run a shell script containing:
+#
+# #!/bin/sh
+# echo hello world
+# echo hi there
+# exit 35
+#
+# Note:  this has been specifically commented out to prevent
+# accidental security holes due to someone else on your system writing
+# a /tmp/shtest before you do.  Uncomment to use it.
+#
+# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.50
+# enterprises.ucdavis.50.1.1 = 1
+# enterprises.ucdavis.50.2.1 = "shelltest"
+# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
+# enterprises.ucdavis.50.100.1 = 35
+# enterprises.ucdavis.50.101.1 = "hello world."
+# enterprises.ucdavis.50.101.2 = "hi there."
+# enterprises.ucdavis.50.102.1 = 0
+
+# Now the Output has grown to two lines, and we can see the 'hi
+# there.' output as the second line from our shell script.
+#
+# Note that you must alter the mib.txt file to be correct if you want
+# the .50.* outputs above to change to reasonable text descriptions.
+
+# Other ideas:
+# 
+# exec .1.3.6.1.4.1.2021.51 ps /bin/ps 
+# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
+# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
+
+# -----------------------------------------------------------------------------
+
+
+###############################################################################
+# Pass through control.
+# 
+
+# Usage:
+#   pass MIBOID EXEC-COMMAND
+#
+# This will pass total control of the mib underneath the MIBOID
+# portion of the mib to the EXEC-COMMAND.  
+#
+# Note:  You'll have to change the path of the passtest script to your
+# source directory or install it in the given location.
+# 
+# Example:  (see the script for details)
+#           (commented out here since it requires that you place the
+#           script in the right location. (its not installed by default))
+
+# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/passtest
+
+# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.255
+# enterprises.ucdavis.255.1 = "life the universe and everything"
+# enterprises.ucdavis.255.2.1 = 42
+# enterprises.ucdavis.255.2.2 = OID: 42.42.42
+# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
+# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
+# enterprises.ucdavis.255.5 = 42
+# enterprises.ucdavis.255.6 = Gauge: 42
+#
+# % snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.255.5
+# enterprises.ucdavis.255.5 = 42
+#
+# % snmpset -v 1 -c public localhost .1.3.6.1.4.1.2021.255.1 s "New string"
+# enterprises.ucdavis.255.1 = "New string"
+#
+
+# For specific usage information, see the man/snmpd.conf.5 manual page
+# as well as the local/passtest script used in the above example.
+
+###############################################################################
+# Subagent control
+#
+
+# The agent can support subagents using a number of extension mechanisms.
+# From the 4.2.1 release, AgentX support is being compiled in by default.
+# However, this is still experimental code, so should not be used on
+# critical production systems.
+#   Please see the file README.agentx for more details.
+#
+# If having read, marked, learnt and inwardly digested this information,
+# you decide that you do wish to make use of this mechanism, simply
+# uncomment the following directive.
+#
+#  master  agentx
+#
+# I repeat - this is *NOT* regarded as suitable for front-line production
+# systems, though it is probably stable enough for day-to-day use.
+# Probably.
+#
+# No refunds will be given.
+
+###############################################################################
+# Further Information
+#
+#  See the snmpd.conf manual page, and the output of "snmpd -H".
+#  MUCH more can be done with the snmpd.conf than is shown as an
+#  example here.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf
new file mode 100644
index 0000000..8d2e437
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/files/snmptrapd.conf
@@ -0,0 +1,18 @@
+###############################################################################
+#
+# EXAMPLE.conf:
+#   An example configuration file for configuring the ucd-snmp snmptrapd agent.
+#
+###############################################################################
+#
+# This file is intended to only be an example.  If, however, you want
+# to use it, it should be placed in /etc/snmp/snmptrapd.conf.
+# When the snmptrapd agent starts up, this is where it will look for it.
+#
+# All lines beginning with a '#' are comments and are intended for you
+# to read.  All other lines are configuration commands for the agent.
+
+#
+# PLEASE: read the snmptrapd.conf(5) manual page as well!
+#
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch
new file mode 100644
index 0000000..dd159b9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch
@@ -0,0 +1,168 @@
+From 4bf83597379523032663c8e95b3786a217c9a849 Mon Sep 17 00:00:00 2001
+From: Hugh McMaster <hugh.mcmaster@outlook.com>
+Date: Wed, 3 Apr 2019 21:36:03 +1100
+Subject: [PATCH] Add pkg-config support for building applications and
+ sub-agents
+
+The netsnmp package should be used when building Net-SNMP applications.
+The netsnmp-agent package should be used when building Net-SNMP subagents.
+
+Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
+[ bvanassche: edited makefile code and .pc files; added ./configure changes ]
+
+Upstream-Status: Backport
+https://sourceforge.net/p/net-snmp/patches/_discuss/thread/a0d66e91dd/f940/attachment/0001-Add-pkg-config-support-for-building-applications-and.patch
+---
+ Makefile.in         |  2 ++
+ Makefile.rules      | 30 ++++++++++++++++++++++++++----
+ configure           |  4 ++++
+ configure.ac        |  1 +
+ netsnmp-agent.pc.in | 12 ++++++++++++
+ netsnmp.pc.in       | 12 ++++++++++++
+ 6 files changed, 57 insertions(+), 4 deletions(-)
+ create mode 100644 netsnmp-agent.pc.in
+ create mode 100644 netsnmp.pc.in
+
+diff --git a/Makefile.in b/Makefile.in
+index 9dbdde1353..ec972636c2 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -35,6 +35,7 @@ INSTALLBUILTHEADERS=include/net-snmp/net-snmp-config.h
+ INSTALLBUILTINCLUDEHEADERS=@FEATUREHEADERS@
+ INSTALLBINSCRIPTS=net-snmp-config net-snmp-create-v3-user
+ INSTALLUCDHEADERS=ucd-snmp-config.h version.h mib_module_config.h
++INSTALL_PKGCONFIG=netsnmp.pc netsnmp-agent.pc
+ 
+ #
+ # other install rules.
+@@ -275,6 +276,7 @@ configclean: makefileclean
+ 		libtool include/net-snmp/net-snmp-config.h \
+ 		net-snmp-config net-snmp-config-x configure-summary \
+ 		net-snmp-create-v3-user net-snmp-create-v3-user-x
++	rm -f *.pc
+ 	rm -f mibs/.index
+ 	rm -f include/net-snmp/agent/mib_module_config.h		\
+ 		include/net-snmp/agent/agent_module_config.h		\
+diff --git a/Makefile.rules b/Makefile.rules
+index 9e9e9009e5..e714f91e72 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -85,12 +85,14 @@ subdirs:
+ # installlibs handles local, ucd and subdir libs. need to do subdir libs
+ # before bins, sinze those libs may be needed for successful linking
+ install: installlocalheaders @installucdheaders@ \
+-         installlibs \
+-         installlocalbin      installlocalsbin   \
++         installlibs         install_pkgconfig   \
++         installlocalbin     installlocalsbin    \
+          installsubdirs      $(OTHERINSTALL)
+ 
+-uninstall: uninstalllibs uninstallbin uninstallsbin uninstallheaders \
+-           uninstallsubdirs $(OTHERUNINSTALL)
++uninstall: uninstalllibs     uninstall_pkgconfig \
++           uninstallbin      uninstallsbin       \
++           uninstallheaders                      \
++           uninstallsubdirs  $(OTHERUNINSTALL)
+ 
+ installprogs: installbin installsbin
+ 
+@@ -287,6 +289,26 @@ uninstalllibs:
+ 		done \
+ 	fi
+ 
++#
++# pkg-config files
++#
++install_pkgconfig: $(INSTALL_PKGCONFIG)
++	@if test "x$(INSTALL_PKGCONFIG)" != x; then			\
++		$(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(libdir)/pkgconfig; \
++		for i in $(INSTALL_PKGCONFIG); do			\
++			echo "installing $$i in $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \
++		done;							\
++		$(INSTALL) $(INSTALL_PKGCONFIG) $(INSTALL_PREFIX)$(libdir)/pkgconfig; \
++	fi
++
++uninstall_pkgconfig:
++	@if test "x$(INSTALL_PKGCONFIG)" != x; then			\
++		for i in $(INSTALL_PKGCONFIG); do			\
++			echo "removing $$i from $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \
++			$(UNINSTALL) $(INSTALL_PREFIX)$(libdir)/pkgconfig/$$i;\
++		done;							\
++	fi
++
+ #
+ # normal bin binaries
+ #
+diff --git a/configure b/configure
+index cad6b74486..8909bffe05 100755
+--- a/configure
++++ b/configure
+@@ -31717,6 +31717,8 @@ ac_config_files="$ac_config_files net-snmp-config:net-snmp-config.in"
+ 
+ ac_config_files="$ac_config_files net-snmp-create-v3-user:net-snmp-create-v3-user.in"
+ 
++ac_config_files="$ac_config_files netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in"
++
+ ac_config_files="$ac_config_files dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in"
+ 
+ ac_config_files="$ac_config_files local/snmpconf"
+@@ -32740,6 +32742,8 @@ do
+     "mibs/Makefile") CONFIG_FILES="$CONFIG_FILES mibs/Makefile:Makefile.top:mibs/Makefile.in:Makefile.rules" ;;
+     "net-snmp-config") CONFIG_FILES="$CONFIG_FILES net-snmp-config:net-snmp-config.in" ;;
+     "net-snmp-create-v3-user") CONFIG_FILES="$CONFIG_FILES net-snmp-create-v3-user:net-snmp-create-v3-user.in" ;;
++    "netsnmp.pc") CONFIG_FILES="$CONFIG_FILES netsnmp.pc:netsnmp.pc.in" ;;
++    "netsnmp-agent.pc") CONFIG_FILES="$CONFIG_FILES netsnmp-agent.pc:netsnmp-agent.pc.in" ;;
+     "dist/generation-scripts/gen-variables") CONFIG_FILES="$CONFIG_FILES dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in" ;;
+     "local/snmpconf") CONFIG_FILES="$CONFIG_FILES local/snmpconf" ;;
+     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+diff --git a/configure.ac b/configure.ac
+index 1622b7c051..898b50f368 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -118,6 +118,7 @@ AC_CONFIG_FILES([net-snmp-config:net-snmp-config.in],
+ 		[chmod +x net-snmp-config])
+ AC_CONFIG_FILES([net-snmp-create-v3-user:net-snmp-create-v3-user.in],
+ 		[chmod +x net-snmp-create-v3-user])
++AC_CONFIG_FILES([netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in])
+ AC_CONFIG_FILES([dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in])
+ AC_CONFIG_FILES([local/snmpconf])
+ 
+diff --git a/netsnmp-agent.pc.in b/netsnmp-agent.pc.in
+new file mode 100644
+index 0000000000..3a1c77bbf8
+--- /dev/null
++++ b/netsnmp-agent.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++includedir=@includedir@
++libdir=@libdir@
++
++Name: netsnmp-agent (@PACKAGE_NAME@)
++Description: SNMP (Simple Network Management Protocol) sub-agent SDK.
++URL: http://www.net-snmp.org
++Version: @PACKAGE_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
++Libs.private: @LDFLAGS@ @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@
+diff --git a/netsnmp.pc.in b/netsnmp.pc.in
+new file mode 100644
+index 0000000000..0a1f5785a4
+--- /dev/null
++++ b/netsnmp.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++includedir=@includedir@
++libdir=@libdir@
++
++Name: netsnmp (@PACKAGE_NAME@)
++Description: SNMP (Simple Network Management Protocol) daemon and applications.
++URL: http://www.net-snmp.org
++Version: @PACKAGE_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lnetsnmp
++Libs.private: @LDFLAGS@ @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
new file mode 100644
index 0000000..5ad7470
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
@@ -0,0 +1,37 @@
+From 2ad4df6d503be72a8910c3087611adb33d77ffde Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 21 Aug 2015 18:23:13 +0900
+Subject: [PATCH] config_os_headers: Error Fix
+
+ERROR: This autoconf log indicates errors, it looked at host include
+and/or library paths while determining system capabilities.
+cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation [-Wpoison-system-directories]
+conftest.c:168:17: fatal error: pkg.h: No such file or directory
+ #include <pkg.h>
+                 ^
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.d/config_os_headers | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index 2fdb5a35d6..0272f02c8e 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -487,8 +487,8 @@ then
+     unset ac_cv_header_pkg_h
+     netsnmp_save_CPPFLAGS="$CPPFLAGS"
+     netsnmp_save_LDFLAGS="$LDFLAGS"
+-    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+-    LDFLAGS="$LDFLAGS -L/usr/local/lib"
++    CPPFLAGS="$CPPFLAGS"
++    LDFLAGS="$LDFLAGS"
+     AC_CHECK_HEADERS(pkg.h,
+         NETSNMP_SEARCH_LIBS(pkg_init, pkg,
+ 	    AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch
new file mode 100644
index 0000000..bf133b3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch
@@ -0,0 +1,27 @@
+From 98c6edba4835b515d933542411d80879327eee16 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 22 Jul 2016 18:34:39 +0000
+Subject: [PATCH] get_pid_from_inode: Include limit.h
+
+PATH_MAX and NAME_MAX are required by this file
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ agent/mibgroup/util_funcs/get_pid_from_inode.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.c b/agent/mibgroup/util_funcs/get_pid_from_inode.c
+index aee907d..7abaec2 100644
+--- a/agent/mibgroup/util_funcs/get_pid_from_inode.c
++++ b/agent/mibgroup/util_funcs/get_pid_from_inode.c
+@@ -6,6 +6,7 @@
+ #include <net-snmp/output_api.h>
+ 
+ #include <ctype.h>
++#include <limits.h>
+ #include <stdio.h>
+ #if HAVE_STDLIB_H
+ #include <stdlib.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch
new file mode 100644
index 0000000..33a1e74
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch
@@ -0,0 +1,62 @@
+From 383e67e359b89abe0440597ce414297892ade511 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 26 Feb 2019 14:26:07 +0800
+Subject: [PATCH] net-snmp: fix compile error with --disable-des
+
+| scapi.c: In function 'sc_encrypt':
+| scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'?
+|      pad_size = pai->pad_size;
+|      ^~~~~~~~
+|      dysize
+
+pad_size is defined only without --disable-des
+[snip]
+#ifndef NETSNMP_DISABLE_DES
+    int             pad, plast, pad_size = 0;
+
+but used when disable-des,
+[snip]
+        QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
+    }
+    pad_size = pai->pad_size;
+
+    memset(my_iv, 0, sizeof(my_iv));
+
+#ifndef NETSNMP_DISABLE_DES
+    if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) {
+
+        /*
+
+fix by move it into #ifndef NETSNMP_DISABLE_DES
+
+Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/bugs/2927/]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ snmplib/scapi.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/snmplib/scapi.c b/snmplib/scapi.c
+index 8ad1d70d90..8c6882d9ab 100644
+--- a/snmplib/scapi.c
++++ b/snmplib/scapi.c
+@@ -1251,7 +1251,6 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
+ 
+         QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
+     }
+-    pad_size = pai->pad_size;
+ 
+     memset(my_iv, 0, sizeof(my_iv));
+ 
+@@ -1261,6 +1260,8 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
+         /*
+          * now calculate the padding needed 
+          */
++
++       pad_size = pai->pad_size;
+         pad = pad_size - (ptlen % pad_size);
+         plast = (int) ptlen - (pad_size - pad);
+         if (pad == pad_size)
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
new file mode 100644
index 0000000..778b401
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
@@ -0,0 +1,31 @@
+From 89538a973119f1bf976b3a6df157ea940cf32eb5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 18 Sep 2015 00:28:45 -0400
+Subject: [PATCH] snmplib/keytools.c: Don't check for return from
+
+ EVP_MD_CTX_init()
+
+EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
+
+snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ snmplib/keytools.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/snmplib/keytools.c b/snmplib/keytools.c
+index 2cf0240..50fd3ea 100644
+--- a/snmplib/keytools.c
++++ b/snmplib/keytools.c
+@@ -186,8 +186,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
+     ctx = EVP_MD_CTX_create();
+ #else
+     ctx = malloc(sizeof(*ctx));
+-    if (!EVP_MD_CTX_init(ctx))
+-        return SNMPERR_GENERR;
++    EVP_MD_CTX_init(ctx);
+ #endif
+     if (!EVP_DigestInit(ctx, hashfn))
+         return SNMPERR_GENERR;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch
new file mode 100644
index 0000000..4782714
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch
@@ -0,0 +1,28 @@
+From a3631df3d6743113e1cd63579925e15bcce85868 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <wenlin.kang@windriver.com>
+Date: Wed, 24 May 2017 16:45:34 +0800
+Subject: [PATCH 2/4] configure: fix a cc check issue.
+
+When has "." in cc value, the expression
+$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'
+can't get corretly the cc's value.
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+
+---
+ configure.d/config_project_perl_python | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.d/config_project_perl_python b/configure.d/config_project_perl_python
+index 475c843..22d2ad3 100644
+--- a/configure.d/config_project_perl_python
++++ b/configure.d/config_project_perl_python
+@@ -87,7 +87,7 @@ if test "x$install_perl" != "xno" ; then
+     if test "x$enable_perl_cc_checks" != "xno" ; then
+         AC_MSG_CHECKING([for Perl cc])
+         changequote(, )
+-        PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'`
++        PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\.\w\s\/]+).;\s*/$1/);'`
+         changequote([, ])
+         if test "x$PERLCC" != "x" ; then
+             AC_MSG_RESULT([$PERLCC])
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch
new file mode 100644
index 0000000..a3d84b2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch
@@ -0,0 +1,28 @@
+From f3c5cd4df7ce8e5639c99b7b918e41fb89e969e3 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <wenlin.kang@windriver.com>
+Date: Wed, 24 May 2017 17:10:20 +0800
+Subject: [PATCH 4/4] configure: fix incorrect variable
+
+For cross compile platform, this variable will not be correct, so fix it.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 9dbdde1..5fdc760 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -173,7 +173,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt
+ #
+ # override LD_RUN_PATH to avoid dependencies on the build directory
+ perlmodules: perlmakefiles subdirs
+-	@(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{archlibexp}/CORE);'`") ; \
++	@(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{installprivlib}/CORE);'`") ; \
+         if test $$? != 0 ; then \
+            exit 1 ; \
+         fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2019-20892.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2019-20892.patch
new file mode 100644
index 0000000..3e2637e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2019-20892.patch
@@ -0,0 +1,118 @@
+From 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Sat, 27 Jul 2019 19:34:09 -0700
+Subject: [PATCH] libsnmp, USM: Introduce a reference count in struct
+ usmStateReference
+
+This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
+
+Upstream-Status: Backport
+[ak: fixup for 5.8 context, changes to library/snmpusm.h]
+CVE:CVE-2019-20892
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ snmplib/snmp_client.c | 22 +++----------
+ snmplib/snmpusm.c     | 73 ++++++++++++++++++++++++++++---------------
+ 2 files changed, 53 insertions(+), 42 deletions(-)
+
+Index: net-snmp-5.8/snmplib/snmpusm.c
+===================================================================
+--- net-snmp-5.8.orig/snmplib/snmpusm.c
++++ net-snmp-5.8/snmplib/snmpusm.c
+@@ -285,12 +285,35 @@ free_enginetime_on_shutdown(int majorid,
+ struct usmStateReference *
+ usm_malloc_usmStateReference(void)
+ {
+-    struct usmStateReference *retval = (struct usmStateReference *)
+-        calloc(1, sizeof(struct usmStateReference));
++   struct usmStateReference *retval;
+ 
++    retval = calloc(1, sizeof(struct usmStateReference));
++    if (retval)
++        retval->refcnt = 1;
+     return retval;
+ }                               /* end usm_malloc_usmStateReference() */
+ 
++static int
++usm_clone(netsnmp_pdu *pdu, netsnmp_pdu *new_pdu)
++{
++    struct usmStateReference *ref = pdu->securityStateRef;
++    struct usmStateReference **new_ref =
++        (struct usmStateReference **)&new_pdu->securityStateRef;
++    int ret = 0;
++
++    if (!ref)
++        return ret;
++
++    if (pdu->command == SNMP_MSG_TRAP2) {
++        netsnmp_assert(pdu->securityModel == SNMP_DEFAULT_SECMODEL);
++        ret = usm_clone_usmStateReference(ref, new_ref);
++    } else {
++        netsnmp_assert(ref == *new_ref);
++        ref->refcnt++;
++    }
++
++    return ret;
++}
+ 
+ void
+ usm_free_usmStateReference(void *old)
+@@ -3345,6 +3368,7 @@ init_usm(void)
+     def->encode_reverse = usm_secmod_rgenerate_out_msg;
+     def->encode_forward = usm_secmod_generate_out_msg;
+     def->decode = usm_secmod_process_in_msg;
++    def->pdu_clone = usm_clone;
+     def->pdu_free_state_ref = usm_free_usmStateReference;
+     def->session_setup = usm_session_init;
+     def->handle_report = usm_handle_report;
+Index: net-snmp-5.8/snmplib/snmp_client.c
+===================================================================
+--- net-snmp-5.8.orig/snmplib/snmp_client.c
++++ net-snmp-5.8/snmplib/snmp_client.c
+@@ -402,27 +402,15 @@ _clone_pdu_header(netsnmp_pdu *pdu)
+         return NULL;
+     }
+ 
+-    if (pdu->securityStateRef &&
+-        pdu->command == SNMP_MSG_TRAP2) {
+-
+-        ret = usm_clone_usmStateReference((struct usmStateReference *) pdu->securityStateRef,
+-                (struct usmStateReference **) &newpdu->securityStateRef );
+-
+-        if (ret)
+-        {
++    sptr = find_sec_mod(newpdu->securityModel);
++    if (sptr && sptr->pdu_clone) {
++        /* call security model if it needs to know about this */
++        ret = sptr->pdu_clone(pdu, newpdu);
++        if (ret) {
+             snmp_free_pdu(newpdu);
+             return NULL;
+         }
+     }
+-
+-    if ((sptr = find_sec_mod(newpdu->securityModel)) != NULL &&
+-        sptr->pdu_clone != NULL) {
+-        /*
+-         * call security model if it needs to know about this 
+-         */
+-        (*sptr->pdu_clone) (pdu, newpdu);
+-    }
+-
+     return newpdu;
+ }
+ 
+Index: net-snmp-5.8/include/net-snmp/library/snmpusm.h
+===================================================================
+--- net-snmp-5.8.orig/include/net-snmp/library/snmpusm.h
++++ net-snmp-5.8/include/net-snmp/library/snmpusm.h
+@@ -43,6 +43,7 @@ extern          "C" {
+      * Structures.
+      */
+     struct usmStateReference {
++        int             refcnt;
+         char           *usr_name;
+         size_t          usr_name_length;
+         u_char         *usr_engine_id;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0001.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0001.patch
new file mode 100644
index 0000000..f43803a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0001.patch
@@ -0,0 +1,164 @@
+From c449946b9d06571b447fce3fc0dcad89e8df05b5 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 15 May 2019 14:09:25 +0200
+Subject: [PATCH 1/5] CHANGES: libsnmp: Scan MIB directories in alphabetical
+ order
+
+This guarantees that e.g. mibs/RFC1213-MIB.txt is read before mibs/SNMPv2-MIB.txt.
+The order in which these MIBs is read matters because both define sysLocation but
+with different attributes.
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/2b3e300ade4add03b889e61d610b0db77d300fc3]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ snmplib/parse.c | 113 +++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 82 insertions(+), 31 deletions(-)
+
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 7678b35..51d119b 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -4894,6 +4894,79 @@ add_mibfile(const char* tmpstr, const char* d_name, FILE *ip )
+     }
+ }
+ 
++static int elemcmp(const void *a, const void *b)
++{
++    const char *const *s1 = a, *const *s2 = b;
++
++    return strcmp(*s1, *s2);
++}
++
++/*
++ * Scan a directory and return all filenames found as an array of pointers to
++ * directory entries (@result).
++ */
++static int scan_directory(char ***result, const char *dirname)
++{
++    DIR            *dir, *dir2;
++    struct dirent  *file;
++    char          **filenames = NULL;
++    int             fname_len, i, filename_count = 0, array_size = 0;
++    char           *tmpstr;
++
++    *result = NULL;
++
++    dir = opendir(dirname);
++    if (!dir)
++        return -1;
++
++    while ((file = readdir(dir))) {
++        /*
++         * Only parse file names that don't begin with a '.'
++         * Also skip files ending in '~', or starting/ending
++         * with '#' which are typically editor backup files.
++         */
++        fname_len = strlen(file->d_name);
++        if (fname_len > 0 && file->d_name[0] != '.'
++            && file->d_name[0] != '#'
++            && file->d_name[fname_len-1] != '#'
++            && file->d_name[fname_len-1] != '~') {
++            if (asprintf(&tmpstr, "%s/%s", dirname, file->d_name) < 0)
++                continue;
++            dir2 = opendir(tmpstr);
++            if (dir2) {
++                /* file is a directory, don't read it */
++                closedir(dir2);
++            } else {
++                if (filename_count >= array_size) {
++                    char **new_filenames;
++
++                    array_size = (array_size + 16) * 2;
++                    new_filenames = realloc(filenames,
++                                        array_size * sizeof(filenames[0]));
++                    if (!new_filenames) {
++                        free(tmpstr);
++                        for (i = 0; i < filename_count; i++)
++                            free(filenames[i]);
++                        free(filenames);
++                        closedir(dir);
++                        return -1;
++                    }
++                    filenames = new_filenames;
++                }
++                filenames[filename_count++] = tmpstr;
++                tmpstr = NULL;
++            }
++            free(tmpstr);
++        }
++    }
++    closedir(dir);
++
++    qsort(filenames, filename_count, sizeof(filenames[0]), elemcmp);
++    *result = filenames;
++
++    return filename_count;
++}
++
+ /* For Win32 platforms, the directory does not maintain a last modification
+  * date that we can compare with the modification date of the .index file.
+  * Therefore there is no way to know whether any .index file is valid.
+@@ -4904,12 +4977,11 @@ int
+ add_mibdir(const char *dirname)
+ {
+     FILE           *ip;
+-    DIR            *dir, *dir2;
+     const char     *oldFile = File;
+-    struct dirent  *file;
++    char          **filenames;
+     char            tmpstr[300];
+     int             count = 0;
+-    int             fname_len = 0;
++    int             filename_count, i;
+ #if !(defined(WIN32) || defined(cygwin))
+     char           *token;
+     char space;
+@@ -4957,36 +5029,15 @@ add_mibdir(const char *dirname)
+         DEBUGMSGTL(("parse-mibs", "No index\n"));
+ #endif
+ 
+-    if ((dir = opendir(dirname))) {
+-        ip = netsnmp_mibindex_new( dirname );
+-        while ((file = readdir(dir))) {
+-            /*
+-             * Only parse file names that don't begin with a '.' 
+-             * Also skip files ending in '~', or starting/ending
+-             * with '#' which are typically editor backup files.
+-             */
+-            if (file->d_name != NULL) {
+-              fname_len = strlen( file->d_name );
+-              if (fname_len > 0 && file->d_name[0] != '.' 
+-                                && file->d_name[0] != '#'
+-                                && file->d_name[fname_len-1] != '#'
+-                                && file->d_name[fname_len-1] != '~') {
+-                snprintf(tmpstr, sizeof(tmpstr), "%s/%s", dirname, file->d_name);
+-                tmpstr[ sizeof(tmpstr)-1 ] = 0;
+-                if ((dir2 = opendir(tmpstr))) {
+-                    /*
+-                     * file is a directory, don't read it 
+-                     */
+-                    closedir(dir2);
+-                } else {
+-                    if ( !add_mibfile( tmpstr, file->d_name, ip ))
+-                        count++;
+-                }
+-              }
+-            }
++    filename_count = scan_directory(&filenames, dirname);
++
++    if (filename_count >= 0) {
++        ip = netsnmp_mibindex_new(dirname);
++        for (i = 0; i < filename_count; i++) {
++            if (add_mibfile(filenames[i], strrchr(filenames[i], '/'), ip) == 0)
++                count++;
+         }
+         File = oldFile;
+-        closedir(dir);
+         if (ip)
+             fclose(ip);
+         return (count);
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0002.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0002.patch
new file mode 100644
index 0000000..e54a8b4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0002.patch
@@ -0,0 +1,44 @@
+From 50118392c58c8d9554580373c0dbc542336b58a9 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 16 May 2019 13:49:05 +0200
+Subject: [PATCH 2/5] libsnmp: Fix two recently introduced issues in the MIB
+ parsing code
+
+Ensure that the first argument passed to qsort() is not NULL. Free the memory
+that holds the directory contents.
+
+Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order")
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/9cfb38b0aa95363da1466ca81dd929989ba27c1f]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ snmplib/parse.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 51d119b..200ba25 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -4961,7 +4961,8 @@ static int scan_directory(char ***result, const char *dirname)
+     }
+     closedir(dir);
+ 
+-    qsort(filenames, filename_count, sizeof(filenames[0]), elemcmp);
++    if (filenames)
++        qsort(filenames, filename_count, sizeof(filenames[0]), elemcmp);
+     *result = filenames;
+ 
+     return filename_count;
+@@ -5040,6 +5041,7 @@ add_mibdir(const char *dirname)
+         File = oldFile;
+         if (ip)
+             fclose(ip);
++        free(filenames);
+         return (count);
+     }
+     else
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch
new file mode 100644
index 0000000..03acbba
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0003.patch
@@ -0,0 +1,40 @@
+From c98808036c86a4ac4877ea13dbcef096b57e49f8 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 22 May 2019 10:08:53 +0200
+Subject: [PATCH 3/5] libsnmp: Fix a compiler warning
+
+Avoid that the compiler complains on Windows systems that tmpstr[] is not used.
+
+Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order")
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/114e4c2cec2601ca56e8afb1f441520f75a9a312]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ snmplib/parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 200ba25..0414337 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -4980,7 +4980,6 @@ add_mibdir(const char *dirname)
+     FILE           *ip;
+     const char     *oldFile = File;
+     char          **filenames;
+-    char            tmpstr[300];
+     int             count = 0;
+     int             filename_count, i;
+ #if !(defined(WIN32) || defined(cygwin))
+@@ -4988,6 +4987,7 @@ add_mibdir(const char *dirname)
+     char space;
+     char newline;
+     struct stat     dir_stat, idx_stat;
++    char            tmpstr[300];
+     char            tmpstr1[300];
+ #endif
+ 
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0004.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0004.patch
new file mode 100644
index 0000000..f0e7096
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0004.patch
@@ -0,0 +1,33 @@
+From 545742d1867d70a645a63161ede4a391456691fc Mon Sep 17 00:00:00 2001
+From: Bill Fenner <fenner@gmail.com>
+Date: Mon, 3 Jun 2019 10:01:08 -0700
+Subject: [PATCH 4/5] libsnmp: free filenames from directory listing
+
+Free each filename as we use it, as well as freeing the
+list of filenames.
+
+Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order")
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/2968b455e6f182f329746e2bca1043f368618c73]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ snmplib/parse.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 0414337..7f98542 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -5037,6 +5037,7 @@ add_mibdir(const char *dirname)
+         for (i = 0; i < filename_count; i++) {
+             if (add_mibfile(filenames[i], strrchr(filenames[i], '/'), ip) == 0)
+                 count++;
++	    free(filenames[i]);
+         }
+         File = oldFile;
+         if (ip)
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0005.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0005.patch
new file mode 100644
index 0000000..66a16f6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15861-0005.patch
@@ -0,0 +1,349 @@
+From 83d6c5181828921b3731878588b3728de704d490 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 22 May 2019 09:56:21 +0200
+Subject: [PATCH 5/5] CHANGES: snmpd: Stop reading and writing the
+ mib_indexes/* files
+
+Caching directory contents is something the operating system should do
+and is not something Net-SNMP should do. Instead of storing a copy of
+the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
+MIB directory.
+
+CVE: CVE-2020-15861
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/4fd9a450444a434a993bc72f7c3486ccce41f602]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ .gitignore                       |   1 -
+ include/net-snmp/library/mib.h   |   3 -
+ include/net-snmp/library/parse.h |   2 +-
+ snmplib/mib.c                    | 148 +------------------------------
+ snmplib/parse.c                  |  57 +-----------
+ 5 files changed, 4 insertions(+), 207 deletions(-)
+
+diff --git a/.gitignore b/.gitignore
+index 2d37bc6..94da568 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -75,7 +75,6 @@ Makefile
+ man/*.[1358]
+ man/default_store.3.h
+ man/manaliases
+-mibs/.index
+ mk/
+ module_tmp_header.h
+ net-snmp-5*
+diff --git a/include/net-snmp/library/mib.h b/include/net-snmp/library/mib.h
+index ab36853..3e81634 100644
+--- a/include/net-snmp/library/mib.h
++++ b/include/net-snmp/library/mib.h
+@@ -124,9 +124,6 @@ SOFTWARE.
+     NETSNMP_IMPORT
+     char            *netsnmp_get_mib_directory(void);
+     void            netsnmp_fixup_mib_directory(void);
+-    void            netsnmp_mibindex_load( void );
+-    char *          netsnmp_mibindex_lookup( const char * );
+-    FILE *          netsnmp_mibindex_new( const char * );
+     int             sprint_realloc_description(u_char ** buf, size_t * buf_len,
+                                 size_t * out_len, int allow_realloc,
+                                 oid * objid, size_t objidlen, int width);
+diff --git a/include/net-snmp/library/parse.h b/include/net-snmp/library/parse.h
+index ce46ab9..7c33d3f 100644
+--- a/include/net-snmp/library/parse.h
++++ b/include/net-snmp/library/parse.h
+@@ -201,7 +201,7 @@ SOFTWARE.
+ #endif
+     void            netsnmp_init_mib_internals(void);
+     void            unload_all_mibs(void);
+-    int             add_mibfile(const char*, const char*, FILE *);
++    int             add_mibfile(const char*, const char*);
+     int             which_module(const char *);
+     NETSNMP_IMPORT
+     char           *module_name(int, char *);
+diff --git a/snmplib/mib.c b/snmplib/mib.c
+index 1c875c0..30d6cde 100644
+--- a/snmplib/mib.c
++++ b/snmplib/mib.c
+@@ -2717,7 +2717,6 @@ netsnmp_init_mib(void)
+     env_var = strdup(netsnmp_get_mib_directory());
+     if (!env_var)
+         return;
+-    netsnmp_mibindex_load();
+ 
+     DEBUGMSGTL(("init_mib",
+                 "Seen MIBDIRS: Looking in '%s' for mib dirs ...\n",
+@@ -2737,7 +2736,7 @@ netsnmp_init_mib(void)
+         else
+             entry = strtok_r(env_var, ENV_SEPARATOR, &st);
+         while (entry) {
+-            add_mibfile(entry, NULL, NULL);
++            add_mibfile(entry, NULL);
+             entry = strtok_r(NULL, ENV_SEPARATOR, &st);
+         }
+     }
+@@ -2888,142 +2887,6 @@ init_mib(void)
+ #endif
+ 
+ 
+-/*
+- * Handle MIB indexes centrally
+- */
+-static int _mibindex     = 0;   /* Last index in use */
+-static int _mibindex_max = 0;   /* Size of index array */
+-char     **_mibindexes   = NULL;
+-
+-int _mibindex_add( const char *dirname, int i );
+-void
+-netsnmp_mibindex_load( void )
+-{
+-    DIR *dir;
+-    struct dirent *file;
+-    FILE *fp;
+-    char tmpbuf[ 300];
+-    char tmpbuf2[300];
+-    int  i;
+-    char *cp;
+-
+-    /*
+-     * Open the MIB index directory, or create it (empty)
+-     */
+-    snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes",
+-              get_persistent_directory());
+-    tmpbuf[sizeof(tmpbuf)-1] = 0;
+-    dir = opendir( tmpbuf );
+-    if ( dir == NULL ) {
+-        DEBUGMSGTL(("mibindex", "load: (new)\n"));
+-        mkdirhier( tmpbuf, NETSNMP_AGENT_DIRECTORY_MODE, 0);
+-        return;
+-    }
+-
+-    /*
+-     * Create a list of which directory each file refers to
+-     */
+-    while ((file = readdir( dir ))) {
+-        if ( !isdigit((unsigned char)(file->d_name[0])))
+-            continue;
+-        i = atoi( file->d_name );
+-
+-        snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d",
+-              get_persistent_directory(), i );
+-        tmpbuf[sizeof(tmpbuf)-1] = 0;
+-        fp = fopen( tmpbuf, "r" );
+-        if (!fp)
+-            continue;
+-        cp = fgets( tmpbuf2, sizeof(tmpbuf2), fp );
+-        fclose( fp );
+-        if ( !cp ) {
+-            DEBUGMSGTL(("mibindex", "Empty MIB index (%d)\n", i));
+-            continue;
+-        }
+-        if ( strncmp( tmpbuf2, "DIR ", 4 ) != 0 ) {
+-            DEBUGMSGTL(("mibindex", "Malformed MIB index (%d)\n", i));
+-            continue;
+-        }
+-        tmpbuf2[strlen(tmpbuf2)-1] = 0;
+-        DEBUGMSGTL(("mibindex", "load: (%d) %s\n", i, tmpbuf2));
+-        (void)_mibindex_add( tmpbuf2+4, i );  /* Skip 'DIR ' */
+-    }
+-    closedir( dir );
+-}
+-
+-char *
+-netsnmp_mibindex_lookup( const char *dirname )
+-{
+-    int i;
+-    static char tmpbuf[300];
+-
+-    for (i=0; i<_mibindex; i++) {
+-        if ( _mibindexes[i] &&
+-             strcmp( _mibindexes[i], dirname ) == 0) {
+-             snprintf(tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d",
+-                      get_persistent_directory(), i);
+-             tmpbuf[sizeof(tmpbuf)-1] = 0;
+-             DEBUGMSGTL(("mibindex", "lookup: %s (%d) %s\n", dirname, i, tmpbuf ));
+-             return tmpbuf;
+-        }
+-    }
+-    DEBUGMSGTL(("mibindex", "lookup: (none)\n"));
+-    return NULL;
+-}
+-
+-int
+-_mibindex_add( const char *dirname, int i )
+-{
+-    const int old_mibindex_max = _mibindex_max;
+-
+-    DEBUGMSGTL(("mibindex", "add: %s (%d)\n", dirname, i ));
+-    if ( i == -1 )
+-        i = _mibindex++;
+-    if ( i >= _mibindex_max ) {
+-        /*
+-         * If the index array is full (or non-existent)
+-         *   then expand (or create) it
+-         */
+-        _mibindex_max = i + 10;
+-        _mibindexes = realloc(_mibindexes,
+-                              _mibindex_max * sizeof(_mibindexes[0]));
+-        netsnmp_assert(_mibindexes);
+-        memset(_mibindexes + old_mibindex_max, 0,
+-               (_mibindex_max - old_mibindex_max) * sizeof(_mibindexes[0]));
+-    }
+-
+-    _mibindexes[ i ] = strdup( dirname );
+-    if ( i >= _mibindex )
+-        _mibindex = i+1;
+-
+-    DEBUGMSGTL(("mibindex", "add: %d/%d/%d\n", i, _mibindex, _mibindex_max ));
+-    return i;
+-}
+-    
+-FILE *
+-netsnmp_mibindex_new( const char *dirname )
+-{
+-    FILE *fp;
+-    char  tmpbuf[300];
+-    char *cp;
+-    int   i;
+-
+-    cp = netsnmp_mibindex_lookup( dirname );
+-    if (!cp) {
+-        i  = _mibindex_add( dirname, -1 );
+-        snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d",
+-                  get_persistent_directory(), i );
+-        tmpbuf[sizeof(tmpbuf)-1] = 0;
+-        cp = tmpbuf;
+-    }
+-    DEBUGMSGTL(("mibindex", "new: %s (%s)\n", dirname, cp ));
+-    fp = fopen( cp, "w" );
+-    if (fp)
+-        fprintf( fp, "DIR %s\n", dirname );
+-    return fp;
+-}
+-
+-
+ /**
+  * Unloads all mibs.
+  */
+@@ -3038,15 +2901,6 @@ shutdown_mib(void)
+     }
+     tree_head = NULL;
+     Mib = NULL;
+-    if (_mibindexes) {
+-        int i;
+-        for (i = 0; i < _mibindex; ++i)
+-            SNMP_FREE(_mibindexes[i]);
+-        free(_mibindexes);
+-        _mibindex = 0;
+-        _mibindex_max = 0;
+-        _mibindexes = NULL;
+-    }
+     if (Prefix != NULL && Prefix != &Standard_Prefix[0])
+         SNMP_FREE(Prefix);
+     if (Prefix)
+diff --git a/snmplib/parse.c b/snmplib/parse.c
+index 7f98542..58d777e 100644
+--- a/snmplib/parse.c
++++ b/snmplib/parse.c
+@@ -607,8 +607,6 @@ static int     read_module_replacements(const char *);
+ static int     read_import_replacements(const char *,
+                                          struct module_import *);
+ 
+-static void     new_module(const char *, const char *);
+-
+ static struct node *merge_parse_objectid(struct node *, FILE *, char *);
+ static struct index_list *getIndexes(FILE * fp, struct index_list **);
+ static struct varbind_list *getVarbinds(FILE * fp, struct varbind_list **);
+@@ -4859,7 +4857,7 @@ snmp_get_token(FILE * fp, char *token, int maxtlen)
+ #endif /* NETSNMP_FEATURE_REMOVE_PARSE_GET_TOKEN */
+ 
+ int
+-add_mibfile(const char* tmpstr, const char* d_name, FILE *ip )
++add_mibfile(const char* tmpstr, const char* d_name)
+ {
+     FILE           *fp;
+     char            token[MAXTOKEN], token2[MAXTOKEN];
+@@ -4884,8 +4882,6 @@ add_mibfile(const char* tmpstr, const char* d_name, FILE *ip )
+      */
+     if (get_token(fp, token2, MAXTOKEN) == DEFINITIONS) {
+         new_module(token, tmpstr);
+-        if (ip)
+-            fprintf(ip, "%s %s\n", token, d_name);
+         fclose(fp);
+         return 0;
+     } else {
+@@ -4977,71 +4973,22 @@ static int scan_directory(char ***result, const char *dirname)
+ int
+ add_mibdir(const char *dirname)
+ {
+-    FILE           *ip;
+     const char     *oldFile = File;
+     char          **filenames;
+     int             count = 0;
+     int             filename_count, i;
+-#if !(defined(WIN32) || defined(cygwin))
+-    char           *token;
+-    char space;
+-    char newline;
+-    struct stat     dir_stat, idx_stat;
+-    char            tmpstr[300];
+-    char            tmpstr1[300];
+-#endif
+ 
+     DEBUGMSGTL(("parse-mibs", "Scanning directory %s\n", dirname));
+-#if !(defined(WIN32) || defined(cygwin))
+-    token = netsnmp_mibindex_lookup( dirname );
+-    if (token && stat(token, &idx_stat) == 0 && stat(dirname, &dir_stat) == 0) {
+-        if (dir_stat.st_mtime < idx_stat.st_mtime) {
+-            DEBUGMSGTL(("parse-mibs", "The index is good\n"));
+-            if ((ip = fopen(token, "r")) != NULL) {
+-                fgets(tmpstr, sizeof(tmpstr), ip); /* Skip dir line */
+-                while (fscanf(ip, "%127s%c%299[^\n]%c", token, &space, tmpstr,
+-		    &newline) == 4) {
+-
+-		    /*
+-		     * If an overflow of the token or tmpstr buffers has been
+-		     * found log a message and break out of the while loop,
+-		     * thus the rest of the file tokens will be ignored.
+-		     */
+-		    if (space != ' ' || newline != '\n') {
+-			snmp_log(LOG_ERR,
+-			    "add_mibdir: strings scanned in from %s/%s " \
+-			    "are too large.  count = %d\n ", dirname,
+-			    ".index", count);
+-			    break;
+-		    }
+-		   
+-		    snprintf(tmpstr1, sizeof(tmpstr1), "%s/%s", dirname, tmpstr);
+-                    tmpstr1[ sizeof(tmpstr1)-1 ] = 0;
+-                    new_module(token, tmpstr1);
+-                    count++;
+-                }
+-                fclose(ip);
+-                return count;
+-            } else
+-                DEBUGMSGTL(("parse-mibs", "Can't read index\n"));
+-        } else
+-            DEBUGMSGTL(("parse-mibs", "Index outdated\n"));
+-    } else
+-        DEBUGMSGTL(("parse-mibs", "No index\n"));
+-#endif
+ 
+     filename_count = scan_directory(&filenames, dirname);
+ 
+     if (filename_count >= 0) {
+-        ip = netsnmp_mibindex_new(dirname);
+         for (i = 0; i < filename_count; i++) {
+-            if (add_mibfile(filenames[i], strrchr(filenames[i], '/'), ip) == 0)
++            if (add_mibfile(filenames[i], strrchr(filenames[i], '/')) == 0)
+                 count++;
+ 	    free(filenames[i]);
+         }
+         File = oldFile;
+-        if (ip)
+-            fclose(ip);
+         free(filenames);
+         return (count);
+     }
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15862.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15862.patch
new file mode 100644
index 0000000..419a0c2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2020-15862.patch
@@ -0,0 +1,87 @@
+From de36cf1ecbb13a9541ec5d43ce20ab5030861837 Mon Sep 17 00:00:00 2001
+From: Wes Hardaker <opensource@hardakers.net>
+Date: Thu, 23 Jul 2020 16:17:27 -0700
+Subject: [PATCH 1/1] make the extend mib read-only by default
+
+CVE: CVE-2020-15862
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/77f6c60f57dba0aaea5d8ef1dd94bcd0c8e6d205]
+
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ agent/mibgroup/agent/extend.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/agent/mibgroup/agent/extend.c b/agent/mibgroup/agent/extend.c
+index 5f8cedc..38a6c50 100644
+--- a/agent/mibgroup/agent/extend.c
++++ b/agent/mibgroup/agent/extend.c
+@@ -16,6 +16,12 @@
+ #define SHELLCOMMAND 3
+ #endif
+ 
++/*  This mib is potentially dangerous to turn on by default, since it
++ *  allows arbitrary commands to be set by anyone with SNMP WRITE
++ *  access to the MIB table.  If all of your users are "root" level
++ *  users, then it may be safe to turn on. */
++#define ENABLE_EXTEND_WRITE_ACCESS 0
++
+ netsnmp_feature_require(extract_table_row_data)
+ netsnmp_feature_require(table_data_delete_table)
+ #ifndef NETSNMP_NO_WRITE_SUPPORT
+@@ -742,7 +748,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler          *handler,
+          *
+          **********/
+ 
+-#ifndef NETSNMP_NO_WRITE_SUPPORT
++#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS
+         case MODE_SET_RESERVE1:
+             /*
+              * Validate the new assignments
+@@ -1068,7 +1074,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler          *handler,
+                 }
+             }
+             break;
+-#endif /* !NETSNMP_NO_WRITE_SUPPORT */ 
++#endif /* !NETSNMP_NO_WRITE_SUPPORT and ENABLE_EXTEND_WRITE_ACCESS */
+ 
+         default:
+             netsnmp_set_request_error(reqinfo, request, SNMP_ERR_GENERR);
+@@ -1076,7 +1082,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler          *handler,
+         }
+     }
+ 
+-#ifndef NETSNMP_NO_WRITE_SUPPORT
++#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS
+     /*
+      * If we're marking a given row as active,
+      *  then we need to check that it's ready.
+@@ -1101,7 +1107,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler          *handler,
+             }
+         }
+     }
+-#endif /* !NETSNMP_NO_WRITE_SUPPORT */
++#endif /* !NETSNMP_NO_WRITE_SUPPORT && ENABLE_EXTEND_WRITE_ACCESS */
+     
+     return SNMP_ERR_NOERROR;
+ }
+@@ -1590,7 +1596,7 @@ fixExec2Error(int action,
+     idx = name[name_len-1] -1;
+     exten = &compatability_entries[ idx ];
+ 
+-#ifndef NETSNMP_NO_WRITE_SUPPORT
++#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS
+     switch (action) {
+     case MODE_SET_RESERVE1:
+         if (var_val_type != ASN_INTEGER) {
+@@ -1611,7 +1617,7 @@ fixExec2Error(int action,
+     case MODE_SET_COMMIT:
+         netsnmp_cache_check_and_reload( exten->efix_entry->cache );
+     }
+-#endif /* !NETSNMP_NO_WRITE_SUPPORT */
++#endif /* !NETSNMP_NO_WRITE_SUPPORT && ENABLE_EXTEND_WRITE_ACCESS */
+     return SNMP_ERR_NOERROR;
+ }
+ #endif /* USING_UCD_SNMP_EXTENSIBLE_MODULE */
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
new file mode 100644
index 0000000..fc3ac2a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
@@ -0,0 +1,34 @@
+From 0becb4843a40910d5ec9aa11969d4905a22037cf Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Fri, 16 Jan 2015 14:14:01 +0800
+Subject: [PATCH] net-snmp: fix "libtool --finish"
+
+LIB_LDCONFIG_CMD failed since it is using a host dir $(libdir)
+which is /usr/lib64 does not exist on host when compile 64bit
+image.
+
+In fact, configuring dynamic linker run-time bindings is meaningless
+at this step,  If it is needed, Poky would write ldconfig scripts to
+rpm-postinst for each recipe while do_package, in package.bbclass.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ Makefile.top | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.top b/Makefile.top
+index 5d4f9bc..d0ed31c 100644
+--- a/Makefile.top
++++ b/Makefile.top
+@@ -89,7 +89,7 @@ LIBREVISION = 0
+ LIB_LD_CMD      = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+ LIB_EXTENSION   = la
+ LIB_VERSION     =
+-LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
++LIB_LDCONFIG_CMD = echo "do not ldconfig\n"
+ LINK		= $(LIBTOOL) --mode=link $(LINKCC)
+ # RANLIB 	= @RANLIB@
+ RANLIB		= :
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
new file mode 100644
index 0000000..5cbb60d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
@@ -0,0 +1,43 @@
+From d619cd9fc01f336ff0ff55b18f9112789eb4d84c Mon Sep 17 00:00:00 2001
+From: Marian Florea <marian.florea@windriver.com>
+Date: Thu, 20 Jul 2017 16:55:24 +0800
+Subject: [PATCH] net snmp: fix engineBoots value on SIGHUP
+
+Upstream-Status: Pending
+
+Signed-off-by: Marian Florea <marian.florea@windriver.com>
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+
+---
+ agent/snmpd.c    | 1 +
+ snmplib/snmpv3.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/agent/snmpd.c b/agent/snmpd.c
+index 6566354..eb0d4b4 100644
+--- a/agent/snmpd.c
++++ b/agent/snmpd.c
+@@ -1239,6 +1239,7 @@ receive(void)
+ 	    snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
+ 		     netsnmp_get_version());
+             update_config();
++            snmp_store(app_name);
+             send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
+ #if HAVE_SIGHOLD
+             sigrelse(SIGHUP);
+diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
+index 771ba3b..5de05e7 100644
+--- a/snmplib/snmpv3.c
++++ b/snmplib/snmpv3.c
+@@ -1060,9 +1060,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg,
+     /*
+      * if our engineID has changed at all, the boots record must be set to 1 
+      */
+-    if (engineIDLen != oldEngineIDLength ||
++    if (oldEngineIDLength != (size_t)0 && (engineIDLen != oldEngineIDLength ||
+         oldEngineID == NULL || c_engineID == NULL ||
+-        memcmp(oldEngineID, c_engineID, engineIDLen) != 0) {
++        memcmp(oldEngineID, c_engineID, engineIDLen) != 0)) {
+         engineBoots = 1;
+     }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
new file mode 100644
index 0000000..fb773e6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
@@ -0,0 +1,38 @@
+From a1134a31d417cc05a1fdb094f613a00a7a5e7ac5 Mon Sep 17 00:00:00 2001
+From: Chong Lu <Chong.Lu@windriver.com>
+Date: Thu, 28 May 2020 09:46:34 -0500
+Subject: [PATCH] net-snmp: add knob whether nlist.h are checked
+
+Previously, it still was checked when there was no nlish.h in sysroots directory.
+Add knob to decide whether nlist.h are checked or not.
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.d/config_os_headers | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index 2fdb5a35d6..af997461d5 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -32,6 +32,7 @@ AC_CHECK_HEADERS([getopt.h   pthread.h  regex.h      ] dnl
+                  [sys/un.h           ])
+ 
+ #  Library and Agent:
++if test "x$with_elf" != "xno"; then
+ AC_CHECK_HEADERS([nlist.h],,,[
+ AC_INCLUDES_DEFAULT
+ [
+@@ -39,6 +40,7 @@ AC_INCLUDES_DEFAULT
+ #define LIBBSD_DISABLE_DEPRECATED 1
+ #endif
+ ]])
++fi
+ 
+ #  Library:
+ AC_CHECK_HEADERS([fcntl.h    io.h       kstat.h                 ] dnl
+-- 
+2.26.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch
new file mode 100644
index 0000000..4cd8fd1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch
@@ -0,0 +1,30 @@
+From 068952c0e0cdda5a91250b91c5fcc9b85b43daab Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 22 Jun 2017 10:25:08 +0800
+Subject: [PATCH] net-snmp: fix for --disable-des
+
+Include des.h only if it's found in openssl so that
+the --disable-des works correctly.
+
+Upstream-Status: Submitted [net-snmp-coders@lists.sourceforge.net]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ snmplib/scapi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/snmplib/scapi.c b/snmplib/scapi.c
+index 8ad1d70..43caddf 100644
+--- a/snmplib/scapi.c
++++ b/snmplib/scapi.c
+@@ -84,7 +84,9 @@ netsnmp_feature_child_of(usm_scapi, usm_support)
+ #include <openssl/hmac.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
++#ifdef HAVE_OPENSSL_DES_H
+ #include <openssl/des.h>
++#endif
+ #ifdef HAVE_AES
+ #include <openssl/aes.h>
+ #endif
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
new file mode 100644
index 0000000..7cbaf0b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
@@ -0,0 +1,35 @@
+From 827fe3b0253aab33472828f40ad05934cc0261b8 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 14 Jan 2015 15:10:06 +0800
+Subject: [PATCH] testing: add the output format for ptest
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ testing/RUNTESTS | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/testing/RUNTESTS b/testing/RUNTESTS
+index 6715831..a2b6fb8 100755
+--- a/testing/RUNTESTS
++++ b/testing/RUNTESTS
+@@ -17,13 +17,17 @@ failed_count=0
+ rm -f failed_tests
+ for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
+     echo "RUNNING $i"
++    test_name=`basename $i`
+     ${srcdir}/testing/fulltests/support/simple_run $i
+     if [ $? = 0 ]; then
++        echo "PASS: $test_name"
+         success_count=`expr $success_count + 1`
+     else
++        echo "FAIL: $test_name"
+         failed_count=`expr $failed_count + 1`
+         echo "$i" >> failed_tests
+     fi
++    echo
+ done
+ 
+ if [ -f failed_tests ]; then
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-accept-configure-options-from-env.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-accept-configure-options-from-env.patch
new file mode 100644
index 0000000..b0dbf5a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-accept-configure-options-from-env.patch
@@ -0,0 +1,15 @@
+Reproducible build: To avoid build host paths being written into binaries,
+accept NETSNMP_CONFIGURE_OPTIONS from the environment.
+NETSNMP_CONFIGURE_OPTIONS can be set either null or to a fixed value.
+
+--- net-snmp-5.8.original/configure.ac	2018-11-20 17:41:39.926529072 +1300
++++ net-snmp-5.8/configure.ac	2018-11-20 17:54:44.488180224 +1300
+@@ -28,7 +28,7 @@
+ #
+ # save the configure arguments
+ #
+-AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"$ac_configure_args",
++AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}",
+   [configure options specified])
+ CONFIGURE_OPTIONS="\"$ac_configure_args\""
+ AC_SUBST(CONFIGURE_OPTIONS)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-have-printcap.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-have-printcap.patch
new file mode 100644
index 0000000..4316c7a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-have-printcap.patch
@@ -0,0 +1,19 @@
+Reproducible build: Don't check for /etc/printcap on the build machine when
+cross-compiling. Use AC_CHECK_FILE to set the cached variable
+ac_cv_file__etc_printcap instead. When cross-compiling, this variable should be
+set in the environment to "yes" or "no" as appropriate for the target platform.
+
+--- net-snmp-5.8.original/configure.d/config_os_misc4	2018-11-20 17:05:03.986274522 +1300
++++ net-snmp-5.8/configure.d/config_os_misc4	2018-11-20 17:08:32.250700448 +1300
+@@ -116,9 +116,9 @@
+ 	[Path to the lpstat command])
+     AC_DEFINE(HAVE_LPSTAT, 1, [Set if the lpstat command is available])
+ fi
+-if test -r /etc/printcap; then
++AC_CHECK_FILE([/etc/printcap],
+     AC_DEFINE(HAVE_PRINTCAP, 1, [Set if /etc/printcap exists])
+-fi
++)
+ 
+ 
+ #       Check ps args
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
new file mode 100755
index 0000000..76514c2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+workdir=$(dirname `realpath $0`)
+cd ${workdir}/testing
+./RUNTESTS
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service
new file mode 100644
index 0000000..447683f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmpd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-Ls0-6d"
+EnvironmentFile=-/etc/default/snmpd
+ExecStart=/usr/sbin/snmpd $OPTIONS -a -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service
new file mode 100644
index 0000000..951f9f2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/snmptrapd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Trap Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-Lsd"
+EnvironmentFile=-/etc/default/snmptrapd
+ExecStart=/usr/sbin/snmptrapd $OPTIONS -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch
new file mode 100644
index 0000000..c6af8c0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/systemd-support.patch
@@ -0,0 +1,1652 @@
+From 0cad0c6c36af2a2d589563804c9ed2b37b7085fb Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Fri, 21 Aug 2015 14:37:02 +0900
+Subject: [PATCH] ystemd support backported from the master branch as of
+ 23/04/2012 (post 5.7.1, pre 5.8).
+
+The following commits have been cherry-picked:
+
+19499c3c90bf9d7b2b9e5d08baa26cc6bba28a11
+fef6cddfdb94da1a6b1fb768af62918b80f11fd3
+0641e43c694c485cbbffef0556efc4641bd3ff50
+76530a89f1c8bbd0b63acce63e10d5d4812a1a16 (conflict resolved)
+bf108d7f1354f6276fc43c129963f2c49b9fc242
+3692875172352f72cf3afd0d35f355e83d7e421b
+74412748067c685e1d8ab6ed3bcc3ca9c2774844
+86132e3f1e6ef7b4e0b96d8fa24e37c81b71b0e0
+63557cf8986a33dba1d4429b583a901361052c4f
+
+Upstream-Status: Backport
+
+Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com>
+---
+ README.systemd                             |  41 +++
+ agent/snmpd.c                              |  33 +-
+ apps/snmptrapd.c                           |  32 +-
+ configure.d/config_modules_lib             |   8 +
+ configure.d/config_project_with_enable     |   9 +
+ dist/snmpd.servic                          |  18 +
+ dist/snmpd.socket                          |  17 +
+ dist/snmptrapd.service                     |  16 +
+ dist/snmptrapd.socket                      |  14 +
+ include/net-snmp/library/sd-daemon.h       | 290 ++++++++++++++++
+ snmplib/sd-daemon.c                        | 532 +++++++++++++++++++++++++++++
+ snmplib/transports/snmpTCPDomain.c         |  43 ++-
+ snmplib/transports/snmpTCPIPv6Domain.c     |  46 ++-
+ snmplib/transports/snmpUDPIPv4BaseDomain.c |  33 +-
+ snmplib/transports/snmpUDPIPv6Domain.c     |  34 +-
+ snmplib/transports/snmpUnixDomain.c        |  66 ++--
+ win32/libsnmp/Makefile.in                  |   6 +
+ win32/net-snmp/net-snmp-config.h           |   2 +
+ win32/net-snmp/net-snmp-config.h.in        |   2 +
+ 19 files changed, 1176 insertions(+), 66 deletions(-)
+ create mode 100644 README.systemd
+ create mode 100644 dist/snmpd.servic
+ create mode 100644 dist/snmpd.socket
+ create mode 100644 dist/snmptrapd.service
+ create mode 100644 dist/snmptrapd.socket
+ create mode 100644 include/net-snmp/library/sd-daemon.h
+ create mode 100644 snmplib/sd-daemon.c
+
+diff --git a/README.systemd b/README.systemd
+new file mode 100644
+index 0000000..dba15d1
+--- /dev/null
++++ b/README.systemd
+@@ -0,0 +1,41 @@
++README.systemd
++--------------
++Net-SNMP provides two daemons, which support systemd system manager.
++See http://www.freedesktop.org/wiki/Software/systemd to learn how
++systemd works. Both socket activation and notification is supported by these
++daemons.
++
++To enable systemd support, the sources must be compiled with
++--with-systemd configure option.
++
++snmpd - The SNMP agent
++----------------------
++Socket activation od snmpd daemon is implemented, but it's discouraged.
++The reason is simple - snmpd not only listens and processes SNMP requests
++from network, but also gathers system statistics counters, sends traps and
++communicates with subagents. It even opens few netlink sockets.
++
++In other words, snmpd should run from system start to properly work.
++This can be done in two ways:
++1) either as snmpd service unit with 'Type=notification' and without a socket
++   unit
++2) or as snmpd service unit with 'Type=simple', appropriate socket socket unit
++   and the snmpd service enabled. This way systemd creates the snmpd listening
++   socket early during boot and passes the sockets to snmpd slightly later
++   (but still during machine boot). This way systemd can paralelize start of
++   services, which depend on snmpd. Admins must adjust the socket file manually,
++   depending if the snmpd support AgentX, IPv6, SMUX etc.
++
++snmpd should be started with '-f' command line parameter to disable forking -
++systemd does that for us automatically.
++
++
++snmptrapd - The trap processing daemon
++--------------------------------------
++snmptrapd supports full socket activation and also notification (if needed).
++Both 'Type=simple' (with appropriate socket unit) and 'Type=notify' services
++will work. Again, '-f' parameter should be provided on snmptrapd command line.
++
++If integration with SNMP agent using AgentX protocol is enabled, snmptrapd should
++start during boot and not after first SNMP trap arrives. Same rules as for snmpd
++applies then.
+diff --git a/agent/snmpd.c b/agent/snmpd.c
+index cfc7bce..116ee5c 100644
+--- a/agent/snmpd.c
++++ b/agent/snmpd.c
+@@ -164,6 +164,10 @@ typedef long    fd_mask;
+ 
+ #endif
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ netsnmp_feature_want(logging_file)
+ netsnmp_feature_want(logging_stdio)
+ netsnmp_feature_want(logging_syslog)
+@@ -443,19 +447,29 @@ main(int argc, char *argv[])
+     int             agent_mode = -1;
+     char           *pid_file = NULL;
+     char            option_compatability[] = "-Le";
++#ifndef WIN32
++    int             prepared_sockets = 0;
++#endif
+ #if HAVE_GETPID
+     int fd;
+     FILE           *PID;
+ #endif
+ 
+ #ifndef WIN32
++#ifndef NETSNMP_NO_SYSTEMD
++    /* check if systemd has sockets for us and don't close them */
++    prepared_sockets = netsnmp_sd_listen_fds(0);
++#endif /* NETSNMP_NO_SYSTEMD */
++
+     /*
+      * close all non-standard file descriptors we may have
+      * inherited from the shell.
+      */
+-    for (i = getdtablesize() - 1; i > 2; --i) {
+-        (void) close(i);
+-    }
++    if (!prepared_sockets) {
++        for (i = getdtablesize() - 1; i > 2; --i) {
++            (void) close(i);
++        }    
++}
+ #endif /* #WIN32 */
+     
+     /*
+@@ -1107,6 +1121,19 @@ main(int argc, char *argv[])
+     netsnmp_addrcache_initialise();
+ 
+     /*
++     * Let systemd know we're up.
++     */
++#ifndef NETSNMP_NO_SYSTEMD
++    netsnmp_sd_notify(1, "READY=1\n");
++    if (prepared_sockets)
++        /*
++         * Clear the environment variable, we already processed all the sockets
++         * by now.
++         */
++        netsnmp_sd_listen_fds(1);
++#endif
++
++    /*
+      * Forever monitor the dest_port for incoming PDUs.  
+      */
+     DEBUGMSGTL(("snmpd/main", "We're up.  Starting to process data.\n"));
+diff --git a/apps/snmptrapd.c b/apps/snmptrapd.c
+index bce0d47..c6a74ec 100644
+--- a/apps/snmptrapd.c
++++ b/apps/snmptrapd.c
+@@ -125,6 +125,10 @@ SOFTWARE.
+ 
+ #include <net-snmp/net-snmp-features.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #ifndef BSD4_3
+ #define BSD4_2
+ #endif
+@@ -657,16 +661,25 @@ main(int argc, char *argv[])
+     int             agentx_subagent = 1;
+ #endif
+     netsnmp_trapd_handler *traph;
++#ifndef WIN32
++    int             prepared_sockets = 0;
++#endif
+ 
+ 
+ #ifndef WIN32
++#ifndef NETSNMP_NO_SYSTEMD
++    /* check if systemd has sockets for us and don't close them */
++    prepared_sockets = netsnmp_sd_listen_fds(0);
++#endif
+     /*
+      * close all non-standard file descriptors we may have
+      * inherited from the shell.
+      */
+-    for (i = getdtablesize() - 1; i > 2; --i) {
+-        (void) close(i);
+-    }
++    if (!prepared_sockets) {
++        for (i = getdtablesize() - 1; i > 2; --i) {
++            (void) close(i);
++        }    
++}
+ #endif /* #WIN32 */
+     
+ #ifdef SIGTERM
+@@ -1318,6 +1331,19 @@ main(int argc, char *argv[])
+ #endif
+ #endif
+ 
++    /*
++     * Let systemd know we're up.
++     */
++#ifndef NETSNMP_NO_SYSTEMD
++    netsnmp_sd_notify(1, "READY=1\n");
++    if (prepared_sockets)
++        /*
++         * Clear the environment variable, we already processed all the sockets
++         * by now.
++         */
++        netsnmp_sd_listen_fds(1);
++#endif
++
+ #ifdef WIN32SERVICE
+     trapd_status = SNMPTRAPD_RUNNING;
+ #endif
+diff --git a/configure.d/config_modules_lib b/configure.d/config_modules_lib
+index 362ba0a..bb69daa 100644
+--- a/configure.d/config_modules_lib
++++ b/configure.d/config_modules_lib
+@@ -53,6 +53,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"
+   other_ftobjs_list="$other_ftobjs_list winpipe.ft"
+ fi
+ 
++# Linux systemd
++if test "x$with_systemd" == "xyes"; then
++  other_src_list="$other_src_list sd-daemon.c"
++  other_objs_list="$other_objs_list sd-daemon.o"
++  other_lobjs_list="$other_lobjs_list sd-daemon.lo"
++  other_ftobjs_list="$other_ftobjs_list sd-daemon.ft"
++fi
++
+ AC_SUBST(other_src_list)
+ AC_SUBST(other_objs_list)
+ AC_SUBST(other_lobjs_list)
+diff --git a/configure.d/config_project_with_enable b/configure.d/config_project_with_enable
+index 61ba026..d782d12 100644
+--- a/configure.d/config_project_with_enable
++++ b/configure.d/config_project_with_enable
+@@ -690,6 +690,15 @@ if test "x$with_dummy_values" != "xyes"; then
+      data for])
+ fi
+ 
++NETSNMP_ARG_WITH(systemd,
++[  --with-systemd                 Provide systemd support. See README.systemd
++                                  for details.])
++# Define unless specifically suppressed (i.e., option defaults to false).
++if test "x$with_systemd" != "xyes"; then
++  AC_DEFINE(NETSNMP_NO_SYSTEMD, 1,
++    [If you don't want to integrate with systemd.])
++fi
++
+ NETSNMP_ARG_ENABLE(set-support,
+ [  --disable-set-support           Do not allow SNMP set requests.])
+ if test "x$enable_set_support" = "xno"; then
+diff --git a/dist/snmpd.servic b/dist/snmpd.servic
+new file mode 100644
+index 0000000..31391e5
+--- /dev/null
++++ b/dist/snmpd.servic
+@@ -0,0 +1,18 @@
++#
++# SNMP agent service file for systemd
++#
++#
++# The service should be enabled, i.e. snmpd should start during machine boot.
++# Socket activation shall not be used. See README.systemd for details.
++
++[Unit]
++Description=Simple Network Management Protocol (SNMP) daemon.
++After=syslog.target network.target
++
++[Service]
++# Type=notify is also supported. It should be set when snmpd.socket is not used.
++Type=simple
++ExecStart=/usr/sbin/snmpd -f
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/dist/snmpd.socket b/dist/snmpd.socket
+new file mode 100644
+index 0000000..7f3a2d9
+--- /dev/null
++++ b/dist/snmpd.socket
+@@ -0,0 +1,17 @@
++[Unit]
++Description=Socket listening for SNMP and AgentX messages
++
++[Socket]
++ListenDatagram=0.0.0.0:161
++# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
++# It must match listening addresses/ports defined in snmpd.service
++# or snmpd.conf.
++# ListenStream=0.0.0.0:161
++# ListenDatagram=[::]:161
++# ListenStream=[::]:161
++#
++# Uncomment AgentX socket if snmpd.conf enables AgentX protocol.
++# ListenStream=/var/agentx/master
++
++[Install]
++WantedBy=sockets.target
+diff --git a/dist/snmptrapd.service b/dist/snmptrapd.service
+new file mode 100644
+index 0000000..e88a5b4
+--- /dev/null
++++ b/dist/snmptrapd.service
+@@ -0,0 +1,16 @@
++#
++# SNMP trap-processing service file for systemd
++#
++
++[Unit]
++Description=Simple Network Management Protocol (SNMP) Trap daemon.
++After=syslog.target network.target
++
++[Service]
++# Type=notify is also supported. It should be set when snmptrapd.socket is not
++# used.
++Type=simple
++ExecStart=/usr/sbin/snmptrapd -f
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/dist/snmptrapd.socket b/dist/snmptrapd.socket
+new file mode 100644
+index 0000000..2d24fb8
+--- /dev/null
++++ b/dist/snmptrapd.socket
+@@ -0,0 +1,14 @@
+++[Unit]
+++Description=Socket listening for SNMP trap messages
+++
+++[Socket]
+++ListenDatagram=0.0.0.0:162
+++# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
+++# It must match listening addresses/ports defined in snmptrapd.service
+++# or snmptrapd.conf.
+++# ListenStream=0.0.0.0:162
+++# ListenDatagram=[::]:162
+++# ListenStream=[::]:162
+++
+++[Install]
+++WantedBy=sockets.target
+diff --git a/include/net-snmp/library/sd-daemon.h b/include/net-snmp/library/sd-daemon.h
+new file mode 100644
+index 0000000..85274c9
+--- /dev/null
++++ b/include/net-snmp/library/sd-daemon.h
+@@ -0,0 +1,290 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++#ifndef SNMPD_SD_DAEMON_H
++#define SNMPD_SD_DAEMON_H
++
++/***
++  Copyright 2010 Lennart Poettering
++
++  Permission is hereby granted, free of charge, to any person
++  obtaining a copy of this software and associated documentation files
++  (the "Software"), to deal in the Software without restriction,
++  including without limitation the rights to use, copy, modify, merge,
++  publish, distribute, sublicense, and/or sell copies of the Software,
++  and to permit persons to whom the Software is furnished to do so,
++  subject to the following conditions:
++
++  The above copyright notice and this permission notice shall be
++  included in all copies or substantial portions of the Software.
++
++  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++  SOFTWARE.
++***/
++
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#ifdef HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++  Reference implementation of a few systemd related interfaces for
++  writing daemons. These interfaces are trivial to implement. To
++  simplify porting we provide this reference implementation.
++  Applications are welcome to reimplement the algorithms described
++  here if they do not want to include these two source files.
++
++  The following functionality is provided:
++
++  - Support for logging with log levels on stderr
++  - File descriptor passing for socket-based activation
++  - Daemon startup and status notification
++  - Detection of systemd boots
++
++  You may compile this with -DDISABLE_SYSTEMD to disable systemd
++  support. This makes all those calls NOPs that are directly related to
++  systemd (i.e. only sd_is_xxx() will stay useful).
++
++  Since this is drop-in code we don't want any of our symbols to be
++  exported in any case. Hence we declare hidden visibility for all of
++  them.
++
++  You may find an up-to-date version of these source files online:
++
++  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h
++  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c
++
++  This should compile on non-Linux systems, too, but with the
++  exception of the sd_is_xxx() calls all functions will become NOPs.
++
++  See sd-daemon(7) for more information.
++*/
++
++#ifndef _sd_printf_attr_
++#if __GNUC__ >= 4
++#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
++#else
++#define _sd_printf_attr_(a,b)
++#endif
++#endif
++
++/*
++  Log levels for usage on stderr:
++
++          fprintf(stderr, SD_NOTICE "Hello World!\n");
++
++  This is similar to printk() usage in the kernel.
++*/
++#define SD_EMERG   "<0>"  /* system is unusable */
++#define SD_ALERT   "<1>"  /* action must be taken immediately */
++#define SD_CRIT    "<2>"  /* critical conditions */
++#define SD_ERR     "<3>"  /* error conditions */
++#define SD_WARNING "<4>"  /* warning conditions */
++#define SD_NOTICE  "<5>"  /* normal but significant condition */
++#define SD_INFO    "<6>"  /* informational */
++#define SD_DEBUG   "<7>"  /* debug-level messages */
++
++/* The first passed file descriptor is fd 3 */
++#define SD_LISTEN_FDS_START 3
++
++/*
++  Returns how many file descriptors have been passed, or a negative
++  errno code on failure. Optionally, removes the $LISTEN_FDS and
++  $LISTEN_PID file descriptors from the environment (recommended, but
++  problematic in threaded environments). If r is the return value of
++  this function you'll find the file descriptors passed as fds
++  SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative
++  errno style error code on failure. This function call ensures that
++  the FD_CLOEXEC flag is set for the passed file descriptors, to make
++  sure they are not passed on to child processes. If FD_CLOEXEC shall
++  not be set, the caller needs to unset it after this call for all file
++  descriptors that are used.
++
++  See sd_listen_fds(3) for more information.
++*/
++int netsnmp_sd_listen_fds(int unset_environment);
++
++/*
++  Helper call for identifying a passed file descriptor. Returns 1 if
++  the file descriptor is a FIFO in the file system stored under the
++  specified path, 0 otherwise. If path is NULL a path name check will
++  not be done and the call only verifies if the file descriptor
++  refers to a FIFO. Returns a negative errno style error code on
++  failure.
++
++  See sd_is_fifo(3) for more information.
++*/
++int netsnmp_sd_is_fifo(int fd, const char *path);
++
++/*
++  Helper call for identifying a passed file descriptor. Returns 1 if
++  the file descriptor is a special character device on the file
++  system stored under the specified path, 0 otherwise.
++  If path is NULL a path name check will not be done and the call
++  only verifies if the file descriptor refers to a special character.
++  Returns a negative errno style error code on failure.
++
++  See sd_is_special(3) for more information.
++*/
++int netsnmp_sd_is_special(int fd, const char *path);
++
++/*
++  Helper call for identifying a passed file descriptor. Returns 1 if
++  the file descriptor is a socket of the specified family (AF_INET,
++  ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If
++  family is 0 a socket family check will not be done. If type is 0 a
++  socket type check will not be done and the call only verifies if
++  the file descriptor refers to a socket. If listening is > 0 it is
++  verified that the socket is in listening mode. (i.e. listen() has
++  been called) If listening is == 0 it is verified that the socket is
++  not in listening mode. If listening is < 0 no listening mode check
++  is done. Returns a negative errno style error code on failure.
++
++  See sd_is_socket(3) for more information.
++*/
++int netsnmp_sd_is_socket(int fd, int family, int type, int listening);
++
++/*
++  Helper call for identifying a passed file descriptor. Returns 1 if
++  the file descriptor is an Internet socket, of the specified family
++  (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM,
++  SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version
++  check is not done. If type is 0 a socket type check will not be
++  done. If port is 0 a socket port check will not be done. The
++  listening flag is used the same way as in sd_is_socket(). Returns a
++  negative errno style error code on failure.
++
++  See sd_is_socket_inet(3) for more information.
++*/
++int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port);
++
++/*
++  Helper call for identifying a passed file descriptor. Returns 1 if
++  the file descriptor is an AF_UNIX socket of the specified type
++  (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0
++  a socket type check will not be done. If path is NULL a socket path
++  check will not be done. For normal AF_UNIX sockets set length to
++  0. For abstract namespace sockets set length to the length of the
++  socket name (including the initial 0 byte), and pass the full
++  socket path in path (including the initial 0 byte). The listening
++  flag is used the same way as in sd_is_socket(). Returns a negative
++  errno style error code on failure.
++
++  See sd_is_socket_unix(3) for more information.
++*/
++int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
++
++/*
++  Informs systemd about changed daemon state. This takes a number of
++  newline separated environment-style variable assignments in a
++  string. The following variables are known:
++
++     READY=1      Tells systemd that daemon startup is finished (only
++                  relevant for services of Type=notify). The passed
++                  argument is a boolean "1" or "0". Since there is
++                  little value in signaling non-readiness the only
++                  value daemons should send is "READY=1".
++
++     STATUS=...   Passes a single-line status string back to systemd
++                  that describes the daemon state. This is free-from
++                  and can be used for various purposes: general state
++                  feedback, fsck-like programs could pass completion
++                  percentages and failing programs could pass a human
++                  readable error message. Example: "STATUS=Completed
++                  66% of file system check..."
++
++     ERRNO=...    If a daemon fails, the errno-style error code,
++                  formatted as string. Example: "ERRNO=2" for ENOENT.
++
++     BUSERROR=... If a daemon fails, the D-Bus error-style error
++                  code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut"
++
++     MAINPID=...  The main pid of a daemon, in case systemd did not
++                  fork off the process itself. Example: "MAINPID=4711"
++
++  Daemons can choose to send additional variables. However, it is
++  recommended to prefix variable names not listed above with X_.
++
++  Returns a negative errno-style error code on failure. Returns > 0
++  if systemd could be notified, 0 if it couldn't possibly because
++  systemd is not running.
++
++  Example: When a daemon finished starting up, it could issue this
++  call to notify systemd about it:
++
++     sd_notify(0, "READY=1");
++
++  See sd_notifyf() for more complete examples.
++
++  See sd_notify(3) for more information.
++*/
++int netsnmp_sd_notify(int unset_environment, const char *state);
++
++/*
++  Similar to sd_notify() but takes a format string.
++
++  Example 1: A daemon could send the following after initialization:
++
++     sd_notifyf(0, "READY=1\n"
++                   "STATUS=Processing requests...\n"
++                   "MAINPID=%lu",
++                   (unsigned long) getpid());
++
++  Example 2: A daemon could send the following shortly before
++  exiting, on failure:
++
++     sd_notifyf(0, "STATUS=Failed to start up: %s\n"
++                   "ERRNO=%i",
++                   strerror(errno),
++                   errno);
++
++  See sd_notifyf(3) for more information.
++*/
++int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3);
++
++/*
++  Returns > 0 if the system was booted with systemd. Returns < 0 on
++  error. Returns 0 if the system was not booted with systemd. Note
++  that all of the functions above handle non-systemd boots just
++  fine. You should NOT protect them with a call to this function. Also
++  note that this function checks whether the system, not the user
++  session is controlled by systemd. However the functions above work
++  for both user and system services.
++
++  See sd_booted(3) for more information.
++*/
++int netsnmp_sd_booted(void);
++
++/**
++ * Find an socket with given parameters. See man sd_is_socket_inet for
++ * description of the arguments.
++ *
++ * Returns the file descriptor if it is found, 0 otherwise.
++ */
++int netsnmp_sd_find_inet_socket(int family, int type, int listening, int port);
++
++/**
++ * Find an unix socket with given parameters. See man sd_is_socket_unix for
++ * description of the arguments.
++ *
++ * Returns the file descriptor if it is found, 0 otherwise.
++ */
++int
++netsnmp_sd_find_unix_socket(int type, int listening, const char *path);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* SNMPD_SD_DAEMON_H */
+diff --git a/snmplib/sd-daemon.c b/snmplib/sd-daemon.c
+new file mode 100644
+index 0000000..42dba29
+--- /dev/null
++++ b/snmplib/sd-daemon.c
+@@ -0,0 +1,532 @@
++/*
++ * Systemd integration parts.
++ *
++ * Most of this file is directly copied from systemd sources.
++ * Changes:
++ * - all functions were renamed to have netsnmp_ prefix
++ * - includes were  changed to match Net-SNMP style.
++ * - removed gcc export macros
++ * - removed POSIX message queues
++ */
++
++#include <net-snmp/net-snmp-config.h>
++#include <net-snmp/net-snmp-features.h>
++#include <net-snmp/types.h>
++#include <net-snmp/library/snmp_debug.h>
++
++#ifndef NETSNMP_NO_SYSTEMD
++
++/***
++  Copyright 2010 Lennart Poettering
++
++  Permission is hereby granted, free of charge, to any person
++  obtaining a copy of this software and associated documentation files
++  (the "Software"), to deal in the Software without restriction,
++  including without limitation the rights to use, copy, modify, merge,
++  publish, distribute, sublicense, and/or sell copies of the Software,
++  and to permit persons to whom the Software is furnished to do so,
++  subject to the following conditions:
++
++  The above copyright notice and this permission notice shall be
++  included in all copies or substantial portions of the Software.
++
++  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++  SOFTWARE.
++***/
++
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++#include <sys/fcntl.h>
++#include <netinet/in.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stddef.h>
++#include <limits.h>
++
++#include <net-snmp/library/sd-daemon.h>
++
++int netsnmp_sd_listen_fds(int unset_environment) {
++
++        int r, fd;
++        const char *e;
++        char *p = NULL;
++        unsigned long l;
++
++        if (!(e = getenv("LISTEN_PID"))) {
++                r = 0;
++                goto finish;
++        }
++
++        errno = 0;
++        l = strtoul(e, &p, 10);
++
++        if (errno != 0) {
++                r = -errno;
++                goto finish;
++        }
++
++        if (!p || *p || l <= 0) {
++                r = -EINVAL;
++                goto finish;
++        }
++
++        /* Is this for us? */
++        if (getpid() != (pid_t) l) {
++                r = 0;
++                goto finish;
++        }
++
++        if (!(e = getenv("LISTEN_FDS"))) {
++                r = 0;
++                goto finish;
++        }
++
++        errno = 0;
++        l = strtoul(e, &p, 10);
++
++        if (errno != 0) {
++                r = -errno;
++                goto finish;
++        }
++
++        if (!p || *p) {
++                r = -EINVAL;
++                goto finish;
++        }
++
++        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
++                int flags;
++
++                if ((flags = fcntl(fd, F_GETFD)) < 0) {
++                        r = -errno;
++                        goto finish;
++                }
++
++                if (flags & FD_CLOEXEC)
++                        continue;
++
++                if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
++                        r = -errno;
++                        goto finish;
++                }
++        }
++
++        r = (int) l;
++
++finish:
++        if (unset_environment) {
++                unsetenv("LISTEN_PID");
++                unsetenv("LISTEN_FDS");
++        }
++
++        return r;
++}
++
++int netsnmp_sd_is_fifo(int fd, const char *path) {
++        struct stat st_fd;
++
++        if (fd < 0)
++                return -EINVAL;
++
++        memset(&st_fd, 0, sizeof(st_fd));
++        if (fstat(fd, &st_fd) < 0)
++                return -errno;
++
++        if (!S_ISFIFO(st_fd.st_mode))
++                return 0;
++
++        if (path) {
++                struct stat st_path;
++
++                memset(&st_path, 0, sizeof(st_path));
++                if (stat(path, &st_path) < 0) {
++
++                        if (errno == ENOENT || errno == ENOTDIR)
++                                return 0;
++
++                        return -errno;
++                }
++
++                return
++                        st_path.st_dev == st_fd.st_dev &&
++                        st_path.st_ino == st_fd.st_ino;
++        }
++
++        return 1;
++}
++
++int netsnmp_sd_is_special(int fd, const char *path) {
++        struct stat st_fd;
++
++        if (fd < 0)
++                return -EINVAL;
++
++        if (fstat(fd, &st_fd) < 0)
++                return -errno;
++
++        if (!S_ISREG(st_fd.st_mode) && !S_ISCHR(st_fd.st_mode))
++                return 0;
++
++        if (path) {
++                struct stat st_path;
++
++                if (stat(path, &st_path) < 0) {
++
++                        if (errno == ENOENT || errno == ENOTDIR)
++                                return 0;
++
++                        return -errno;
++                }
++
++                if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode))
++                        return
++                                st_path.st_dev == st_fd.st_dev &&
++                                st_path.st_ino == st_fd.st_ino;
++                else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode))
++                        return st_path.st_rdev == st_fd.st_rdev;
++                else
++                        return 0;
++        }
++
++        return 1;
++}
++
++static int sd_is_socket_internal(int fd, int type, int listening) {
++        struct stat st_fd;
++
++        if (fd < 0 || type < 0)
++                return -EINVAL;
++
++        if (fstat(fd, &st_fd) < 0)
++                return -errno;
++
++        if (!S_ISSOCK(st_fd.st_mode))
++                return 0;
++
++        if (type != 0) {
++                int other_type = 0;
++                socklen_t l = sizeof(other_type);
++
++                if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0)
++                        return -errno;
++
++                if (l != sizeof(other_type))
++                        return -EINVAL;
++
++                if (other_type != type)
++                        return 0;
++        }
++
++        if (listening >= 0) {
++                int accepting = 0;
++                socklen_t l = sizeof(accepting);
++
++                if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0)
++                        return -errno;
++
++                if (l != sizeof(accepting))
++                        return -EINVAL;
++
++                if (!accepting != !listening)
++                        return 0;
++        }
++
++        return 1;
++}
++
++union sockaddr_union {
++        struct sockaddr sa;
++        struct sockaddr_in in4;
++        struct sockaddr_in6 in6;
++        struct sockaddr_un un;
++        struct sockaddr_storage storage;
++};
++
++int netsnmp_sd_is_socket(int fd, int family, int type, int listening) {
++        int r;
++
++        if (family < 0)
++                return -EINVAL;
++
++        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++                return r;
++
++        if (family > 0) {
++                union sockaddr_union sockaddr;
++                socklen_t l;
++
++                memset(&sockaddr, 0, sizeof(sockaddr));
++                l = sizeof(sockaddr);
++
++                if (getsockname(fd, &sockaddr.sa, &l) < 0)
++                        return -errno;
++
++                if (l < sizeof(sa_family_t))
++                        return -EINVAL;
++
++                return sockaddr.sa.sa_family == family;
++        }
++
++        return 1;
++}
++
++int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
++        union sockaddr_union sockaddr;
++        socklen_t l;
++        int r;
++
++        if (family != 0 && family != AF_INET && family != AF_INET6)
++                return -EINVAL;
++
++        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++                return r;
++
++        memset(&sockaddr, 0, sizeof(sockaddr));
++        l = sizeof(sockaddr);
++
++        if (getsockname(fd, &sockaddr.sa, &l) < 0)
++                return -errno;
++
++        if (l < sizeof(sa_family_t))
++                return -EINVAL;
++
++        if (sockaddr.sa.sa_family != AF_INET &&
++            sockaddr.sa.sa_family != AF_INET6)
++                return 0;
++
++        if (family > 0)
++                if (sockaddr.sa.sa_family != family)
++                        return 0;
++
++        if (port > 0) {
++                if (sockaddr.sa.sa_family == AF_INET) {
++                        if (l < sizeof(struct sockaddr_in))
++                                return -EINVAL;
++
++                        return htons(port) == sockaddr.in4.sin_port;
++                } else {
++                        if (l < sizeof(struct sockaddr_in6))
++                                return -EINVAL;
++
++                        return htons(port) == sockaddr.in6.sin6_port;
++                }
++        }
++
++        return 1;
++}
++
++int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
++        union sockaddr_union sockaddr;
++        socklen_t l;
++        int r;
++
++        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
++                return r;
++
++        memset(&sockaddr, 0, sizeof(sockaddr));
++        l = sizeof(sockaddr);
++
++        if (getsockname(fd, &sockaddr.sa, &l) < 0)
++                return -errno;
++
++        if (l < sizeof(sa_family_t))
++                return -EINVAL;
++
++        if (sockaddr.sa.sa_family != AF_UNIX)
++                return 0;
++
++        if (path) {
++                if (length <= 0)
++                        length = strlen(path);
++
++                if (length <= 0)
++                        /* Unnamed socket */
++                        return l == offsetof(struct sockaddr_un, sun_path);
++
++                if (path[0])
++                        /* Normal path socket */
++                        return
++                                (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
++                                memcmp(path, sockaddr.un.sun_path, length+1) == 0;
++                else
++                        /* Abstract namespace socket */
++                        return
++                                (l == offsetof(struct sockaddr_un, sun_path) + length) &&
++                                memcmp(path, sockaddr.un.sun_path, length) == 0;
++        }
++
++        return 1;
++}
++
++int netsnmp_sd_notify(int unset_environment, const char *state) {
++        int fd = -1, r;
++        struct msghdr msghdr;
++        struct iovec iovec;
++        union sockaddr_union sockaddr;
++        const char *e;
++
++        if (!state) {
++                r = -EINVAL;
++                goto finish;
++        }
++
++        if (!(e = getenv("NOTIFY_SOCKET")))
++                return 0;
++
++        /* Must be an abstract socket, or an absolute path */
++        if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
++                r = -EINVAL;
++                goto finish;
++        }
++
++        if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
++                r = -errno;
++                goto finish;
++        }
++
++        memset(&sockaddr, 0, sizeof(sockaddr));
++        sockaddr.sa.sa_family = AF_UNIX;
++        strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path));
++
++        if (sockaddr.un.sun_path[0] == '@')
++                sockaddr.un.sun_path[0] = 0;
++
++        memset(&iovec, 0, sizeof(iovec));
++        iovec.iov_base = (char *)state;
++        iovec.iov_len = strlen(state);
++
++        memset(&msghdr, 0, sizeof(msghdr));
++        msghdr.msg_name = &sockaddr;
++        msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
++
++        if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
++                msghdr.msg_namelen = sizeof(struct sockaddr_un);
++
++        msghdr.msg_iov = &iovec;
++        msghdr.msg_iovlen = 1;
++
++        if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
++                r = -errno;
++                goto finish;
++        }
++
++        r = 1;
++
++finish:
++        if (unset_environment)
++                unsetenv("NOTIFY_SOCKET");
++
++        if (fd >= 0)
++                close(fd);
++
++        return r;
++}
++
++int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) {
++        va_list ap;
++        char *p = NULL;
++        int r;
++
++        va_start(ap, format);
++        r = vasprintf(&p, format, ap);
++        va_end(ap);
++
++        if (r < 0 || !p)
++                return -ENOMEM;
++
++        r = netsnmp_sd_notify(unset_environment, p);
++        free(p);
++
++        return r;
++}
++
++int netsnmp_sd_booted(void) {
++        struct stat a, b;
++
++        /* We simply test whether the systemd cgroup hierarchy is
++         * mounted */
++
++        if (lstat("/sys/fs/cgroup", &a) < 0)
++                return 0;
++
++        if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
++                return 0;
++
++        return a.st_dev != b.st_dev;
++}
++
++/* End of original sd-daemon.c from systemd sources */
++
++int
++netsnmp_sd_find_inet_socket(int family, int type, int listening, int port)
++{
++    int count, fd;
++
++    count = netsnmp_sd_listen_fds(0);
++    if (count <= 0) {
++        DEBUGMSGTL(("systemd:find_inet_socket", "No LISTEN_FDS found.\n"));
++        return 0;
++    }
++    DEBUGMSGTL(("systemd:find_inet_socket", "LISTEN_FDS reports %d sockets.\n",
++            count));
++
++    for (fd = 3; fd < 3+count; fd++) {
++        int rc = netsnmp_sd_is_socket_inet(fd, family, type, listening, port);
++        if (rc < 0)
++            DEBUGMSGTL(("systemd:find_inet_socket",
++                    "sd_is_socket_inet error: %d\n", rc));
++        if (rc > 0) {
++            DEBUGMSGTL(("systemd:find_inet_socket",
++                    "Found the socket in LISTEN_FDS\n"));
++            return fd;
++        }
++    }
++    DEBUGMSGTL(("systemd:find_inet_socket", "Socket not found in LISTEN_FDS\n"));
++    return 0;
++}
++
++int
++netsnmp_sd_find_unix_socket(int type, int listening, const char *path)
++{
++    int count, fd;
++
++    count = netsnmp_sd_listen_fds(0);
++    if (count <= 0) {
++        DEBUGMSGTL(("systemd:find_unix_socket", "No LISTEN_FDS found.\n"));
++        return 0;
++    }
++    DEBUGMSGTL(("systemd:find_unix_socket", "LISTEN_FDS reports %d sockets.\n",
++            count));
++
++    for (fd = 3; fd < 3+count; fd++) {
++        int rc = netsnmp_sd_is_socket_unix(fd, type, listening, path, 0);
++        if (rc < 0)
++            DEBUGMSGTL(("systemd:find_unix_socket",
++                    "netsnmp_sd_is_socket_unix error: %d\n", rc));
++        if (rc > 0) {
++            DEBUGMSGTL(("systemd:find_unix_socket",
++                    "Found the socket in LISTEN_FDS\n"));
++            return fd;
++        }
++    }
++    DEBUGMSGTL(("systemd:find_unix_socket", "Socket not found in LISTEN_FDS\n"));
++    return 0;
++}
++
++#endif /* ! NETSNMP_NO_SYSTEMD */
+diff --git a/snmplib/transports/snmpTCPDomain.c b/snmplib/transports/snmpTCPDomain.c
+index 7feb028..a41b926 100644
+--- a/snmplib/transports/snmpTCPDomain.c
++++ b/snmplib/transports/snmpTCPDomain.c
+@@ -43,6 +43,10 @@
+ #include <net-snmp/library/snmpTCPBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ /*
+  * needs to be in sync with the definitions in snmplib/snmpUDPDomain.c
+  * and perl/agent/agent.xs
+@@ -149,6 +153,7 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+     netsnmp_transport *t = NULL;
+     netsnmp_udp_addr_pair *addr_pair = NULL;
+     int rc = 0;
++    int socket_initialized = 0;
+ 
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+     if (local)
+@@ -178,7 +183,19 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+     t->domain_length =
+         sizeof(netsnmp_snmpTCPDomain) / sizeof(netsnmp_snmpTCPDomain[0]);
+ 
+-    t->sock = socket(PF_INET, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++    /*
++     * Maybe the socket was already provided by systemd...
++     */
++    if (local) {
++        t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_STREAM, 1,
++                ntohs(addr->sin_port));
++        if (t->sock)
++            socket_initialized = 1;
++    }
++#endif
++    if (!socket_initialized)
++        t->sock = socket(PF_INET, SOCK_STREAM, 0);
+     if (t->sock < 0) {
+         netsnmp_transport_free(t);
+         return NULL;
+@@ -215,11 +232,13 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+         setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt,
+ 		   sizeof(opt));
+ 
+-        rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+ 
+         /*
+@@ -236,11 +255,13 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local)
+          * Now sit here and wait for connections to arrive.  
+          */
+ 
+-        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+         
+         /*
+diff --git a/snmplib/transports/snmpTCPIPv6Domain.c b/snmplib/transports/snmpTCPIPv6Domain.c
+index d2e0a2d..22de6d4 100644
+--- a/snmplib/transports/snmpTCPIPv6Domain.c
++++ b/snmplib/transports/snmpTCPIPv6Domain.c
+@@ -49,6 +49,10 @@
+ #include <net-snmp/library/snmpTCPBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #include "inet_ntop.h"
+ 
+ oid netsnmp_TCPIPv6Domain[] = { TRANSPORT_DOMAIN_TCP_IPV6 };
+@@ -140,6 +144,8 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+ {
+     netsnmp_transport *t = NULL;
+     int             rc = 0;
++    char           *str = NULL;
++    int             socket_initialized = 0;
+ 
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+     if (local)
+@@ -174,7 +180,19 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+     t->domain = netsnmp_TCPIPv6Domain;
+     t->domain_length = sizeof(netsnmp_TCPIPv6Domain) / sizeof(oid);
+ 
+-    t->sock = socket(PF_INET6, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++    /*
++     * Maybe the socket was already provided by systemd...
++     */
++    if (local) {
++        t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_STREAM, 1,
++                ntohs(addr->sin6_port));
++        if (t->sock)
++            socket_initialized = 1;
++    }
++#endif
++    if (!socket_initialized)
++        t->sock = socket(PF_INET6, SOCK_STREAM, 0);
+     if (t->sock < 0) {
+         netsnmp_transport_free(t);
+         return NULL;
+@@ -220,12 +238,14 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+ 
+         setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt));
+ 
+-        rc = bind(t->sock, (struct sockaddr *) addr,
+-		  sizeof(struct sockaddr_in6));
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = bind(t->sock, (struct sockaddr *) addr,
++                    sizeof(struct sockaddr_in6));
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+ 
+         /*
+@@ -242,11 +262,13 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local)
+          * Now sit here and wait for connections to arrive.  
+          */
+ 
+-        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+         
+         /*
+diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c
+index 8c0fb05..00e5bbc 100644
+--- a/snmplib/transports/snmpUDPIPv4BaseDomain.c
++++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c
+@@ -40,6 +40,10 @@
+ 
+ #include <net-snmp/library/snmpSocketBaseDomain.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
+ int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from,
+                              socklen_t *fromlen, struct sockaddr *dstip,
+@@ -64,6 +68,7 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+     char           *client_socket = NULL;
+     netsnmp_indexed_addr_pair addr_pair;
+     socklen_t       local_addr_len;
++    int             socket_initialized = 0;
+ 
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+     if (local)
+@@ -88,7 +93,19 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+         free(str);
+     }
+ 
+-    t->sock = socket(PF_INET, SOCK_DGRAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++    /*
++     * Maybe the socket was already provided by systemd...
++     */
++    if (local) {
++        t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_DGRAM, -1,
++                ntohs(addr->sin_port));
++        if (t->sock)
++            socket_initialized = 1;
++    }
++#endif
++    if (!socket_initialized)
++        t->sock = socket(PF_INET, SOCK_DGRAM, 0);
+     DEBUGMSGTL(("UDPBase", "openned socket %d as local=%d\n", t->sock, local)); 
+     if (t->sock < 0) {
+         netsnmp_transport_free(t);
+@@ -151,12 +168,14 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
+             }
+         }
+ #endif /* !defined(WIN32) */
+-        rc = bind(t->sock, (struct sockaddr *) addr,
+-                  sizeof(struct sockaddr));
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = bind(t->sock, (struct sockaddr *) addr,
++                    sizeof(struct sockaddr));
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+         t->data = NULL;
+         t->data_length = 0;
+diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c
+index 18de876..fd2ced4 100644
+--- a/snmplib/transports/snmpUDPIPv6Domain.c
++++ b/snmplib/transports/snmpUDPIPv6Domain.c
+@@ -67,6 +67,10 @@ static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+ #include <net-snmp/library/snmpSocketBaseDomain.h>
+ #include <net-snmp/library/tools.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ #include "inet_ntop.h"
+ #include "inet_pton.h"
+ 
+@@ -190,6 +194,8 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+ {
+     netsnmp_transport *t = NULL;
+     int             rc = 0;
++    char           *str = NULL;
++    int             socket_initialized = 0;
+ 
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+     if (local)
+@@ -217,7 +223,19 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+     t->domain_length =
+         sizeof(netsnmp_UDPIPv6Domain) / sizeof(netsnmp_UDPIPv6Domain[0]);
+ 
+-    t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++    /*
++     * Maybe the socket was already provided by systemd...
++     */
++    if (local) {
++        t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_DGRAM, -1,
++                ntohs(addr->sin6_port));
++        if (t->sock)
++            socket_initialized = 1;
++    }
++#endif
++    if (!socket_initialized)
++        t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
+     if (t->sock < 0) {
+         netsnmp_transport_free(t);
+         return NULL;
+@@ -243,12 +261,14 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+         }
+ #endif
+ 
+-        rc = bind(t->sock, (struct sockaddr *) addr,
+-		  sizeof(struct sockaddr_in6));
+-        if (rc != 0) {
+-            netsnmp_socketbase_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = bind(t->sock, (struct sockaddr *) addr,
++                    sizeof(struct sockaddr_in6));
++            if (rc != 0) {
++                netsnmp_socketbase_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+         t->local = (unsigned char*)malloc(18);
+         if (t->local == NULL) {
+diff --git a/snmplib/transports/snmpUnixDomain.c b/snmplib/transports/snmpUnixDomain.c
+index 47dffc1..8f34c37 100644
+--- a/snmplib/transports/snmpUnixDomain.c
++++ b/snmplib/transports/snmpUnixDomain.c
+@@ -37,6 +37,10 @@
+ #include <net-snmp/library/system.h> /* mkdirhier */
+ #include <net-snmp/library/tools.h>
+ 
++#ifndef NETSNMP_NO_SYSTEMD
++#include <net-snmp/library/sd-daemon.h>
++#endif
++
+ netsnmp_feature_child_of(transport_unix_socket_all, transport_all)
+ netsnmp_feature_child_of(unix_socket_paths, transport_unix_socket_all)
+ 
+@@ -295,6 +299,8 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+     netsnmp_transport *t = NULL;
+     sockaddr_un_pair *sup = NULL;
+     int             rc = 0;
++    char           *string = NULL;
++    int             socket_initialized = 0;
+ 
+ #ifdef NETSNMP_NO_LISTEN_SUPPORT
+     /* SPECIAL CIRCUMSTANCE: We still want AgentX to be able to operate,
+@@ -333,7 +339,18 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+     t->data_length = sizeof(sockaddr_un_pair);
+     sup = (sockaddr_un_pair *) t->data;
+ 
+-    t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
++#ifndef NETSNMP_NO_SYSTEMD
++    /*
++     * Maybe the socket was already provided by systemd...
++     */
++    if (local) {
++        t->sock = netsnmp_sd_find_unix_socket(SOCK_STREAM, 1, addr->sun_path);
++        if (t->sock)
++            socket_initialized = 1;
++    }
++#endif
++    if (!socket_initialized)
++        t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
+     if (t->sock < 0) {
+         netsnmp_transport_free(t);
+         return NULL;
+@@ -357,25 +374,26 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+ 
+         t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN;
+ 
+-        unlink(addr->sun_path);
+-        rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
+-
+-        if (rc != 0 && errno == ENOENT && create_path) {
+-            rc = mkdirhier(addr->sun_path, create_mode, 1);
++        if (!socket_initialized) {
++            unlink(addr->sun_path);
++            rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
++            if (rc != 0 && errno == ENOENT && create_path) {
++                rc = mkdirhier(addr->sun_path, create_mode, 1);
++                if (rc != 0) {
++                    netsnmp_unix_close(t);
++                    netsnmp_transport_free(t);
++                    return NULL;
++                }
++                rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
++            }
+             if (rc != 0) {
++                DEBUGMSGTL(("netsnmp_unix_transport",
++                        "couldn't bind \"%s\", errno %d (%s)\n",
++                        addr->sun_path, errno, strerror(errno)));
+                 netsnmp_unix_close(t);
+                 netsnmp_transport_free(t);
+                 return NULL;
+             }
+-            rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
+-        }
+-        if (rc != 0) {
+-            DEBUGMSGTL(("netsnmp_unix_transport",
+-                        "couldn't bind \"%s\", errno %d (%s)\n",
+-                        addr->sun_path, errno, strerror(errno)));
+-            netsnmp_unix_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
+         }
+ 
+         /*
+@@ -391,14 +409,16 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local)
+          * Now sit here and listen for connections to arrive.
+          */
+ 
+-        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
+-        if (rc != 0) {
+-            DEBUGMSGTL(("netsnmp_unix_transport",
+-                        "couldn't listen to \"%s\", errno %d (%s)\n",
+-                        addr->sun_path, errno, strerror(errno)));
+-            netsnmp_unix_close(t);
+-            netsnmp_transport_free(t);
+-            return NULL;
++        if (!socket_initialized) {
++            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
++            if (rc != 0) {
++                DEBUGMSGTL(("netsnmp_unix_transport",
++                            "couldn't listen to \"%s\", errno %d (%s)\n",
++                            addr->sun_path, errno, strerror(errno)));
++                netsnmp_unix_close(t);
++                netsnmp_transport_free(t);
++                return NULL;
++            }
+         }
+ 
+     } else {
+diff --git a/win32/libsnmp/Makefile.in b/win32/libsnmp/Makefile.in
+index 98d83c8..b228d20 100644
+--- a/win32/libsnmp/Makefile.in
++++ b/win32/libsnmp/Makefile.in
+@@ -42,6 +42,7 @@ LIB32_OBJS= \
+ 	"$(INTDIR)\read_config.obj" \
+ 	"$(INTDIR)\readdir.obj" \
+ 	"$(INTDIR)\scapi.obj" \
++        "$(INTDIR)\sd-daemon.obj" \
+ 	"$(INTDIR)\snmp-tc.obj" \
+ 	"$(INTDIR)\snmp.obj" \
+ 	"$(INTDIR)\snmpCallbackDomain.obj" \
+@@ -138,6 +139,11 @@ SOURCE=..\..\snmplib\asn1.c
+ "$(INTDIR)\asn1.obj" : $(SOURCE) "$(INTDIR)"
+ 	$(CPP) $(CPP_PROJ) $(SOURCE)
+ 
++SOURCE=..\..\snmplib\sd-daemon.c
++
++"$(INTDIR)\sd-daemon.obj" : $(SOURCE) "$(INTDIR)"
++       $(CPP) $(CPP_PROJ) $(SOURCE)
++
+ 
+ SOURCE=..\..\snmplib\callback.c
+ 
+diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h
+index 1608563..7aec547 100644
+--- a/win32/net-snmp/net-snmp-config.h
++++ b/win32/net-snmp/net-snmp-config.h
+@@ -1717,6 +1717,8 @@ enum {
+ #define DMALLOC_FUNC_CHECK
+ #endif
+ 
+++#define NETSNMP_NO_SYSTEMD
+++
+ /* #undef NETSNMP_ENABLE_LOCAL_SMUX */
+ 
+ /* define if agentx transport is to use domain sockets only */
+diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in
+index 9693730..96ec3d9 100644
+--- a/win32/net-snmp/net-snmp-config.h.in
++++ b/win32/net-snmp/net-snmp-config.h.in
+@@ -1717,6 +1717,8 @@ enum {
+ #define DMALLOC_FUNC_CHECK
+ #endif
+ 
++#define NETSNMP_NO_SYSTEMD
++
+ /* #undef NETSNMP_ENABLE_LOCAL_SMUX */
+ 
+ /* define if agentx transport is to use domain sockets only */
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
new file mode 100644
index 0000000..6b4b6ce
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
@@ -0,0 +1,284 @@
+SUMMARY = "Various tools relating to the Simple Network Management Protocol"
+HOMEPAGE = "http://www.net-snmp.org/"
+SECTION = "net"
+LICENSE = "BSD & MIT"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687"
+
+DEPENDS = "openssl libnl pciutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
+           file://init \
+           file://snmpd.conf \
+           file://snmptrapd.conf \
+           file://snmpd.service \
+           file://snmptrapd.service \
+           file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
+           file://fix-libtool-finish.patch \
+           file://net-snmp-testing-add-the-output-format-for-ptest.patch \
+           file://run-ptest \
+           file://0001-config_os_headers-Error-Fix.patch \
+           file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \
+           file://0001-get_pid_from_inode-Include-limit.h.patch \
+           file://0002-configure-fix-a-cc-check-issue.patch \
+           file://0004-configure-fix-incorrect-variable.patch \
+           file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \
+           file://net-snmp-fix-for-disable-des.patch \
+           file://reproducibility-have-printcap.patch \
+           file://reproducibility-accept-configure-options-from-env.patch \
+           file://0001-net-snmp-fix-compile-error-disable-des.patch \
+           file://0001-Add-pkg-config-support-for-building-applications-and.patch \
+           file://CVE-2019-20892.patch \
+           file://CVE-2020-15861-0001.patch \
+           file://CVE-2020-15861-0002.patch \
+           file://CVE-2020-15861-0003.patch \
+           file://CVE-2020-15861-0004.patch \
+           file://CVE-2020-15861-0005.patch \
+           file://CVE-2020-15862.patch \
+           "
+SRC_URI[md5sum] = "63bfc65fbb86cdb616598df1aff6458a"
+SRC_URI[sha256sum] = "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/"
+UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/"
+
+inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header
+
+EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'"
+
+PARALLEL_MAKE = ""
+CCACHE = ""
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} des"
+PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
+PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,,"
+
+PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable-embedded-perl --with-perl-modules=no,\
+                       perl,"
+PACKAGECONFIG[des] = "--enable-des,--disable-des"
+
+EXTRA_OECONF = "--enable-shared \
+                --disable-manuals \
+                --with-defaults \
+                --with-install-prefix=${D} \
+                --with-persistent-directory=${localstatedir}/lib/net-snmp \
+                ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
+                --with-openssl=${STAGING_EXECPREFIXDIR} \
+"
+
+# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
+EXTRA_OECONF += "--with-mib-modules=smux"
+
+CACHED_CONFIGUREVARS = " \
+    ac_cv_header_valgrind_valgrind_h=no \
+    ac_cv_header_valgrind_memcheck_h=no \
+    ac_cv_ETC_MNTTAB=/etc/mtab \
+    lt_cv_shlibpath_overrides_runpath=yes \
+    ac_cv_path_UNAMEPROG=${base_bindir}/uname \
+    ac_cv_file__etc_printcap=no \
+    NETSNMP_CONFIGURE_OPTIONS= \
+"
+export PERLPROG="${bindir}/env perl"
+PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}"
+
+HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}"
+
+PTEST_BUILD_HOST_FILES += "net-snmp-config gen-variables"
+
+do_configure_prepend() {
+    sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \
+        "${S}"/configure \
+        "${S}"/configure.d/config_os_libs2
+
+    if [ "${HAS_PERL}" = "1" ]; then
+        # this may need to be changed when package perl has any change.
+        cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl?/*/Config.pm ${WORKDIR}/
+        cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl?/*/*/Config_heavy.pl ${WORKDIR}/
+        sed -e "s@libpth => '/usr/lib.*@libpth => '${STAGING_DIR_TARGET}/${libdir} ${STAGING_DIR_TARGET}/${base_libdir}',@g" \
+            -e "s@privlibexp => '/usr@privlibexp => '${STAGING_DIR_TARGET}/usr@g" \
+            -e "s@scriptdir => '/usr@scriptdir => '${STAGING_DIR_TARGET}/usr@g" \
+            -e "s@sitearchexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \
+            -e "s@sitelibexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \
+            -e "s@vendorarchexp => '/usr@vendorarchexp => '${STAGING_DIR_TARGET}/usr@g" \
+            -e "s@vendorlibexp => '/usr@vendorlibexp => '${STAGING_DIR_TARGET}/usr@g" \
+            -i ${WORKDIR}/Config.pm
+    fi
+
+}
+
+do_configure_append() {
+    if [ "${HAS_PERL}" = "1" ]; then
+        sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=${STAGING_DIR_TARGET}\$\{includedir\}@g" \
+            -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L${STAGING_DIR_TARGET}\$\{libdir\}@g" \
+            -i ${B}/net-snmp-config
+    fi
+}
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/snmp
+    install -d ${D}${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd
+    install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/
+    install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
+    sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+        -i ${D}${bindir}/net-snmp-create-v3-user
+    sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \
+        -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \
+        -e 's@-L${STAGING_DIR_HOST}${libdir}@@g' \
+        -e 's@-I${STAGING_DIR_HOST}${includedir}@@g' \
+        -i ${D}${bindir}/net-snmp-config
+
+    if [ "${HAS_PERL}" = "1" ]; then
+        sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \
+            -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \
+            -i ${D}${bindir}/net-snmp-config
+    fi
+
+    oe_multilib_header net-snmp/net-snmp-config.h
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}
+    for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \
+        ${B}/net-snmp-config ${S}/testing; do
+        if [ -e "$i" ]; then
+            cp -R --no-dereference --preserve=mode,links -v "$i" ${D}${PTEST_PATH}
+        fi
+    done
+    echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version
+
+    rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build"
+    for i in $rmdlist; do
+        if [ -d "$i" ]; then
+            rm -rf "$i"
+        fi
+    done
+}
+
+SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
+SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+net_snmp_sysroot_preprocess () {
+    if [ -e ${D}${bindir}/net-snmp-config ]; then
+        install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \
+            -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}${prefix}@g" \
+            -e "s@^exec_prefix=.*@exec_prefix=${STAGING_EXECPREFIXDIR}@g" \
+            -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
+            -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
+            -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
+            -e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
+            -e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+                  -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \
+            -e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \
+          -i  ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
+    fi
+}
+
+PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client \
+             ${PN}-server-snmpd ${PN}-server-snmptrapd \
+             ${PN}-lib-netsnmp ${PN}-lib-agent ${PN}-lib-helpers \
+             ${PN}-lib-mibs ${PN}-lib-trapd"
+
+# perl module
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl-modules', '', d)}"
+
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-server = "1"
+ALLOW_EMPTY_${PN}-libs = "1"
+
+FILES_${PN}-perl-modules = "${libdir}/perl?/*"
+RDEPENDS_${PN}-perl-modules = "perl"
+
+FILES_${PN}-libs = ""
+FILES_${PN}-mibs = "${datadir}/snmp/mibs"
+FILES_${PN}-server-snmpd = "${sbindir}/snmpd \
+                            ${sysconfdir}/snmp/snmpd.conf \
+                            ${sysconfdir}/init.d \
+                            ${systemd_unitdir}/system/snmpd.service \
+"
+
+FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
+                                ${sysconfdir}/snmp/snmptrapd.conf \
+                                ${systemd_unitdir}/system/snmptrapd.service \
+"
+
+FILES_${PN}-lib-netsnmp = "${libdir}/libnetsnmp${SOLIBS}"
+FILES_${PN}-lib-agent = "${libdir}/libnetsnmpagent${SOLIBS}"
+FILES_${PN}-lib-helpers = "${libdir}/libnetsnmphelpers${SOLIBS}"
+FILES_${PN}-lib-mibs = "${libdir}/libnetsnmpmibs${SOLIBS}"
+FILES_${PN}-lib-trapd = "${libdir}/libnetsnmptrapd${SOLIBS}"
+
+FILES_${PN} = ""
+FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
+FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
+FILES_${PN}-dev += "${bindir}/mib2c \
+                    ${bindir}/mib2c-update \
+                    ${bindir}/net-snmp-config \
+                    ${bindir}/net-snmp-create-v3-user \
+"
+
+CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
+CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
+
+INITSCRIPT_PACKAGES = "${PN}-server-snmpd"
+INITSCRIPT_NAME_${PN}-server-snmpd = "snmpd"
+INITSCRIPT_PARAMS_${PN}-server-snmpd = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
+
+SYSTEMD_PACKAGES = "${PN}-server-snmpd \
+                    ${PN}-server-snmptrapd"
+
+SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
+SYSTEMD_SERVICE_${PN}-server-snmptrapd =  "snmptrapd.service"
+
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}"
+RDEPENDS_${PN} += "net-snmp-client"
+RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
+RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd"
+RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
+RDEPENDS_${PN}-client += "net-snmp-mibs net-snmp-libs"
+RDEPENDS_${PN}-libs += "libpci \
+                        ${PN}-lib-netsnmp \
+                        ${PN}-lib-agent \
+                        ${PN}-lib-helpers \
+                        ${PN}-lib-mibs \
+"
+RDEPENDS_${PN}-ptest += "perl \
+                         perl-module-test \
+                         perl-module-file-basename \
+                         perl-module-getopt-long \
+                         perl-module-file-temp \
+                         perl-module-data-dumper \
+"
+RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
+RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
+
+RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
+
+RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
+
+LEAD_SONAME = "libnetsnmp.so"
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/net-snmp-config"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb
new file mode 100644
index 0000000..8c57d29
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb
@@ -0,0 +1,23 @@
+SUMMARY = "OpenSource WebSocket Toolkit"
+DESCRIPTION = "noPoll is a OpenSource WebSocket implementation (RFC 6455), \
+written in ansi C, that allows building pure WebSocket solutions or to \
+provide WebSocket support to existing TCP oriented applications.\
+\
+noPoll provides support for WebSocket (ws://) and TLS (secure) WebSocket (wss://),\
+allowing message based (handler notified) programming or stream oriented access."
+
+HOMEPAGE = "http://www.aspl.es/nopoll/"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f0504124678c1b3158146e0630229298 \
+                   "
+DEPENDS = "openssl"
+SRC_URI = "http://www.aspl.es/nopoll/downloads/nopoll-${PV}.tar.gz \
+          "
+SRC_URI[md5sum] = "8d333f158b5d5a8975a6149e6ef8db63"
+SRC_URI[sha256sum] = "7f1b20f1d0525f30cdd2a4fc386d328b4cf98c6d11cef51fe62cd9491ba19ad9"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--disable-nopoll-doc"
+
+LDFLAGS += "-lpthread"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
new file mode 100644
index 0000000..cccbfa1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
@@ -0,0 +1,37 @@
+SUMMARY = "OpenFlow communications protocol"
+DESCRIPTION = "\
+Open standard that enables researchers to run experimental protocols in \
+contained networks.  OpenFlow is a communications interface between \
+control and forwarding planes of a software-defined networking architecture.\
+"
+HOMEPAGE = "http://www.openflow.org"
+
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2"
+
+SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git"
+
+DEPENDS = "virtual/libc"
+
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl openssl-native, libssl"
+
+EXTRA_OECONF += " \
+                 KARCH=${TARGET_ARCH} \
+                 ${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'SSL_LIBS="-lssl -lcrypto"', '', d)} \
+                "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+do_configure_prepend() {
+    ./boot.sh
+}
+
+do_install_append() {
+    # Remove /var/run as it is created on startup
+    rm -rf ${D}${localstatedir}/run
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch
new file mode 100644
index 0000000..952274b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch
@@ -0,0 +1,64 @@
+From 7b62e5884353b247f542844d1e4687d0e9211999 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Jul 2017 04:27:32 -0700
+Subject: [PATCH 1/2] Check and use strlcpy from libc before defining own
+
+This is required especially on musl where
+function prototype conflicts and causes build
+failures.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ lib/util.c   | 2 ++
+ lib/util.h   | 1 +
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 13064f6..596c43f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,7 +57,7 @@ OFP_CHECK_HWTABLES
+ OFP_CHECK_HWLIBS
+ AC_SYS_LARGEFILE
+ 
+-AC_CHECK_FUNCS([strsignal])
++AC_CHECK_FUNCS([strlcpy strsignal])
+ 
+ AC_ARG_VAR(KARCH, [Kernel Architecture String])
+ AC_SUBST(KARCH)
+diff --git a/lib/util.c b/lib/util.c
+index 21cc28d..1f341b1 100644
+--- a/lib/util.c
++++ b/lib/util.c
+@@ -138,6 +138,7 @@ xasprintf(const char *format, ...)
+     return s;
+ }
+ 
++#ifndef HAVE_STRLCPY
+ void
+ strlcpy(char *dst, const char *src, size_t size)
+ {
+@@ -148,6 +149,7 @@ strlcpy(char *dst, const char *src, size_t size)
+         dst[n_copy] = '\0';
+     }
+ }
++#endif
+ 
+ void
+ ofp_fatal(int err_no, const char *format, ...)
+diff --git a/lib/util.h b/lib/util.h
+index fde681f..9e45ea9 100644
+--- a/lib/util.h
++++ b/lib/util.h
+@@ -41,6 +41,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include "compiler.h"
++#include "config.h"
+ 
+ #ifndef va_copy
+ #ifdef __va_copy
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-generate-not-static-get_dh-functions.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-generate-not-static-get_dh-functions.patch
new file mode 100644
index 0000000..4acae80
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0001-generate-not-static-get_dh-functions.patch
@@ -0,0 +1,33 @@
+From 0fe6770b617af7e400abc6f8652c1417d4c3575e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Sep 2018 22:49:15 -0700
+Subject: [PATCH] generate not static get_dh* functions
+
+Fixes build with OpenSSL 1.1.x
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/automake.mk | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/automake.mk b/lib/automake.mk
+index bfbeb94..b53909a 100644
+--- a/lib/automake.mk
++++ b/lib/automake.mk
+@@ -113,8 +113,9 @@ lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
+ 	(echo '#include "lib/dhparams.h"' &&				\
+ 	 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout &&	\
+ 	 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout &&	\
+-	 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout)	\
+-	| sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
++	 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) | 	\
++	 sed -e 's/\(get_dh[0-9]*\)()/\1(void)/' 			\
++	     -e 's/static DH \*get_dh/DH \*get_dh/' > lib/dhparams.c.tmp
+ 	mv lib/dhparams.c.tmp lib/dhparams.c
+ endif
+ 
+-- 
+2.18.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch
new file mode 100644
index 0000000..75180fe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch
@@ -0,0 +1,59 @@
+From 5bba224edea38607e8732081f86679ffd8b218ab Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Jul 2017 04:29:04 -0700
+Subject: [PATCH 2/2] lib/netdev: Adjust header include sequence
+
+Specify libc headers before kernel UAPIs
+this helps compiling with musl where otherwise
+it uses the definition from kernel and complains
+about double definition in libc headers
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/netdev.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/lib/netdev.c b/lib/netdev.c
+index 3b6fbc5..c7de25e 100644
+--- a/lib/netdev.c
++++ b/lib/netdev.c
+@@ -39,7 +39,6 @@
+ #include <fcntl.h>
+ #include <arpa/inet.h>
+ #include <inttypes.h>
+-#include <linux/if_tun.h>
+ 
+ /* Fix for some compile issues we were experiencing when setting up openwrt
+  * with the 2.4 kernel. linux/ethtool.h seems to use kernel-style inttypes,
+@@ -57,10 +56,6 @@
+ #define s64 __s64
+ #endif
+ 
+-#include <linux/ethtool.h>
+-#include <linux/rtnetlink.h>
+-#include <linux/sockios.h>
+-#include <linux/version.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+@@ -68,12 +63,16 @@
+ #include <net/ethernet.h>
+ #include <net/if.h>
+ #include <net/if_arp.h>
+-#include <net/if_packet.h>
+ #include <net/route.h>
+ #include <netinet/in.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <linux/ethtool.h>
++#include <linux/rtnetlink.h>
++#include <linux/sockios.h>
++#include <linux/version.h>
++#include <linux/if_tun.h>
+ 
+ #include "fatal-signal.h"
+ #include "list.h"
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb
new file mode 100644
index 0000000..a7e254d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_1.0.bb
@@ -0,0 +1,4 @@
+include ${BPN}.inc
+
+SRCREV = "5ccca75a69f99791659bcfbcf35353ab1921320a"
+PV = "1.0"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb
new file mode 100644
index 0000000..b6cef07
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb
@@ -0,0 +1,10 @@
+include ${BPN}.inc
+
+SRCREV = "c84f33f09d5dbcfc9b489f64cb30475bf36f653a"
+PV = "1.0+git${SRCPV}"
+
+SRC_URI += "\
+           file://0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch \
+           file://0002-lib-netdev-Adjust-header-include-sequence.patch \
+           file://0001-generate-not-static-get_dh-functions.patch \
+           "
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch
new file mode 100644
index 0000000..d1ee3c5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch
@@ -0,0 +1,29 @@
+From 1f8d336a5cd88b87e15596d05980f6fe77a0f226 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 11:28:41 -0700
+Subject: [PATCH 1/4] Use -1 instead of WAIT_ANY
+
+WAIT_ANY is not supported by POSIX and some C libraries
+e.g. musl do not define this.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_pid.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usl/usl_pid.c b/usl/usl_pid.c
+index 103458b..9819473 100644
+--- a/usl/usl_pid.c
++++ b/usl/usl_pid.c
+@@ -78,7 +78,7 @@ int usl_pid_reap_children(int waitfor)
+ 
+ 	/* Wait for processes in our process group. */
+ 
+-	while (((pid = waitpid(WAIT_ANY, &status, (waitfor ? 0: WNOHANG))) != -1) && (pid != 0)) {
++	while (((pid = waitpid(-1, &status, (waitfor ? 0: WNOHANG))) != -1) && (pid != 0)) {
+ 		have_callback = 0;
+ 		usl_list_for_each(walk, tmp, &usl_child_list) {
+ 			child = usl_list_entry(walk, struct usl_pid_child, list);
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch
new file mode 100644
index 0000000..c50f68e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch
@@ -0,0 +1,34 @@
+From 25dce20a75bc84ae9e4ec640590cef0c12750789 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 17:48:13 -0700
+Subject: [PATCH 1/2] l2tp_api: Included needed headers
+
+These are flagged by musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ l2tp_api.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/l2tp_api.c b/l2tp_api.c
+index d16f80e..9d6f60a 100644
+--- a/l2tp_api.c
++++ b/l2tp_api.c
+@@ -22,9 +22,12 @@
+  * Each module implements the required RPC xxx_1_svc() callbacks which
+  * are called directly by the RPC library.
+  */
+-
++#define _GNU_SOURCE
++#include <sys/types.h>
++#include <rpc/types.h>
++#include <rpc/xdr.h>
+ #include <rpc/pmap_clnt.h>
+-#include <net/ethernet.h>
++//#include <netinet/in.h>
+ 
+ #include "usl.h"
+ 
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch
new file mode 100644
index 0000000..1f576fa
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch
@@ -0,0 +1,38 @@
+From ce5f5563ab54db9d28dba44a0e25e8a8c7bb9876 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Oct 2016 00:34:35 +0000
+Subject: [PATCH] test/pppd_dummy.c: Fix return value
+
+pause() is defined in unistd.h, clang does not
+like the fact that we are using a function without
+declaration
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/pppd_dummy.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/pppd_dummy.c b/test/pppd_dummy.c
+index 148e7d2..b564c36 100644
+--- a/test/pppd_dummy.c
++++ b/test/pppd_dummy.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <syslog.h>
++#include <unistd.h>
+ 
+ #define PPPD_DUMMY_TMP_FILE	"/tmp/pppd_dummy"
+ 
+@@ -40,7 +41,7 @@ int main(int argc, char **argv)
+ 	
+ 	if (file == NULL) {
+ 		syslog(LOG_ERR, "Failed to open %s\n", filename);
+-		return;
++		return -1;
+ 	}
+ 
+ 	for (arg = 1; arg < argc; arg++) {
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch
new file mode 100644
index 0000000..9df3265
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch
@@ -0,0 +1,25 @@
+From 2d633f4c18ff3cb52234449fd86a0a63b55d669b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 11:31:55 -0700
+Subject: [PATCH 2/4] cli: include fcntl.h for O_CREAT define
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_readline.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cli/cli_readline.c b/cli/cli_readline.c
+index 097ed6a..127136c 100644
+--- a/cli/cli_readline.c
++++ b/cli/cli_readline.c
+@@ -24,6 +24,7 @@
+ #include <sys/file.h>
+ #include <sys/stat.h>
+ #include <sys/errno.h>
++#include <fcntl.h>
+ #include <signal.h>
+ 
+ #include <readline/readline.h>
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch
new file mode 100644
index 0000000..bd9bcb8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch
@@ -0,0 +1,36 @@
+From a41cbeee3cf660663a9baac80545050a8d960898 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 18:09:58 -0700
+Subject: [PATCH 2/2] user ipv6 structures
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Update for ipv6 address compare
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ l2tp_api.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/l2tp_api.c b/l2tp_api.c
+index 9d6f60a..f0946fd 100644
+--- a/l2tp_api.c
++++ b/l2tp_api.c
+@@ -450,10 +450,12 @@ int l2tp_api_rpc_check_request(SVCXPRT *xprt)
+ 	 * non-loopback interface, reject the request.
+ 	 */
+ 	if ((!l2tp_opt_remote_rpc) &&
+-	    ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
+-	     (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
++	    ((memcmp(&xprt->xp_raddr.sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)) != 0) &&
++	     (memcmp(&xprt->xp_raddr.sin6_addr, &in6addr_any, sizeof(struct in6_addr)) != 0))) {
++		char straddr[INET6_ADDRSTRLEN];
++		inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
+ 		if (l2tp_opt_trace_flags & L2TP_DEBUG_API) {
+-			l2tp_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
++			l2tp_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
+ 		}
+ 		svcerr_auth(xprt, AUTH_TOOWEAK);
+ 		return -EPERM;
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch
new file mode 100644
index 0000000..e05be1b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch
@@ -0,0 +1,35 @@
+From 74fe72583472bcc3c89a52839cac2ebbad6c8a74 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 11:34:52 -0700
+Subject: [PATCH 3/4] cli: Define _GNU_SOURCE for getting sighandler_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cli/cli_readline.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cli/cli_readline.c b/cli/cli_readline.c
+index 127136c..931779b 100644
+--- a/cli/cli_readline.c
++++ b/cli/cli_readline.c
+@@ -17,7 +17,7 @@
+  *  Boston, MA 02110-1301 USA
+  *
+  *****************************************************************************/
+-
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+@@ -634,7 +634,7 @@ static void cli_rl_uninstall_signal_handlers(void)
+ 
+ static int cli_rl_install_signal_handlers(void)
+ {
+-	__sighandler_t handler;
++	sighandler_t handler;
+ 
+ 	rl_catch_signals = 0;
+ 	rl_clear_signals();
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch
new file mode 100644
index 0000000..96dbc75
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch
@@ -0,0 +1,106 @@
+From 152486fa3c36c3b99d17d5b553cf87ef412fae8e Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Mon, 1 Dec 2014 01:53:41 +0900
+Subject: [PATCH] Makefile:modify CFLAGS to aviod build error.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ Makefile         | 22 +++++++++++-----------
+ plugins/Makefile |  6 +++---
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4aaa448..baa7882 100644
+--- a/Makefile
++++ b/Makefile
+@@ -152,10 +152,10 @@ LIBS.dmalloc=		-ldmalloc
+ export USE_DMALLOC
+ endif
+ 
+-CPPFLAGS=		$(CPPFLAGS.l2tptest) $(CPPFLAGS-y)
+-CFLAGS=			-I. -Iusl -Icli -isystem include \
+-				-MMD -Wall -Werror -Wno-strict-aliasing \
+-				$(CPPFLAGS) $(CPPFLAGS.dmalloc) \
++ADD_CPPFLAGS=		$(CPPFLAGS.l2tptest) $(CPPFLAGS-y)
++ADD_CFLAGS=			-I. -Iusl -Icli -isystem include \
++				-MMD -Wall -Wno-strict-aliasing \
++				$(ADD_CPPFLAGS) $(CPPFLAGS.dmalloc) \
+ 				-DSYS_LIBDIR=$(SYS_LIBDIR)
+ LDFLAGS.l2tpd=		-Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
+ LDFLAGS.l2tpconfig=	-Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
+@@ -170,10 +170,10 @@ CFLAGS.optimize=	$(OPT_CFLAGS)
+ endif
+ export CFLAGS.optimize
+ 
+-CFLAGS+=		$(CFLAGS.optimize)
++ADD_CFLAGS+=		$(CFLAGS.optimize)
+ 
+ ifeq ($(L2TP_USE_ASYNC_RPC),y)
+-CPPFLAGS+=		-DL2TP_ASYNC_RPC
++ADD_CPPFLAGS+=		-DL2TP_ASYNC_RPC
+ endif
+ 
+ ifeq ($(L2TP_FEATURE_RPC_MANAGEMENT),y)
+@@ -220,13 +220,13 @@ endif
+ 
+ # Compile without -Wall because rpcgen-generated code is full of warnings.
+ %_xdr.o:		%_xdr.c
+-			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+ 
+ %_client.o:		%_client.c
+-			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+ 
+ %_server.o:		%_server.c
+-			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) $<
++			$(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(ADD_CPPFLAGS) $<
+ 
+ %_xdr.c:		%.x
+ 			-$(RM) $@
+@@ -272,7 +272,7 @@ l2tpconfig:		$(L2TPCONFIG_SRCS.o)
+ 			$(CC) -o $@ $^ $(LDFLAGS.l2tpconfig)
+ 
+ %.o:	%.c
+-			$(CC) -c $(CFLAGS) $< -o $@
++			$(CC) -c $(CFLAGS) $(ADD_CFLAGS) $< -o $@
+ 
+ l2tp_options.h:	FORCE
+ 	@rm -f $@.tmp
+@@ -325,7 +325,7 @@ install:		install-all
+ install-all:		all install-daemon install-app
+ 
+ install-daemon:
+-			@for d in $(filter-out usl,$(SUBDIRS)); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" install; if [ $$? -ne 0 ]; then exit 1; fi; done
++			@for d in $(filter-out usl,$(SUBDIRS)); do $(MAKE) -C $$d $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS) $(ADD_CPPFLAGS)" install; if [ $$? -ne 0 ]; then exit 1; fi; done
+ 			$(INSTALL) -d $(DESTDIR)/usr/sbin
+ 			$(INSTALL) openl2tpd $(DESTDIR)/usr/sbin
+ 
+diff --git a/plugins/Makefile b/plugins/Makefile
+index 5be996d..6810236 100644
+--- a/plugins/Makefile
++++ b/plugins/Makefile
+@@ -1,7 +1,7 @@
+-CFLAGS	:= $(CFLAGS.optimize) -MMD -Wall \
++ADD_CFLAGS	:= $(CFLAGS.optimize) -MMD -Wall \
+ 	-isystem ../include \
+ 	-I. -I.. -I../usl -fPIC $(EXTRA_CFLAGS)
+-LDFLAGS	:= -shared
++ADD_LDFLAGS	:= -shared
+ 
+ PLUGINS.c:=	ppp_unix.c ppp_null.c ipsec.c event_sock.c
+ 
+@@ -21,7 +21,7 @@ clean:
+ 		$(RM) $(PLUGINS.so) $(wildcard *.o) $(wildcard *.d) $(SRC.generated)
+ 
+ %.so: %.c
+-		$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $<
++		$(CC) -o $@ $(LDFLAGS) $(ADD_LDFLAGS) $(CFLAGS) $(ADD_CFLAGS) $<
+ 
+ install:	all
+ 		$(INSTALL) -d $(DESTDIR)$(SYS_LIBDIR)/openl2tp
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-obey-LDFLAGS.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-obey-LDFLAGS.patch
new file mode 100644
index 0000000..811fadd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-obey-LDFLAGS.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+--- openl2tp-1.8/Makefile.orig	2016-09-16 14:54:18.554291976 +0200
++++ openl2tp-1.8/Makefile	2016-09-16 14:57:23.559090400 +0200
+@@ -157,8 +157,8 @@ ADD_CFLAGS=			-I. -Iusl -Icli -isystem i
+ 				-MMD -Wall -Wno-strict-aliasing \
+ 				$(ADD_CPPFLAGS) $(CPPFLAGS.dmalloc) \
+ 				-DSYS_LIBDIR=$(SYS_LIBDIR)
+-LDFLAGS.l2tpd=		-Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.l2tpconfig=	-Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
++LDFLAGS.l2tpd=		-Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc $(LDFLAGS)
++LDFLAGS.l2tpconfig=	-Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc $(LDFLAGS)
+ 
+ OPT_CFLAGS?=		-O
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch
new file mode 100644
index 0000000..4597df8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch
@@ -0,0 +1,44 @@
+This fixes a compile issue introduced with linux kernel 4.15
+
+include/linux/in.h:222:8: error: redefinition of 'struct in_pktinfo'
+|  struct in_pktinfo {
+
+
+Upstream-Status: Pending
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: openl2tp-1.8/plugins/ppp_unix.c
+===================================================================
+--- openl2tp-1.8.orig/plugins/ppp_unix.c
++++ openl2tp-1.8/plugins/ppp_unix.c
+@@ -25,9 +25,14 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <signal.h>
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ #include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
++#endif
++
+ #include <arpa/inet.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+@@ -41,12 +46,12 @@
+ #define __user
+ #endif
+ #include <sys/ioctl.h>
+-#include <linux/if_ether.h>
+-#include <linux/if_pppox.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
++#include <linux/if_pppox.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ #include <linux/if_pppol2tp.h>
+-
++#endif
+ #include "usl.h"
+ #include "l2tp_private.h"
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch
new file mode 100644
index 0000000..c11a127
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch
@@ -0,0 +1,41 @@
+From 460549a3de27f8dd8371b6d6fc1f69d8bffa102b Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 6 Jan 2015 11:23:21 -0500
+Subject: [PATCH] openl2tp: simplify gcc warning hack
+
+The hack to work around the gcc warning causes problems with some modern
+gcc configurations.  Since the redef behaviour is essentially correct
+everywhere and since the hack is still required on 32-bit builders, leave
+it in place but remove the #if guard since it is only there to ensure that
+the l2tp_private.h file is updated if the rpc source file is changed and
+the two get out of sync.
+
+Upstream-status: pending
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ l2tp_private.h | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/l2tp_private.h b/l2tp_private.h
+index f3c1af7..cca6806 100644
+--- a/l2tp_private.h
++++ b/l2tp_private.h
+@@ -89,14 +89,8 @@
+  * So we redefine the constant with UL suffix to avoid the gcc warning.
+  * Is there some C preprocessor magic that could avoid having to do this?
+  */
+-#if L2TP_API_TUNNEL_FLAG_MTU != 2147483648
+-#error Constant L2TP_API_TUNNEL_FLAG_MTU changed. Update local definition here.
+-#endif
+ #undef L2TP_API_TUNNEL_FLAG_MTU
+ #define L2TP_API_TUNNEL_FLAG_MTU 2147483648UL
+-#if L2TP_API_SESSION_FLAG_NO_PPP != 2147483648
+-#error Constant L2TP_API_SESSION_FLAG_NO_PPP changed. Update local definition here.
+-#endif
+ #undef L2TP_API_SESSION_FLAG_NO_PPP
+ #define L2TP_API_SESSION_FLAG_NO_PPP 2147483648UL
+ 
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch
new file mode 100644
index 0000000..0bece2f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch
@@ -0,0 +1,24 @@
+commit 3e96a6c41bdd26417265a45ed685138d8eed564e
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Fri Sep 14 02:32:53 2012 -0400
+
+    openl2tp: Enable tests
+    
+    Build the test direcctory as part
+    of the overall build
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 412cf4d..adf4f44 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,7 @@ L2TP_FEATURE_LOCAL_CONF_FILE=	y
+ 
+ # Define to include test code. This must be defined to run the
+ # regression tests
+-# L2TP_TEST=		y
++L2TP_TEST=y
+ 
+ # Define to compile in debug code. Also makes default trace flags
+ # enable all messages
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
new file mode 100644
index 0000000..3119425
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
@@ -0,0 +1,35 @@
+commit 6ea3125e2bec15004f312814022335d94cdf7e94
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 19 11:34:48 2012 -0400
+
+    Fix openl2tp config script location
+    
+    Correct the location of the sysconfig
+    script. Use /etc/default/ instead of
+    /etc/sysconfig/
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [configuration]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index 7f27bb7..4194f63 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -8,12 +8,12 @@
+ #              can be used to implement L2TP VPNs. As a server, it can handle
+ #              hundreds of tunnels and sessions.
+ # processname: openl2tpd
+-# config: /etc/sysconfig/openl2tpd
++# config: /etc/default/openl2tpd
+ # pidfile: /var/run/openl2tpd.pid
+ 
+ # Source function library.
+ . /etc/init.d/functions
+-. /etc/sysconfig/openl2tpd
++. /etc/default/openl2tpd
+  
+ # See how we were called.
+   
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
new file mode 100644
index 0000000..15a8c5b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
@@ -0,0 +1,32 @@
+openl2tp: eliminate warning from modprobe
+
+modprobe will emit alarming warnings if it cannot
+find a module, but we only care that it find one
+of two possible modules when we start openl2tpd.
+
+Suppress messages from modprobe.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -29,7 +29,7 @@ start() {
+ 		return 1
+ 	    fi
+ 	fi
+-	modprobe -s pppol2tp || modprobe -s l2tp_ppp
++	modprobe -sq pppol2tp || modprobe -sq l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
+@@ -57,7 +57,7 @@ stop() {
+ 	    return 1;
+ 	fi
+ 	killproc openl2tpd
+-	modprobe -s -r pppol2tp || modprobe -s -r l2tp_ppp
++	modprobe -srq pppol2tp || modprobe -srq l2tp_ppp
+ 	echo
+ 	rm -f /var/run/openl2tpd.pid
+         rm -f /var/lock/subsys/openl2tpd
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
new file mode 100644
index 0000000..9ecd4b0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
@@ -0,0 +1,49 @@
+commit 7c58a1e244ea83a9e7bbd51a6d354cee25cdbd33
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 12 23:35:40 2012 -0400
+
+    Fix openl2tpd initscript
+    
+    - Correct the location of the retval statement.
+    - use start-stop-daemon instead of daemon.
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [OE specific]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index ce21b50..7f27bb7 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -24,7 +24,7 @@ start() {
+         if [ -e /var/lock/subsys/openl2tpd ]; then
+ 	    if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then
+ 		echo -n $"cannot start openl2tpd: openl2tpd is already running.";
+-		failure $"cannot start openl2tpd: openl2tpd already running.";
++		#failure $"cannot start openl2tpd: openl2tpd already running.";
+ 		echo
+ 		return 1
+ 	    fi
+@@ -32,9 +32,9 @@ start() {
+ 	modprobe -s pppol2tp || modprobe -s l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+-	    daemon openl2tpd $OPENL2TPDARGS
++	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
++        RETVAL=$?
+ 	fi
+-	RETVAL=$?
+ 	echo
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    touch /var/lock/subsys/openl2tpd
+@@ -52,7 +52,7 @@ stop() {
+ 	echo -n $"Stopping $prog: "
+         if [ ! -e /var/lock/subsys/openl2tpd ]; then
+ 	    echo -n $"cannot stop openl2tpd: openl2tpd is not running."
+-	    failure $"cannot stop openl2tpd: openl2tpd is not running."
++	    #failure $"cannot stop openl2tpd: openl2tpd is not running."
+ 	    echo
+ 	    return 1;
+ 	fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
new file mode 100644
index 0000000..d02d0ff
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=The open L2TP implementation
+After=network.target remote-fs.target nss-lookup.target rpcbind.target
+Requires=rpcbind.service
+
+[Service]
+Type=forking
+PIDFile=/run/openl2tpd.pid
+EnvironmentFile=@SYSCONFDIR@/default/openl2tpd
+ExecStartPre=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -sq l2tp_ppp || @BASE_SBINDIR@/modprobe -sq pppol2tp"
+ExecStart=@SBINDIR@/openl2tpd $OPENL2TPDARGS
+ExecStartPost=@BASE_BINDIR@/sh -c 'if [ -n "$OPENL2TPD_CONFIG_FILE" ]; then sleep 1; @BINDIR@/l2tpconfig config restore file=$OPENL2TPD_CONFIG_FILE; fi'
+ExecStopPost=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -rsq l2tp_ppp || @BASE_SBINDIR@/modprobe -rsq pppol2tp"
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
new file mode 100644
index 0000000..01c9c7b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+TMP_DIR=`mktemp -d /tmp/std.26.tmp.XXXXXX`
+
+# restore the file if exist
+restore_file()
+{
+	filelist="test_procs.tcl tunnel.test session.test"
+	for file in ${filelist}
+	do
+		if [ -f ${TMP_DIR}/${file} ]; then
+			mv ${TMP_DIR}/${file} ${OPENL2TP_DIR}
+		fi
+	done
+}
+
+exit_cus()
+{
+	restore_file
+	echo $1
+	exit $2
+}
+
+if [ -d /usr/lib64/openl2tp/ptest ]; then
+	OPENL2TP_DIR="/usr/lib64/openl2tp"
+elif [ -d /usr/lib/openl2tp/ptest ]; then
+	OPENL2TP_DIR="/usr/lib/openl2tp"
+else
+	exit_cus "The openl2tp ptest directory not installed, skip the test" 1
+fi
+
+#read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST
+echo "Please input the network interface you use to test(such as eth0, em1 etc):"
+read ETH_TEST > /dev/null
+
+if [ x"$ETH_TEST" = x ]; then
+    exit_cus "The network interface cannot be null" 1
+fi
+ifconfig | grep $ETH_TEST > /dev/null || exit_cus "The network interface you provide is invalid" 1
+
+# check openl2tp related kernel config
+zcat /proc/config.gz | grep CONFIG_L2TP=y > /dev/null || exit_cus "Failed to check CONFIG_L2TP=y, skip the tests." 1
+zcat /proc/config.gz | grep CONFIG_PPPOL2TP=m > /dev/null || exit_cus "Failed to check CONFIG_PPPOL2TP=m, skip the tests." 1
+
+SYSV_INIT="/etc/init.d/rpcbind"
+if [ -e ${SYSV_INIT} ]; then
+	${SYSV_INIT} status > /dev/null || ${SYSV_INIT} start > /dev/null
+else
+	systemctl status rpcbind > /dev/null || systemctl start rpcbind > /dev/null
+fi
+
+which systemctl > /dev/null && systemctl status rpcbind > /dev/null || service rpcbind status > /dev/null
+[ $? -ne 0 ] && exit_cus "Failed to start rpcbind service, skip the tests." 1
+
+# backup the below files
+cp ${OPENL2TP_DIR}/ptest/test_procs.tcl $TMP_DIR
+cp ${OPENL2TP_DIR}/ptest/tunnel.test $TMP_DIR
+cp ${OPENL2TP_DIR}/ptest/session.test $TMP_DIR
+
+# customise the config
+if [ x"$ETH_TEST" = x ]; then
+	exit_cus "Please set ETH_TEST which used to test first, skip the tests." 1
+fi
+
+sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl
+test_ip="`ifconfig $ETH_TEST | grep 'inet ' | sed 's/^.*inet addr://g' | \
+    sed 's/ *Mask.*$//g'|sed 's/ *Bcast.*$//g'`"
+sed -i 's/192.168.0.1/'"$test_ip"'/g' ${OPENL2TP_DIR}/ptest/tunnel.test
+
+# load module l2tp_ppp
+modprobe  l2tp_ppp > /dev/null
+lsmod | grep l2tp_ppp > /dev/null || exit_cus "FAIL: Load module l2tp_ppp" 2
+
+# start openl2tpd
+ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null
+ppp_path=`rpm -ql openl2tp | grep ppp_null.so`
+echo "test it here"
+/usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} &  > /dev/null
+
+# prepare the test env
+rm -rf $OPENL2TP_DIR/results
+mkdir -p $OPENL2TP_DIR/results || exit_cus "FAIL: mkdir $OPENL2TP_DIR/results" 2
+cp /usr/bin/l2tpconfig ${OPENL2TP_DIR} || exit_cus "FAIL: copy /usr/bin/l2tpconfig to ${OPENL2TP_DIR}" 2
+
+# start the test
+cd ${OPENL2TP_DIR}/ptest && tclsh all.tcl -preservecore 3 -verbose bps -tmpdir $OPENL2TP_DIR/results -outfile test-l2tpd.result -constraints "l2tpdRunning peerProfile tunnelProfile sessionProfile pppProfile system" -match "peer_profile-1.1 tunnel_profile-1.1 session_profile-1.1 ppp_profile-1.1 system-1.1"
+
+# check the result
+PASSNUM=`grep PASS $OPENL2TP_DIR/results/test-l2tpd.result | wc -l`
+FAILNUM=`grep FAIL $OPENL2TP_DIR/results/test-l2tpd.result | wc -l`
+if [ $PASSNUM -ne 0 ] && [ $FAILNUM -eq 0 ]; then
+    echo "PASS: openl2tp"
+else
+    echo "FAIL: openl2tp"
+fi
+
+restore_file
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
new file mode 100644
index 0000000..9c0c28e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -0,0 +1,94 @@
+SUMMARY = "An L2TP client/server, designed for VPN use."
+DESCRIPTION = "OpenL2TP is an open source L2TP client / server, written \
+specifically for Linux. It has been designed for use as an enterprise \
+L2TP VPN server or in commercial, Linux-based, embedded networking \
+products and is able to support hundreds of sessions, each with \
+different configuration. It is used by several ISPs to provide \
+L2TP services and by corporations to implement L2TP VPNs."
+HOMEPAGE = "http://www.openl2tp.org/"
+SECTION = "net"
+
+# cli and usl use license LGPL-2.1
+LICENSE = "GPL-2.0 & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \
+                    file://LICENSE;md5=f8970abd5ea9be701a0deedf5afd77a5 \
+                    file://cli/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    "
+
+DEPENDS = "popt flex readline rpcsvc-proto-native bison-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \
+           file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \
+           file://openl2tp-simplify-gcc-warning-hack.patch \
+           file://Makefile-obey-LDFLAGS.patch \
+           file://0001-test-pppd_dummy.c-Fix-return-value.patch \
+           file://0001-Use-1-instead-of-WAIT_ANY.patch \
+           file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \
+           file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \
+           file://0001-l2tp_api-Included-needed-headers.patch \
+           file://openl2tpd-initscript-fix.patch \
+           file://openl2tpd-initscript-fix-sysconfig.patch \
+           file://openl2tpd-initscript-fix-warning.patch \
+           file://openl2tpd.service \
+           file://openl2tpd-enable-tests.patch \
+           file://run-ptest \
+           file://fix_linux_4.15_compile.patch \
+           file://0002-user-ipv6-structures.patch \
+           "
+SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
+SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
+
+inherit autotools-brokensep pkgconfig systemd ptest
+
+SYSTEMD_SERVICE_${PN} = "openl2tpd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+DEPENDS += "libtirpc"
+CPPFLAGS += "-I${STAGING_INCDIR}/tirpc"
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += "-ltirpc"
+
+PARALLEL_MAKE = ""
+EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-unused-but-set-variable" CPPFLAGS="${CPPFLAGS}" OPT_CFLAGS="${CFLAGS}"'
+
+do_compile_prepend() {
+    sed -i -e "s:SYS_LIBDIR=.*:SYS_LIBDIR=${libdir}:g" \
+        -e 's:$(CROSS_COMPILE)as:${AS}:g' \
+        -e 's:$(CROSS_COMPILE)ld:${LD}:g' \
+        -e 's:$(CROSS_COMPILE)gcc:${CC}:g' \
+        -e 's:$(CROSS_COMPILE)ar:${AR}:g' \
+        -e 's:$(CROSS_COMPILE)nm:${NM}:g' \
+        -e 's:$(CROSS_COMPILE)strip:${STRIP}:g' \
+        -e 's:$(CROSS_COMPILE)install:install:g' \
+        -e 's:CPPFLAGS-y:CPPFLAGS:g' \
+        ${S}/Makefile
+}
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/default
+    install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd
+    install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${WORKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service
+        sed -i -e 's,@STATEDIR@,${localstatedir},g' \
+               -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+               -e 's,@SBINDIR@,${sbindir},g' \
+               -e 's,@BINDIR@,${bindir},g' \
+               -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+               -e 's,@BASE_BINDIR@,${base_bindir},g' \
+               ${D}${systemd_system_unitdir}/openl2tpd.service
+    fi
+}
+
+do_install_ptest () {
+    for i in all.tcl configfile.test peer_profile.test ppp_profile.test \
+    session_profile.test session.test system.test test_procs.tcl \
+    thirdparty_lns.test tunnel_profile.test tunnel.test; do
+        install -m 0755 ${S}/test/$i ${D}${PTEST_PATH}
+    done
+}
+
+RDEPENDS_${PN} = "ppp ppp-l2tp bash"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch
new file mode 100644
index 0000000..40b082e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch
@@ -0,0 +1,26 @@
+From a64e52f9b58519aa2b8a1073fa6c04da04933428 Mon Sep 17 00:00:00 2001
+From: Jonathan Richardson <jonathan.richardson@broadcom.com>
+Date: Wed, 26 Feb 2020 12:16:38 -0800
+Subject: [PATCH] Fix musl libc build issue
+
+clif.h should include sys/types.h for the definition of pid_t. It fails
+to compile when using musl libc.
+
+Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
+
+---
+ include/clif.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/clif.h b/include/clif.h
+index 648eedf..92f4fd8 100644
+--- a/include/clif.h
++++ b/include/clif.h
+@@ -32,6 +32,7 @@
+ #ifndef CLIF_H
+ #define CLIF_H
+ 
++#include <sys/types.h>
+ #include <sys/un.h>
+ #include "clif_sock.h"
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch
new file mode 100644
index 0000000..b58fc10
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch
@@ -0,0 +1,29 @@
+From eb14aa66dc0384071af401cced8c02993b55502e Mon Sep 17 00:00:00 2001
+From: Jonathan Richardson <jonathan.richardson@broadcom.com>
+Date: Wed, 26 Feb 2020 15:54:51 -0800
+Subject: [PATCH] autotools: Add include path to generated version.h
+
+When the build dir isn't the same as source dir it fails to compile
+because the generated version.h from AC_CONFIG_FILES is always in build
+dir. Include the path to it in AM_CPPFLAGS.
+
+Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
+
+---
+ Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0fb9bb0..2952019 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,6 +14,9 @@ endif
+ AM_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR="\"${sysconfdir}\"" \
+ 	-D_FORTIFY_SOURCE=2
+ 
++# Required for the generated version.h when build dir is not the same as srcdir.
++AM_CPPFLAGS += -I${top_builddir}/include
++
+ ACLOCAL_AMFLAGS = -I m4
+ 
+ parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch
new file mode 100644
index 0000000..a26a529
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch
@@ -0,0 +1,57 @@
+From dc3f2250908587710f109c80ddf8a94f0bc40b82 Mon Sep 17 00:00:00 2001
+From: Jonathan Richardson <jonathan.richardson@broadcom.com>
+Date: Fri, 6 Apr 2018 10:49:04 -0700
+Subject: [PATCH] autotools: Add option to disable installation of systemd conf
+ files
+
+Add option to configure.ac to enable or disable install of systemd conf
+files. If --with-systemdsystemunitdir is passed to configure then the
+files will be installed to the provided directory. If the option isn't
+provided then the value is determined from the systemd pkgconfig file,
+if found in PKG_CONFIG_PATH.
+
+This change is required because Makefile.am always installed the files
+to a hard coded path that couldn't be changed.
+
+
+Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
+---
+ Makefile.am  | 3 ++-
+ configure.ac | 9 +++++++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 292c0fd..0fb9bb0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -138,8 +138,9 @@ install-data-hook:	installdirs-local
+ pkgconfigdir = ${libdir}/pkgconfig
+ pkgconfig_DATA = lldpad.pc liblldp_clif.pc
+ 
+-systemdsystemunitdir = $(prefix)/lib/systemd/system
++if HAVE_SYSTEMD
+ dist_systemdsystemunit_DATA = lldpad.service lldpad.socket
++endif
+ 
+ bashcompletiondir = $(sysconfdir)/bash_completion.d
+ dist_bashcompletion_DATA = contrib/bash_completion/lldpad contrib/bash_completion/lldptool
+diff --git a/configure.ac b/configure.ac
+index 0667446..f75f433 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,6 +95,15 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT8_T
+ 
++# Support for systemd unit files.
++AC_ARG_WITH([systemdsystemunitdir],
++        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
++        [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
++if test "x$with_systemdsystemunitdir" != xno; then
++        AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
++fi
++AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
++
+ AC_CONFIG_FILES([Makefile include/version.h lldpad.spec lldpad.pc liblldp_clif.pc])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_OUTPUT
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb
new file mode 100644
index 0000000..5fbf064
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Open-LLDP"
+DESCRIPTION = "Link Layer Discovery Protocol for Linux that includes support for DCBX"
+HOMEPAGE = "http://open-lldp.org/start"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig autotools
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}
+
+DEPENDS = "libnl libconfig readline"
+
+SRCREV = "36d729de7ce5b56cf061d94d610cf0510154820c"
+SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=master \
+           file://0001-Fix-musl-libc-build-issue.patch \
+           file://0001-autotools-Add-include-path-to-generated-version.h.patch \
+           file://0001-autotools-Add-option-to-disable-installation-of-syst.patch \
+           "
+
+# Makefile.am adds -Werror to AM_CFLAGS. There are warnings so disable it.
+TARGET_CFLAGS += "-Wno-error"
+
+# Enable install of systemd conf files.
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_system_unitdir}', '', d)}"
+
+SYSTEMD_SERVICE_${PN} = "lldpad.service lldpad.socket"
+
+# To enable service at boot set to enable in local.conf.
+SYSTEMD_AUTO_ENABLE ?= "disable"
+
+RRECOMMENDS_${PN} = "iproute2-tc"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/options.pptp b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/options.pptp
new file mode 100644
index 0000000..f446e22
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux/options.pptp
@@ -0,0 +1,30 @@
+#
+# Lock the port
+#
+lock
+
+#
+# We don't need the tunnel server to authenticate itself
+#
+noauth
+
+#
+# Turn off transmission protocols we know won't be used
+#
+nobsdcomp
+nodeflate
+
+#
+# We want MPPE
+# (option naming specific to ppp 2.4.0 with unofficial patch)
+#
+#mppe-40
+mppe-128
+#mppe-stateless
+
+#
+# We want a sane mtu/mru 
+# (ppp 2.4.0 with unofficial patch)
+#
+#mtu 1000
+#mru 1000
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb
new file mode 100644
index 0000000..53a79af
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Client for Microsoft PPTP VPNs"
+DESCRIPTION = "PPTP Client is a Linux, FreeBSD, NetBSD \
+    and OpenBSD client for the proprietary Microsoft Point-to-Point \
+    Tunneling Protocol, PPTP. Allows connection to a PPTP based \
+    Virtual Private Network (VPN) as used by employers and some \
+    cable and ADSL internet service providers."
+HOMEPAGE = "http://pptpclient.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+inherit perlnative
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/sourceforge/pptpclient/pptp-${PV}.tar.gz \
+           file://options.pptp \
+           "
+
+SRC_URI[md5sum] = "8d25341352fdae5ad5b36b9f18254908"
+SRC_URI[sha256sum] = "82492db8e487ce73b182ee7f444251d20c44f5c26d6e96c553ec7093aefb5af4"
+
+S = "${WORKDIR}/pptp-${PV}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+    install -d ${D}${sbindir} ${D}${sysconfdir}/ppp ${D}${mandir}/man8
+    install -m 555 pptp ${D}${sbindir}
+    install -m 644 pptp.8 ${D}${mandir}/man8
+    install -m 644 ${WORKDIR}/options.pptp ${D}${sysconfdir}/ppp
+}
+
+RDEPENDS_${PN} = "ppp"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service
new file mode 100644
index 0000000..c1021fb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/bgpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=BGP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/bgpd.pid
+ExecStart=@SBINDIR@/bgpd -d $bgpd_options -f @SYSCONFDIR@/quagga/bgpd.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/bgpd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service
new file mode 100644
index 0000000..9bfe7b6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/isisd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=IS-IS routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/isisd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/isisd -d $isisd_options -f /etc/quagga/isisd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service
new file mode 100644
index 0000000..99d0e6d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospf6d.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/ospf6d.pid
+ExecStart=@SBINDIR@/ospf6d -d $ospf6d_options -f @SYSCONFDIR@/quagga/ospf6d.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospf6d.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service
new file mode 100644
index 0000000..fe8343b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ospfd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/ospfd.pid
+ExecStart=@SBINDIR@/ospfd -d $ospfd_options -f @SYSCONFDIR@/quagga/ospfd.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospfd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default
new file mode 100644
index 0000000..4c4bc23
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.default
@@ -0,0 +1,12 @@
+# If this option is set the /etc/init.d/quagga script automatically loads
+# the config via "vtysh -b" when the servers are started.
+vtysh_enable=yes
+
+# Bind all daemons to loopback only by default
+zebra_options=" --daemon -A 127.0.0.1"
+bgpd_options="  --daemon -A 127.0.0.1"
+ospfd_options=" --daemon -A 127.0.0.1"
+ospf6d_options="--daemon -A ::1"
+ripd_options="  --daemon -A 127.0.0.1"
+ripngd_options="--daemon -A ::1"
+isisd_options=" --daemon -A 127.0.0.1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init
new file mode 100644
index 0000000..df1beb7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.init
@@ -0,0 +1,200 @@
+#!/bin/sh
+#
+# /etc/init.d/quagga -- start/stop the Quagga routing daemons
+#
+# Based on debian version by Endre Hirling <endre@mail.elte.hu> and 
+# Christian Hammers <ch@debian.org>.
+#
+
+### BEGIN INIT INFO
+# Provides: quagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga routing suite
+# Description: Quagga is a routing suite for IP routing protocols like 
+#              BGP, OSPF, RIP and others. This script contols the main 
+#              daemon "quagga" as well as the individual protocol daemons.
+### END INIT INFO
+
+# NOTE: sbin must be before bin so we get the iproute2 ip and not the
+# busybox ip command. The busybox one flushes all routes instead of just
+# the dynamic routes
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
+D_PATH=/usr/sbin
+C_PATH=/etc/quagga
+
+# Keep zebra first and do not list watchquagga!
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd"
+
+# Print the name of the pidfile.
+pidfile()
+{
+	echo "/var/run/quagga/$1.pid"
+}
+
+# Check if daemon is started by using the pidfile.
+started()
+{
+	[ -e `pidfile $1` ] && kill -0 `cat \`pidfile $1\`` 2> /dev/null && return 0
+	return 1
+}
+
+# Loads the config via vtysh -b if configured to do so.
+vtysh_b ()
+{
+	# Rember, that all variables have been incremented by 1 in convert_daemon_prios()
+	if [ "$vtysh_enable" = 2 -a -f $C_PATH/Quagga.conf ]; then
+		/usr/bin/vtysh -b
+	fi
+}
+
+# Check if the daemon is activated and if its executable and config files 
+# are in place.
+# params: 	daemon name
+# returns:	0=ok, 1=error
+check_daemon()
+{
+	# If the integrated config file is used the others are not checked.
+	if [ -r "$C_PATH/Quagga.conf" ]; then
+	  return 0
+	fi 
+
+	# check for config file		  
+	if [ ! -r "$C_PATH/$1.conf" ]; then
+	  return 1
+	fi
+	return 0
+}
+
+# Starts the server if it's not alrady running according to the pid file.
+# The Quagga daemons creates the pidfile when starting.
+start()
+{
+	if ! check_daemon $1; then echo -n " (!$1)"; return; fi
+	echo -n " $1"
+	start-stop-daemon \
+		--start \
+		--pidfile=`pidfile $1` \
+		--exec "$D_PATH/$1" \
+		-- \
+		`eval echo "$""$1""_options"`
+		
+}
+
+# Stop the daemon given in the parameter, printing its name to the terminal.
+stop()
+{
+    if ! started "$1" ; then
+	echo -n " (!$1)"
+	return 0
+    else
+	PIDFILE=`pidfile $1`
+	PID=`cat $PIDFILE 2>/dev/null`
+	start-stop-daemon --stop --quiet --exec "$D_PATH/$1"
+	#
+	#       Now we have to wait until $DAEMON has _really_ stopped.
+	#
+	if test -n "$PID" && kill -0 $PID 2>/dev/null; then
+	    echo -n " (waiting) ."
+	    cnt=0
+	    while kill -0 $PID 2>/dev/null; do
+		cnt=`expr $cnt + 1`
+		if [ $cnt -gt 60 ]; then
+		    # Waited 120 secs now, fail.
+		    echo -n "Failed.. "
+		    break
+		fi
+		sleep 2
+		echo -n "."
+		done
+	    fi
+	echo -n " $1"
+	rm -f `pidfile $1`
+    fi
+}
+
+stop_all() 
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+
+	echo -n "Stopping Quagga daemons:"
+	for daemon_name in $daemon_list; do
+		stop "$daemon_name"
+	done
+	echo "."
+}
+
+start_all()
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+
+	echo -n "Starting Quagga daemons:"
+	for daemon_name in $daemon_list; do
+		start "$daemon_name"
+	done
+	echo "."
+}
+
+status_all() 
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+	res=1
+
+	echo -n "quagga: "
+	for daemon_name in $daemon_list; do
+	    if started "$daemon_name" ; then
+		id=`cat \`pidfile $daemon_name\``
+		echo -n "$daemon_name (pid $id) "
+		res=0
+	    fi
+	done
+	if [ $res -eq 0 ]; then
+	    echo "is running..."
+	else
+	    echo "is stopped..."
+	fi
+	exit $res
+}
+
+#########################################################
+# 		Main program 				#
+#########################################################
+
+# Load configuration
+test -f /etc/default/quagga && . /etc/default/quagga
+
+case "$1" in
+    start)
+	cd $C_PATH/
+	start_all $2
+	vtysh_b
+    	;;
+	
+    stop)
+  	stop_all $2
+	echo "Removing all routes made by zebra."
+	ip route flush proto zebra
+   	;;
+
+    status)
+  	status_all $2
+   	;;
+
+    restart|force-reload)
+	$0 stop $2
+	sleep 1
+	$0 start $2
+	;;
+
+    *)
+    	echo "Usage: /etc/init.d/quagga {start|stop|restart|status|force-reload} [daemon]"
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam
new file mode 100644
index 0000000..3541a97
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/quagga.pam
@@ -0,0 +1,13 @@
+#
+# The PAM configuration file for the quagga `vtysh' service
+#
+
+# This allows root to change user infomation without being
+# prompted for a password
+auth		sufficient	pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth       include      common-auth
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service
new file mode 100644
index 0000000..7af65ca
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/ripd.pid
+ExecStart=@SBINDIR@/ripd -d $ripd_options -f @SYSCONFDIR@/quagga/ripd.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service
new file mode 100644
index 0000000..9305f86
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/ripngd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripngd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/ripngd.pid
+ExecStart=@SBINDIR@/ripngd -d $ripngd_options -f @SYSCONFDIR@/quagga/ripngd.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripngd.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
new file mode 100644
index 0000000..1f28c0b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d quagga quagga 0755 /var/run/quagga none
+d quagga quagga 0755 /var/log/quagga none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default
new file mode 100644
index 0000000..2d601ec
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.default
@@ -0,0 +1,12 @@
+# Watchquagga configuration
+#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
+watch_daemons="zebra"
+
+# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
+# the WATCH_DAEMONS line to reflect the daemons you are actually using):
+#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
+
+# Since we are using one quagga daemon for now, use the following line. If using
+# multiple daemons, comment the line below and uncoment the line mentioned
+# above.
+watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init
new file mode 100644
index 0000000..5ddd94a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/watchquagga.init
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: watchquagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga watchdog
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Load configuration
+test -f /etc/default/watchquagga && . /etc/default/watchquagga
+
+# Check that there are daemons to be monitored.
+[ -z "$watch_daemons" ] && exit 0
+
+pidfile="/var/run/quagga/watchquagga.pid"
+
+case "$1" in
+    start)
+	echo -n "Starting quagga watchdog daemon: watchquagga"
+	start-stop-daemon --start \
+		--pidfile $pidfile \
+		--exec /usr/sbin/watchquagga \
+		-- -d $watch_options $watch_daemons
+	echo "."
+    	;;
+	
+    stop)
+	echo -n "Stopping quagga watchdog daemon: watchquagga"
+	start-stop-daemon --stop --quiet \
+		--pidfile $pidfile
+	echo "."
+	;;
+
+    status)
+	echo -n "watchquagga "
+	res=1
+	[ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null
+	if [ $? -eq 0 ]; then
+	    echo "(pid `cat $pidfile`) is running..."
+	    res=0
+	else
+	    echo "is stopped..."
+	fi
+	exit $res
+	;;
+
+    restart|force-reload)
+	$0 stop $2
+	sleep 1
+	$0 start $2
+	;;
+
+    *)
+	echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}"
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service
new file mode 100644
index 0000000..e34af72
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/files/zebra.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=GNU Zebra routing manager
+Wants=network.target
+Before=network.target
+ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+PIDFile=/run/quagga/zebra.pid
+ExecStartPre=@BASE_SBINDIR@/ip route flush proto zebra
+ExecStart=@SBINDIR@/zebra -d $zebra_options -f @SYSCONFDIR@/quagga/zebra.conf
+ExecStopPost=@base_bindir@/rm -rf /run/quagga/zebra.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
new file mode 100644
index 0000000..134a33d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -0,0 +1,237 @@
+SUMMARY = "BGP/OSPF/RIP routing daemon"
+DESCRIPTION = "Quagga is a routing software suite, providing \
+implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \
+Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
+Quagga is a fork of GNU Zebra which was developed by Kunihiro \
+Ishiguro. The Quagga tree aims to build a more involved community \
+around Quagga than the current centralised model of GNU Zebra."
+HOMEPAGE = "http://www.nongnu.org/quagga/"
+SECTION = "net"
+
+
+LICENSE = "GPL-2.0 & LGPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d \
+                    file://COPYING.LIB;md5=01ef24401ded36cd8e5d18bfe947240c"
+
+DEPENDS = "readline ncurses perl-native c-ares"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
+SNMP_CONF="${@bb.utils.contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
+
+# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
+RDEPENDS_${PN} += "iproute2"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga/quagga-${PV}.tar.gz; \
+           file://quagga.init \
+           file://quagga.default \
+           file://watchquagga.init \
+           file://watchquagga.default \
+           file://volatiles.03_quagga \
+           file://quagga.pam \
+           file://bgpd.service \
+           file://isisd.service \
+           file://ospf6d.service \
+           file://ospfd.service \
+           file://ripd.service \
+           file://ripngd.service \
+           file://zebra.service \
+          "
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
+PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
+
+inherit autotools update-rc.d useradd systemd pkgconfig multilib_header
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+SYSTEMD_SERVICE_${PN}-bgpd = "bgpd.service"
+SYSTEMD_SERVICE_${PN}-isisd = "isisd.service"
+SYSTEMD_SERVICE_${PN}-ospf6d = "ospf6d.service"
+SYSTEMD_SERVICE_${PN}-ospfd = "ospfd.service"
+SYSTEMD_SERVICE_${PN}-ripd = "ripd.service"
+SYSTEMD_SERVICE_${PN}-ripngd = "ripngd.service"
+SYSTEMD_SERVICE_${PN} = "zebra.service"
+
+EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
+                --localstatedir=${localstatedir}/run/quagga \
+                --enable-exampledir=${docdir}/quagga/examples/ \
+                --enable-vtysh \
+                --enable-isisd \
+                ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--enable-watchquagga', '--disable-watchquagga', d)} \
+                --enable-ospfclient=yes \
+                --enable-multipath=64 \
+                --enable-user=quagga \
+                --enable-group=quagga \
+                --enable-vty-group=quaggavty \
+                --enable-configfile-mask=0640 \
+                --enable-logfile-mask=0640 \
+                --enable-rtadv \
+                --enable-linux24-tcp-md5 \
+                ap_cv_cc_pie=no \
+                ${SNMP_CONF}"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+
+do_install () {
+    # Install init script and default settings
+    install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
+    ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
+    install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
+    install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
+    install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
+    install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
+    install -m 0644 ${WORKDIR}/volatiles.03_quagga  ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+
+    # Install sample configurations for the daemons
+    for f in bgpd vtysh isisd ospfd ripngd zebra ripd ospf6d; do
+        install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
+    done
+
+    for f in bgpd vtysh isisd ospfd ripngd zebra ripd ospf6d; do
+        touch ${D}${sysconfdir}/quagga/$f.conf
+    done
+    chown quagga:quaggavty ${D}${sysconfdir}/quagga
+    chown quagga:quagga ${D}${sysconfdir}/quagga/*.conf
+    chmod 750 ${D}${sysconfdir}/quagga
+    chmod 640 ${D}${sysconfdir}/quagga/*.conf
+
+    # Install quagga
+    oe_runmake install DESTDIR=${D} prefix=${prefix} \
+            sbindir=${sbindir} \
+            sysconfdir=${sysconfdir}/quagga \
+            localstatedir=${localstatedir}/run/quagga
+
+    # Fix hardcoded paths
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
+    sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
+    sed -i 's!--with-libtool-sysroot=[^ "]*!!' ${D}${includedir}/quagga/version.h
+
+    oe_multilib_header quagga/version.h
+
+    # For PAM
+    for feature in ${DISTRO_FEATURES}; do
+        if [ "$feature" = "pam" ]; then
+            install -D -m 644 ${WORKDIR}/quagga.pam ${D}/${sysconfdir}/pam.d/quagga
+            break
+        fi
+    done
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${nonarch_libdir}/tmpfiles.d
+        echo "d /run/quagga 0755 quagga quagga -" \
+        > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+    fi
+
+    # Remove sysinit script if sysvinit is not in DISTRO_FEATURES
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+        rm -rf ${D}${sysconfdir}/init.d/
+        rm -f ${D}${sysconfdir}/default/watchquagga
+    fi
+
+    install -d ${D}${systemd_unitdir}/system
+    for i in bgpd isisd ospf6d ospfd ripd ripngd zebra; do
+        install -m 0644 ${WORKDIR}/$i.service ${D}${systemd_unitdir}/system
+    done
+    sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@SBINDIR@,${sbindir},g' \
+        -e 's,@base_bindir@,${base_bindir},g' \
+        -e 's,@localstatedir@,${localstatedir},g' \
+        -i ${D}${systemd_unitdir}/system/*.service
+}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
+pkg_postinst_${PN} () {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then
+        if [ -n "$D" ]; then
+            OPTS="--root=$D"
+        fi
+        systemctl $OPTS mask quagga.service
+    fi
+}
+
+# Split into a main package and separate per-protocol packages
+PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-bgpd \
+                     ${PN}-ripd ${PN}-ripngd ${PN}-isisd \
+                     ${PN}-ospfclient ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${PN}-watchquagga', '', d)}"
+
+RDEPENDS_${PN} += "${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+
+FILES_${PN}-ospfd       = "${sbindir}/ospfd ${libdir}/libospf.so.*"
+FILES_${PN}-ospf6d      = "${sbindir}/ospf6d"
+FILES_${PN}-bgpd        = "${sbindir}/bgpd"
+FILES_${PN}-ripd        = "${sbindir}/ripd"
+FILES_${PN}-ripngd      = "${sbindir}/ripngd"
+FILES_${PN}-isisd       = "${sbindir}/isisd"
+FILES_${PN}-ospfclient  = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*"
+FILES_${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
+                           ${sysconfdir}/init.d/watchquagga"
+
+FILES_${PN} += "${nonarch_libdir}/tmpfiles.d/*.conf"
+
+# Indicate that the default files are configuration files
+CONFFILES_${PN} = "${sysconfdir}/default/quagga \
+                   ${sysconfdir}/quagga/bgpd.conf \
+                   ${sysconfdir}/quagga/vtysh.conf \
+                   ${sysconfdir}/quagga/isisd.conf \
+                   ${sysconfdir}/quagga/ospfd.conf \
+                   ${sysconfdir}/quagga/ripngd.conf \
+                   ${sysconfdir}/quagga/zebra.conf \
+                   ${sysconfdir}/quagga/ripd.conf \
+                   ${sysconfdir}/quagga/ospf6d.conf \
+                  "
+CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"
+
+# Stop the names being rewritten due to the internal shared libraries
+DEBIAN_NOAUTONAME_${PN}-ospfd = "1"
+DEBIAN_NOAUTONAME_${PN}-ospfclient = "1"
+
+# Main init script starts all deamons
+# Seperate init script for watchquagga
+INITSCRIPT_PACKAGES                     = "${PN} ${PN}-watchquagga"
+INITSCRIPT_NAME_${PN}                   = "quagga"
+INITSCRIPT_PARAMS_${PN}                 = "defaults 15 85"
+INITSCRIPT_NAME_${PN}-watchquagga       = "watchquagga"
+INITSCRIPT_PARAMS_${PN}-watchquagga     = "defaults 90 10"
+
+# Add quagga's user and group
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system quagga ; --system quaggavty"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga -G quaggavty --shell /bin/false quagga"
+
+pkg_postinst_${PN} () {
+    if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+        ${sysconfdir}/init.d/populate-volatile.sh update
+    fi
+}
+
+# Stop apps before uninstall
+pkg_prerm_${PN} () {
+    ${sysconfdir}/init.d/quagga stop
+}
+
+pkg_prerm_${PN}-ospfd () {
+    ${sysconfdir}/init.d/quagga stop ospfd
+}
+
+pkg_prerm_${PN}-ospf6d () {
+    ${sysconfdir}/init.d/quagga stop ospf6d
+}
+
+pkg_prerm_${PN}-bgpd () {
+    ${sysconfdir}/init.d/quagga stop bgpd
+}
+
+pkg_prerm_${PN}-ripd () {
+    ${sysconfdir}/init.d/quagga stop ripd
+}
+
+pkg_prerm_${PN}-ripngd () {
+    ${sysconfdir}/init.d/quagga stop ripngd
+}
+
+pkg_prerm_${PN}-isisd () {
+    ${sysconfdir}/init.d/quagga stop isisd
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
new file mode 100644
index 0000000..a7697a1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
@@ -0,0 +1,4 @@
+require quagga.inc
+
+SRC_URI[md5sum] = "eced21b054d71c9e1b7c6ac43286a166"
+SRC_URI[sha256sum] = "e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch
new file mode 100644
index 0000000..ecc2d74
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch
@@ -0,0 +1,84 @@
+From 45b97b474ce2d0ad56828db11edde8562bb47a43 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Tue, 2 Dec 2014 02:33:53 +0900
+Subject: [PATCH] Modify configure.in and etc/Makefile.am
+
+this patch is from Fedora to fix error:
+"conftest.c:26:9: error: unknown type name 'not'"
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.in             | 6 +++++-
+ etc/Makefile.am          | 9 ++++++---
+ etc/radiusclient.conf.in | 2 +-
+ 3 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 812f640..3a8af99 100644
+--- a/configure.in
++++ b/configure.in
+@@ -29,6 +29,9 @@ AC_SUBST(LIBVERSION)
+ pkgsysconfdir=${sysconfdir}/$PACKAGE
+ AC_SUBST(pkgsysconfdir)
+ 
++pkgdatadir=${datadir}/$PACKAGE
++AC_SUBST(pkgdatadir)
++
+ AC_PROG_LIBTOOL
+ 
+ AC_PROG_CC
+@@ -118,7 +121,8 @@ then
+ 	],
+ 	AC_MSG_RESULT(yes)
+ 	AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
+-	AC_MSG_RESULT(no)
++	AC_MSG_RESULT(no),
++	AC_MSG_RESULT(assume no),
+ 	)
+ fi
+ 
+diff --git a/etc/Makefile.am b/etc/Makefile.am
+index 39b6975..a3c403f 100644
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -14,9 +14,11 @@ CLEANFILES = *~ radiusclient.conf
+ 
+ sbindir = @sbindir@
+ pkgsysconfdir = @pkgsysconfdir@
+-pkgsysconf_DATA = issue port-id-map radiusclient.conf \
+-	dictionary dictionary.ascend dictionary.compat dictionary.merit \
+-	dictionary.sip
++pkgsysconf_DATA = issue port-id-map radiusclient.conf
++
++pkgdatadir = @pkgdatadir@
++pkgdata_DATA = dictionary dictionary.ascend dictionary.compat \
++	dictionary.merit dictionary.sip
+ 
+ EXTRA_DIST = issue port-id-map dictionary dictionary.ascend \
+ 	dictionary.compat dictionary.merit servers radiusclient.conf.in \
+@@ -25,6 +27,7 @@ EXTRA_DIST = issue port-id-map dictionary dictionary.ascend \
+ radiusclient.conf: radiusclient.conf.in
+ 	sed -e 's|@sbin''dir@|$(sbindir)|g' \
+ 	    -e 's|@pkgsysconf''dir@|$(pkgsysconfdir)|g' \
++	    -e 's|@pkgdata''dir@|$(pkgdatadir)|g' \
+ 	    <$(srcdir)/radiusclient.conf.in >radiusclient.conf
+ 
+ install-data-local: servers
+diff --git a/etc/radiusclient.conf.in b/etc/radiusclient.conf.in
+index 948bc2f..aac9973 100644
+--- a/etc/radiusclient.conf.in
++++ b/etc/radiusclient.conf.in
+@@ -47,7 +47,7 @@ servers		@pkgsysconfdir@/servers
+ 
+ # dictionary of allowed attributes and values
+ # just like in the normal RADIUS distributions
+-dictionary 	@pkgsysconfdir@/dictionary
++dictionary 	@pkgdatadir@/dictionary
+ 
+ # program to call for a RADIUS authenticated login
+ login_radius	@sbindir@/login.radius
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6 b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6
new file mode 100644
index 0000000..a30c144
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/config-site.radiusclient-ng-0.5.6
@@ -0,0 +1 @@
+ac_cv_func_uname=no
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb
new file mode 100644
index 0000000..ea37754
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb
@@ -0,0 +1,38 @@
+SUMMARY = "RADIUS protocol client library"
+DESCRIPTION = "Portable, easy-to-use and standard compliant library suitable \
+for developing free and commercial software that need support for a RADIUS \
+protocol (RFCs 2128 and 2139)."
+HOMEPAGE = "http://sourceforge.net/projects/radiusclient-ng.berlios/"
+SECTION = "net"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/r/${BPN}/${BPN}_${PV}.orig.tar.gz \
+   file://Modify-configure.in-and-etc-Makefile.am.patch \
+   file://config-site.radiusclient-ng-${PV}"
+
+SRC_URI[md5sum] = "6fb7d4d0aefafaee7385831ac46a8e9c"
+SRC_URI[sha256sum] = "282a9f1355f190efbb06c0d7c4e062eaa652caf342ed3ad361ac595f72f09f14"
+
+LICENSE = "BSD-3-Clause & BSD-2-Clause & HPND"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3e47566c9271b786693d8a08792dbf41"
+
+inherit autotools-brokensep
+
+DEPENDS += "virtual/crypt"
+
+EXTRA_OECONF += "--disable-static"
+
+do_configure_prepend () {
+    export CONFIG_SITE=./config-site.${P}
+}
+
+do_compile_prepend() {
+    for m in `find . -name "Makefile"` ; do
+        sed -i -e 's:^program_transform_name =.*:program_transform_name =:g' ${m}
+    done
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+    rm -f ${D}${libdir}/*.la
+    rm -f ${D}${sbindir}/radexample
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch
new file mode 100644
index 0000000..7601f0d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch
@@ -0,0 +1,28 @@
+From fdb64d21560bfdafeefccc7d20e105e4857faa99 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 19:20:07 -0700
+Subject: [PATCH] ppoe: Dont include linux/if_ether.h
+
+Fixes build with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/pppoe.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/pppoe.h b/src/pppoe.h
+index ec067a0..281879c 100644
+--- a/src/pppoe.h
++++ b/src/pppoe.h
+@@ -127,10 +127,6 @@ typedef unsigned long UINT32_t;
+ #error Could not find a 32-bit integer type
+ #endif
+ 
+-#ifdef HAVE_LINUX_IF_ETHER_H
+-#include <linux/if_ether.h>
+-#endif
+-
+ #include <netinet/in.h>
+ 
+ #ifdef HAVE_NETINET_IF_ETHER_H
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch
new file mode 100644
index 0000000..2103b38
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch
@@ -0,0 +1,23 @@
+From 31b6eecd7e5ebfb9a37915f28823e5af9d1062b4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Mar 2017 19:24:53 -0700
+Subject: [PATCH] Enable support for the kernel module
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/configure.in b/src/configure.in
+index cae0976..951a042 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -33,6 +33,7 @@ AC_CHECK_HEADERS(linux/if_pppox.h, [], [],
+ #include<net/ethernet.h>
+ #include<linux/if.h>
+ #include<linux/in.h>
++#include<linux/in6.h>
+ ])
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch
new file mode 100644
index 0000000..bbd516f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch
@@ -0,0 +1,57 @@
+From bdd20b7a584a20504dfabb409a41ee2b9ae41657 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 13:52:57 +0900
+Subject: [PATCH] configure.in: Error fix.
+
+the error is: conftest.c:9:28: fatal error: ac_nonexistent.h:
+No such file or directory #include <ac_nonexistent.h>
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+
+---
+ src/configure.in | 30 ------------------------------
+ 1 file changed, 30 deletions(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index 1714e69..cae0976 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -195,36 +195,6 @@ if test "$GCC" = yes; then
+ 	CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
+ fi
+ 
+-dnl Figure out packing order of structures
+-AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
+-if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
+-AC_TRY_RUN([
+-union foo {
+-    struct bar {
+-	unsigned int ver:4;
+-	unsigned int type:4;
+-    } bb;
+-    unsigned char baz;
+-};
+-
+-int
+-main(void)
+-{
+-    union foo x;
+-    x.bb.ver = 1;
+-    x.bb.type = 2;
+-    if (x.baz == 0x21) {
+-	return 1;
+-    } else if (x.baz == 0x12) {
+-	return 0;
+-    } else {
+-	return 2;
+-    }
+-}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+-$ECHO "no defaults for cross-compiling"; exit 1)
+-fi
+-])
+-
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ 	AC_MSG_RESULT(reversed)
+ 	AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch
new file mode 100644
index 0000000..be89280
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch
@@ -0,0 +1,19 @@
+From c96dda04ec024bdef2a15d374e5f8242e041cad4 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Fri, 18 Jul 2014 08:25:16 +0000
+
+---
+ configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ac1a7e4..11b9f31 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1,4 +1,4 @@
+-AC_INIT(src/pppoe.c)
+-AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
++AC_INIT([rp-pppoe], [3.8])
++AM_INIT_AUTOMAKE([foreign])
+ AC_CONFIG_SUBDIRS(src)
+ AC_OUTPUT(Makefile)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch
new file mode 100644
index 0000000..3b94593
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch
@@ -0,0 +1,153 @@
+From 172907f31d64da4c3f289a439fd605d2ab51b24a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 12:17:03 +0900
+Subject: [PATCH] configure in cross
+
+Update the configure script to cross-compiling with OE.  This hard-codes
+a few target paths, reworks a few tests to be more friendly for cross
+and drops other tests.
+
+Upstream-Status: Inappropriate [build system specific changes]
+
+---
+ src/configure.in | 66 ++++++++++++++------------------------------------------
+ 1 file changed, 16 insertions(+), 50 deletions(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index 90a07df..1d30243 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -5,6 +5,13 @@ AC_INIT(pppoe.c)
+ dnl pppd directory for kernel-mode PPPoE
+ PPPD_DIR=ppp-2.4.1.pppoe2
+ 
++dnl hard code some paths
++PPPD=/usr/sbin/pppd
++ID=/usr/bin/id
++ECHO=/bin/echo
++AC_ARG_VAR(PPPD)
++AC_ARG_VAR(ID)
++
+ AC_CONFIG_HEADER(config.h)
+ 
+ AC_PREFIX_DEFAULT(/usr)
+@@ -45,7 +52,7 @@ ac_cv_struct_sockaddr_ll=no)
+ AC_MSG_RESULT($ac_cv_struct_sockaddr_ll)
+ 
+ if test "$ac_cv_struct_sockaddr_ll" = yes ; then
+-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL)
++AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [], [Have struct SOCKADDR_LL])
+ fi
+ 
+ dnl Check for N_HDLC line discipline
+@@ -58,7 +65,7 @@ AC_TRY_COMPILE([
+ 	ac_cv_n_hdlc=no)
+ AC_MSG_RESULT($ac_cv_n_hdlc)
+ if test "$ac_cv_n_hdlc" = yes ; then
+-AC_DEFINE(HAVE_N_HDLC)
++AC_DEFINE([HAVE_N_HDLC], [], [Have N_HDLC])
+ fi
+ 
+ AC_ARG_ENABLE(plugin, [  --enable-plugin=pppd_src_path   build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
+@@ -106,7 +113,7 @@ PPPD_INCDIR=""
+ if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
+ 	if test "$ac_cv_pluginpath" != no ; then
+ 		LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
+-		AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE)
++		AC_DEFINE([HAVE_LINUX_KERNEL_PPPOE], [], [Have kernel PPPoE])
+ 		PPPD_INCDIR=$ac_cv_pluginpath
+ 	fi
+ fi
+@@ -116,7 +123,7 @@ if test "$PPPD_INCDIR" = "" ; then
+ fi
+ 
+ if test "$ac_cv_debugging" = "yes" ; then
+-   AC_DEFINE(DEBUGGING_ENABLED)
++   AC_DEFINE([DEBUGGING_ENABLED], [], [Debugging enabled])
+ fi
+ 
+ AC_SUBST(LINUX_KERNELMODE_PLUGIN)
+@@ -142,15 +149,8 @@ AC_CHECK_SIZEOF(unsigned short)
+ AC_CHECK_SIZEOF(unsigned int)
+ AC_CHECK_SIZEOF(unsigned long)
+ 
+-dnl Check for location of pppd
+-AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+-AC_PATH_PROG(ECHO, echo, echo)
+-
+-dnl Check for setsid (probably Linux-specific)
+-AC_PATH_PROG(SETSID, setsid, "", $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+-
+ dnl Check for an "id" which accepts "-u" option -- hack for Solaris.
+-AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
++dnl AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
+ 
+ dnl Check for Linux-specific kernel support for PPPoE
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+@@ -195,44 +195,8 @@ if test "$GCC" = yes; then
+ 	CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
+ fi
+ 
+-dnl If we couldn't find pppd, die
+-if test "$PPPD" = "NOTFOUND"; then
+-        AC_MSG_WARN([*** Oops!  I couldn't find pppd, the PPP daemon anywhere.])
+-	AC_MSG_WARN([*** You must install pppd, version 2.3.10 or later.])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	PPPD=pppd
+-fi
+-
+-dnl Figure out pppd version.  2.3.7 to 2.3.9 -- issue warning.  Less than
+-dnl 2.3.7 -- stop
+-
+-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'`
+-
+-case "$PPPD_VERSION" in
+-1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6)
+-	AC_MSG_WARN([*** Oops! Your version of pppd is $PPPD_VERSION, which is too old.])
+-	AC_MSG_WARN([*** You need at least 2.3.7 (2.3.10 or newer recommended.])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	;;
+-
+-2.3.7|2.3.8|2.3.9)
+-	AC_MSG_WARN([*** Warning.  Your version of pppd is $PPPD_VERSION.  You will])
+-	AC_MSG_WARN([*** not be able to use connect-on-demand.  Upgrade to pppd])
+-	AC_MSG_WARN([*** 2.3.10 or newer if you need connect-on-demand.])
+-	;;
+-
+-2*|3*|4*|5*|6*|7*|8*|9*)
+-	;;
+-
+-*)
+-	AC_MSG_WARN([*** Oops.  I cannot figure out what version of pppd you have.])
+-	AC_MSG_WARN([*** All I got back was '$PPPD_VERSION'])
+-	AC_MSG_WARN([*** I will keep going, but it may not work.])
+-	;;
+-esac
+-
+ dnl Figure out packing order of structures
+-AC_MSG_CHECKING([packing order of bit fields])
++AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[
+ if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
+ AC_TRY_RUN([
+ union foo {
+@@ -259,10 +223,11 @@ main(void)
+ }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+ $ECHO "no defaults for cross-compiling"; exit 0)
+ fi
++])
+ 
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ 	AC_MSG_RESULT(reversed)
+-	AC_DEFINE(PACK_BITFIELDS_REVERSED)
++	AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
+ else
+ 	AC_MSG_RESULT(normal)
+ fi
+@@ -326,6 +291,7 @@ AC_SUBST(PPPOE_SERVER_DEPS)
+ AC_SUBST(RDYNAMIC)
+ AC_SUBST(LIBEVENT)
+ AC_SUBST(ECHO)
++AC_SUBST(HAVE_STRUCT_SOCKADDR_LL)
+ AC_SUBST(LDFLAGS)
+ 
+ datadir_evaluated=`eval echo $datadir`
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch
new file mode 100644
index 0000000..9801f6e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch
@@ -0,0 +1,25 @@
+From f658181c58347c3e2b0ee4f0a6a3d19162921471 Mon Sep 17 00:00:00 2001
+From: Ting Liu <b28495@freescale.com>
+Date: Tue, 12 Jun 2012 14:26:16 -0400
+Subject: [PATCH] discard use of dnl in Makefile.am
+
+Since Makefile.am is not processed by m4, but by automake, 'dnl' does
+not introduce a comment.
+
+Signed-off-by: Ting Liu <b28495@freescale.com>
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index eff6977..3091c33 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ PACKAGE = rp-pppoe
+ VERSION = 3.8
+ 
+-dnl AM_CFLAGS = -Wall -DDEBUG
++##dnl AM_CFLAGS = -Wall -DDEBUG
+ SUBDIRS = src
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch
new file mode 100644
index 0000000..8a85788
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch
@@ -0,0 +1,26 @@
+From a9a7322273c51882af58c35ba288a0fae00ba841 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Wed, 19 Aug 2015 12:33:41 +0900
+Subject: [PATCH] don't swallow errors
+
+Further fixup to the configure scripts to not swallow errors
+
+Upstream-Status: Pending
+
+---
+ src/configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/configure.in b/src/configure.in
+index 1d30243..1714e69 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -221,7 +221,7 @@ main(void)
+ 	return 2;
+     }
+ }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
+-$ECHO "no defaults for cross-compiling"; exit 0)
++$ECHO "no defaults for cross-compiling"; exit 1)
+ fi
+ ])
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.default
new file mode 100644
index 0000000..996d57f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.default
@@ -0,0 +1,22 @@
+# PPPoE Server options
+
+# Maximum segment size, not used for in kernel PPPoE
+#MSS=1412
+
+# Device(s) - Space seperated list of devices to listen on
+#DEVICES="eth1"
+
+# Local IP
+#LOCAL_IP=10.0.0.1
+
+# Starting remote IP
+#REMOTE_IP=10.67.15.1
+
+# Service name
+#SERVICE_NAME="acme"
+
+# Maximum number of sessions, default is 16
+#MAX_SESSIONS=64
+
+# Access concentrator name, default is the hostname
+#ACCESS_CONCENTRATOR_NAME="pppoe-rtr-1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.init
new file mode 100755
index 0000000..21afe0b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.init
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+test -f /usr/sbin/pppoe-server || exit 0
+test -f /etc/default/pppoe-server && . /etc/default/pppoe-server
+
+case $1 in
+  start)
+    OPTIONS=""
+    if [ -n "$MSS" ]; then
+      OPTIONS="$OPTIONS -m $MSS"
+    fi
+    if [ -n "$DEVICES" ]; then
+      for i in $DEVICES; do
+        OPTIONS="$OPTIONS -I $i"
+      done
+    fi
+    if [ -n "$LOCAL_IP" ]; then
+      OPTIONS="$OPTIONS -L $LOCAL_IP"
+    fi
+    if [ -n "$REMOTE_IP" ]; then
+      OPTIONS="$OPTIONS -R $REMOTE_IP"
+    fi
+    if [ -n "$SERVICE_NAME" ]; then
+      OPTIONS="$OPTIONS -S $SERVICE_NAME"
+    fi
+    if [ -n "$MAX_SESSIONS" ]; then
+      OPTIONS="$OPTIONS -N $MAX_SESSIONS"
+    fi
+    if [ -n "$ACCESS_CONCENTRATOR_NAME" ]; then
+      OPTIONS="$OPTIONS -C $ACCESS_CONCENTRATOR_NAME"
+    fi
+    echo -n "Starting PPPoE server: pppoe-server"
+    start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping PPPoE server: pppoe-server"
+    start-stop-daemon --stop --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
+    echo "."
+    ;;
+  status)
+    pid=$(pidof pppoe-server)    	          
+    if [ -n "$pid" ] ; then
+	    echo "Running with pid $pid"
+    else
+	    echo "Not running"
+    fi
+    ;;
+  restart|force-reload)
+    $0 stop
+    $0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/pppoe-server {start|stop|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.service
new file mode 100644
index 0000000..41e0b9e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/pppoe-server.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=PPPOE Service
+After=network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/pppoe-server
+ExecStart=@SBINDIR@/pppoe-server
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/top-autoconf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/top-autoconf.patch
new file mode 100644
index 0000000..f64da4f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/top-autoconf.patch
@@ -0,0 +1,41 @@
+From 0b62f71eb5d44d4a57103566ba58022b6304fa4f Mon Sep 17 00:00:00 2001
+From: Tom Rini <tom_rini@mentor.com>
+Date: Wed, 27 Jul 2011 03:46:52 +0000
+Subject: [PATCH] rp-pppoe: Port from oe.dev
+
+The autoconf stuff is all in a subdirectory, which is rather annoying
+as OE expects patches to be applied and autoconf stuff to be done in
+S. This adds enough autoconf at the top level to allow it to be
+called there - all it does is run a sub autoconf stuff in the src
+directory.
+
+Upstream-Status: Inappropriate [build system specific change]
+
+---
+ Makefile.am  | 5 +++++
+ configure.in | 4 ++++
+ 2 files changed, 9 insertions(+)
+ create mode 100644 Makefile.am
+ create mode 100644 configure.in
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..eff6977
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,5 @@
++PACKAGE = rp-pppoe
++VERSION = 3.8
++
++dnl AM_CFLAGS = -Wall -DDEBUG
++SUBDIRS = src
+diff --git a/configure.in b/configure.in
+new file mode 100644
+index 0000000..ac1a7e4
+--- /dev/null
++++ b/configure.in
+@@ -0,0 +1,4 @@
++AC_INIT(src/pppoe.c)
++AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
++AC_CONFIG_SUBDIRS(src)
++AC_OUTPUT(Makefile)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/update-config.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/update-config.patch
new file mode 100644
index 0000000..c759e09
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/update-config.patch
@@ -0,0 +1,41 @@
+From 4d34e0d7d790ec41b0afb731c7dc1b1ee90dd377 Mon Sep 17 00:00:00 2001
+From: Tom Rini <tom_rini@mentor.com>
+Date: Wed, 27 Jul 2011 03:46:52 +0000
+Subject: [PATCH] rp-pppoe: Port from oe.dev
+
+Set the timeout to 0 since we don't want pppoe to try reconnecting,
+we want whatever is calling it to reconnect. Lots of odd things
+happen when you have pppoe retrying itself.
+
+The path for the plugin is wrong, it's now part of ppp and is in a
+ppp's plugin lib directory. If no path is specified then that's where
+ppp looks, so that's what we do here.
+
+Upstream-Status: Inappropriate [configuration]
+
+---
+ configs/pppoe.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configs/pppoe.conf b/configs/pppoe.conf
+index c222b2f..65618a5 100644
+--- a/configs/pppoe.conf
++++ b/configs/pppoe.conf
+@@ -66,7 +66,7 @@ DEFAULTROUTE=yes
+ # to connect forever after pppoe-start is called.  Otherwise, it will
+ # give out after CONNECT_TIMEOUT seconds and will not attempt to
+ # connect again, making it impossible to reach.
+-CONNECT_TIMEOUT=30
++CONNECT_TIMEOUT=0
+ 
+ # How often in seconds pppoe-start polls to check if link is up
+ CONNECT_POLL=2
+@@ -115,7 +115,7 @@ PPPOE_TIMEOUT=80
+ FIREWALL=NONE
+ 
+ # Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
+-# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
++# plugin, use LINUX_PLUGIN=rp-pppoe.so
+ LINUX_PLUGIN=
+ 
+ # Any extra arguments to pass to pppoe.  Normally, use a blank string
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.13.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.13.bb
new file mode 100644
index 0000000..492ade5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.13.bb
@@ -0,0 +1,76 @@
+SUMMARY = "A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581"
+
+PR = "r10"
+
+SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/rp-pppoe-${PV}.tar.gz \
+           file://top-autoconf.patch \
+           file://configure_in_cross.patch \
+           file://update-config.patch \
+           file://dont-swallow-errors.patch \
+           file://discard-use-of-dnl-in-Makefile.am.patch \
+           file://configure.patch \
+           file://pppoe-server.default \
+           file://pppoe-server.init \
+           file://configure.in-Error-fix.patch \
+           file://pppoe-server.service \
+           file://0001-ppoe-Dont-include-linux-if_ether.h.patch \
+           file://0002-Enable-support-for-the-kernel-module.patch \
+           "
+
+SRC_URI[md5sum] = "ec9dccd9a367a1f71f2dc81069796dd8"
+SRC_URI[sha256sum] = "8cd6bc71ba46bd5f6eb4daf60220ccdcd991a8525111dee466501b1b9717e676"
+
+inherit autotools-brokensep update-rc.d systemd
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
+    install -d ${D}${datadir}/doc/${PN}
+    if [ -f ${D}${datadir}/doc/README ]; then
+        mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
+    fi
+}
+
+do_install() {
+    # Install init script and default settings
+    install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d
+    install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server
+    install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server
+    # Install
+    oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install
+    chmod 4755 ${D}${sbindir}/pppoe
+}
+
+SYSTEMD_PACKAGES = "${PN}-server"
+SYSTEMD_SERVICE_${PN}-server = "pppoe-server.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+# Insert server package before main package
+PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc"
+
+FILES_${PN}-server = "${sysconfdir}/default/pppoe-server \
+                      ${sysconfdir}/init.d/pppoe-server \
+                      ${sbindir}/pppoe-server \
+                      ${sysconfdir}/ppp/pppoe-server-options"
+FILES_${PN}-relay = "${sbindir}/pppoe-relay"
+FILES_${PN}-sniff = "${sbindir}/pppoe-sniff"
+
+CONFFILES_${PN} = "${sysconfdir}/ppp/pppoe.conf \
+                   ${sysconfdir}/ppp/firewall-standalone \
+                   ${sysconfdir}/ppp/firewall-masq"
+CONFFILES_${PN}-server = "${sysconfdir}/ppp/pppoe-server-options \
+                          ${sysconfdir}/default/pppoe-server"
+
+INITSCRIPT_PACKAGES            = "${PN}-server"
+INITSCRIPT_NAME_${PN}-server   = "pppoe-server"
+INITSCRIPT_PARAMS_${PN}-server = "defaults 92 8"
+
+RDEPENDS_${PN} = "ppp"
+RDEPENDS_${PN}-server = "${PN}"
+RRECOMMENDS_${PN} = "ppp-oe"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks/makefile-add-ldflags.patch
new file mode 100644
index 0000000..2146418
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile.in, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile.in b/Makefile.in
+index cad6706..0ed55c5 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -50,7 +50,7 @@ ${SAVE}: ${SAVE}.c
+ 	${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
+ 
+ ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o
+-	${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
++	${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
+ 	ln -sf ${SHLIB} ${LIB_NAME}.so
+ 
+ %.so: %.c
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
new file mode 100644
index 0000000..725ba18
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Libraries and wrapper for using a SOCKS proxy"
+DESCRIPTION = "The role of tsocks is to allow non SOCKS aware \
+applications (e.g telnet, ssh, ftp etc) to use SOCKS without any \
+modification. It does this by intercepting the calls that applications \
+make to establish network connections and negotating them through a \
+SOCKS server as necessary."
+HOMEPAGE = "http://sourceforge.net/projects/tsocks/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+SRC_URI = "http://downloads.sourceforge.net/tsocks/tsocks-${PV}.tar.gz \
+           file://makefile-add-ldflags.patch \
+          "
+
+SRC_URI[md5sum] = "51caefd77e5d440d0bbd6443db4fc0f8"
+SRC_URI[sha256sum] = "849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347"
+
+inherit autotools-brokensep
+
+LIBS_append_libc-musl = " -lssp_nonshared"
+LIBS_append_libc-glibc = " -lc_nonshared"
+
+S = "${WORKDIR}/tsocks-1.8"
+
+FILES_${PN} = "${libdir}/* ${bindir}/tsocks"
+FILES_${PN}-dev = ""
+INSANE_SKIP_${PN} = "dev-so"
+
+EXTRA_OEMAKE = "SHCC='${CC} -fPIC ${LDFLAGS}' LIBS='${LIBS}'"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
new file mode 100644
index 0000000..4f8e4d4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows."
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ffcf846341f3856d79a483eafa18e2a5"
+
+SRCREV = "a10cd498d964508c0e6ec6bd2be9dd4afcbb4d86"
+SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \
+          "
+
+S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+inherit autotools pkgconfig
+
+DEPENDS += "openssl"
+
+CFLAGS  += "-DSCTP_USE_OPENSSL_SHA1 -fPIC"
+LDFLAGS += "-lssl -lcrypto"
+
+PACKAGECONFIG ?= "disablewarnings inet inet6"
+PACKAGECONFIG[disablewarnings] = "--disable-warnings-as-errors,,"
+PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,"
+PACKAGECONFIG[inet6] = "--enable-inet6,--disable-inet6,"
+
+EXTRA_OECONF += "--disable-debug"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb
new file mode 100644
index 0000000..b02e183
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Xelerance version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE = "http://www.xelerance.com/software/xl2tpd/"
+SECTION = "net"
+DEPENDS = "ppp virtual/kernel"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/xelerance/xl2tpd.git"
+SRCREV = "ba619c79c4790c78c033df0abde4a9a5de744a08"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d
+
+do_compile () {
+    oe_runmake CFLAGS="${CFLAGS} -DLINUX" LDFLAGS="${LDFLAGS}" PREFIX="${prefix}" KERNELSRC=${STAGING_KERNEL_DIR} all
+}
+
+do_install () {
+    oe_runmake PREFIX="${D}${prefix}" install
+
+    install -d ${D}${sysconfdir}/init.d
+    touch ${D}${sysconfdir}/xl2tpd.conf
+    install -m 0755 debian/xl2tpd.init ${D}${sysconfdir}/init.d/xl2tpd
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/xl2tpd
+
+    install -d ${D}${sysconfdir}/default
+    install -m 0644 debian/xl2tpd.default ${D}${sysconfdir}/default/xl2tpd
+}
+
+CONFFILES_${PN} += "${sysconfdir}/xl2tpd.conf ${sysconfdir}/default/xl2tpd"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "xl2tpd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch
new file mode 100644
index 0000000..b4d6d94
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch
@@ -0,0 +1,69 @@
+From 549773fdaf1fb003b84f25df386a07d299cdeb3e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Jul 2017 21:25:33 -0700
+Subject: [PATCH] zeroconf: Rename arp_op to avoid namespace conflicts with C
+ library
+
+on musl e.g. we get
+In file included from /mnt/a/oe/build/tmp/work/corei7-64-bec-linux-musl/zeroconf/0.9-r1/recipe-sysroot/usr/include/net/ethernet.h:10:0,
+
+This is because in musl arp_op is a define which is included
+and causes the conflict
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ zeroconf.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/zeroconf.c b/zeroconf.c
+index 812d34b..f27e907 100644
+--- a/zeroconf.c
++++ b/zeroconf.c
+@@ -14,8 +14,6 @@
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include <linux/rtnetlink.h>
+-#include <linux/if.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -34,6 +32,8 @@
+ #include <sys/time.h>
+ #include <signal.h>
+ #include <limits.h>
++#include <linux/rtnetlink.h>
++#include <linux/if.h>
+ 
+ #include "delay.h"
+ 
+@@ -108,7 +108,7 @@ int  arp_conflict(struct intf *intf, struct arp_packet *pkt);
+ void arp_packet_dump(struct arp_packet *pkt);
+ void arp_packet_send(int as,
+ 		     struct intf *intf,
+-		     short int arp_op,
++		     short int arpop,
+ 		     int null_sender);
+ void arp_probe(int as, struct intf *intf);
+ void arp_claim(int as, struct intf *intf);
+@@ -1591,7 +1591,7 @@ int  arp_conflict(struct intf *intf, struct arp_packet *pkt)
+ 
+ void arp_packet_send(int as,
+ 		     struct intf *intf,
+-		     short int arp_op,
++		     short int arpop,
+ 		     int null_sender)
+ {
+ 
+@@ -1605,7 +1605,7 @@ void arp_packet_send(int as,
+   ap.arp.ar_pro = htons(ARP_IP_PROTO);
+   ap.arp.ar_hln = ETH_ALEN;
+   ap.arp.ar_pln = 4; /* octets in IPv4 address */
+-  ap.arp.ar_op = htons(arp_op);
++  ap.arp.ar_op = htons(arpop);
+ 
+   /* filling with 0xff sets the destination to
+    * the broadcast link-layer address for free
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
new file mode 100644
index 0000000..328e574
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
@@ -0,0 +1,19 @@
+| zeroconf.c: In function 'main':
+| zeroconf.c:145: error: 'PATH_MAX' undeclared (first use in this function)
+
+RP - 4/9/09
+
+Upstream-Status: Pending
+
+Index: zeroconf-0.9/zeroconf.c
+===================================================================
+--- zeroconf-0.9.orig/zeroconf.c	2009-09-04 10:05:25.000000000 +0100
++++ zeroconf-0.9/zeroconf.c	2009-09-04 10:05:42.000000000 +0100
+@@ -33,6 +33,7 @@
+ #include <net/if_arp.h>
+ #include <sys/time.h>
+ #include <signal.h>
++#include <limits.h>
+ 
+ #include "delay.h"
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
new file mode 100644
index 0000000..0c9d15b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/zeroconf ]; then
+    exit 0
+fi
+
+# IPv4 link-local addresses (zeroconf) are
+# only applicable on the 'inet' address family
+[ "X$ADDRFAM" != "Xinet" ] && exit 0
+
+# However there are some methods where it doesn't
+# make any sense to configure an IPv4LL address
+
+# not on loopback
+[ "X$METHOD" = "Xloopback" ] && exit 0
+
+# not on ppp or wvdial either
+[ "X$METHOD" = "Xppp" ] && exit 0
+[ "X$METHOD" = "Xwvdial" ] && exit 0
+
+# The administrator may have blacklisted interfaces
+# or only want zeroconf in a fallback situation
+[ -f /etc/default/zeroconf ] &&
+    . /etc/default/zeroconf
+
+[ -n "$DISABLE" ] && exit 0
+
+for BLACK in $IFBLACKLIST; do
+    case $IFACE in
+	$BLACK)
+	exit 0
+	;;
+    esac
+done
+
+# should we only allocate an address if we do not already have one?
+if [ -n "$FALLBACK" ]; then
+    /sbin/ip addr show $IFACE scope global | grep -q "inet"
+    IP=$?
+    if [ $IP -eq 0 ]; then
+        /sbin/ip route add 169.254.0.0/16 dev $IFACE
+        exit 0
+    fi
+fi
+
+# otherwise, run if we aren't already going
+if [ ! -r /var/run/zeroconf.$IFACE.pid ]; then
+	/usr/sbin/zeroconf -i $IFACE
+fi
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/makefile-add-ldflags.patch
new file mode 100644
index 0000000..c5a4414
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 77f3364..c98083f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,7 +18,7 @@ clean:
+ 
+ zeroconf: zeroconf.o delay.o
+ 	$(Q)echo "Creating $@"
+-	$(Q)$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++	$(Q)$(CC) $(CFLAGS) ${LDFLAGS} -o $@ $^ $(LIBS)
+ 
+ 
+ # Automatic dependency generation
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
new file mode 100644
index 0000000..cc07b27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
@@ -0,0 +1,17 @@
+# Default for zeroconf
+
+# disable zeroconf
+# If you want to disable zeroconf completely, uncomment the following line
+# this may be useful if you are debugging zeroconf or starting it manually
+#DISABLE=yes
+
+# black-listed interfaces
+# Interfaces which you never wish to have zeroconf run on should
+# be listed here. e.g. "eth2 wlan1" in a space seperated string
+IFBLACKLIST=""
+
+# fallback only
+# If you would only like a link-local address if you were unable to
+# obtain an address via DHCP then uncomment the following line
+#FALLBACK=yes
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
new file mode 100644
index 0000000..753d832
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
@@ -0,0 +1,37 @@
+SUMMARY = "IPv4 link-local address allocator"
+DESCRIPTION = "Zeroconf is a program that is used to claim IPv4 \
+link-local addresses. IPv4 link-local addresses are useful when setting \
+up ad-hoc networking between devices without the involvement of a either \
+a DHCP server or network administrator. \
+These addresses are allocated from the 169.254.0.0/16 address range and \
+are normally attached to each Ethernet device in your computer. \
+Addresses are assigned randomly by each host and, in case of collision, \
+both hosts (are supposed to) renumber."
+AUTHOR = "Anand Kumria <wildfire@progsoc.uts.edu.au>"
+HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4 \
+                    file://zeroconf.c;beginline=1;endline=13;md5=a5bada96e1e34b08eb7446b28e2630b2"
+SECTION = "net"
+
+PR = "r1"
+
+SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${BPN}-${PV}.tar.gz \
+           file://compilefix.patch \
+           file://makefile-add-ldflags.patch \
+           file://zeroconf-default \
+           file://debian-zeroconf \
+           file://0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch \
+           "
+
+SRC_URI[md5sum] = "bdafb16b008ebb5633e4e581f77821d2"
+SRC_URI[sha256sum] = "a8c74df127753e2310fa1e072f3c9ca44a404bb0bbce9cfec7a84c6dff8bec7b"
+
+do_install () {
+    install -d ${D}${sbindir}
+    install -d ${D}${sysconfdir}/network/if-up.d
+    install -d ${D}${sysconfdir}/default
+    install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
+    install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
+    install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch
new file mode 100644
index 0000000..ec89b7a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch
@@ -0,0 +1,27 @@
+From 38c97e590fde19213f6ba31e72d1c227db869427 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 31 Aug 2014 22:28:38 -0700
+Subject: [PATCH] aoe-stat.in: no bashism
+
+The checkbashisms shows there is no bashism, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ aoe-stat.in |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/aoe-stat.in b/aoe-stat.in
+index 50e6ac6..0c1d6f5 100755
+--- a/aoe-stat.in
++++ b/aoe-stat.in
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+ # aoe-stat - collate and present information about AoE storage
+ # Copyright 2012, CORAID, Inc., and licensed under GPL v.2.
+ 
+-- 
+1.7.9.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch
new file mode 100644
index 0000000..726d8c5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools/makefile-add-ldflags.patch
@@ -0,0 +1,31 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 0c56ade..79f2e2b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -68,17 +68,17 @@ clean :
+ 	rm -f ${CONF_SCRIPTS} ${AOE_PING_OBJ} ${AOE_CFG_OBJ} ${SANCHECK_OBJ} ${PROGS}
+ 
+ aoeping : ${AOE_PING_OBJ}
+-	${CC} ${CFLAGS} -o $@ ${AOE_PING_OBJ}
++	${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_PING_OBJ}
+ aoeping.o : aoeping.c dat.h fns.h
+ 	${CC} ${CFLAGS} -o $@ -c $<
+ linux.o : linux.c config.h
+ 	${CC} ${CFLAGS} -o $@ -c $<
+ aoecfg: ${AOE_CFG_OBJ}
+-	${CC} ${CFLAGS} -o $@ ${AOE_CFG_OBJ}
++	${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_CFG_OBJ}
+ aoecfg.o : aoecfg.c dat.h fns.h
+ 	${CC} ${CFLAGS} -o $@ -c $<
+ aoe-sancheck : ${SANCHECK_OBJ}
+-	-$(CC) $(CFLAGS) -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
++	-$(CC) $(CFLAGS) ${LDFLAGS} -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
+ aoe-sancheck.o : aoe-sancheck.c
+ 	-$(CC) $(CFLAGS) -o $@ -c $<
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
new file mode 100644
index 0000000..9b73b44
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/aoetools/aoetools_36.bb
@@ -0,0 +1,26 @@
+SUMMARY = "ATA over Ethernet Tools"
+DESCRIPTION = " \
+The aoetools are programs for users of the ATA over Ethernet (AoE)network \
+storage protocol, a simple protocol for using storage over anethernet LAN. \
+The vblade program (storage target) exports a blockdevice using AoE. \
+"
+HOMEPAGE = "http://sourceforge.net/projects/${BPN}"
+SECTION = "admin"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+RRECOMMENDS_${PN} = "kernel-module-aoe"
+
+SRC_URI = "http://sourceforge.net/projects/${BPN}/files/${BPN}/${BPN}-${PV}.tar.gz \
+           file://aoe-stat-no-bashism.patch \
+           file://makefile-add-ldflags.patch \
+        "
+SRC_URI[md5sum] = "bff30daa988a65f69d4448ce4726a6db"
+SRC_URI[sha256sum] = "fb5e2cd0de7644cc1ec04ee3aeb43211cf7445a0c19e13d6b3ed5a8fbdf215ff"
+
+# EXTRA_OEMAKE is typically: -e MAKEFLAGS=
+# the -e causes problems as CFLAGS is modified in the Makefile.
+EXTRA_OEMAKE = ""
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch
new file mode 100644
index 0000000..eb58389
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch
@@ -0,0 +1,61 @@
+From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 30 Mar 2017 12:33:51 -0700
+Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags
+
+This leaves room for setting CFLAGS in environment
+which OE uses to pass tweaks
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile            | 10 ++++------
+ extensions/Makefile |  4 ++++
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 62ebdf2..cd06813 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,9 +12,7 @@ DESTDIR:=
+ 
+ MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8
+ 
+-COPT_FLAGS:=-O2
+-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
+-
++ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\"
+ ifndef ARPT_LIBDIR
+ ARPT_LIBDIR:=$(LIBDIR)/arptables
+ endif
+@@ -24,13 +22,13 @@ include extensions/Makefile
+ all: arptables-legacy libarptc/libarptc.a
+ 
+ arptables.o: arptables.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+ 
+ arptables-standalone.o: arptables-standalone.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+ 
+ libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
+ 
+ libarptc/libarptc.a: libarptc/libarptc.o
+ 	$(AR) rcs $@ $<
+diff --git a/extensions/Makefile b/extensions/Makefile
+index 0189cc9..e8af782 100644
+--- a/extensions/Makefile
++++ b/extensions/Makefile
+@@ -5,3 +5,7 @@ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
+ 
+ extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
+ 	$(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
++
++extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
++	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch
new file mode 100644
index 0000000..0875344
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables-arpt-get-target-fix.patch
@@ -0,0 +1,30 @@
+arptables: fix the redefinition of 'arpt_get_target'
+
+Upstream-Status: Pending
+
+This function is already defined as a static inline function in
+include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the
+inline will not work, and the redefinition error will happen
+
+Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
+index 35736db..addd3f9 100644
+--- a/libarptc/libarptc_incl.c
++++ b/libarptc/libarptc_incl.c
+@@ -11,14 +11,6 @@
+ /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See
+    COPYING for details). */
+ 
+-#ifndef __OPTIMIZE__
+-STRUCT_ENTRY_TARGET *
+-GET_TARGET(STRUCT_ENTRY *e)
+-{
+-	return (void *)e + e->target_offset;
+-}
+-#endif
+-
+ static int sockfd = -1;
+ static void *arptc_fn = NULL;
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service
new file mode 100644
index 0000000..f9fd56d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables/arptables.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Arp filtering arptables
+After=network.target
+Requires=network.target
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
+ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
+ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
+RemainAfterExit=yes
+ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null"
+ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables"
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
new file mode 100644
index 0000000..c02a199
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/arptables/arptables_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Administration tool for arp packet filtering"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+SRCREV = "efae8949e31f8b2eb6290f377a28384cecaf105a"
+PV = "0.0.5+git${SRCPV}"
+
+SRC_URI = " \
+    git://git.netfilter.org/arptables \
+    file://0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch \
+    file://arptables-arpt-get-target-fix.patch \
+    file://arptables.service \
+"
+SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
+SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
+
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE_${PN} = "arptables.service"
+
+inherit systemd
+
+EXTRA_OEMAKE = "'BINDIR=${sbindir}' 'MANDIR=${mandir}'"
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
+    fi
+}
+
+RDEPENDS_${PN} += "perl"
+
+# the install target is not multi-job safe, but it doesn't do much
+# so we just install serially
+#
+PARALLEL_MAKEINST = "-j1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
new file mode 100644
index 0000000..0a72c6b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
@@ -0,0 +1,40 @@
+From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:37:48 -0400
+Subject: [PATCH] build: don't ignore CFLAGS from environment
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We need to take them into account so as to behave nicely towards
+build environments which expect to be able to set them, e.g. for
+optimisation flags, or debug options.
+
+Therefore they need to be added to the compiler command line of
+every source file, and in addition, the same CFLAGS that were
+used during compilation must also always be used during linking!
+
+Upstream-Status: Pending
+
+Signed-off-by: André Draszik <git@andred.net>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ brctl/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/brctl/Makefile.in b/brctl/Makefile.in
+index e1956d6..eff260c 100644
+--- a/brctl/Makefile.in
++++ b/brctl/Makefile.in
+@@ -34,7 +34,7 @@ install: $(PROGRAMS)
+ 	$(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
+ 
+ brctl:	$(brctl_OBJECTS) ../libbridge/libbridge.a
+-	$(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
++	$(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
+ 
+ %.o: %.c brctl.h
+ 	$(CC) $(CFLAGS) $(INCLUDE) -c $< 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
new file mode 100644
index 0000000..3f65761
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
@@ -0,0 +1,51 @@
+From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:48:33 -0400
+Subject: [PATCH] libbridge: Modifying the AR to cross toolchain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Makefile uses the host “ar” tool when it should be using the ar from
+the target toolchain.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ configure.ac          | 1 +
+ libbridge/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8b2e2ea..8426b7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,10 @@ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
+index 7932bfe..bd55e9b 100644
+--- a/libbridge/Makefile.in
++++ b/libbridge/Makefile.in
+@@ -1,7 +1,7 @@
+ 
+ KERNEL_HEADERS=-I@KERNEL_HEADERS@
+ 
+-AR=ar
++AR=@AR@
+ RANLIB=@RANLIB@
+ 
+ CC=@CC@
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
new file mode 100644
index 0000000..8a23a30
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
@@ -0,0 +1,33 @@
+From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:18:20 -0400
+Subject: [PATCH] include missing kernel header
+
+Fixes errors like
+
+| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type
+| In file included from ../libbridge/libbridge.h:24:0,
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ libbridge/libbridge.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
+index c038b92..fd09306 100644
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -24,6 +24,7 @@
+ #include <sys/time.h>
+ #include <netinet/in.h>
+ 
++#include <linux/in6.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
new file mode 100644
index 0000000..1c87c48
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Tools for ethernet bridging"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
+
+SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606"
+
+SRC_URI = "\
+    git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \
+    file://kernel-headers.patch \
+    file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
+    file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \
+"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "sysfsutils"
+
+inherit autotools-brokensep update-alternatives
+
+ALTERNATIVE_${PN} = "brctl"
+ALTERNATIVE_PRIORITY[brctl] = "100"
+ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
+
+EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
+
+do_install_append () {
+    install -d ${D}/${datadir}/bridge-utils
+    install -d ${D}/${sysconfdir}/network/if-pre-up.d
+    install -d ${D}/${sysconfdir}/network/if-post-down.d
+}
+
+RRECOMMENDS_${PN} = "kernel-module-bridge"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch
new file mode 100644
index 0000000..b0809ee
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch
@@ -0,0 +1,39 @@
+From 86df4200c9c33d999df0e8cc3c9771f17a297ec4 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 13 Sep 2017 15:01:54 +0200
+Subject: [PATCH] configure.ac: make tools support optional
+
+* add --enable-tools option
+* XIPH_PATH_OGG macro is provided by libogg so we cannot call
+  it without the libogg dependency
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d4b1a3f..7d6b2dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,8 +68,14 @@ AC_MSG_RESULT($has_alloca)
+ 
+ AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
+ 
+-XIPH_PATH_OGG([tools="tools"], [tools=""])
++AC_ARG_ENABLE(tools, [  --enable-tools          Compile ogg tools],
++[if test "$enableval" = yes; then
++  [tools="tools"]
++else
++  [tools=""]
++fi],
+ AC_SUBST(tools)
++)
+ 
+ AC_CHECK_LIB(m, sin)
+ 
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-tests-Include-entcode.c-into-test-sources-to-provide.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-tests-Include-entcode.c-into-test-sources-to-provide.patch
new file mode 100644
index 0000000..cc893f0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051/0001-tests-Include-entcode.c-into-test-sources-to-provide.patch
@@ -0,0 +1,55 @@
+From 61fbdddb660c5944ac23b820754a7c4cf4eee097 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jun 2018 19:29:03 -0700
+Subject: [PATCH] tests: Include entcode.c into test sources to provide
+ definitions of functions e.g. ec_ilog()
+
+Fixes link errors in tests
+| /usr/src/debug/celt051/0.5.1.3+gitAUTOINC+5555aae843-r0/git/tests/../libcelt/rangedec.c:202: undefined reference to `ec_ilog'
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/cwrs32-test.c  | 1 +
+ tests/ectest.c       | 2 +-
+ tests/laplace-test.c | 1 +
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/cwrs32-test.c b/tests/cwrs32-test.c
+index 3a95df2..a159ab3 100644
+--- a/tests/cwrs32-test.c
++++ b/tests/cwrs32-test.c
+@@ -8,6 +8,7 @@
+ #include "rangeenc.c"
+ #include "rangedec.c"
+ #include "cwrs.c"
++#include "entcode.c"
+ #include <string.h>
+ #define NMAX (10)
+ #define MMAX (9)
+diff --git a/tests/ectest.c b/tests/ectest.c
+index aa35453..94eb9a3 100644
+--- a/tests/ectest.c
++++ b/tests/ectest.c
+@@ -5,7 +5,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <math.h>
+-#include "entcode.h"
++#include "entcode.c"
+ #include "entenc.c"
+ #include "entdec.c"
+ #include "rangeenc.c"
+diff --git a/tests/laplace-test.c b/tests/laplace-test.c
+index 3f98ab3..8e1fb4e 100644
+--- a/tests/laplace-test.c
++++ b/tests/laplace-test.c
+@@ -6,6 +6,7 @@
+ #include <stdlib.h>
+ #include "laplace.c"
+ #include "stack_alloc.h"
++#include "entcode.c"
+ #include "entenc.c"
+ #include "entdec.c"
+ #include "rangeenc.c"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051_git.bb
new file mode 100644
index 0000000..c3e4cbb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/celt051/celt051_git.bb
@@ -0,0 +1,33 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "The CELT codec is a compression algorithm for audio"
+DESCRIPTION = "The CELT codec is a compression algorithm for \
+audio. Like MP3, Vorbis, and AAC it is suitable for transmitting music \
+with high quality. Unlike these formats CELT imposes very little delay \
+on the signal, even less than is typical for speech centric formats \
+like Speex, GSM, or G.729."
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=375f60ab360d17f0172737036ff155b2"
+
+PV = "0.5.1.3+git${SRCPV}"
+
+SRCREV = "5555aae843f57241d005e330b9cb65602d56db0f"
+
+SRC_URI = "git://gitlab.xiph.org/xiph/celt.git;branch=compat-v0.5.1;protocol=https \
+           file://0001-configure.ac-make-tools-support-optional.patch \
+           file://0001-tests-Include-entcode.c-into-test-sources-to-provide.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[ogg] = "--enable-tools,--disable-tools,libogg,"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/0001-Fix-compilation-with-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/0001-Fix-compilation-with-musl.patch
new file mode 100644
index 0000000..17b6353
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/0001-Fix-compilation-with-musl.patch
@@ -0,0 +1,29 @@
+From 11ec10cdb5ab4b94c5999e018a9c854419997761 Mon Sep 17 00:00:00 2001
+From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+Date: Wed, 10 Apr 2019 03:18:17 +0200
+Subject: [PATCH] Fix compilation with musl
+
+Fixes:
+../hash_intmd5.c:58: undefined reference to `MIN'
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+---
+ hash_intmd5.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/hash_intmd5.c b/hash_intmd5.c
+index 49da1cf..47efe4c 100644
+--- a/hash_intmd5.c
++++ b/hash_intmd5.c
+@@ -33,6 +33,8 @@
+ 
+ #include "md5.c"
+ 
++#include <sys/param.h>
++
+ static MD5_CTX ctx;
+ 
+ int
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/CVE-2020-14367.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/CVE-2020-14367.patch
new file mode 100644
index 0000000..79df100
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/CVE-2020-14367.patch
@@ -0,0 +1,204 @@
+From f00fed20092b6a42283f29c6ee1f58244d74b545 Mon Sep 17 00:00:00 2001
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Thu, 6 Aug 2020 09:31:11 +0200
+Subject: main: create new file when writing pidfile
+
+When writing the pidfile, open the file with the O_CREAT|O_EXCL flags
+to avoid following a symlink and writing the PID to an unexpected file,
+when chronyd still has the root privileges.
+
+The Linux open(2) man page warns about O_EXCL not working as expected on
+NFS versions before 3 and Linux versions before 2.6. Saving pidfiles on
+a distributed filesystem like NFS is not generally expected, but if
+there is a reason to do that, these old kernel and NFS versions are not
+considered to be supported for saving files by chronyd.
+
+This is a minimal backport specific to this issue of the following
+commits:
+- commit 2fc8edacb810 ("use PATH_MAX")
+- commit f4c6a00b2a11 ("logging: call exit() in LOG_Message()")
+- commit 7a4c396bba8f ("util: add functions for common file operations")
+- commit e18903a6b563 ("switch to new util file functions")
+
+Reported-by: Matthias Gerstner <mgerstner@suse.de>
+
+Upstream-Status: Backport [https://git.tuxfamily.org/chrony/chrony.git/commit/?id=f00fed20092b6a42283f29c6ee1f58244d74b545]
+CVE: CVE-2020-14367
+Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
+
+diff --git a/logging.c b/logging.c
+index d2296e0..fd7f900 100644
+--- a/logging.c
++++ b/logging.c
+@@ -171,6 +171,7 @@ void LOG_Message(LOG_Severity severity,
+         system_log = 0;
+         log_message(1, severity, buf);
+       }
++      exit(1);
+       break;
+     default:
+       assert(0);
+diff --git a/main.c b/main.c
+index 6ccf32e..8edb2e1 100644
+--- a/main.c
++++ b/main.c
+@@ -281,13 +281,9 @@ write_pidfile(void)
+   if (!pidfile[0])
+     return;
+ 
+-  out = fopen(pidfile, "w");
+-  if (!out) {
+-    LOG_FATAL("Could not open %s : %s", pidfile, strerror(errno));
+-  } else {
+-    fprintf(out, "%d\n", (int)getpid());
+-    fclose(out);
+-  }
++  out = UTI_OpenFile(NULL, pidfile, NULL, 'W', 0644);
++  fprintf(out, "%d\n", (int)getpid());
++  fclose(out);
+ }
+ 
+ /* ================================================== */
+diff --git a/sysincl.h b/sysincl.h
+index 296c5e6..873a3bd 100644
+--- a/sysincl.h
++++ b/sysincl.h
+@@ -37,6 +37,7 @@
+ #include <glob.h>
+ #include <grp.h>
+ #include <inttypes.h>
++#include <limits.h>
+ #include <math.h>
+ #include <netinet/in.h>
+ #include <pwd.h>
+diff --git a/util.c b/util.c
+index e7e3442..83b3b20 100644
+--- a/util.c
++++ b/util.c
+@@ -1179,6 +1179,101 @@ UTI_CheckDirPermissions(const char *path, mode_t perm, uid_t uid, gid_t gid)
+ 
+ /* ================================================== */
+ 
++static int
++join_path(const char *basedir, const char *name, const char *suffix,
++          char *buffer, size_t length, LOG_Severity severity)
++{
++  const char *sep;
++
++  if (!basedir) {
++    basedir = "";
++    sep = "";
++  } else {
++    sep = "/";
++  }
++
++  if (!suffix)
++    suffix = "";
++
++  if (snprintf(buffer, length, "%s%s%s%s", basedir, sep, name, suffix) >= length) {
++    LOG(severity, "File path %s%s%s%s too long", basedir, sep, name, suffix);
++    return 0;
++  }
++
++  return 1;
++}
++
++/* ================================================== */
++
++FILE *
++UTI_OpenFile(const char *basedir, const char *name, const char *suffix,
++             char mode, mode_t perm)
++{
++  const char *file_mode;
++  char path[PATH_MAX];
++  LOG_Severity severity;
++  int fd, flags;
++  FILE *file;
++
++  severity = mode >= 'A' && mode <= 'Z' ? LOGS_FATAL : LOGS_ERR;
++
++  if (!join_path(basedir, name, suffix, path, sizeof (path), severity))
++    return NULL;
++
++  switch (mode) {
++    case 'r':
++    case 'R':
++      flags = O_RDONLY;
++      file_mode = "r";
++      if (severity != LOGS_FATAL)
++        severity = LOGS_DEBUG;
++      break;
++    case 'w':
++    case 'W':
++      flags = O_WRONLY | O_CREAT | O_EXCL;
++      file_mode = "w";
++      break;
++    case 'a':
++    case 'A':
++      flags = O_WRONLY | O_CREAT | O_APPEND;
++      file_mode = "a";
++      break;
++    default:
++      assert(0);
++      return NULL;
++  }
++
++try_again:
++  fd = open(path, flags, perm);
++  if (fd < 0) {
++    if (errno == EEXIST) {
++      if (unlink(path) < 0) {
++        LOG(severity, "Could not remove %s : %s", path, strerror(errno));
++        return NULL;
++      }
++      DEBUG_LOG("Removed %s", path);
++      goto try_again;
++    }
++    LOG(severity, "Could not open %s : %s", path, strerror(errno));
++    return NULL;
++  }
++
++  UTI_FdSetCloexec(fd);
++
++  file = fdopen(fd, file_mode);
++  if (!file) {
++    LOG(severity, "Could not open %s : %s", path, strerror(errno));
++    close(fd);
++    return NULL;
++  }
++
++  DEBUG_LOG("Opened %s fd=%d mode=%c", path, fd, mode);
++
++  return file;
++}
++
++/* ================================================== */
++
+ void
+ UTI_DropRoot(uid_t uid, gid_t gid)
+ {
+diff --git a/util.h b/util.h
+index e3d6767..a2481cc 100644
+--- a/util.h
++++ b/util.h
+@@ -176,6 +176,17 @@ extern int UTI_CreateDirAndParents(const char *path, mode_t mode, uid_t uid, gid
+    permissions and its uid/gid must match the specified values. */
+ extern int UTI_CheckDirPermissions(const char *path, mode_t perm, uid_t uid, gid_t gid);
+ 
++/* Open a file.  The full path of the file is constructed from the basedir
++   (may be NULL), '/' (if basedir is not NULL), name, and suffix (may be NULL).
++   Created files have specified permissions (umasked).  Returns NULL on error.
++   The following modes are supported (if the mode is an uppercase character,
++   errors are fatal):
++   r/R - open an existing file for reading
++   w/W - open a new file for writing (remove existing file)
++   a/A - open an existing file for appending (create if does not exist) */
++extern FILE *UTI_OpenFile(const char *basedir, const char *name, const char *suffix,
++                          char mode, mode_t perm);
++
+ /* Set process user/group IDs and drop supplementary groups */
+ extern void UTI_DropRoot(uid_t uid, gid_t gid);
+ 
+-- 
+cgit v0.10.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
new file mode 100644
index 0000000..187898a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
@@ -0,0 +1,75 @@
+From f35e07aceb4a16121d83b47ee77990018bec98ea Mon Sep 17 00:00:00 2001
+From: Joe Slater <jslater@windriver.com>
+Date: Thu, 9 Mar 2017 10:58:06 -0800
+Subject: [PATCH] chrony: fix build failure for arma9
+
+    Eliminate references to syscalls not available
+    for ARM_EABI.  Also add a dependency on libseccomp
+    which is needed for scfilter to work.
+
+    Set PACKAGECONFIG to not enable scfilter, since
+    kernel CONFIG_SECCOMP is unlikely to be set.  This
+    aligns the usage of libseccomp with that of other packages.
+
+    Upstream-Status: Pending
+
+    Signed-off-by: Joe Slater <jslater@windriver.com>
+
+    Refresh patch for new upstream version.
+
+    Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
+---
+ sys_linux.c | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/sys_linux.c b/sys_linux.c
+index 898dc7a..b268ad1 100644
+--- a/sys_linux.c
++++ b/sys_linux.c
+@@ -479,14 +479,14 @@ SYS_Linux_EnableSystemCallFilter(int level)
+   const int syscalls[] = {
+     /* Clock */
+     SCMP_SYS(adjtimex), SCMP_SYS(clock_gettime), SCMP_SYS(gettimeofday),
+-    SCMP_SYS(settimeofday), SCMP_SYS(time),
++    SCMP_SYS(settimeofday),
+     /* Process */
+     SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getpid),
+-    SCMP_SYS(getrlimit), SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
++    SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
+     SCMP_SYS(rt_sigprocmask), SCMP_SYS(set_tid_address), SCMP_SYS(sigreturn),
+     SCMP_SYS(wait4), SCMP_SYS(waitpid),
+     /* Memory */
+-    SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap), SCMP_SYS(mmap2),
++    SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap2),
+     SCMP_SYS(mprotect), SCMP_SYS(mremap), SCMP_SYS(munmap), SCMP_SYS(shmdt),
+     /* Filesystem */
+     SCMP_SYS(_llseek), SCMP_SYS(access), SCMP_SYS(chmod), SCMP_SYS(chown),
+@@ -499,14 +499,22 @@ SYS_Linux_EnableSystemCallFilter(int level)
+     SCMP_SYS(bind), SCMP_SYS(connect), SCMP_SYS(getsockname), SCMP_SYS(getsockopt),
+     SCMP_SYS(recv), SCMP_SYS(recvfrom), SCMP_SYS(recvmmsg), SCMP_SYS(recvmsg),
+     SCMP_SYS(send), SCMP_SYS(sendmmsg), SCMP_SYS(sendmsg), SCMP_SYS(sendto),
+-    /* TODO: check socketcall arguments */
+-    SCMP_SYS(socketcall),
+     /* General I/O */
+     SCMP_SYS(_newselect), SCMP_SYS(close), SCMP_SYS(open), SCMP_SYS(openat), SCMP_SYS(pipe),
+     SCMP_SYS(pipe2), SCMP_SYS(poll), SCMP_SYS(ppoll), SCMP_SYS(pselect6), SCMP_SYS(read),
+-    SCMP_SYS(futex), SCMP_SYS(select), SCMP_SYS(set_robust_list), SCMP_SYS(write),
++    SCMP_SYS(futex), SCMP_SYS(set_robust_list), SCMP_SYS(write),
+     /* Miscellaneous */
+     SCMP_SYS(getrandom), SCMP_SYS(sysinfo), SCMP_SYS(uname),
++    /* not always available */
++#if ! defined(__ARM_EABI__)
++    SCMP_SYS(time),
++    SCMP_SYS(getrlimit),
++    SCMP_SYS(select),
++    SCMP_SYS(mmap),
++    /* TODO: check socketcall arguments */
++    SCMP_SYS(socketcall),
++#endif
++
+   };
+ 
+   const int socket_domains[] = {
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf
new file mode 100644
index 0000000..64c1b9f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chrony.conf
@@ -0,0 +1,50 @@
+# Use public NTP servers from the pool.ntp.org project.
+# Please consider joining the pool project if possible by running your own
+# server(s).
+# If you are a vendor distributing a product using chrony, you *MUST*
+# read and comply with http://www.pool.ntp.org/vendors.html
+pool 0.openembedded.pool.ntp.org iburst
+
+# Use a local timeserver in preference to the pool, if it's reachable.
+#server 192.168.22.22 iburst minpoll 2 prefer
+
+# Sync to pulse-per-second from an onboard GPS.
+#refclock PPS /dev/pps0 poll 0 prefer
+# You'll want to enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO in your kernel,
+# and an entry something like this in your device tree:
+#	pps {
+#		compatible = "pps-gpio";
+#		gpios = <&ps7_gpio_0 56 0>;
+#	};
+
+# In first three updates step the system clock instead of slew
+# if the adjustment is larger than 1 second.
+makestep 1.0 3
+
+# Record the rate at which the system clock gains/loses time,
+# improving accuracy after reboot
+driftfile /var/lib/chrony/drift
+
+# Enable kernel synchronization of the hardware real-time clock (RTC).
+rtcsync
+
+# Allow NTP client access from local network.
+allow 192.168/16
+
+# Serve time even if not synchronized to any NTP server.
+local stratum 10
+
+# Specify file containing keys for NTP authentication.
+#keyfile /etc/chrony.keys
+
+# Specify directory for log files.
+logdir /var/log/chrony
+
+refclock PPS /dev/pps0 refid PPS lock GPS prefer precision 1e-7
+refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
+#refclock SHM 1 refid PPS precision 1e-7
+#refclock SOCK /var/run/chrony.ttyS1.sock refid GPS precision 1e-1 offset 0.9999
+#refclock SOCK /var/run/chrony.pps0.sock refid PPS precision 1e-7
+
+# Select which information is logged.
+#log measurements statistics tracking
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd
new file mode 100644
index 0000000..04f1b68
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony/chronyd
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+# System V init script for chrony
+# Adapted from the script already in meta-networking for ntpd
+
+### BEGIN INIT INFO
+# Provides:        chrony
+# Required-Start:  $network $remote_fs $syslog
+# Required-Stop:   $network $remote_fs $syslog
+# Default-Start:   2 3 4 5
+# Default-Stop:
+# Short-Description: Start chrony time daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/chronyd
+PIDFILE=/var/run/chronyd.pid
+
+test -x $DAEMON -a -r /etc/chrony.conf || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+# Functions to do individual actions
+startdaemon(){
+	echo -n "Starting chronyd: "
+	start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- "$@"
+	echo "done"
+}
+stopdaemon(){
+	echo -n "Stopping chronyd: "
+	start-stop-daemon --stop --quiet --oknodo -p $PIDFILE
+	echo "done"
+}
+
+case "$1" in
+  start)
+	startdaemon
+	;;
+  stop)
+  	stopdaemon
+	;;
+  force-reload | restart | reload)
+  	stopdaemon
+	startdaemon
+	;;
+  status)
+	status /usr/sbin/chronyd;
+	exit $?
+	;;
+  *)
+	echo "Usage: chronyd { start | stop | status | restart | reload }" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.5.bb
new file mode 100644
index 0000000..182ce13
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.5.bb
@@ -0,0 +1,139 @@
+SUMMARY = "Versatile implementation of the Network Time Protocol"
+DESCRIPTION = "Chrony can synchronize the system clock with NTP \
+servers, reference clocks (e.g. GPS receiver), and manual input using \
+wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) \
+server and peer to provide a time service to other computers in the \
+network. \
+\
+It is designed to perform well in a wide range of conditions, \
+including intermittent network connections, heavily congested \
+networks, changing temperatures (ordinary computer clocks are \
+sensitive to temperature), and systems that do not run continuously, or \
+run on a virtual machine. \
+\
+Typical accuracy between two machines on a LAN is in tens, or a few \
+hundreds, of microseconds; over the Internet, accuracy is typically \
+within a few milliseconds. With a good hardware reference clock \
+sub-microsecond accuracy is possible. \
+\
+Two programs are included in chrony: chronyd is a daemon that can be \
+started at boot time and chronyc is a command-line interface program \
+which can be used to monitor chronyd's performance and to change \
+various operating parameters whilst it is running. \
+\
+This recipe produces two binary packages: 'chrony' which contains chronyd, \
+the configuration file and the init script, and 'chronyc' which contains \
+the client program only."
+
+HOMEPAGE = "https://chrony.tuxfamily.org/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \
+    file://chrony.conf \
+    file://chronyd \
+    file://arm_eabi.patch \
+    file://CVE-2020-14367.patch \
+"
+
+SRC_URI_append_libc-musl = " \
+    file://0001-Fix-compilation-with-musl.patch \
+"
+SRC_URI[md5sum] = "5f66338bc940a9b51eede8f391e7bed3"
+SRC_URI[sha256sum] = "4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5"
+
+DEPENDS = "pps-tools"
+
+# Note: Despite being built via './configure; make; make install',
+#       chrony does not use GNU Autotools.
+inherit update-rc.d systemd
+
+# Configuration options:
+# - For command line editing support in chronyc, you may specify either
+#   'editline' or 'readline' but not both.  editline is smaller, but
+#   many systems already have readline for other purposes so you might want
+#   to choose that instead.  However, beware license incompatibility
+#   since chrony is GPLv2 and readline versions after 6.0 are GPLv3+.
+#   You can of course choose neither, but if you're that tight on space
+#   consider dropping chronyc entirely (you can use it remotely with
+#   appropriate chrony.conf options).
+# - Security-related:
+#   - 'sechash' is omitted by default because it pulls in nss which is huge.
+#   - 'privdrop' allows chronyd to run as non-root; would need changes to
+#     chrony.conf and init script.
+#   - 'scfilter' enables support for system call filtering, but requires the
+#     kernel to have CONFIG_SECCOMP enabled.
+PACKAGECONFIG ??= "editline \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[readline] = "--without-editline,--without-readline,readline"
+PACKAGECONFIG[editline] = ",--without-editline,libedit"
+PACKAGECONFIG[sechash] = "--without-tomcrypt,--disable-sechash,nss"
+PACKAGECONFIG[privdrop] = ",--disable-privdrop,libcap"
+PACKAGECONFIG[scfilter] = "--enable-scfilter,--without-seccomp,libseccomp"
+PACKAGECONFIG[ipv6] = ",--disable-ipv6,"
+PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+
+# --disable-static isn't supported by chrony's configure script.
+DISABLE_STATIC = ""
+
+do_configure() {
+    ./configure --sysconfdir=${sysconfdir} --bindir=${bindir} --sbindir=${sbindir} \
+                --localstatedir=${localstatedir} --datarootdir=${datadir} \
+                ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+    # Binaries
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/chronyc ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -m 0755 ${S}/chronyd ${D}${sbindir}
+
+    # Config file
+    install -d ${D}${sysconfdir}
+    install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir}
+
+    # System V init script
+    install -d ${D}${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d
+
+    # systemd unit configuration file
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
+
+    # Variable data (for drift and/or rtc file)
+    install -d ${D}${localstatedir}/lib/chrony
+
+    # Log files
+    install -d ${D}${localstatedir}/log/chrony
+
+    # Fix hard-coded paths in config files and init scripts
+    sed -i -e 's!/var/!${localstatedir}/!g' -e 's!/etc/!${sysconfdir}/!g' \
+           -e 's!/usr/sbin/!${sbindir}/!g' -e 's!/usr/bin/!${bindir}/!g' \
+           ${D}${sysconfdir}/chrony.conf \
+           ${D}${sysconfdir}/init.d/chronyd \
+           ${D}${systemd_unitdir}/system/chronyd.service
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
+    sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
+}
+
+FILES_${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}"
+CONFFILES_${PN} = "${sysconfdir}/chrony.conf"
+INITSCRIPT_NAME = "chronyd"
+INITSCRIPT_PARAMS = "defaults"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "chronyd.service"
+
+# It's probably a bad idea to run chrony and another time daemon on
+# the same system.  systemd includes the SNTP client 'timesyncd', which
+# will be disabled by chronyd.service, however it will remain on the rootfs
+# wasting 150 kB unless you put 'PACKAGECONFIG_remove_pn-systemd = "timesyncd"'
+# in a conf file or bbappend somewhere.
+RCONFLICTS_${PN} = "ntp ntimed"
+
+# Separate the client program into its own package
+PACKAGES =+ "chronyc"
+FILES_chronyc = "${bindir}/chronyc"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils/0001-Bugfix-Modify-the-dir-of-install-exec-hook-and.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils/0001-Bugfix-Modify-the-dir-of-install-exec-hook-and.patch
new file mode 100644
index 0000000..233ae40
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils/0001-Bugfix-Modify-the-dir-of-install-exec-hook-and.patch
@@ -0,0 +1,43 @@
+From f61f5f8a328207867b5c523b1c6bef6aaecaab88 Mon Sep 17 00:00:00 2001
+From: Wang Mingyu <wangmy@cn.fujitsu.com>
+Date: Sat, 15 Feb 2020 16:05:58 +0800
+Subject: [PATCH] Bugfix: Modify the dir of install-exec-hook and
+ install-data-hook
+
+Error message:
+(cd /sbin && ln -sf mount.cifs mount.smb3)
+  /yocto/work001/fnst/wangmy/build/tmp/hosttools/install -c mount.cifs
+'/yocto/work001/fnst/wangmy/build/tmp/work/core2-64-poky-linux/cifs-utils/6.10-r0/image/sbin'
+make  install-data-hook
+ln: failed to create symbolic link 'mount.smb3': Permission denied
+
+Upstream-Status: Pending
+
+Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
+---
+ Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index fe9cd34..e9be6b3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -119,11 +119,11 @@ endif
+ SUBDIRS = contrib
+ 
+ install-exec-hook:
+-	(cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
++	(cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+ 
+ install-data-hook:
+-	(cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
++	(test -n "$(man_MANS)" || exit 0; cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+ 
+ uninstall-hook:
+-	(cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
+-	(cd $(man8dir) && rm -f $(man8dir)/mount.smb3.8)
++	(cd $(DESTDIR)$(ROOTSBINDIR) && rm -f $(DESTDIR)$(ROOTSBINDIR)/mount.smb3)
++	(test -n "$(man_MANS)" || exit 0; cd $(DESTDIR)$(man8dir) && rm -f $(DESTDIR)$(man8dir)/mount.smb3.8)
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb
new file mode 100644
index 0000000..8d82ee4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem."
+HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils"
+SECTION = "otherosfs"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PV = "6.10"
+
+SRCREV = "5ff5fc2ecc10353fd39ad508db5c2828fd2d8d9a"
+SRC_URI = "git://git.samba.org/cifs-utils.git"
+
+S = "${WORKDIR}/git"
+DEPENDS += "libtalloc"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap"
+# when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install_append is needed
+PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils"
+# when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install_append is needed
+PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 libtalloc keyutils"
+PACKAGECONFIG[cifsidmap] = "--enable-cifsidmap,--disable-cifsidmap,keyutils samba"
+PACKAGECONFIG[cifsacl] = "--enable-cifsacl,--disable-cifsacl,samba"
+PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disable-pam,libpam keyutils"
+
+SRC_URI += " \
+            file://0001-Bugfix-Modify-the-dir-of-install-exec-hook-and.patch \
+            "
+
+inherit autotools pkgconfig
+
+do_install_append() {
+    # Remove empty /usr/bin and /usr/sbin directories since the mount helper
+    # is installed to /sbin
+    rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
+}
+
+FILES_${PN} += "${base_libdir}/security"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug"
+RRECOMMENDS_${PN} = "kernel-module-cifs"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb
new file mode 100644
index 0000000..4ecaabd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb
@@ -0,0 +1,20 @@
+require cim-schema.inc
+
+SECTION = "doc"
+
+LICENSE = "DMTF"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-Doc.zip;subdir=${BP} \
+           file://LICENSE \
+          "
+SRC_URI[md5sum] = "3d01940bc1085c6c42184c25fb61f739"
+SRC_URI[sha256sum] = "3174cf0f8657b19d80dc59e184778d8e553da424728cb2966fe9d5428dd84267"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_install() {
+        install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}-docs
+        cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/doc/cim-schema-${PV}-docs
+}
+
+FILES_${PN} = "${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
new file mode 100644
index 0000000..90ea882
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
@@ -0,0 +1,29 @@
+require cim-schema.inc
+
+LICENSE = "DMTF"
+
+RCONFLICTS_${PN} = "cim-schema-final"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2500/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
+    file://LICENSE \
+"
+SRC_URI[md5sum] = "ee4ad6441a2b65ca60a3abc53e3ec629"
+SRC_URI[sha256sum] = "a44d67881325e267ef46b72eabe0c69f90470b1033b1ce7c26d9ba99072adb50"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_install() {
+    install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
+    install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
+    install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
+
+    cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
+    chown -R root:root ${D}${datadir}/mof/cimv${PV}
+    for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
+        sed -i -e 's/\r//g' $i
+    done
+    ln -s cimv${PV} ${D}${datadir}/mof/cim-current
+    ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
+}
+
+FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb
new file mode 100644
index 0000000..67d1db2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-final_2.40.0.bb
@@ -0,0 +1,29 @@
+require cim-schema.inc
+
+LICENSE = "DMTF"
+
+RCONFLICTS_${PN} = "cim-schema-exper"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-MOFs.zip;subdir=${BP} \
+    file://LICENSE \
+"
+SRC_URI[md5sum] = "a9bdf17c7374e3b5b7adeaac4842c4ad"
+SRC_URI[sha256sum] = "dbfa3064ea427acd71a4bebbc172ca2dc44b0b09a6d83b0945b9ffa988a9058a"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_install() {
+    install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
+    install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
+    install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
+
+    cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
+    chown -R root:root ${D}${datadir}/mof/cimv${PV}/
+    for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
+        sed -i -e 's/\r//g' $i
+    done
+    ln -s cimv${PV} ${D}${datadir}/mof/cim-current
+    ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
+}
+
+FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc
new file mode 100644
index 0000000..b9171e4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema.inc
@@ -0,0 +1,9 @@
+SUMMARY = "Common Information Model (CIM) Schema"
+DESCRIPTION = "Common Information Model (CIM) is a model for describing overall\
+management information in a network or enterprise environment. CIM\
+consists of a specification and a schema. The specification defines the\
+details for integration with other management models. The schema\
+provides the actual model descriptions."
+
+HOMEPAGE = "http://www.dmtf.org/"
+SECTION = "libs"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE
new file mode 100644
index 0000000..54a2812
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/cim-schema/files/LICENSE
@@ -0,0 +1,34 @@
+// Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF).
+// All rights reserved.
+// DMTF is a not-for-profit association of industry members dedicated
+// to promoting enterprise and systems management and interoperability.
+// DMTF specifications and documents may be reproduced by
+// members and non-members, provided that correct attribution is given.
+// As DMTF specifications may be revised from time to time,
+// the particular version and release date should always be noted.
+// 
+// Implementation of certain elements of this standard or proposed
+// standard may be subject to third party patent rights, including
+// provisional patent rights (herein "patent rights"). DMTF makes
+// no representations to users of the standard as to the existence
+// of such rights, and is not responsible to recognize, disclose, or
+// identify any or all such third party patent right, owners or
+// claimants, nor for any incomplete or inaccurate identification or
+// disclosure of such rights, owners or claimants. DMTF shall have no
+// liability to any party, in any manner or circumstance, under any
+// legal theory whatsoever, for failure to recognize, disclose, or
+// identify any such third party patent rights, or for such party's
+// reliance on the standard or incorporation thereof in its product,
+// protocols or testing procedures. DMTF shall have no liability to
+// any party implementing such standard, whether such implementation
+// is foreseeable or not, nor to any patent owner or claimant, and shall
+// have no liability or responsibility for costs or losses incurred if
+// a standard is withdrawn or modified after publication, and shall be
+// indemnified and held harmless by any party implementing the
+// standard from any and all claims of infringement by a patent owner
+// for such implementations.
+// 
+// For information about patents held by third-parties which have
+// notified the DMTF that, in their opinion, such patent may relate to
+// or impact implementations of DMTF standards, visit
+// http://www.dmtf.org/about/policies/disclosures.php.
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
new file mode 100644
index 0000000..799cf86
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "C++ library for client-side URL transfers"
+HOMEPAGE = "http://www.curlpp.org/"
+SECTION = "libdevel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=fd0c9adf285a69aa3b4faf34384e1029"
+
+DEPENDS = "curl"
+DEPENDS_class-native = "curl-native"
+
+SRC_URI = "git://github.com/jpbarrette/curlpp.git"
+
+SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig binconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
new file mode 100644
index 0000000..33678e2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -0,0 +1,86 @@
+SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server"
+HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SECTION = "net"
+# GPLv3 was added in version 2.41 as license option
+LICENSE = "GPLv2 | GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+                    file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504"
+
+#at least versions 2.69 and prior are moved to the archive folder on the server
+SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
+           file://init \
+           file://dnsmasq.conf \
+           file://dnsmasq-resolvconf.service \
+           file://dnsmasq-noresolvconf.service \
+           file://dnsmasq-resolved.conf \
+"
+
+inherit pkgconfig update-rc.d systemd
+
+INITSCRIPT_NAME = "dnsmasq"
+INITSCRIPT_PARAMS = "defaults"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[dbus] = ",,dbus"
+PACKAGECONFIG[idn] = ",,libidn"
+PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack"
+PACKAGECONFIG[lua] = ",,lua"
+PACKAGECONFIG[resolvconf] = ",,,resolvconf"
+EXTRA_OEMAKE = "\
+    'COPTS=${@bb.utils.contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \
+           ${@bb.utils.contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \
+           ${@bb.utils.contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \
+           ${@bb.utils.contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \
+    'CFLAGS=${CFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}"
+
+do_compile_append() {
+    # build dhcp_release
+    cd ${S}/contrib/lease-tools
+    oe_runmake
+}
+
+do_install () {
+    oe_runmake "PREFIX=${D}${prefix}" \
+               "BINDIR=${D}${bindir}" \
+               "MANDIR=${D}${mandir}" \
+               install
+    install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d
+    install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
+    install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
+
+    install -d ${D}${systemd_unitdir}/system
+
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
+        install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
+    else
+        install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
+    fi
+    install -d ${D}${sysconfdir}/systemd/resolved.conf.d/
+    install -m 0644 ${WORKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/
+
+    install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir}
+
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'dbus', d)}" ]; then
+        install -d ${D}${sysconfdir}/dbus-1/system.d
+        install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/
+    fi
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
+        install -d ${D}${sysconfdir}/resolvconf/update.d/
+        install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq
+
+        install -d ${D}${sysconfdir}/default/volatiles
+        install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles
+        install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir}
+    fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "dnsmasq.service"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
new file mode 100644
index 0000000..1bf0f75
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch
@@ -0,0 +1,30 @@
+From be1b3d2d0f1608cba5efee73d6aac5ad0709041b Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Tue, 9 Sep 2014 10:24:58 -0400
+Subject: [PATCH] Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 73ea23e..ed3eeb9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,8 +59,8 @@ idn2_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFI
+ idn2_libs =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --libs libidn2`
+ ct_cflags =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack`
+ ct_libs =       `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
+-lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2` 
+-lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2` 
++lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua`
++lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua`
+ nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
+ nettle_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
+ gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
+-- 
+2.9.5
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb
new file mode 100644
index 0000000..a1dc0f3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb
@@ -0,0 +1,13 @@
+require dnsmasq.inc
+
+SRC_URI[dnsmasq-2.81.md5sum] = "e43808177a773014b5892ccba238f7a8"
+SRC_URI[dnsmasq-2.81.sha256sum] = "3c28c68c6c2967c3a96e9b432c0c046a5df17a426d3a43cffe9e693cf05804d0"
+SRC_URI += "\
+    file://lua.patch \
+    file://CVE-2020-25681.patch \
+    file://CVE-2020-25684.patch \
+    file://CVE-2020-25685-1.patch \
+    file://CVE-2020-25685-2.patch \
+    file://CVE-2020-25686-1.patch \
+    file://CVE-2020-25686-2.patch \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
new file mode 100644
index 0000000..f52ce4e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/99_dnsmasq
@@ -0,0 +1 @@
+d root root 0755 /run/dnsmasq none
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25681.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25681.patch
new file mode 100644
index 0000000..6756157
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25681.patch
@@ -0,0 +1,370 @@
+From 4e96a4be685c9e4445f6ee79ad0b36b9119b502a Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Wed, 11 Nov 2020 23:25:04 +0000
+Subject: [PATCH] Fix remote buffer overflow CERT VU#434904
+
+The problem is in the sort_rrset() function and allows a remote
+attacker to overwrite memory. Any dnsmasq instance with DNSSEC
+enabled is vulnerable.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ CHANGELOG    |   7 +-
+ src/dnssec.c | 273 ++++++++++++++++++++++++++++-----------------------
+ 2 files changed, 158 insertions(+), 122 deletions(-)
+
+CVE: CVE-2020-25681
+CVE: CVE-2020-25682
+CVE: CVE-2020-25683
+CVE: CVE-2020-25687
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=patch;h=4e96a4be685c9e4445f6ee79ad0b36b9119b502a]
+Comment: Refreshed first two hunks
+
+Index: dnsmasq-2.81/src/dnssec.c
+===================================================================
+--- dnsmasq-2.81.orig/src/dnssec.c
++++ dnsmasq-2.81/src/dnssec.c
+@@ -223,138 +223,144 @@ static int check_date_range(unsigned lon
+     && serial_compare_32(curtime, date_end) == SERIAL_LT;
+ }
+ 
+-/* Return bytes of canonicalised rdata, when the return value is zero, the remaining 
+-   data, pointed to by *p, should be used raw. */
+-static int get_rdata(struct dns_header *header, size_t plen, unsigned char *end, char *buff, int bufflen,
+-		     unsigned char **p, u16 **desc)
++/* Return bytes of canonicalised rrdata one by one.
++   Init state->ip with the RR, and state->end with the end of same.
++   Init state->op to NULL.
++   Init state->desc to RR descriptor.
++   Init state->buff with a MAXDNAME * 2 buffer.
++   
++   After each call which returns 1, state->op points to the next byte of data.
++   On returning 0, the end has been reached.
++*/
++struct rdata_state {
++  u16 *desc;
++  size_t c;
++  unsigned char *end, *ip, *op;
++  char *buff;
++};
++
++static int get_rdata(struct dns_header *header, size_t plen, struct rdata_state *state)
+ {
+-  int d = **desc;
++  int d;
+   
+-  /* No more data needs mangling */
+-  if (d == (u16)-1)
++  if (state->op && state->c != 1)
+     {
+-      /* If there's more data than we have space for, just return what fits,
+-	 we'll get called again for more chunks */
+-      if (end - *p > bufflen)
+-	{
+-	  memcpy(buff, *p, bufflen);
+-	  *p += bufflen;
+-	  return bufflen;
+-	}
+-      
+-      return 0;
++      state->op++;
++      state->c--;
++      return 1;
+     }
+- 
+-  (*desc)++;
+-  
+-  if (d == 0 && extract_name(header, plen, p, buff, 1, 0))
+-    /* domain-name, canonicalise */
+-    return to_wire(buff);
+-  else
+-    { 
+-      /* plain data preceding a domain-name, don't run off the end of the data */
+-      if ((end - *p) < d)
+-	d = end - *p;
+-      
+-      if (d != 0)
++
++  while (1)
++    {
++      d = *(state->desc);
++      if (d == (u16)-1)
+ 	{
+-	  memcpy(buff, *p, d);
+-	  *p += d;
++         /* all the bytes to the end. */
++         if ((state->c = state->end - state->ip) != 0)
++           {
++             state->op = state->ip;
++             state->ip = state->end;;
++           }
++         else
++           return 0;
++       }
++      else
++       {
++         state->desc++;
++         
++         if (d == (u16)0)
++           {
++             /* domain-name, canonicalise */
++             int len;
++             
++             if (!extract_name(header, plen, &state->ip, state->buff, 1, 0) ||
++                 (len = to_wire(state->buff)) == 0)
++               continue;
++             
++             state->c = len;
++             state->op = (unsigned char *)state->buff;
++           }
++         else
++           {
++             /* plain data preceding a domain-name, don't run off the end of the data */
++             if ((state->end - state->ip) < d)
++               d = state->end - state->ip;
++             
++             if (d == 0)
++               continue;
++                 
++             state->op = state->ip;
++             state->c = d;
++             state->ip += d;
++           }
+ 	}
+       
+-      return d;
++      return 1;
+     }
+ }
+ 
+-/* Bubble sort the RRset into the canonical order. 
+-   Note that the byte-streams from two RRs may get unsynced: consider 
+-   RRs which have two domain-names at the start and then other data.
+-   The domain-names may have different lengths in each RR, but sort equal
+-
+-   ------------
+-   |abcde|fghi|
+-   ------------
+-   |abcd|efghi|
+-   ------------
+-
+-   leaving the following bytes as deciding the order. Hence the nasty left1 and left2 variables.
+-*/
++/* Bubble sort the RRset into the canonical order. */
+ 
+ static int sort_rrset(struct dns_header *header, size_t plen, u16 *rr_desc, int rrsetidx, 
+ 		      unsigned char **rrset, char *buff1, char *buff2)
+ {
+-  int swap, quit, i, j;
++  int swap, i, j;
+   
+   do
+     {
+       for (swap = 0, i = 0; i < rrsetidx-1; i++)
+ 	{
+-	  int rdlen1, rdlen2, left1, left2, len1, len2, len, rc;
+-	  u16 *dp1, *dp2;
+-	  unsigned char *end1, *end2;
++         int rdlen1, rdlen2;
++         struct rdata_state state1, state2;
++         
+ 	  /* Note that these have been determined to be OK previously,
+ 	     so we don't need to check for NULL return here. */
+-	  unsigned char *p1 = skip_name(rrset[i], header, plen, 10);
+-	  unsigned char *p2 = skip_name(rrset[i+1], header, plen, 10);
+-	  
+-	  p1 += 8; /* skip class, type, ttl */
+-	  GETSHORT(rdlen1, p1);
+-	  end1 = p1 + rdlen1;
+-	  
+-	  p2 += 8; /* skip class, type, ttl */
+-	  GETSHORT(rdlen2, p2);
+-	  end2 = p2 + rdlen2; 
+-	  
+-	  dp1 = dp2 = rr_desc;
+-	  
+-	  for (quit = 0, left1 = 0, left2 = 0, len1 = 0, len2 = 0; !quit;)
++         state1.ip = skip_name(rrset[i], header, plen, 10);
++         state2.ip = skip_name(rrset[i+1], header, plen, 10);
++         state1.op = state2.op = NULL;
++         state1.buff = buff1;
++         state2.buff = buff2;
++         state1.desc = state2.desc = rr_desc;
++	  
++         state1.ip += 8; /* skip class, type, ttl */
++         GETSHORT(rdlen1, state1.ip);
++         if (!CHECK_LEN(header, state1.ip, plen, rdlen1))
++           return rrsetidx; /* short packet */
++         state1.end = state1.ip + rdlen1;
++         state2.ip += 8; /* skip class, type, ttl */
++         GETSHORT(rdlen2, state2.ip);
++         if (!CHECK_LEN(header, state2.ip, plen, rdlen2))
++           return rrsetidx; /* short packet */
++         state2.end = state2.ip + rdlen2;
++                 
++         while (1)
+ 	    {
+-	      if (left1 != 0)
+-		memmove(buff1, buff1 + len1 - left1, left1);
+-	      
+-	      if ((len1 = get_rdata(header, plen, end1, buff1 + left1, (MAXDNAME * 2) - left1, &p1, &dp1)) == 0)
+-		{
+-		  quit = 1;
+-		  len1 = end1 - p1;
+-		  memcpy(buff1 + left1, p1, len1);
++             int ok1, ok2;
++             ok1 = get_rdata(header, plen, &state1);
++             ok2 = get_rdata(header, plen, &state2);
++
++             if (!ok1 && !ok2)
++               {
++                 /* Two RRs are equal, remove one copy. RFC 4034, para 6.3 */
++                 for (j = i+1; j < rrsetidx-1; j++)
++                   rrset[j] = rrset[j+1];
++                 rrsetidx--;
++                 i--;
++                 break;
+ 		}
+-	      len1 += left1;
+-	      
+-	      if (left2 != 0)
+-		memmove(buff2, buff2 + len2 - left2, left2);
+-	      
+-	      if ((len2 = get_rdata(header, plen, end2, buff2 + left2, (MAXDNAME *2) - left2, &p2, &dp2)) == 0)
+-		{
+-		  quit = 1;
+-		  len2 = end2 - p2;
+-		  memcpy(buff2 + left2, p2, len2);
+-		}
+-	      len2 += left2;
+-	       
+-	      if (len1 > len2)
+-		left1 = len1 - len2, left2 = 0, len = len2;
+-	      else
+-		left2 = len2 - len1, left1 = 0, len = len1;
+-	      
+-	      rc = (len == 0) ? 0 : memcmp(buff1, buff2, len);
+-	      
+-	      if (rc > 0 || (rc == 0 && quit && len1 > len2))
++             else if (ok1 && (!ok2 || *state1.op > *state2.op))
+ 		{
+ 		  unsigned char *tmp = rrset[i+1];
+ 		  rrset[i+1] = rrset[i];
+ 		  rrset[i] = tmp;
+-		  swap = quit = 1;
+-		}
+-	      else if (rc == 0 && quit && len1 == len2)
+-		{
+-		  /* Two RRs are equal, remove one copy. RFC 4034, para 6.3 */
+-		  for (j = i+1; j < rrsetidx-1; j++)
+-		    rrset[j] = rrset[j+1];
+-		  rrsetidx--;
+-		  i--;
++		  swap = 1;
++		  break;
+ 		}
+-	      else if (rc < 0)
+-		quit = 1;
++	      else if (ok2 && (!ok1 || *state2.op > *state1.op))
++		break;
++	      
++	      /* arrive here when bytes are equal, go round the loop again
++		 and compare the next ones. */
+ 	    }
+ 	}
+     } while (swap);
+@@ -569,12 +575,15 @@ static int validate_rrset(time_t now, st
+       wire_len = to_wire(keyname);
+       hash->update(ctx, (unsigned int)wire_len, (unsigned char*)keyname);
+       from_wire(keyname);
++
++#define RRBUFLEN 300 /* Most RRs are smaller than this. */
+       
+       for (i = 0; i < rrsetidx; ++i)
+ 	{
+-	  int seg;
+-	  unsigned char *end, *cp;
+-	  u16 len, *dp;
++         int j;
++         struct rdata_state state;
++         u16 len;
++         unsigned char rrbuf[RRBUFLEN];
+ 	  
+ 	  p = rrset[i];
+ 	 	  
+@@ -586,12 +595,11 @@ static int validate_rrset(time_t now, st
+ 	  /* if more labels than in RRsig name, hash *.<no labels in rrsig labels field>  4035 5.3.2 */
+ 	  if (labels < name_labels)
+ 	    {
+-	      int k;
+-	      for (k = name_labels - labels; k != 0; k--)
++	      for (j = name_labels - labels; j != 0; j--)
+ 		{
+ 		  while (*name_start != '.' && *name_start != 0)
+ 		    name_start++;
+-		  if (k != 1 && *name_start == '.')
++		  if (j != 1 && *name_start == '.')
+ 		    name_start++;
+ 		}
+ 	      
+@@ -612,24 +620,44 @@ static int validate_rrset(time_t now, st
+ 	  if (!CHECK_LEN(header, p, plen, rdlen))
+ 	    return STAT_BOGUS; 
+ 	  
+-	  end = p + rdlen;
+-	  
+-	  /* canonicalise rdata and calculate length of same, use name buffer as workspace.
+-	     Note that name buffer is twice MAXDNAME long in DNSSEC mode. */
+-	  cp = p;
+-	  dp = rr_desc;
+-	  for (len = 0; (seg = get_rdata(header, plen, end, name, MAXDNAME * 2, &cp, &dp)) != 0; len += seg);
+-	  len += end - cp;
+-	  len = htons(len);
++	  /* canonicalise rdata and calculate length of same, use
++	     name buffer as workspace for get_rdata. */
++	  state.ip = p;
++	  state.op = NULL;
++	  state.desc = rr_desc;
++	  state.buff = name;
++	  state.end = p + rdlen;
++	  
++	  for (j = 0; get_rdata(header, plen, &state); j++)
++	    if (j < RRBUFLEN)
++	      rrbuf[j] = *state.op;
++
++	  len = htons((u16)j);
+ 	  hash->update(ctx, 2, (unsigned char *)&len); 
++
++	  /* If the RR is shorter than RRBUFLEN (most of them, in practice)
++	     then we can just digest it now. If it exceeds RRBUFLEN we have to
++	     go back to the start and do it in chunks. */
++	  if (j >= RRBUFLEN)
++	    {
++	      state.ip = p;
++	      state.op = NULL;
++	      state.desc = rr_desc;
++
++	      for (j = 0; get_rdata(header, plen, &state); j++)
++		{
++		   rrbuf[j] = *state.op;
++
++		   if (j == RRBUFLEN - 1)
++		     {
++		       hash->update(ctx, RRBUFLEN, rrbuf);
++		       j = -1;
++		     }
++		}
++	    }
+ 	  
+-	  /* Now canonicalise again and digest. */
+-	  cp = p;
+-	  dp = rr_desc;
+-	  while ((seg = get_rdata(header, plen, end, name, MAXDNAME * 2, &cp, &dp)))
+-	    hash->update(ctx, seg, (unsigned char *)name);
+-	  if (cp != end)
+-	    hash->update(ctx, end - cp, cp);
++	  if (j != 0)
++	    hash->update(ctx, j, rrbuf);
+ 	}
+      
+       hash->digest(ctx, hash->digest_size, digest);
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25684.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25684.patch
new file mode 100644
index 0000000..f7ff4b2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25684.patch
@@ -0,0 +1,98 @@
+From 257ac0c5f7732cbc6aa96fdd3b06602234593aca Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Thu, 12 Nov 2020 18:49:23 +0000
+Subject: [PATCH] Check destination of DNS UDP query replies.
+
+At any time, dnsmasq will have a set of sockets open, bound to
+random ports, on which it sends queries to upstream nameservers.
+This patch fixes the existing problem that a reply for ANY in-flight
+query would be accepted via ANY open port, which increases the
+chances of an attacker flooding answers "in the blind" in an
+attempt to poison the DNS cache. CERT VU#434904 refers.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ CHANGELOG     |  6 +++++-
+ src/forward.c | 37 ++++++++++++++++++++++++++++---------
+ 2 files changed, 33 insertions(+), 10 deletions(-)
+
+CVE: CVE-2020-25684
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=patch;h=257ac0c5f7732cbc6aa96fdd3b06602234593aca]
+Comment: No change in any hunk
+
+Index: dnsmasq-2.81/src/forward.c
+===================================================================
+--- dnsmasq-2.81.orig/src/forward.c
++++ dnsmasq-2.81/src/forward.c
+@@ -16,7 +16,7 @@
+ 
+ #include "dnsmasq.h"
+ 
+-static struct frec *lookup_frec(unsigned short id, void *hash);
++static struct frec *lookup_frec(unsigned short id, int fd, int family, void *hash);
+ static struct frec *lookup_frec_by_sender(unsigned short id,
+ 					  union mysockaddr *addr,
+ 					  void *hash);
+@@ -805,7 +805,7 @@ void reply_query(int fd, int family, tim
+   crc = questions_crc(header, n, daemon->namebuff);
+ #endif
+   
+-  if (!(forward = lookup_frec(ntohs(header->id), hash)))
++  if (!(forward = lookup_frec(ntohs(header->id), fd, family, hash)))
+     return;
+   
+ #ifdef HAVE_DUMPFILE
+@@ -2338,14 +2338,25 @@ struct frec *get_new_frec(time_t now, in
+ }
+ 
+ /* crc is all-ones if not known. */
+-static struct frec *lookup_frec(unsigned short id, void *hash)
++static struct frec *lookup_frec(unsigned short id, int fd, int family, void *hash)
+ {
+   struct frec *f;
+ 
+   for(f = daemon->frec_list; f; f = f->next)
+     if (f->sentto && f->new_id == id && 
+ 	(!hash || memcmp(hash, f->hash, HASH_SIZE) == 0))
+-      return f;
++      {
++	/* sent from random port */
++	if (family == AF_INET && f->rfd4 && f->rfd4->fd == fd)
++	  return f;
++
++	if (family == AF_INET6 && f->rfd6 && f->rfd6->fd == fd)
++	  return f;
++
++	/* sent to upstream from bound socket. */
++	if (f->sentto->sfd && f->sentto->sfd->fd == fd)
++	  return f;
++      }
+       
+   return NULL;
+ }
+@@ -2406,12 +2417,20 @@ void server_gone(struct server *server)
+ static unsigned short get_id(void)
+ {
+   unsigned short ret = 0;
++  struct frec *f;
+   
+-  do 
+-    ret = rand16();
+-  while (lookup_frec(ret, NULL));
+-  
+-  return ret;
++  while (1)
++    {
++      ret = rand16();
++
++      /* ensure id is unique. */
++      for (f = daemon->frec_list; f; f = f->next)
++	if (f->sentto && f->new_id == ret)
++	  break;
++
++      if (!f)
++	return ret;
++    }
+ }
+ 
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-1.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-1.patch
new file mode 100644
index 0000000..5eb582c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-1.patch
@@ -0,0 +1,587 @@
+From 2d765867c597db18be9d876c9c17e2c0fe1953cd Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Thu, 12 Nov 2020 22:06:07 +0000
+Subject: [PATCH] Use SHA-256 to provide security against DNS cache poisoning.
+
+Use the SHA-256 hash function to verify that DNS answers
+received are for the questions originally asked. This replaces
+the slightly insecure SHA-1 (when compiled with DNSSEC) or
+the very insecure CRC32 (otherwise). Refer: CERT VU#434904.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ CHANGELOG            |   5 +
+ Makefile             |   3 +-
+ bld/Android.mk       |   2 +-
+ src/dnsmasq.h        |  11 +-
+ src/dnssec.c         |  31 -----
+ src/forward.c        |  43 ++-----
+ src/hash_questions.c | 281 +++++++++++++++++++++++++++++++++++++++++++
+ src/rfc1035.c        |  49 --------
+ 8 files changed, 301 insertions(+), 124 deletions(-)
+ create mode 100644 src/hash_questions.c
+
+CVE: CVE-2020-25685
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=patch;h=2024f9729713fd657d65e64c2e4e471baa0a3e5b]
+Comment: No change in any hunk
+
+Index: dnsmasq-2.81/Makefile
+===================================================================
+--- dnsmasq-2.81.orig/Makefile
++++ dnsmasq-2.81/Makefile
+@@ -77,7 +77,8 @@ objs = cache.o rfc1035.o util.o option.o
+        helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
+        dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
+        domain.o dnssec.o blockdata.o tables.o loop.o inotify.o \
+-       poll.o rrfilter.o edns0.o arp.o crypto.o dump.o ubus.o metrics.o
++       poll.o rrfilter.o edns0.o arp.o crypto.o dump.o ubus.o \
++       metrics.o hash_questions.o
+ 
+ hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
+        dns-protocol.h radv-protocol.h ip6addr.h metrics.h
+Index: dnsmasq-2.81/bld/Android.mk
+===================================================================
+--- dnsmasq-2.81.orig/bld/Android.mk
++++ dnsmasq-2.81/bld/Android.mk
+@@ -11,7 +11,7 @@ LOCAL_SRC_FILES :=  bpf.c cache.c dbus.c
+ 		    radv.c slaac.c auth.c ipset.c domain.c \
+ 	            dnssec.c dnssec-openssl.c blockdata.c tables.c \
+ 		    loop.c inotify.c poll.c rrfilter.c edns0.c arp.c \
+-		    crypto.c dump.c ubus.c
++		    crypto.c dump.c ubus.c metrics.c hash_questions.c
+ 
+ LOCAL_MODULE := dnsmasq
+ 
+Index: dnsmasq-2.81/src/dnsmasq.h
+===================================================================
+--- dnsmasq-2.81.orig/src/dnsmasq.h
++++ dnsmasq-2.81/src/dnsmasq.h
+@@ -654,11 +654,7 @@ struct hostsfile {
+ #define FREC_TEST_PKTSZ       256
+ #define FREC_HAS_EXTRADATA    512        
+ 
+-#ifdef HAVE_DNSSEC
+-#define HASH_SIZE 20 /* SHA-1 digest size */
+-#else
+-#define HASH_SIZE sizeof(int)
+-#endif
++#define HASH_SIZE 32 /* SHA-256 digest size */
+ 
+ struct frec {
+   union mysockaddr source;
+@@ -1218,7 +1214,6 @@ int check_for_bogus_wildcard(struct dns_
+ 			     struct bogus_addr *baddr, time_t now);
+ int check_for_ignored_address(struct dns_header *header, size_t qlen, struct bogus_addr *baddr);
+ int check_for_local_domain(char *name, time_t now);
+-unsigned int questions_crc(struct dns_header *header, size_t plen, char *name);
+ size_t resize_packet(struct dns_header *header, size_t plen, 
+ 		  unsigned char *pheader, size_t hlen);
+ int add_resource_record(struct dns_header *header, char *limit, int *truncp,
+@@ -1243,9 +1238,11 @@ int dnssec_validate_reply(time_t now, st
+ 			  int check_unsigned, int *neganswer, int *nons, int *nsec_ttl);
+ int dnskey_keytag(int alg, int flags, unsigned char *key, int keylen);
+ size_t filter_rrsigs(struct dns_header *header, size_t plen);
+-unsigned char* hash_questions(struct dns_header *header, size_t plen, char *name);
+ int setup_timestamp(void);
+ 
++/* hash_questions.c */
++unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name);
++
+ /* crypto.c */
+ const struct nettle_hash *hash_find(char *name);
+ int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char **digestp);
+Index: dnsmasq-2.81/src/dnssec.c
+===================================================================
+--- dnsmasq-2.81.orig/src/dnssec.c
++++ dnsmasq-2.81/src/dnssec.c
+@@ -2084,35 +2084,4 @@ size_t dnssec_generate_query(struct dns_
+   return ret;
+ }
+ 
+-unsigned char* hash_questions(struct dns_header *header, size_t plen, char *name)
+-{
+-  int q;
+-  unsigned int len;
+-  unsigned char *p = (unsigned char *)(header+1);
+-  const struct nettle_hash *hash;
+-  void *ctx;
+-  unsigned char *digest;
+-  
+-  if (!(hash = hash_find("sha1")) || !hash_init(hash, &ctx, &digest))
+-    return NULL;
+-  
+-  for (q = ntohs(header->qdcount); q != 0; q--) 
+-    {
+-      if (!extract_name(header, plen, &p, name, 1, 4))
+-	break; /* bad packet */
+-      
+-      len = to_wire(name);
+-      hash->update(ctx, len, (unsigned char *)name);
+-      /* CRC the class and type as well */
+-      hash->update(ctx, 4, p);
+-
+-      p += 4;
+-      if (!CHECK_LEN(header, p, plen, 0))
+-	break; /* bad packet */
+-    }
+-  
+-  hash->digest(ctx, hash->digest_size, digest);
+-  return digest;
+-}
+-
+ #endif /* HAVE_DNSSEC */
+Index: dnsmasq-2.81/src/forward.c
+===================================================================
+--- dnsmasq-2.81.orig/src/forward.c
++++ dnsmasq-2.81/src/forward.c
+@@ -256,19 +256,16 @@ static int forward_query(int udpfd, unio
+   union all_addr *addrp = NULL;
+   unsigned int flags = 0;
+   struct server *start = NULL;
+-#ifdef HAVE_DNSSEC
+   void *hash = hash_questions(header, plen, daemon->namebuff);
++#ifdef HAVE_DNSSEC
+   int do_dnssec = 0;
+-#else
+-  unsigned int crc = questions_crc(header, plen, daemon->namebuff);
+-  void *hash = &crc;
+ #endif
+   unsigned int gotname = extract_request(header, plen, daemon->namebuff, NULL);
+   unsigned char *oph = find_pseudoheader(header, plen, NULL, NULL, NULL, NULL);
+   (void)do_bit;
+ 
+   /* may be no servers available. */
+-  if (forward || (hash && (forward = lookup_frec_by_sender(ntohs(header->id), udpaddr, hash))))
++  if (forward || (forward = lookup_frec_by_sender(ntohs(header->id), udpaddr, hash)))
+     {
+       /* If we didn't get an answer advertising a maximal packet in EDNS,
+ 	 fall back to 1280, which should work everywhere on IPv6.
+@@ -769,9 +766,6 @@ void reply_query(int fd, int family, tim
+   size_t nn;
+   struct server *server;
+   void *hash;
+-#ifndef HAVE_DNSSEC
+-  unsigned int crc;
+-#endif
+ 
+   /* packet buffer overwritten */
+   daemon->srv_save = NULL;
+@@ -798,12 +792,7 @@ void reply_query(int fd, int family, tim
+   if (difftime(now, server->pktsz_reduced) > UDP_TEST_TIME)
+     server->edns_pktsz = daemon->edns_pktsz;
+ 
+-#ifdef HAVE_DNSSEC
+   hash = hash_questions(header, n, daemon->namebuff);
+-#else
+-  hash = &crc;
+-  crc = questions_crc(header, n, daemon->namebuff);
+-#endif
+   
+   if (!(forward = lookup_frec(ntohs(header->id), fd, family, hash)))
+     return;
+@@ -1115,8 +1104,7 @@ void reply_query(int fd, int family, tim
+ 			log_query(F_NOEXTRA | F_DNSSEC | F_IPV6, daemon->keyname, (union all_addr *)&(server->addr.in6.sin6_addr),
+ 				  querystr("dnssec-query", querytype));
+   
+-		      if ((hash = hash_questions(header, nn, daemon->namebuff)))
+-			memcpy(new->hash, hash, HASH_SIZE);
++		      memcpy(new->hash, hash_questions(header, nn, daemon->namebuff), HASH_SIZE);
+ 		      new->new_id = get_id();
+ 		      header->id = htons(new->new_id);
+ 		      /* Save query for retransmission */
+@@ -1969,15 +1957,9 @@ unsigned char *tcp_request(int confd, ti
+ 	      if (!flags && last_server)
+ 		{
+ 		  struct server *firstsendto = NULL;
+-#ifdef HAVE_DNSSEC
+-		  unsigned char *newhash, hash[HASH_SIZE];
+-		  if ((newhash = hash_questions(header, (unsigned int)size, daemon->namebuff)))
+-		    memcpy(hash, newhash, HASH_SIZE);
+-		  else
+-		    memset(hash, 0, HASH_SIZE);
+-#else
+-		  unsigned int crc = questions_crc(header, (unsigned int)size, daemon->namebuff);
+-#endif		  
++		  unsigned char hash[HASH_SIZE];
++		  memcpy(hash, hash_questions(header, (unsigned int)size, daemon->namebuff), HASH_SIZE);
++
+ 		  /* Loop round available servers until we succeed in connecting to one.
+ 		     Note that this code subtly ensures that consecutive queries on this connection
+ 		     which can go to the same server, do so. */
+@@ -2116,20 +2098,11 @@ unsigned char *tcp_request(int confd, ti
+ 		      /* If the crc of the question section doesn't match the crc we sent, then
+ 			 someone might be attempting to insert bogus values into the cache by 
+ 			 sending replies containing questions and bogus answers. */
+-#ifdef HAVE_DNSSEC
+-		      newhash = hash_questions(header, (unsigned int)m, daemon->namebuff);
+-		      if (!newhash || memcmp(hash, newhash, HASH_SIZE) != 0)
++		      if (memcmp(hash, hash_questions(header, (unsigned int)m, daemon->namebuff), HASH_SIZE) != 0)
+ 			{ 
+ 			  m = 0;
+ 			  break;
+ 			}
+-#else			  
+-		      if (crc != questions_crc(header, (unsigned int)m, daemon->namebuff))
+-			{
+-			  m = 0;
+-			  break;
+-			}
+-#endif
+ 
+ 		      m = process_reply(header, now, last_server, (unsigned int)m, 
+ 					option_bool(OPT_NO_REBIND) && !norebind, no_cache_dnssec, cache_secure, bogusanswer,
+@@ -2344,7 +2317,7 @@ static struct frec *lookup_frec(unsigned
+ 
+   for(f = daemon->frec_list; f; f = f->next)
+     if (f->sentto && f->new_id == id && 
+-	(!hash || memcmp(hash, f->hash, HASH_SIZE) == 0))
++	(memcmp(hash, f->hash, HASH_SIZE) == 0))
+       {
+ 	/* sent from random port */
+ 	if (family == AF_INET && f->rfd4 && f->rfd4->fd == fd)
+Index: dnsmasq-2.81/src/hash_questions.c
+===================================================================
+--- /dev/null
++++ dnsmasq-2.81/src/hash_questions.c
+@@ -0,0 +1,281 @@
++/* Copyright (c) 2012-2020 Simon Kelley
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; version 2 dated June, 1991, or
++   (at your option) version 3 dated 29 June, 2007.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++*/
++
++
++/* Hash the question section. This is used to safely detect query
++   retransmission and to detect answers to questions we didn't ask, which
++   might be poisoning attacks. Note that we decode the name rather
++   than CRC the raw bytes, since replies might be compressed differently.
++   We ignore case in the names for the same reason.
++
++   The hash used is SHA-256. If we're building with DNSSEC support,
++   we use the Nettle cypto library. If not, we prefer not to
++   add a dependency on Nettle, and use a stand-alone implementaion.
++*/
++
++#include "dnsmasq.h"
++
++#ifdef HAVE_DNSSEC
++unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name)
++{
++  int q;
++  unsigned char *p = (unsigned char *)(header+1);
++  const struct nettle_hash *hash;
++  void *ctx;
++  unsigned char *digest;
++  
++  if (!(hash = hash_find("sha256")) || !hash_init(hash, &ctx, &digest))
++    {
++      /* don't think this can ever happen. */
++      static unsigned char dummy[HASH_SIZE];
++      static int warned = 0;
++
++      if (warned)
++	my_syslog(LOG_ERR, _("Failed to create SHA-256 hash object"));
++      warned = 1;
++     
++      return dummy;
++    }
++  
++  for (q = ntohs(header->qdcount); q != 0; q--)
++    {
++      char *cp, c;
++
++      if (!extract_name(header, plen, &p, name, 1, 4))
++	break; /* bad packet */
++
++      for (cp = name; (c = *cp); cp++)
++	 if (c >= 'A' && c <= 'Z')
++	   *cp += 'a' - 'A';
++
++      hash->update(ctx, cp - name, (unsigned char *)name);
++      /* CRC the class and type as well */
++      hash->update(ctx, 4, p);
++
++      p += 4;
++      if (!CHECK_LEN(header, p, plen, 0))
++	break; /* bad packet */
++    }
++  
++  hash->digest(ctx, hash->digest_size, digest);
++  return digest;
++}
++
++#else /* HAVE_DNSSEC */
++
++#define SHA256_BLOCK_SIZE 32            // SHA256 outputs a 32 byte digest
++typedef unsigned char BYTE;             // 8-bit byte
++typedef unsigned int  WORD;             // 32-bit word, change to "long" for 16-bit machines
++
++typedef struct {
++  BYTE data[64];
++  WORD datalen;
++  unsigned long long bitlen;
++  WORD state[8];
++} SHA256_CTX;
++
++static void sha256_init(SHA256_CTX *ctx);
++static void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len);
++static void sha256_final(SHA256_CTX *ctx, BYTE hash[]);
++
++
++unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name)
++{
++  int q;
++  unsigned char *p = (unsigned char *)(header+1);
++  SHA256_CTX ctx;
++  static BYTE digest[SHA256_BLOCK_SIZE];
++  
++  sha256_init(&ctx);
++    
++  for (q = ntohs(header->qdcount); q != 0; q--)
++    {
++      char *cp, c;
++
++      if (!extract_name(header, plen, &p, name, 1, 4))
++	break; /* bad packet */
++
++      for (cp = name; (c = *cp); cp++)
++	 if (c >= 'A' && c <= 'Z')
++	   *cp += 'a' - 'A';
++
++      sha256_update(&ctx, (BYTE *)name, cp - name);
++      /* CRC the class and type as well */
++      sha256_update(&ctx, (BYTE *)p, 4);
++
++      p += 4;
++      if (!CHECK_LEN(header, p, plen, 0))
++	break; /* bad packet */
++    }
++  
++  sha256_final(&ctx, digest);
++  return (unsigned char *)digest;
++}
++
++/* Code from here onwards comes from https://github.com/B-Con/crypto-algorithms
++   and was written by Brad Conte (brad@bradconte.com), to whom all credit is given.
++
++   This code is in the public domain, and the copyright notice at the head of this
++   file does not apply to it.
++*/
++
++
++/****************************** MACROS ******************************/
++#define ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b))))
++#define ROTRIGHT(a,b) (((a) >> (b)) | ((a) << (32-(b))))
++
++#define CH(x,y,z) (((x) & (y)) ^ (~(x) & (z)))
++#define MAJ(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
++#define EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22))
++#define EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25))
++#define SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ ((x) >> 3))
++#define SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ ((x) >> 10))
++
++/**************************** VARIABLES *****************************/
++static const WORD k[64] = {
++			   0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,
++			   0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,
++			   0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,
++			   0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967,
++			   0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,
++			   0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,
++			   0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,
++			   0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
++};
++
++/*********************** FUNCTION DEFINITIONS ***********************/
++static void sha256_transform(SHA256_CTX *ctx, const BYTE data[])
++{
++  WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
++  
++  for (i = 0, j = 0; i < 16; ++i, j += 4)
++    m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]);
++  for ( ; i < 64; ++i)
++    m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];
++
++  a = ctx->state[0];
++  b = ctx->state[1];
++  c = ctx->state[2];
++  d = ctx->state[3];
++  e = ctx->state[4];
++  f = ctx->state[5];
++  g = ctx->state[6];
++  h = ctx->state[7];
++
++  for (i = 0; i < 64; ++i)
++    {
++      t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i];
++      t2 = EP0(a) + MAJ(a,b,c);
++      h = g;
++      g = f;
++      f = e;
++      e = d + t1;
++      d = c;
++      c = b;
++      b = a;
++      a = t1 + t2;
++    }
++  
++  ctx->state[0] += a;
++  ctx->state[1] += b;
++  ctx->state[2] += c;
++  ctx->state[3] += d;
++  ctx->state[4] += e;
++  ctx->state[5] += f;
++  ctx->state[6] += g;
++  ctx->state[7] += h;
++}
++
++static void sha256_init(SHA256_CTX *ctx)
++{
++  ctx->datalen = 0;
++  ctx->bitlen = 0;
++  ctx->state[0] = 0x6a09e667;
++  ctx->state[1] = 0xbb67ae85;
++  ctx->state[2] = 0x3c6ef372;
++  ctx->state[3] = 0xa54ff53a;
++  ctx->state[4] = 0x510e527f;
++  ctx->state[5] = 0x9b05688c;
++  ctx->state[6] = 0x1f83d9ab;
++  ctx->state[7] = 0x5be0cd19;
++}
++
++static void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len)
++{
++  WORD i;
++  
++  for (i = 0; i < len; ++i)
++    {
++      ctx->data[ctx->datalen] = data[i];
++      ctx->datalen++;
++      if (ctx->datalen == 64) {
++	sha256_transform(ctx, ctx->data);
++	ctx->bitlen += 512;
++	ctx->datalen = 0;
++      }
++    }
++}
++
++static void sha256_final(SHA256_CTX *ctx, BYTE hash[])
++{
++  WORD i;
++  
++  i = ctx->datalen;
++
++  // Pad whatever data is left in the buffer.
++  if (ctx->datalen < 56)
++    {
++      ctx->data[i++] = 0x80;
++      while (i < 56)
++	ctx->data[i++] = 0x00;
++    }
++  else
++    {
++      ctx->data[i++] = 0x80;
++      while (i < 64)
++	ctx->data[i++] = 0x00;
++      sha256_transform(ctx, ctx->data);
++      memset(ctx->data, 0, 56);
++    }
++  
++  // Append to the padding the total message's length in bits and transform.
++  ctx->bitlen += ctx->datalen * 8;
++  ctx->data[63] = ctx->bitlen;
++  ctx->data[62] = ctx->bitlen >> 8;
++  ctx->data[61] = ctx->bitlen >> 16;
++  ctx->data[60] = ctx->bitlen >> 24;
++  ctx->data[59] = ctx->bitlen >> 32;
++  ctx->data[58] = ctx->bitlen >> 40;
++  ctx->data[57] = ctx->bitlen >> 48;
++  ctx->data[56] = ctx->bitlen >> 56;
++  sha256_transform(ctx, ctx->data);
++  
++  // Since this implementation uses little endian byte ordering and SHA uses big endian,
++  // reverse all the bytes when copying the final state to the output hash.
++  for (i = 0; i < 4; ++i)
++    {
++      hash[i]      = (ctx->state[0] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 4]  = (ctx->state[1] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 8]  = (ctx->state[2] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0x000000ff;
++      hash[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0x000000ff;
++    }
++}
++
++#endif
+Index: dnsmasq-2.81/src/rfc1035.c
+===================================================================
+--- dnsmasq-2.81.orig/src/rfc1035.c
++++ dnsmasq-2.81/src/rfc1035.c
+@@ -333,55 +333,6 @@ unsigned char *skip_section(unsigned cha
+   return ansp;
+ }
+ 
+-/* CRC the question section. This is used to safely detect query 
+-   retransmission and to detect answers to questions we didn't ask, which 
+-   might be poisoning attacks. Note that we decode the name rather 
+-   than CRC the raw bytes, since replies might be compressed differently. 
+-   We ignore case in the names for the same reason. Return all-ones
+-   if there is not question section. */
+-#ifndef HAVE_DNSSEC
+-unsigned int questions_crc(struct dns_header *header, size_t plen, char *name)
+-{
+-  int q;
+-  unsigned int crc = 0xffffffff;
+-  unsigned char *p1, *p = (unsigned char *)(header+1);
+-
+-  for (q = ntohs(header->qdcount); q != 0; q--) 
+-    {
+-      if (!extract_name(header, plen, &p, name, 1, 4))
+-	return crc; /* bad packet */
+-      
+-      for (p1 = (unsigned char *)name; *p1; p1++)
+-	{
+-	  int i = 8;
+-	  char c = *p1;
+-
+-	  if (c >= 'A' && c <= 'Z')
+-	    c += 'a' - 'A';
+-
+-	  crc ^= c << 24;
+-	  while (i--)
+-	    crc = crc & 0x80000000 ? (crc << 1) ^ 0x04c11db7 : crc << 1;
+-	}
+-      
+-      /* CRC the class and type as well */
+-      for (p1 = p; p1 < p+4; p1++)
+-	{
+-	  int i = 8;
+-	  crc ^= *p1 << 24;
+-	  while (i--)
+-	    crc = crc & 0x80000000 ? (crc << 1) ^ 0x04c11db7 : crc << 1;
+-	}
+-
+-      p += 4;
+-      if (!CHECK_LEN(header, p, plen, 0))
+-	return crc; /* bad packet */
+-    }
+-
+-  return crc;
+-}
+-#endif
+-
+ size_t resize_packet(struct dns_header *header, size_t plen, unsigned char *pheader, size_t hlen)
+ {
+   unsigned char *ansp = skip_questions(header, plen);
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-2.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-2.patch
new file mode 100644
index 0000000..302c42c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25685-2.patch
@@ -0,0 +1,175 @@
+From 2024f9729713fd657d65e64c2e4e471baa0a3e5b Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
+Date: Wed, 25 Nov 2020 17:18:55 +0100
+Subject: [PATCH] Support hash function from nettle (only)
+
+Unlike COPTS=-DHAVE_DNSSEC, allow usage of just sha256 function from
+nettle, but keep DNSSEC disabled at build time. Skips use of internal
+hash implementation without support for validation built-in.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ Makefile             |  8 +++++---
+ bld/pkg-wrapper      | 41 ++++++++++++++++++++++-------------------
+ src/config.h         |  8 ++++++++
+ src/crypto.c         |  7 +++++++
+ src/dnsmasq.h        |  2 +-
+ src/hash_questions.c |  2 +-
+ 6 files changed, 44 insertions(+), 24 deletions(-)
+
+CVE: CVE-2020-25685
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=patch;h=2024f9729713fd657d65e64c2e4e471baa0a3e5b]
+Comment: Refreshed a hunk from pkg-wrapper and second hunk from Makefile
+
+Index: dnsmasq-2.81/Makefile
+===================================================================
+--- dnsmasq-2.81.orig/Makefile
++++ dnsmasq-2.81/Makefile
+@@ -53,7 +53,7 @@ top?=$(CURDIR)
+ 
+ dbus_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --cflags dbus-1` 
+ dbus_libs =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1` 
+-ubus_libs =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_UBUS "" --copy -lubox -lubus`
++ubus_libs =     `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_UBUS "" --copy '-lubox -lubus'`
+ idn_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn` 
+ idn_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` 
+ idn2_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --cflags libidn2`
+@@ -62,8 +62,10 @@ ct_cflags =     `echo $(COPTS) | $(top)/
+ ct_libs =       `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
+ lua_cflags =    `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua`
+ lua_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua`
+-nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
+-nettle_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
++nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC     $(PKG_CONFIG) --cflags 'nettle hogweed' \
++                                                        HAVE_NETTLEHASH $(PKG_CONFIG) --cflags nettle`
++nettle_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC     $(PKG_CONFIG) --libs 'nettle hogweed' \
++                                                        HAVE_NETTLEHASH $(PKG_CONFIG) --libs nettle`
+ gmp_libs =      `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
+ sunos_libs =    `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
+ version =     -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
+Index: dnsmasq-2.81/bld/pkg-wrapper
+===================================================================
+--- dnsmasq-2.81.orig/bld/pkg-wrapper
++++ dnsmasq-2.81/bld/pkg-wrapper
+@@ -1,35 +1,37 @@
+ #!/bin/sh
+ 
+-search=$1
+-shift
+-pkg=$1
+-shift
+-op=$1
+-shift
+-
+ in=`cat`
+ 
+-if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
+-    echo $in | grep $search >/dev/null 2>&1; then
++search()
++{
++    grep "^\#[[:space:]]*define[[:space:]]*$1" config.h >/dev/null 2>&1 || \
++    echo $in | grep $1 >/dev/null 2>&1
++}
++
++while [ "$#" -gt 0 ]; do
++    search=$1
++    pkg=$2
++    op=$3
++    lib=$4
++    shift 4
++if search "$search"; then
++
+ # Nasty, nasty, in --copy, arg 2 (if non-empty) is another config to search for, used with NO_GMP
+     if [ $op = "--copy" ]; then
+ 	if [ -z "$pkg" ]; then
+-	    pkg="$*"
+-	elif grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \
+-		 echo $in | grep $pkg >/dev/null 2>&1; then
++	    pkg="$lib"
++	elif search "$pkg"; then
+ 	    pkg=""
+ 	else 
+-	    pkg="$*"
++	    pkg="$lib"
+ 	fi
+-    elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
+-	     echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
+-	pkg=`$pkg  --static $op $*`
++    elif search "${search}_STATIC"; then
++	pkg=`$pkg  --static $op $lib`
+     else
+-	pkg=`$pkg $op $*`
++	pkg=`$pkg $op $lib`
+     fi
+     
+-    if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
+-	   echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
++    if search "${search}_STATIC"; then
+ 	if [ $op = "--libs" ] || [ $op = "--copy" ]; then
+ 	    echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
+ 	else
+@@ -40,3 +42,4 @@ if grep "^\#[[:space:]]*define[[:space:]
+     fi
+ fi
+ 
++done
+Index: dnsmasq-2.81/src/config.h
+===================================================================
+--- dnsmasq-2.81.orig/src/config.h
++++ dnsmasq-2.81/src/config.h
+@@ -118,6 +118,9 @@ HAVE_AUTH
+    define this to include the facility to act as an authoritative DNS
+    server for one or more zones.
+ 
++HAVE_NETTLEHASH
++   include just hash function from nettle, but no DNSSEC.
++
+ HAVE_DNSSEC
+    include DNSSEC validator.
+ 
+@@ -185,6 +188,7 @@ RESOLVFILE
+ /* #define HAVE_IDN */
+ /* #define HAVE_LIBIDN2 */
+ /* #define HAVE_CONNTRACK */
++/* #define HAVE_NETTLEHASH */
+ /* #define HAVE_DNSSEC */
+ 
+ 
+@@ -418,6 +422,10 @@ static char *compile_opts =
+ "no-"
+ #endif
+ "auth "
++#if !defined(HAVE_NETTLEHASH) && !defined(HAVE_DNSSEC)
++"no-"
++#endif
++"nettlehash "
+ #ifndef HAVE_DNSSEC
+ "no-"
+ #endif
+Index: dnsmasq-2.81/src/dnsmasq.h
+===================================================================
+--- dnsmasq-2.81.orig/src/dnsmasq.h
++++ dnsmasq-2.81/src/dnsmasq.h
+@@ -161,6 +161,9 @@ extern int capget(cap_user_header_t head
+ #  include <nettle/nettle-meta.h>
+ #endif
+ 
++#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
++#  include <nettle/nettle-meta.h>
++#endif
+ /* daemon is function in the C library.... */
+ #define daemon dnsmasq_daemon
+ 
+Index: dnsmasq-2.81/src/hash_questions.c
+===================================================================
+--- dnsmasq-2.81.orig/src/hash_questions.c
++++ dnsmasq-2.81/src/hash_questions.c
+@@ -28,7 +28,7 @@
+ 
+ #include "dnsmasq.h"
+ 
+-#ifdef HAVE_DNSSEC
++#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
+ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name)
+ {
+   int q;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-1.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-1.patch
new file mode 100644
index 0000000..fd9d0a9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-1.patch
@@ -0,0 +1,332 @@
+From 15b60ddf935a531269bb8c68198de012a4967156 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Wed, 18 Nov 2020 18:34:55 +0000
+Subject: [PATCH] Handle multiple identical near simultaneous DNS queries
+ better.
+
+Previously, such queries would all be forwarded
+independently. This is, in theory, inefficent but in practise
+not a problem, _except_ that is means that an answer for any
+of the forwarded queries will be accepted and cached.
+An attacker can send a query multiple times, and for each repeat,
+another {port, ID} becomes capable of accepting the answer he is
+sending in the blind, to random IDs and ports. The chance of a
+succesful attack is therefore multiplied by the number of repeats
+of the query. The new behaviour detects repeated queries and
+merely stores the clients sending repeats so that when the
+first query completes, the answer can be sent to all the
+clients who asked. Refer: CERT VU#434904.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ CHANGELOG     |  16 +++++-
+ src/dnsmasq.h |  19 ++++---
+ src/forward.c | 142 ++++++++++++++++++++++++++++++++++++++++++--------
+ 3 files changed, 147 insertions(+), 30 deletions(-)
+
+CVE: CVE-2020-25686
+Upstream-Status: Backport [http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=15b60ddf935a531269bb8c68198de012a4967156]
+Comment: No change in any hunk
+
+Index: dnsmasq-2.81/src/dnsmasq.h
+===================================================================
+--- dnsmasq-2.81.orig/src/dnsmasq.h
++++ dnsmasq-2.81/src/dnsmasq.h
+@@ -655,19 +655,24 @@ struct hostsfile {
+ #define FREC_DO_QUESTION       64
+ #define FREC_ADDED_PHEADER    128
+ #define FREC_TEST_PKTSZ       256
+-#define FREC_HAS_EXTRADATA    512        
++#define FREC_HAS_EXTRADATA    512
++#define FREC_HAS_PHEADER     1024
+ 
+ #define HASH_SIZE 32 /* SHA-256 digest size */
+ 
+ struct frec {
+-  union mysockaddr source;
+-  union all_addr dest;
++  struct frec_src {
++    union mysockaddr source;
++    union all_addr dest;
++    unsigned int iface, log_id;
++    unsigned short orig_id;
++    struct frec_src *next;
++  } frec_src;
+   struct server *sentto; /* NULL means free */
+   struct randfd *rfd4;
+   struct randfd *rfd6;
+-  unsigned int iface;
+-  unsigned short orig_id, new_id;
+-  int log_id, fd, forwardall, flags;
++  unsigned short new_id;
++  int fd, forwardall, flags;
+   time_t time;
+   unsigned char *hash[HASH_SIZE];
+ #ifdef HAVE_DNSSEC 
+@@ -1085,6 +1090,8 @@ extern struct daemon {
+   int back_to_the_future;
+ #endif
+   struct frec *frec_list;
++  struct frec_src *free_frec_src;
++  int frec_src_count;
+   struct serverfd *sfds;
+   struct irec *interfaces;
+   struct listener *listeners;
+Index: dnsmasq-2.81/src/forward.c
+===================================================================
+--- dnsmasq-2.81.orig/src/forward.c
++++ dnsmasq-2.81/src/forward.c
+@@ -20,6 +20,8 @@ static struct frec *lookup_frec(unsigned
+ static struct frec *lookup_frec_by_sender(unsigned short id,
+ 					  union mysockaddr *addr,
+ 					  void *hash);
++static struct frec *lookup_frec_by_query(void *hash, unsigned int flags);
++
+ static unsigned short get_id(void);
+ static void free_frec(struct frec *f);
+ 
+@@ -255,6 +257,7 @@ static int forward_query(int udpfd, unio
+   int type = SERV_DO_DNSSEC, norebind = 0;
+   union all_addr *addrp = NULL;
+   unsigned int flags = 0;
++  unsigned int fwd_flags = 0;
+   struct server *start = NULL;
+   void *hash = hash_questions(header, plen, daemon->namebuff);
+ #ifdef HAVE_DNSSEC
+@@ -263,7 +266,18 @@ static int forward_query(int udpfd, unio
+   unsigned int gotname = extract_request(header, plen, daemon->namebuff, NULL);
+   unsigned char *oph = find_pseudoheader(header, plen, NULL, NULL, NULL, NULL);
+   (void)do_bit;
+-
++  
++  if (header->hb4 & HB4_CD)
++    fwd_flags |= FREC_CHECKING_DISABLED;
++  if (ad_reqd)
++    fwd_flags |= FREC_AD_QUESTION;
++  if (oph)
++    fwd_flags |= FREC_HAS_PHEADER;
++#ifdef HAVE_DNSSEC
++  if (do_bit)
++    fwd_flags |= FREC_DO_QUESTION;
++#endif
++  
+   /* may be no servers available. */
+   if (forward || (forward = lookup_frec_by_sender(ntohs(header->id), udpaddr, hash)))
+     {
+@@ -336,6 +350,39 @@ static int forward_query(int udpfd, unio
+     }
+   else 
+     {
++      /* Query from new source, but the same query may be in progress
++	 from another source. If so, just add this client to the
++	 list that will get the reply.
++	 
++	 Note that is the EDNS client subnet option is in use, we can't do this,
++	 as the clients (and therefore query EDNS options) will be different
++	 for each query. The EDNS subnet code has checks to avoid
++	 attacks in this case. */
++      if (!option_bool(OPT_CLIENT_SUBNET) && (forward = lookup_frec_by_query(hash, fwd_flags)))
++	{
++	  /* Note whine_malloc() zeros memory. */
++	  if (!daemon->free_frec_src &&
++	      daemon->frec_src_count < daemon->ftabsize &&
++	      (daemon->free_frec_src = whine_malloc(sizeof(struct frec_src))))
++	    daemon->frec_src_count++;
++	  
++	  /* If we've been spammed with many duplicates, just drop the query. */
++	  if (daemon->free_frec_src)
++	    {
++	      struct frec_src *new = daemon->free_frec_src;
++	      daemon->free_frec_src = new->next;
++	      new->next = forward->frec_src.next;
++	      forward->frec_src.next = new;
++	      new->orig_id = ntohs(header->id);
++	      new->source = *udpaddr;
++	      new->dest = *dst_addr;
++	      new->log_id = daemon->log_id;
++	      new->iface = dst_iface;
++	    }
++	  
++	  return 1;
++	}
++	
+       if (gotname)
+ 	flags = search_servers(now, &addrp, gotname, daemon->namebuff, &type, &domain, &norebind);
+       
+@@ -343,22 +390,22 @@ static int forward_query(int udpfd, unio
+       do_dnssec = type & SERV_DO_DNSSEC;
+ #endif
+       type &= ~SERV_DO_DNSSEC;      
+-
++      
+       if (daemon->servers && !flags)
+ 	forward = get_new_frec(now, NULL, NULL);
+       /* table full - flags == 0, return REFUSED */
+       
+       if (forward)
+ 	{
+-	  forward->source = *udpaddr;
+-	  forward->dest = *dst_addr;
+-	  forward->iface = dst_iface;
+-	  forward->orig_id = ntohs(header->id);
++	  forward->frec_src.source = *udpaddr;
++	  forward->frec_src.orig_id = ntohs(header->id);
++	  forward->frec_src.dest = *dst_addr;
++	  forward->frec_src.iface = dst_iface;
+ 	  forward->new_id = get_id();
+ 	  forward->fd = udpfd;
+ 	  memcpy(forward->hash, hash, HASH_SIZE);
+ 	  forward->forwardall = 0;
+-	  forward->flags = 0;
++	  forward->flags = fwd_flags;
+ 	  if (norebind)
+ 	    forward->flags |= FREC_NOREBIND;
+ 	  if (header->hb4 & HB4_CD)
+@@ -413,9 +460,9 @@ static int forward_query(int udpfd, unio
+       unsigned char *pheader;
+       
+       /* If a query is retried, use the log_id for the retry when logging the answer. */
+-      forward->log_id = daemon->log_id;
++      forward->frec_src.log_id = daemon->log_id;
+       
+-      plen = add_edns0_config(header, plen, ((unsigned char *)header) + PACKETSZ, &forward->source, now, &subnet);
++      plen = add_edns0_config(header, plen, ((unsigned char *)header) + PACKETSZ, &forward->frec_src.source, now, &subnet);
+       
+       if (subnet)
+ 	forward->flags |= FREC_HAS_SUBNET;
+@@ -552,7 +599,7 @@ static int forward_query(int udpfd, unio
+ 	return 1;
+       
+       /* could not send on, prepare to return */ 
+-      header->id = htons(forward->orig_id);
++      header->id = htons(forward->frec_src.orig_id);
+       free_frec(forward); /* cancel */
+     }	  
+   
+@@ -804,8 +851,8 @@ void reply_query(int fd, int family, tim
+ 
+   /* log_query gets called indirectly all over the place, so 
+      pass these in global variables - sorry. */
+-  daemon->log_display_id = forward->log_id;
+-  daemon->log_source_addr = &forward->source;
++  daemon->log_display_id = forward->frec_src.log_id;
++  daemon->log_source_addr = &forward->frec_src.source;
+   
+   if (daemon->ignore_addr && RCODE(header) == NOERROR &&
+       check_for_ignored_address(header, n, daemon->ignore_addr))
+@@ -1077,6 +1124,7 @@ void reply_query(int fd, int family, tim
+ 		      new->sentto = server;
+ 		      new->rfd4 = NULL;
+ 		      new->rfd6 = NULL;
++		      new->frec_src.next = NULL;
+ 		      new->flags &= ~(FREC_DNSKEY_QUERY | FREC_DS_QUERY | FREC_HAS_EXTRADATA);
+ 		      new->forwardall = 0;
+ 		      
+@@ -1212,9 +1260,11 @@ void reply_query(int fd, int family, tim
+       
+       if ((nn = process_reply(header, now, forward->sentto, (size_t)n, check_rebind, no_cache_dnssec, cache_secure, bogusanswer, 
+ 			      forward->flags & FREC_AD_QUESTION, forward->flags & FREC_DO_QUESTION, 
+-			      forward->flags & FREC_ADDED_PHEADER, forward->flags & FREC_HAS_SUBNET, &forward->source)))
++			      forward->flags & FREC_ADDED_PHEADER, forward->flags & FREC_HAS_SUBNET, &forward->frec_src.source)))
+ 	{
+-	  header->id = htons(forward->orig_id);
++	  struct frec_src *src;
++
++	  header->id = htons(forward->frec_src.orig_id);
+ 	  header->hb4 |= HB4_RA; /* recursion if available */
+ #ifdef HAVE_DNSSEC
+ 	  /* We added an EDNSO header for the purpose of getting DNSSEC RRs, and set the value of the UDP payload size
+@@ -1230,13 +1280,26 @@ void reply_query(int fd, int family, tim
+ 	    }
+ #endif
+ 
++	  for (src = &forward->frec_src; src; src = src->next)
++	    {
++	      header->id = htons(src->orig_id);
++	      
+ #ifdef HAVE_DUMPFILE
+-	  dump_packet(DUMP_REPLY, daemon->packet, (size_t)nn, NULL, &forward->source);
++	      dump_packet(DUMP_REPLY, daemon->packet, (size_t)nn, NULL, &src->source);
+ #endif
+-	  
+-	  send_from(forward->fd, option_bool(OPT_NOWILD) || option_bool (OPT_CLEVERBIND), daemon->packet, nn, 
+-		    &forward->source, &forward->dest, forward->iface);
++	      
++	      send_from(forward->fd, option_bool(OPT_NOWILD) || option_bool (OPT_CLEVERBIND), daemon->packet, nn, 
++			&src->source, &src->dest, src->iface);
++
++	      if (option_bool(OPT_EXTRALOG) && src != &forward->frec_src)
++		{
++		  daemon->log_display_id = src->log_id;
++		  daemon->log_source_addr = &src->source;
++		  log_query(F_UPSTREAM, "query", NULL, "duplicate");
++		}
++	    }
+ 	}
++
+       free_frec(forward); /* cancel */
+     }
+ }
+@@ -2198,6 +2261,17 @@ void free_rfd(struct randfd *rfd)
+ 
+ static void free_frec(struct frec *f)
+ {
++  struct frec_src *src, *tmp;
++
++   /* add back to freelist of not the record builtin to every frec. */
++  for (src = f->frec_src.next; src; src = tmp)
++    {
++      tmp = src->next;
++      src->next = daemon->free_frec_src;
++      daemon->free_frec_src = src;
++    }
++  
++  f->frec_src.next = NULL;
+   free_rfd(f->rfd4);
+   f->rfd4 = NULL;
+   f->sentto = NULL;
+@@ -2339,17 +2413,39 @@ static struct frec *lookup_frec_by_sende
+ 					  void *hash)
+ {
+   struct frec *f;
++  struct frec_src *src;
++
++  for (f = daemon->frec_list; f; f = f->next)
++    if (f->sentto &&
++	!(f->flags & (FREC_DNSKEY_QUERY | FREC_DS_QUERY)) &&
++	memcmp(hash, f->hash, HASH_SIZE) == 0)
++      for (src = &f->frec_src; src; src = src->next)
++	if (src->orig_id == id && 
++	    sockaddr_isequal(&src->source, addr))
++	  return f;
++  
++  return NULL;
++}
++
++static struct frec *lookup_frec_by_query(void *hash, unsigned int flags)
++{
++  struct frec *f;
++
++  /* FREC_DNSKEY and FREC_DS_QUERY are never set in flags, so the test below
++     ensures that no frec created for internal DNSSEC query can be returned here. */
++
++#define FLAGMASK (FREC_CHECKING_DISABLED | FREC_AD_QUESTION | FREC_DO_QUESTION \
++		  | FREC_HAS_PHEADER | FREC_DNSKEY_QUERY | FREC_DS_QUERY)
+   
+   for(f = daemon->frec_list; f; f = f->next)
+     if (f->sentto &&
+-	f->orig_id == id && 
+-	memcmp(hash, f->hash, HASH_SIZE) == 0 &&
+-	sockaddr_isequal(&f->source, addr))
++	(f->flags & FLAGMASK) == flags &&
++	memcmp(hash, f->hash, HASH_SIZE) == 0)
+       return f;
+-   
++  
+   return NULL;
+ }
+- 
++
+ /* Send query packet again, if we can. */
+ void resend_query()
+ {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-2.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-2.patch
new file mode 100644
index 0000000..a6ffd37
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/CVE-2020-25686-2.patch
@@ -0,0 +1,63 @@
+From 6a6e06fbb0d4690507ceaf2bb6f0d8910f3d4914 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Fri, 4 Dec 2020 18:35:11 +0000
+Subject: [PATCH] Small cleanups in frec_src datastucture handling.
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+---
+ src/forward.c | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+CVE: CVE-2020-25686
+Upstream-Status: Backport [http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=6a6e06fbb0d4690507ceaf2bb6f0d8910f3d4914]
+Comment: No change in any hunk
+
+Index: dnsmasq-2.81/src/forward.c
+===================================================================
+--- dnsmasq-2.81.orig/src/forward.c
++++ dnsmasq-2.81/src/forward.c
+@@ -364,7 +364,10 @@ static int forward_query(int udpfd, unio
+ 	  if (!daemon->free_frec_src &&
+ 	      daemon->frec_src_count < daemon->ftabsize &&
+ 	      (daemon->free_frec_src = whine_malloc(sizeof(struct frec_src))))
+-	    daemon->frec_src_count++;
++	    {
++	      daemon->frec_src_count++;
++	      daemon->free_frec_src->next = NULL;
++	    }
+ 	  
+ 	  /* If we've been spammed with many duplicates, just drop the query. */
+ 	  if (daemon->free_frec_src)
+@@ -401,6 +404,7 @@ static int forward_query(int udpfd, unio
+ 	  forward->frec_src.orig_id = ntohs(header->id);
+ 	  forward->frec_src.dest = *dst_addr;
+ 	  forward->frec_src.iface = dst_iface;
++	  forward->frec_src.next = NULL;
+ 	  forward->new_id = get_id();
+ 	  forward->fd = udpfd;
+ 	  memcpy(forward->hash, hash, HASH_SIZE);
+@@ -2261,16 +2265,16 @@ void free_rfd(struct randfd *rfd)
+ 
+ static void free_frec(struct frec *f)
+ {
+-  struct frec_src *src, *tmp;
+-
+-   /* add back to freelist of not the record builtin to every frec. */
+-  for (src = f->frec_src.next; src; src = tmp)
++  struct frec_src *last;
++  
++  /* add back to freelist if not the record builtin to every frec. */
++  for (last = f->frec_src.next; last && last->next; last = last->next) ;
++  if (last)
+     {
+-      tmp = src->next;
+-      src->next = daemon->free_frec_src;
+-      daemon->free_frec_src = src;
++      last->next = daemon->free_frec_src;
++      daemon->free_frec_src = f->frec_src.next;
+     }
+-  
++    
+   f->frec_src.next = NULL;
+   free_rfd(f->rfd4);
+   f->rfd4 = NULL;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
new file mode 100644
index 0000000..0c64fab
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=DNS forwarder and DHCP server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dnsmasq.pid
+ExecStartPre=/usr/bin/dnsmasq --test
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
+ExecStop=/bin/kill $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper
new file mode 100644
index 0000000..db54d46
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf-helper
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# Borrowing heavily from the dnsmasq initscript's version of support for
+# resolvconf, intended for use in systemd-only configurations.
+#
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/dnsmasq
+NAME=dnsmasq
+
+# Most configuration options in /etc/default/dnsmasq are deprecated
+# but still honoured.
+if [ -r /etc/default/$NAME ]; then
+   . /etc/default/$NAME
+fi
+
+start_resolvconf()
+{
+   # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
+   # Then dnsmasq won't be providing local DNS, so don't add it to
+   # the resolvconf server set.
+   for interface in $DNSMASQ_EXCEPT
+   do
+      [ $interface = lo ] && return
+   done
+
+   if [ -x /sbin/resolvconf ] ; then
+      echo "nameserver 127.0.0.1" |
+      /sbin/resolvconf -a lo.$NAME
+   fi
+   return 0
+}
+
+stop_resolvconf()
+{
+   if [ -x /sbin/resolvconf ] ; then
+      /sbin/resolvconf -d lo.$NAME
+   fi
+   return 0
+}
+
+case "$1" in
+   start)
+      start_resolvconf
+      exit 0
+      ;;
+   stop)
+      stop_resolvconf
+      exit 0
+      ;;
+   restart)
+      stop_resolvconf
+      start_resolvconf
+      exit 0
+      ;;
+   *)
+      echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2
+      exit 3
+      ;;
+esac
+
+exit 0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
new file mode 100644
index 0000000..ef2f3f7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=DNS forwarder and DHCP server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dnsmasq.pid
+ExecStartPre=/usr/bin/dnsmasq --test
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
+ExecStartPost=/usr/bin/dnsmasq-resolvconf-helper start
+ExecStop=/usr/bin/dnsmasq-resolvconf-helper stop
+ExecStop=/bin/kill $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolved.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolved.conf
new file mode 100644
index 0000000..33f4649
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolved.conf
@@ -0,0 +1,3 @@
+# Avoid conflicts between dnsmasq and systemd-resolved about port 53
+[Resolve]
+DNSStubListener=no
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
new file mode 100755
index 0000000..2897b90
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
@@ -0,0 +1,298 @@
+# Configuration file for dnsmasq.
+#
+# Format is one option per line, legal options are the same
+# as the long options legal on the command line. See
+# "/usr/bin/dnsmasq --help" or "man 8 dnsmasq" for details.
+
+# Listen on this specific port instead of the standard DNS port
+# (53). Setting this to zero completely disables DNS function,
+# leaving only DHCP and/or TFTP.
+#port=5353
+
+# Change these lines if you want dnsmasq to serve MX records.
+# Only one of mx-host and mx-target need be set, the other defaults
+# to the name of the host  running dnsmasq.
+#mx-host=
+#mx-target=
+#selfmx
+#localmx
+
+# The following two options make you a better netizen, since they 
+# tell dnsmasq to filter out queries which the public DNS cannot
+# answer, and which load the servers (especially the root servers) 
+# uneccessarily. If you have a dial-on-demand link they also stop
+# these requests from bringing up the link uneccessarily.
+
+# Never forward plain names (with a dot or domain part)
+domain-needed
+# Never forward addresses in the non-routed address spaces.
+bogus-priv
+
+
+# Uncomment this to filter useless windows-originated DNS requests
+# which can trigger dial-on-demand links needlessly.
+# Note that (amongst other things) this blocks all SRV requests, 
+# so don't use it if you use eg Kerberos.
+#filterwin2k
+
+# Change this line if you want dns to get its upstream servers from
+# somewhere other that /etc/resolv.conf 
+#resolv-file=
+
+# By  default,  dnsmasq  will  send queries to any of the upstream
+# servers it knows about and tries to favour servers to are  known
+# to  be  up.  Uncommenting this forces dnsmasq to try each query
+# with  each  server  strictly  in  the  order  they   appear   in
+# /etc/resolv.conf
+#strict-order
+
+# If you don't want dnsmasq to read /etc/resolv.conf or any other
+# file, getting its servers for this file instead (see below), then
+# uncomment this
+#no-resolv
+
+# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
+# files for changes and re-read them then uncomment this.
+#no-poll
+
+# Add other name servers here, with domain specs if they are for 
+# non-public domains.
+#server=/localnet/192.168.0.1
+
+# Add local-only domains here, queries in these domains are answered
+# from /etc/hosts or DHCP only.
+#local=/localnet/
+
+# Add domains which you want to force to an IP address here.
+# The example below send any host in doubleclick.net to a local
+# webserver.
+#address=/doubleclick.net/127.0.0.1
+
+# You no longer (as of version 1.7) need to set these to enable 
+# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the
+# "dip" group to achieve this.
+#user=
+#group=
+
+# If you want dnsmasq to listen for requests only on specified interfaces
+# (and the loopback) give the name of the interface (eg eth0) here. 
+# Repeat the line for more than one interface.
+#interface=
+# Or you can specify which interface _not_ to listen on
+#except-interface=
+# Or which to listen on by address (remember to include 127.0.0.1 if
+# you use this.)
+#listen-address=127.0.0.1
+
+# On systems which support it, dnsmasq binds the wildcard address,
+# even when it is listening on only some interfaces. It then discards
+# requests that it shouldn't reply to. This has the advantage of 
+# working even when interfaces come and go and change address. If you
+# want dnsmasq to really bind only the interfaces it is listening on,
+# uncomment this option. About the only time you may need this is when 
+# running another nameserver on the same machine.
+#bind-interfaces 
+
+# If you don't want dnsmasq to read /etc/hosts, uncomment the
+# following line.
+#no-hosts
+# or if you want it to read another file, as well as /etc/hosts, use
+# this.
+#addn-hosts=/etc/banner_add_hosts
+
+# Set this (and domain: see below) if you want to have a domain
+# automatically added to simple names in a hosts-file.
+#expand-hosts
+
+# Set the domain for dnsmasq. this is optional, but if it is set, it
+# does the following things.
+# 1) Allows DHCP hosts to have fully qualified domain names, as long
+#     as the domain part matches this setting.
+# 2) Sets the "domain" DHCP option thereby potentially setting the
+#    domain of all systems configured by DHCP
+# 3) Provides the domain part for "expand-hosts"
+#domain=thekelleys.org.uk
+  
+# Uncomment this to enable the integrated DHCP server, you need
+# to supply the range of addresses available for lease and optionally 
+# a lease time. If you have more than one network, you will need to
+# repeat this for each network on which you want to supply DHCP
+# service.
+#dhcp-range=192.168.0.50,192.168.0.150,12h
+#dhcp-range=10.0.0.10,10.0.0.200,2h
+
+# This is an example of a DHCP range where the netmask is given. This
+# is needed for networks we reach the dnsmasq DHCP server via a relay 
+# agent. If you don't know what a DHCP relay agent is, you probably
+# don't need to worry about this.
+#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
+
+# This is an example of a DHCP range with a network-id, so that
+# some DHCP options may be set only for this network.
+#dhcp-range=red,192.168.0.50,192.168.0.150
+
+# Supply parameters for specified hosts using DHCP. There are lots
+# of valid alternatives, so we will give examples of each. Note that
+# IP addresses DO NOT have to be in the range given above, they just
+# need to be on the same network. The order of the parameters in these
+# do not matter, it's permissble to give name,adddress and MAC in any order
+
+# Always allocate the host with ethernet address 11:22:33:44:55:66 
+# The IP address 192.168.0.60
+#dhcp-host=11:22:33:44:55:66,192.168.0.60
+
+# Always set the name of the host with hardware address
+# 11:22:33:44:55:66 to be "fred"
+#dhcp-host=11:22:33:44:55:66,fred
+
+# Always give the host with ethernet address 11:22:33:44:55:66
+# the name fred and IP address 192.168.0.60 and lease time 45 minutes
+#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
+
+# Give the machine which says it's name is "bert" IP address
+# 192.168.0.70 and an infinite lease
+#dhcp-host=bert,192.168.0.70,infinite
+
+# Always give the host with client identifier 01:02:02:04 
+# the IP address 192.168.0.60
+#dhcp-host=id:01:02:02:04,192.168.0.60
+
+# Always give the host with client identifier "marjorie"
+# the IP address 192.168.0.60
+#dhcp-host=id:marjorie,192.168.0.60
+
+# Enable the address given for "judge" in /etc/hosts
+# to be given to a machine presenting the name "judge" when
+# it asks for a DHCP lease.
+#dhcp-host=judge
+
+# Never offer DHCP service to a machine whose ethernet 
+# address is 11:22:33:44:55:66
+#dhcp-host=11:22:33:44:55:66,ignore
+
+# Ignore any client-id presented by the machine with ethernet
+# address 11:22:33:44:55:66. This is useful to prevent a machine 
+# being treated differently when running under different OS's or
+# between PXE boot and OS boot.
+#dhcp-host=11:22:33:44:55:66,id:*
+
+# Send extra options which are tagged as "red" to 
+# the machine with ethernet address 11:22:33:44:55:66
+#dhcp-host=11:22:33:44:55:66,net:red
+
+# Send extra options which are tagged as "red" to any machine whose
+# DHCP vendorclass string includes the substring "Linux"
+#dhcp-vendorclass=red,Linux
+
+# Send extra options which are tagged as "red" to any machine one 
+# of whose DHCP userclass strings includes the substring "accounts"
+#dhcp-userclass=red,accounts
+
+# If this line is uncommented, dnsmasq will read /etc/ethers and act
+# on the ethernet-address/IP pairs found there just as if they had
+# been given as --dhcp-host options. Useful if you keep
+# MAC-address/host mappings there for other purposes.
+#read-ethers
+
+# Send options to hosts which ask for a DHCP lease.
+# See RFC 2132 for details of available options.
+# Note that all the common settings, such as netmask and
+# broadcast address, DNS server and default route, are given
+# sane defaults by dnsmasq. You very likely will not need any
+# any dhcp-options. If you use Windows clients and Samba, there
+# are some options which are recommended, they are detailed at the
+# end of this section.
+# For reference, the common options are:
+# subnet mask - 1
+# default router - 3
+# DNS server - 6
+# broadcast address - 28
+
+# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
+#dhcp-option=42,192.168.0.4,10.10.0.5
+
+# Set the NTP time server address to be the same machine as 
+# is running dnsmasq
+#dhcp-option=42,0.0.0.0
+
+# Set the NIS domain name to "welly"
+#dhcp-option=40,welly
+
+# Set the default time-to-live to 50
+#dhcp-option=23,50
+
+# Set the "all subnets are local" flag
+#dhcp-option=27,1
+
+# Send the etherboot magic flag and then etherboot options (a string).
+#dhcp-option=128,e4:45:74:68:00:00
+#dhcp-option=129,NIC=eepro100
+
+# Specify an option which will only be sent to the "red" network 
+# (see dhcp-range for the declaration of the "red" network)
+#dhcp-option=red,42,192.168.1.1
+
+# The following DHCP options set up dnsmasq in the same way as is specified
+# for the ISC dhcpcd in 
+# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
+# adapted for a typical dnsmasq installation where the host running
+# dnsmasq is also the host running samba.
+# you may want to uncomment them if you use Windows clients and Samba.
+#dhcp-option=19,0           # option ip-forwarding off 
+#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
+#dhcp-option=45,0.0.0.0     # netbios datagram distribution server
+#dhcp-option=46,8           # netbios node type
+#dhcp-option=47             # empty netbios scope.
+ 
+
+# Set the boot filename and tftpd server name and address
+# for BOOTP. You will only need this is you want to
+# boot machines over the network.
+#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
+
+# Set the limit on DHCP leases, the default is 150
+#dhcp-lease-max=150
+
+# The DHCP server needs somewhere on disk to keep its lease database.
+# This defaults to a sane location, but if you want to change it, use
+# the line below.
+#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
+
+# Set the cachesize here.
+#cache-size=150
+
+# If you want to disable negative caching, uncomment this.
+#no-negcache
+
+# Normally responses which come form /etc/hosts and the DHCP lease
+# file have Time-To-Live set as zero, which conventionally means
+# do not cache further. If you are happy to trade lower load on the 
+# server for potentially stale date, you can set a time-to-live (in 
+# seconds) here.
+#local-ttl=
+
+# If you want dnsmasq to detect attempts by Verisign to send queries
+# to unregistered .com and .net hosts to its sitefinder service and
+# have dnsmasq instead return the correct NXDOMAIN response, uncomment
+# this line. You can add similar lines to do the same for other
+# registries which have implemented wildcard A records.
+#bogus-nxdomain=64.94.110.11
+
+# If you want to fix up DNS results from upstream servers, use the
+# alias option. This only works for IPv4.
+# This alias makes a result of 1.2.3.4 appear as 5.6.7.8
+#alias=1.2.3.4,5.6.7.8
+# and this maps 1.2.3.x to 5.6.7.x
+#alias=1.2.3.0,5.6.7.0,255.255.255.0
+
+# For debugging purposes, log each DNS query as it passes through
+# dnsmasq.
+#log-queries
+
+# Include a another lot of configuration options.
+#conf-file=/etc/dnsmasq.more.conf
+ 
+ 
+
+
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf
new file mode 100755
index 0000000..06cd25c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/dnsmasq.resolvconf
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# Script to update the resolver list for dnsmasq
+#
+# N.B. Resolvconf may run us even if dnsmasq is not (yet) running.
+# If dnsmasq is installed then we go ahead and update the resolver list
+# in case dnsmasq is started later.
+#
+# Assumption: On entry, PWD contains the resolv.conf-type files.
+#
+# This file is part of the dnsmasq package.
+#
+
+set -e
+
+RUN_DIR="/run/dnsmasq"
+RSLVRLIST_FILE="${RUN_DIR}/resolv.conf"
+TMP_FILE="${RSLVRLIST_FILE}_new.$$"
+MY_NAME_FOR_RESOLVCONF="dnsmasq"
+
+[ -x /usr/bin/dnsmasq ] || exit 0
+[ -x /lib/resolvconf/list-records ] || exit 1
+
+PATH=/bin:/sbin
+
+report_err() { echo "$0: Error: $*" >&2 ; }
+
+# Stores arguments (minus duplicates) in RSLT, separated by spaces
+# Doesn't work properly if an argument itself contains whitespace
+uniquify()
+{
+	RSLT=""
+	while [ "$1" ] ; do
+		for E in $RSLT ; do
+			[ "$1" = "$E" ] && { shift ; continue 2 ; }
+		done
+		RSLT="${RSLT:+$RSLT }$1"
+		shift
+	done
+}
+
+if [ ! -d "$RUN_DIR" ] && ! mkdir --parents --mode=0755 "$RUN_DIR" ; then
+	report_err "Failed trying to create directory $RUN_DIR"
+	exit 1
+fi
+
+RSLVCNFFILES=""
+for F in $(/lib/resolvconf/list-records --after "lo.$MY_NAME_FOR_RESOLVCONF") ; do
+	case "$F" in
+	    "lo.$MY_NAME_FOR_RESOLVCONF")
+		# Omit own record
+		;;
+	    lo.*)
+		# Include no more records after one for a local nameserver
+		RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
+		break
+		;;
+	  *)
+		RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
+		;;
+	esac
+done
+
+NMSRVRS=""
+if [ "$RSLVCNFFILES" ] ; then
+	uniquify $(sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' $RSLVCNFFILES)
+	NMSRVRS="$RSLT"
+fi
+
+# Dnsmasq uses the mtime of $RSLVRLIST_FILE, with a resolution of one second,
+# to detect changes in the file. This means that if a resolvconf update occurs
+# within one second of the previous one then dnsmasq may fail to notice the
+# more recent change. To work around this problem we sleep one second here
+# if necessary in order to ensure that the new mtime is different.
+if [ -f "$RSLVRLIST_FILE" ] && [ "$(stat -c %X "$RSLVRLIST_FILE")" = "$(date +%s)" ] ; then
+	sleep 1
+fi
+
+clean_up() { rm -f "$TMP_FILE" ; }
+trap clean_up EXIT
+: >| "$TMP_FILE"
+for N in $NMSRVRS ; do echo "nameserver $N" >> "$TMP_FILE" ; done
+mv -f "$TMP_FILE" "$RSLVRLIST_FILE"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init
new file mode 100644
index 0000000..51c95df
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dnsmasq/files/init
@@ -0,0 +1,117 @@
+#!/bin/sh
+DAEMON=/usr/bin/dnsmasq
+NAME=dnsmasq
+DESC="DNS forwarder and DHCP server"
+ARGS="-7 /etc/dnsmasq.d"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+if [ -r /etc/default/$NAME ]
+then
+	. /etc/default/$NAME
+fi
+
+DNSMASQ_CONF="/etc/dnsmasq.conf"
+test "/etc/dnsmasq.d/*" != '/etc/dnsmasq.d/*' && DNSMASQ_CONF="${DNSMASQ_CONF} /etc/dnsmasq.d/*"
+
+test -z "${PIDFILE}" && PIFILE="/run/dnsmasq.pid"
+
+if [ -z "$IGNORE_RESOLVCONF" ]
+then
+	egrep -h -q '^no-resolv' ${DNSMASQ_CONF} && IGNORE_RESOLVCONF="yes"
+fi
+
+# RESOLV_CONF:
+# If the resolvconf package is installed then use the resolv conf file
+# that it provides as the default.  Otherwise use /etc/resolv.conf as
+# the default.
+#
+# If IGNORE_RESOLVCONF is set in /etc/default/dnsmasq or an explicit
+# filename is set there then this inhibits the use of the resolvconf-provided
+# information.
+#
+# Note that if the resolvconf package is installed it is not possible to
+# override it just by configuration in /etc/dnsmasq.conf, it is necessary
+# to set IGNORE_RESOLVCONF=yes in /etc/default/dnsmasq.
+
+test -z "$RESOLV_CONF" -a "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf && \
+	RESOLV_CONF=/run/dnsmasq/resolv.conf
+
+start_resolvconf()
+{
+        if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
+	then
+		echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
+	fi
+	:
+}
+
+stop_resolvconf()
+{
+	if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
+	then
+		/sbin/resolvconf -d lo.$NAME
+	fi
+	:
+}
+
+case "$1" in
+    start)
+        echo -n "starting $DESC: $NAME... "
+	test -d /var/lib/misc/ || mkdir /var/lib/misc/
+	start-stop-daemon -S -x $DAEMON -- $ARGS \
+		${RESOLV_CONF:+ -r $RESOLV_CONF} \
+		${PIDFILE:+ -x $PIDFILE}
+	test $? -eq 0 && start_resolvconf
+	echo "done."
+	;;
+    stop)
+        echo -n "stopping $DESC: $NAME... "
+	stop_resolvconf
+	start-stop-daemon -K -x $DAEMON
+	echo "done."
+	;;
+    status)
+	echo -n "dnsmasq "
+	start-stop-daemon -q -K -t -x $DAEMON
+	RET=$?
+	if [ "$RET" = "0" ]; then
+		PID=`cat ${PIDFILE}`
+		echo "($PID) is running"
+	else
+		echo "is not running"
+		exit $RET
+	fi
+	;;
+    restart)
+        echo "restarting $DESC: $NAME... "
+ 	$0 stop
+	$0 start
+	echo "done."
+	;;
+    reload)
+    	echo -n "reloading $DESC: $NAME... "
+    	killall -HUP $(basename ${DAEMON})
+	echo "done."
+	;;
+    systemd-start-resolvconf)
+	start_resolvconf
+	;;
+    systemd-stop-resolvconf)
+	stop_resolvconf
+	;;
+    systemd-exec)
+	test -d /var/lib/misc/ || mkdir /var/lib/misc/
+	exec $DAEMON --keep-in-foreground $ARGS \
+		${RESOLV_CONF:+ -r $RESOLV_CONF} \
+		${PIDFILE:+ -x $PIDFILE}
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|restart|reload}"
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
new file mode 100644
index 0000000..f862350
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
@@ -0,0 +1,66 @@
+From 07150f3a27681e034f18ab2ed2b68914c1e10af6 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Sat, 18 Jul 2015 05:03:57 +0900
+Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements
+
+This is not completely safe, but it's the least invasive fix.
+
+Upstream-Status: pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ configure.ac | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3b32614..94ec002 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -519,13 +519,10 @@ have_ioloop=no
+ 
+ if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
+   AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
+-    AC_TRY_RUN([
++    AC_TRY_LINK([
+       #include <sys/epoll.h>
+-  
+-      int main()
+-      {
+-	return epoll_create(5) < 1;
+-      }
++    ], [
++      epoll_create(5) < 1;
+     ], [
+       i_cv_epoll_works=yes
+     ], [
+@@ -653,7 +650,7 @@ fi
+ dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
+ dnl * It may also be broken in AIX.
+ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+-  AC_TRY_RUN([
++  AC_TRY_LINK([
+     #define _XOPEN_SOURCE 600
+     #include <stdio.h>
+     #include <stdlib.h>
+@@ -662,7 +659,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+     #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
+       possibly broken posix_fallocate
+     #endif
+-    int main() {
++    ], [
+       int fd = creat("conftest.temp", 0600);
+       int ret;
+       if (fd == -1) {
+@@ -671,8 +668,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+       }
+       ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
+       unlink("conftest.temp");
+-      return ret;
+-    }
+   ], [
+     i_cv_posix_fallocate_works=yes
+   ], [
+-- 
+1.8.4.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
new file mode 100644
index 0000000..65ae9bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
@@ -0,0 +1,38 @@
+From be9b3809b86fe593dbb16f0b981b3d315a27b799 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 22 Oct 2017 22:10:41 -0700
+Subject: [PATCH] doveadm: Fix parallel build
+
+Sometimes dovetail build fails with errors like
+
+doveadm-util.o: file not recognized: File truncated
+collect2: error: ld returned 1 exit status
+make[4]: *** [Makefile:812: test-doveadm-util] Error 1
+
+This is partial backport from
+
+https://github.com/dovecot/core/commit/b200bc3875fa06d42c8619865cc306c3297fcacc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/doveadm/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am
+index c644646..6ae9144 100644
+--- a/src/doveadm/Makefile.am
++++ b/src/doveadm/Makefile.am
+@@ -180,8 +180,8 @@ test_libs = \
+ 	../lib/liblib.la
+ test_deps = $(noinst_LTLIBRARIES) $(test_libs)
+ 
+-test_doveadm_util_SOURCES = test-doveadm-util.c
+-test_doveadm_util_LDADD = doveadm-util.o $(test_libs) $(MODULE_LIBS)
++test_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c
++test_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS)
+ test_doveadm_util_DEPENDENCIES = $(test_deps)
+ 
+ check: check-am check-test
+-- 
+2.14.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service
new file mode 100644
index 0000000..ca250ea
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Dovecot IMAP/POP3 email server
+After=local-fs.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/dovecot
+ExecStart=@SBINDIR@/dovecot -F
+ExecReload=/bin/kill -HUP $MAINPID
+NonBlocking=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket
new file mode 100644
index 0000000..556e1a8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/dovecot.socket
@@ -0,0 +1,14 @@
+[Unit]
+Description=Dovecot IMAP/POP3 email server activation socket
+
+[Socket]
+#dovecot expects separate IPv4 and IPv6 sockets
+BindIPv6Only=ipv6-only
+ListenStream=0.0.0.0:143
+ListenStream=[::]:143
+ListenStream=0.0.0.0:993
+ListenStream=[::]:993
+KeepAlive=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb
new file mode 100644
index 0000000..0f7fad2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
+HOMEPAGE = "https://www.dovecot.org/"
+DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
+SECTION = "mail"
+LICENSE = "LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b"
+
+SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
+           file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
+           file://dovecot.service \
+           file://dovecot.socket \
+           file://0001-doveadm-Fix-parallel-build.patch \
+           "
+
+SRC_URI[md5sum] = "66c4d71858b214afee5b390ee602dee2"
+SRC_URI[sha256sum] = "777c61e264869e9b288b8d6603f4ed3ac3aac9ec573908067353f51269dce2fe"
+
+DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc"
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += "-ltirpc"
+
+inherit autotools pkgconfig systemd useradd gettext
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
+
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+
+# From native build in armv7a-hf/eglibc
+CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
+                         i_cv_gmtime_max_time_t=32 \
+                         i_cv_signed_time_t=yes \
+                         i_cv_mmap_plays_with_write=yes \
+                         i_cv_fd_passing=yes \
+                         i_cv_c99_vsnprintf=yes \
+                         lib_cv___va_copy=yes \
+                         lib_cv_va_copy=yes \
+                         lib_cv_va_val_copy=yes \
+                        "
+
+# hardcode epoll() to avoid running unsafe tests
+# BSD needs kqueue and uclibc poll()
+EXTRA_OECONF = " --with-ioloop=epoll \
+                 --with-systemdsystemunitdir=${systemd_unitdir}/system"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+    install -d 755 ${D}/etc/dovecot
+    touch 644 ${D}/etc/dovecot/dovecot.conf
+    install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
+                      -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
+GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
+
+FILES_${PN} += "${libdir}/dovecot/*plugin.so \
+                ${libdir}/dovecot/libfs_compress.so \
+                ${libdir}/dovecot/libssl_iostream_openssl.so"
+FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
+FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
+FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
new file mode 100644
index 0000000..5e12872
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
@@ -0,0 +1,108 @@
+From 642b5823abeee27a0fdc2d12d0e1235461ace9ed Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 5 Sep 2019 18:57:39 +0800
+Subject: [PATCH] drbd-utils: support usrmerge
+
+Upstream-Status: Inappropriate[oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac         |  2 +-
+ scripts/Makefile.in  |  4 ++--
+ user/v83/Makefile.in | 14 +++++++-------
+ user/v84/Makefile.in | 14 +++++++-------
+ 4 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4df1b4d..c4ef1bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -176,7 +176,7 @@ AC_ARG_WITH(tmpfilesdir,
+ AC_SUBST(tmpfilesdir)
+ 
+ # set default early
+-default_udevdir=/lib/udev
++default_udevdir=${prefix}/lib/udev
+ if test x"$with_udev" = x || \
+    test x"$with_udev" = xyes ; then
+ 	if test x"$PKG_CONFIG" != x; then
+diff --git a/scripts/Makefile.in b/scripts/Makefile.in
+index fbb0beb..da701a1 100644
+--- a/scripts/Makefile.in
++++ b/scripts/Makefile.in
+@@ -75,8 +75,8 @@ endif
+ ifeq ($(subst both,systemd,$(initscripttype)),systemd)
+ 	install -d $(DESTDIR)$(systemdunitdir)
+ 	install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
+-	install -d $(DESTDIR)/lib/drbd/
+-	install -m 755 drbd $(DESTDIR)/lib/drbd/
++	install -d $(DESTDIR)/${nonarch_libdir}/drbd
++	install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbd
+ 	install -d $(DESTDIR)$(tmpfilesdir)/
+ 	install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
+ endif
+diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in
+index 27516de..b301376 100644
+--- a/user/v83/Makefile.in
++++ b/user/v83/Makefile.in
+@@ -96,19 +96,19 @@ install:
+ ifeq ($(WITH_83_SUPPORT),yes)
+ 	install -d $(DESTDIR)$(localstatedir)/lib/drbd
+ 	install -d $(DESTDIR)$(localstatedir)/lock
+-	install -d $(DESTDIR)/lib/drbd/
++	install -d $(DESTDIR)/${nonarch_libdir}/drbd/
+ 	if getent group haclient > /dev/null 2> /dev/null ; then		\
+-		install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ;	\
+-		install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ;		\
++		install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ;	\
++		install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ;		\
+ 	else									\
+-		install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ;		\
+-		install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; 		\
++		install -m 755 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ;		\
++		install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; 		\
+ 	fi
+ endif
+ 
+ uninstall:
+-	rm -f $(DESTDIR)/lib/drbd/drbdsetup-83
+-	rm -f $(DESTDIR)/lib/drbd/drbdadm-83
++	rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-83
++	rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-83
+ 
+ .PHONY: install uninstall clean distclean
+ ../../configure:
+diff --git a/user/v84/Makefile.in b/user/v84/Makefile.in
+index 38977c6..05ef060 100644
+--- a/user/v84/Makefile.in
++++ b/user/v84/Makefile.in
+@@ -109,19 +109,19 @@ ifeq ($(WITH_84_SUPPORT),yes)
+ 	install -d $(DESTDIR)$(localstatedir)/lib/drbd
+ 	install -d $(DESTDIR)$(localstatedir)/run/drbd
+ 	install -d $(DESTDIR)$(localstatedir)/lock
+-	install -d $(DESTDIR)/lib/drbd/
++	install -d $(DESTDIR)/${nonarch_libdir}/drbd/
+ 	if getent group haclient > /dev/null 2> /dev/null ; then	\
+-		install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ;	\
+-		install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ;		\
++		install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ;	\
++		install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ;		\
+ 	else								\
+-		install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ;		\
+-		install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; 		\
++		install -m 755 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ;		\
++		install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; 		\
+ 	fi
+ endif
+ 
+ uninstall:
+-	rm -f $(DESTDIR)/lib/drbd/drbdsetup-84
+-	rm -f $(DESTDIR)/lib/drbd/drbdadm-84
++	rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-84
++	rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-84
+ 
+ spell:
+ 	for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb
new file mode 100644
index 0000000..5dabdd5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb
@@ -0,0 +1,60 @@
+SUMMARY = "Distributed block device driver for Linux"
+DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
+DRBD mirrors a block device over the network to another machine.\
+Think of it as networked raid 1. It is a building block for\
+setting up high availability (HA) clusters."
+HOMEPAGE = "http://www.drbd.org/"
+SECTION = "admin"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils \
+           git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers \
+           ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
+          "
+# v9.12.0
+SRCREV_drbd-utils = "91629a4cce49ca0d4f917fe0bffa25cfe8db3052"
+SRCREV_drbd-headers = "233006b4d26cf319638be0ef6d16ec7dee287b66"
+
+S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
+
+SYSTEMD_SERVICE_${PN} = "drbd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+DEPENDS = "flex-native"
+
+inherit autotools-brokensep systemd
+
+EXTRA_OECONF = " \
+                --with-initdir=/etc/init.d    \
+                --without-pacemaker           \
+                --without-rgmanager           \
+                --without-bashcompletion      \
+                --with-distro debian          \
+                --with-initscripttype=both    \
+                --with-systemdunitdir=${systemd_unitdir}/system \
+                --without-manual \
+               "
+
+# If we have inherited reproducible_build, we want to use it.
+export WANT_DRBD_REPRODUCIBLE_BUILD = "yes"
+
+do_install_append() {
+    # don't install empty /var/lock and /var/run to avoid conflict with base-files
+    rm -rf ${D}${localstatedir}/lock
+    rm -rf ${D}${localstatedir}/run
+}
+
+RDEPENDS_${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy"
+
+# The drbd items are explicitly put under /lib when installed.
+#
+FILES_${PN} += "/run"
+FILES_${PN} += "${nonarch_base_libdir}/drbd \
+                ${nonarch_libdir}/drbd \
+                ${nonarch_libdir}/tmpfiles.d"
+FILES_${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
+
+CLEANBROKEN = "1"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
new file mode 100644
index 0000000..6414f73
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
@@ -0,0 +1,24 @@
+If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
+does not build drbd.ko here. Under this circumstance do_install
+task is going to fail with a below error:
+-- snip --
+| install: cannot stat ‘drbd.ko’: No such file or directory
+| make[1]: *** [install] Error 1
+-- snip --
+
+So, check for kernel module existence before installing.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+--- drbd-9.0.1-1/drbd/Makefile	2016-07-03 06:54:19.421538690 -0700
++++ drbd-9.0.1-1/drbd/Makefile_mod	2016-07-03 06:53:18.938801628 -0700
+@@ -158,7 +158,7 @@ else
+ 	fi
+ 	install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ 	set -e ; for ko in $(MODOBJS); do \
+-		install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
++		[ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
+ 	done
+     ifeq ($(DESTDIR),/)
+       ifeq ($(shell uname -r),$(KERNELRELEASE))
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.19-1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.19-1.bb
new file mode 100644
index 0000000..23fe202
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.19-1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Distributed block device driver for Linux"
+DESCRIPTION = "DRBD is a block device which is designed to build high \
+               availability clusters. This is done by mirroring a whole \
+               block device via (a dedicated) network. You could see \
+               it as a network raid-1."
+HOMEPAGE = "http://oss.linbit.com/drbd/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+DEPENDS = "virtual/kernel"
+
+SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \
+           file://check_existence_of_modules_before_installing.patch \
+           "
+SRC_URI[md5sum] = "bd1202eaaf81641752d0c9b003b10f6c"
+SRC_URI[sha256sum] = "5b3d2bcb99542940e40af903dea783cf04524e9f41cc530e210d2c15ef84fa58"
+
+inherit module
+
+EXTRA_OEMAKE += "KDIR='${STAGING_KERNEL_DIR}'"
+
+do_install () {
+    oe_runmake install DESTDIR="${D}"
+}
+
+PNBLACKLIST[drbd] = "Kernel module Needs forward porting to kernel 5.2+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
new file mode 100644
index 0000000..972d5aa
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
@@ -0,0 +1,46 @@
+SUMMARY = "User configurable send-only Mail Transfer Agent"
+DESCRIPTION = "ESMTP is a user-configurable relay-only MTA \
+with a sendmail-compatible syntax, based on libESMTP and \
+supporting the AUTH (including the CRAM-MD5 and NTLM SASL \
+mechanisms) and StartTLS SMTP extensions."
+HOMEPAGE = "http://esmtp.sourceforge.net/"
+SECTION = "net"
+
+DEPENDS = "libesmtp"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.bz2"
+
+# Have to set this or we get -L/lib in LDFLAGS
+EXTRA_OECONF = "--with-libesmtp=${STAGING_EXECPREFIXDIR}"
+
+inherit autotools update-alternatives
+
+ALTERNATIVE_${PN} = "sendmail mailq newaliases"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
+ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
+ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/esmtp"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/esmtp"
+
+ALTERNATIVE_PRIORITY = "10"
+
+ALTERNATIVE_${PN}-doc += "mailq.1 newaliases.1 sendmail.1"
+ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
+ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
+ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
+
+SRC_URI[md5sum] = "79a9c1f9023d53f35bb82bf446150a72"
+SRC_URI[sha256sum] = "a0d26931bf731f97514da266d079d8bc7d73c65b3499ed080576ab606b21c0ce"
+
+do_install_append() {
+    # only one file /usr/lib/sendmail in ${D}${libdir}
+    rm -rf ${D}${libdir}
+}
+
+FILES_${PN} += "${libdir}/"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.4.bb
new file mode 100644
index 0000000..efab0c8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.4.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP"
+HOMEPAGE = "http://www.fetchmail.info/"
+DESCRIPTION = "Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC."
+SECTION = "mail"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ca53985c1fd053ae0bffffaa89ed49f1"
+
+DEPENDS = "openssl"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz \
+           "
+SRC_URI[md5sum] = "53d52179c8bf8e2f57489538b49bfda9"
+SRC_URI[sha256sum] = "511b60daabf7543a01de06af07c8772290c6807cd53c42a8504960e978f3abea"
+
+inherit autotools gettext python3-dir python3native
+
+EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}"
+
+PACKAGES =+ "fetchmail-python"
+FILES_fetchmail-python = "${libdir}/${PYTHON_DIR}/*"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_4.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_4.2.bb
new file mode 100644
index 0000000..594f5b9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fping/fping_4.2.bb
@@ -0,0 +1,25 @@
+SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts"
+DESCRIPTION = "fping is a ping like program which uses the Internet Control \
+Message Protocol (ICMP) echo request to determine if a target host is \
+responding. fping differs from ping in that you can specify any number of \
+targets on the command line, or specify a file containing the lists of \
+targets to ping.  Instead of sending to one target until it times out or \
+replies, fping will send out a ping packet and move on to the next target \
+in a round-robin fashion."
+HOMEPAGE = "http://www.fping.org/"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c6170fbadddfcd74f011515291d96901"
+
+SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz"
+SRC_URI[md5sum] = "218e71764177a8ce25564a7810f8e729"
+SRC_URI[sha256sum] = "7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a"
+
+S = "${WORKDIR}/fping-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-ipv4"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb
new file mode 100644
index 0000000..3eca3ab
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.10.bb
@@ -0,0 +1,36 @@
+SUMMARY = "fwknop - Single Packet Authorization"
+HOMEPAGE = "http://www.cipherdyne.org/fwknop/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+		    "
+inherit autotools-brokensep
+
+SRC_URI = "http://www.cipherdyne.org/${BPN}/download/${BPN}-${PV}.tar.bz2 \
+          "
+SRC_URI[md5sum] = "47a9c7c214c40dceb5dc2aa8832e4f32"
+SRC_URI[sha256sum] = "f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77"
+
+DEPENDS = "libpcap gpgme"
+
+EXTRA_OECONF = " --with-iptables=/usr/sbin/iptables \
+               "
+
+do_configure () {
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config
+
+	aclocal
+	libtoolize --automake --copy --force
+	autoconf
+	autoheader
+	automake -a
+	oe_runconf
+}
+
+PACKAGES =+ "${PN}-client ${PN}-daemon"
+
+FILES_${PN}-client = "${bindir}/fwknop"
+FILES_${PN}-daemon = "${sbindir}/fwknopd \
+                      ${sysconfdir}/fwknop/access.conf \
+                      ${sysconfdir}/fwknop/fwknopd.conf"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest
new file mode 100644
index 0000000..14e9619
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+pdir=`dirname $0`
+cd ${pdir}/tests
+for i in ./benchmark ./test-geoip-city ; do
+	${i} 1>/dev/null 2>&1;
+	if [ $? == 0 ]; then
+		echo PASS: $i;
+	else
+		echo FAIL: $i;
+	fi;
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest
new file mode 100644
index 0000000..5404c24
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# The tests contain hard-coded relative paths and must be
+# executed from $pdir.
+#
+pdir=`dirname $0`
+cd ${pdir}
+for i in t/*.t ; do
+	perl ${i} 1>/dev/null 2>&1;
+	if [ $? == 0 ]; then
+		echo PASS: $i;
+	else
+		echo FAIL: $i;
+	fi;
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb
new file mode 100644
index 0000000..ed5c3a9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb
@@ -0,0 +1,35 @@
+#
+# Copyright (C) 2014, 2015 Wind River Systems, Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+SUMMARY = "GeoIP perl API library to access location database"
+DESCRIPTION = "perl library for country/city/organization to IP address or hostname mapping"
+HOMEPAGE = "http://www.maxmind.com/app/ip-location"
+SECTION = "libdevel"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e4f3ea6e9b28af88dc0321190a1f8250"
+
+S = "${WORKDIR}/git"
+SRCREV = "4cdfdc38eca237c19c22a8b90490446ce6d970fa"
+SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https; \
+    file://run-ptest \
+"
+
+DEPENDS += "geoip"
+
+inherit cpan ptest
+
+EXTRA_CPANFLAGS = "LIBS='-L${STAGING_LIBDIR}' INC='-I${STAGING_INCDIR}'"
+
+
+# perl scripts and some special small data files
+#
+do_install_ptest () {
+    install -d -m 0755 ${D}${PTEST_PATH}/t/data
+
+    install ${S}/t/*.t* ${D}${PTEST_PATH}/t
+    install ${S}/t/data/* ${D}${PTEST_PATH}/t/data
+}
+
+FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Geo/IP/.debug"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb
new file mode 100644
index 0000000..4271c2e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.12.bb
@@ -0,0 +1,92 @@
+SUMMARY = "C library for country/city/organization to IP address or hostname mapping"
+DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \
+address or hostname originates from. It uses a file based database that is \
+accurate as of March 2003. This database simply contains IP blocks as keys, and \
+countries as values. This database should be more complete and accurate than \
+using reverse DNS lookups."
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "libdevel"
+
+GEOIP_DATABASE_VERSION = "20181205"
+
+SRC_URI = "git://github.com/maxmind/geoip-api-c.git \
+           http://sources.openembedded.org/GeoIP.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIP-dat; \
+           http://sources.openembedded.org/GeoIPv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIPv6-dat; \
+           http://sources.openembedded.org/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCity-dat; \
+           http://sources.openembedded.org/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCityv6-dat; \
+           file://run-ptest \
+"
+SRCREV = "4b526e7331ca1d692b74a0509ddcc725622ed31a"
+
+SRC_URI[GeoIP-dat.md5sum] = "d538e57ad9268fdc7955c6cf9a37c4a9"
+SRC_URI[GeoIP-dat.sha256sum] = "b9c05eb8bfcf90a6ddfdc6815caf40a8db2710f0ce3dd48fbd6c24d485ae0449"
+
+SRC_URI[GeoIPv6-dat.md5sum] = "52d6aa0aac1adbfa5eb7fa4742197c11"
+SRC_URI[GeoIPv6.sha256sum] = "416ac92fcc35a21d5efbb32e5c88e609c37aec1aa1af6247d088b8da1af6e9bf"
+
+SRC_URI[GeoLiteCity-dat.md5sum] = "d700c137232f8e077ac8db8577f699d9"
+SRC_URI[GeoLiteCity-dat.sha256sum] = "90db2e52195e3d1bcdb2c2789209006d09de5c742812dbd9a1b36c12675ec4cd"
+
+SRC_URI[GeoLiteCityv6-dat.md5sum] = "6734ccdc644fc0ba76eb276dce73d005"
+SRC_URI[GeoLiteCityv6-dat.sha256sum] = "c95a9d2643b7f53d7abeed2114388870e13fbbad4653f450a49efa7e4b86aca4"
+
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \
+                    file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-static               \
+                --disable-dependency-tracking  "
+
+do_install() {
+    make DESTDIR=${D} install
+    install -d ${D}/${datadir}/GeoIP
+    install ${WORKDIR}/GeoIP.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIP.dat
+    install ${WORKDIR}/GeoIPv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIPv6.dat
+    install ${WORKDIR}/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCity.dat
+    install ${WORKDIR}/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCityv6.dat
+    ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat
+}
+
+PACKAGES =+ "${PN}-database"
+FILES_${PN}-database = ""
+FILES_${PN}-database += "${datadir}/GeoIP/*"
+
+# We cannot do much looking up without databases.
+#
+RDEPENDS_${PN} += "${PN}-database"
+
+inherit ptest
+
+do_configure_ptest() {
+    sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \
+        -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \
+        ${S}/test/Makefile.am
+
+    if ! grep "^testdir = " ${S}/test/Makefile.am ; then
+        sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \
+            -i ${S}/test/Makefile.am
+    fi
+
+    sed -i -e "s:/usr/local/share:/usr/share:g" \
+        ${S}/test/benchmark.c
+
+    sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \
+        ${S}/test/test-geoip-city.c \
+        ${S}/test/test-geoip-isp.c \
+        ${S}/test/test-geoip-asnum.c \
+        ${S}/test/test-geoip-netspeed.c \
+        ${S}/test/test-geoip-org.c \
+        ${S}/test/test-geoip-region.c
+}
+
+
+do_install_ptest() {
+    oe_runmake -C test DESTDIR=${D}  install-testPROGRAMS
+    install ${S}/test/*.txt ${D}${PTEST_PATH}/tests
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
new file mode 100644
index 0000000..134cfed
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
@@ -0,0 +1,11 @@
+# The following UserId and LicenseKey are required placeholders:
+UserId 999999
+LicenseKey 000000000000
+
+# Include one or more of the following ProductIds:
+# * GeoLite2-City - GeoLite 2 City
+# * GeoLite2-Country - GeoLite2 Country
+# * 506 - GeoLite Legacy Country
+# * 517 - GeoLite Legacy ASN
+# * 533 - GeoLite Legacy City
+ProductIds GeoLite2-City GeoLite2-Country 506 517 533
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
new file mode 100644
index 0000000..40597a8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
@@ -0,0 +1,5 @@
+# top of crontab
+MAILTO=your@email.com
+
+32 11 * * 4 /usr/local/bin/geoipupdate
+# end of crontab
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
new file mode 100644
index 0000000..f4eb2b7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
+DESCRIPTION = "update databases for GeoIP"
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "net"
+
+DEPENDS = "zlib curl"
+
+SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.5.0/geoipupdate-2.5.0.tar.gz \
+           file://GeoIP.conf \
+           file://geoipupdate.cron \
+          "
+SRC_URI[md5sum] = "28f633c49ec87ab01ad3c0fb0228a696"
+SRC_URI[sha256sum] = "5119fd0e338cd083e886228b26679c64bcbaade8a815be092aecf865a610ab26"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "\
+file://ChangeLog.md;md5=11d2e31df0de2be3ccc3e2286c4dafcb \
+"
+FILES_${PN} = "/usr/share/GeoIP \
+              /etc/GeoIP.conf \
+             /etc/cron.d/geoipupdate.cron \
+             /usr/bin/geoipupdate \
+"
+inherit autotools
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}
+    install -d ${D}/${sysconfdir}/cron.d
+    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
+    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
new file mode 100644
index 0000000..0ee44c1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
@@ -0,0 +1,31 @@
+From 04603f52d793f964653e6a985944400fe4fa87ee Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jun 2018 17:50:20 -0700
+Subject: [PATCH] Make environment variables assignments to be weak
+
+So that OE can override them for cross builds
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1c80c09..884126c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,11 +2,11 @@ prefix = $(DESTDIR)/usr
+ bindir = ${prefix}/bin
+ mandir = ${prefix}/share/man
+ 
+-CC = gcc
++CC ?= gcc
+ CFLAGS += -Wall -std=c99 -pedantic -O2
+ 
+-INSTALL = /usr/bin/install -c
+-STRIP = /usr/bin/strip -s
++INSTALL ?= /usr/bin/install -c
++STRIP ?= /usr/bin/strip -s
+ 
+ all: htpdate
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
new file mode 100644
index 0000000..cca8c6c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
@@ -0,0 +1,40 @@
+From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Jun 2018 20:11:08 -0700
+Subject: [PATCH] Replace ntp_adjtime with adjtimex.
+
+ntp_adjtime in glibc is an alias to adjtimex and
+musl does not provide ntp_adjtime at all
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ htpdate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/htpdate.c b/htpdate.c
+index 4171efe..ff0bf8d 100644
+--- a/htpdate.c
++++ b/htpdate.c
+@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) {
+ 
+ 	/* Read current kernel frequency */
+ 	tmx.modes = 0;
+-	ntp_adjtime(&tmx);
++	adjtimex(&tmx);
+ 
+ 	/* Calculate new frequency */
+ 	freq = (long)(65536e6 * drift);
+@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) {
+ 
+ 	/* Become root */
+ 	swuid(0);
+-	return( ntp_adjtime(&tmx) );
++	return( adjtimex(&tmx) );
+ 
+ }
+ 
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate_1.2.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate_1.2.2.bb
new file mode 100644
index 0000000..d9d7268
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/htpdate/htpdate_1.2.2.bb
@@ -0,0 +1,39 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "HTTP based time synchronization tool"
+
+DESCRIPTION = "The  HTTP Time Protocol (HTP) is used to synchronize a computer's time with\
+ web servers as reference time source. This program can be used instead\
+ ntpdate or similar, in networks that has a firewall blocking the NTP port.\
+ Htpdate will synchronize the computer time to Greenwich Mean Time (GMT),\
+ using the timestamps from HTTP headers found in web servers response (the\
+ HEAD method will be used to get the information).\
+ Htpdate works through proxy servers. Accuracy of htpdate will be usually\
+ within 0.5 seconds (better with multiple servers).\
+"
+
+HOMEPAGE = "http://www.vervest.org/htp/"
+
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://htpdate.c;beginline=26;endline=30;md5=d7018a4d2c5a6eab392709a05e5e168a"
+
+SRC_URI = "http://www.vervest.org/htp/archive/c/htpdate-${PV}.tar.xz \
+           file://0001-Make-environment-variables-assignments-to-be-weak.patch \
+           file://0001-Replace-ntp_adjtime-with-adjtimex.patch \
+           "
+SRC_URI[md5sum] = "aad8c33933648532ac8716c809b15be1"
+SRC_URI[sha256sum] = "5f1f959877852abb3153fa407e8532161a7abe916aa635796ef93f8e4119f955"
+
+do_configure () {
+	:
+}
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	oe_runmake install 'INSTALL=install' 'STRIP=echo' 'DESTDIR=${D}'
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
new file mode 100644
index 0000000..125b59e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Configure network interfaces for parallel routing"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
+
+inherit manpages
+MAN_PKG = "${PN}"
+
+SRCREV = "42bfbb9beb924672ca86b86e9679ac3d6b87d992"
+SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -m 0755 ${S}/ifenslave ${D}${sbindir}/
+
+    install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
+    install -m 0644 -D ${S}/debian/ifenslave.8 ${D}${mandir}/man8/ifenslave.8
+}
+
+FILES_${PN}-doc_remove = "${mandir}"
+FILES_${PN} += "${mandir}/man8/ifenslave.8"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.8_typo.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.8_typo.patch
new file mode 100644
index 0000000..2469100
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.8_typo.patch
@@ -0,0 +1,15 @@
+Description: Correct typo: s/ommited/omitted/
+Author: Michael Shuler <michael@pbandjelly.org>
+Index: ifmetric/man/ifmetric.8
+===================================================================
+--- ifmetric.orig/man/ifmetric.8
++++ ifmetric/man/ifmetric.8
+@@ -9,7 +9,7 @@ ifmetric is a Linux tool for setting the
+ 
+ ifmetric uses the Linux NETLINK interface to manipulate the routes. Because of that it is compatible with routes created with the new iproute2 utility.
+ .SH OPTIONS
+-You should specify the interface name as first parameter. The second parameter should be the new metric. If ommited the metric 0 (highest) is used.
++You should specify the interface name as first parameter. The second parameter should be the new metric. If omitted the metric 0 (highest) is used.
+ .SH RETURN VALUES
+ \fI0\f1 Success
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_netlink-invalid-arg.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_netlink-invalid-arg.patch
new file mode 100644
index 0000000..374135d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_netlink-invalid-arg.patch
@@ -0,0 +1,16 @@
+Description: Fix "NETLINK: Error: Invalid argument" for links that are down, in kernel 4.4+
+Author: Jim Paris <jim@jtan.com>
+Bug-Debian: http://bugs.debian.org/864889
+Index: ifmetric/src/nlrequest.c
+===================================================================
+--- a/src/ifmetric.c
++++ b/src/ifmetric.c
+@@ -97,6 +97,8 @@
+     l = NLMSG_PAYLOAD(n, sizeof(struct rtmsg));
+     a = RTM_RTA(r);
+     
++    r->rtm_flags &= ~(RTNH_F_DEAD | RTNH_F_LINKDOWN);
++
+     while(RTA_OK(a, l)) {
+         switch(a->rta_type) {
+             case RTA_PRIORITY:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_typo.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_typo.patch
new file mode 100644
index 0000000..992f7d2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_typo.patch
@@ -0,0 +1,24 @@
+Description: Correct spelling-error-in-binary s/Recieved/Received/
+Author: Michael Shuler <michael@pbandjelly.org>
+Index: ifmetric/src/ifmetric.c
+===================================================================
+--- ifmetric.orig/src/ifmetric.c	2013-09-04 18:37:59.000000000 -0500
++++ ifmetric/src/ifmetric.c	2013-09-04 19:08:38.539750778 -0500
+@@ -38,7 +38,7 @@
+             case RTA_OIF:
+ 
+                 if (RTA_PAYLOAD(a) != sizeof(int)) {
+-                    fprintf(stderr, "NETLINK: Recieved corrupt RTA_OIF payload.\n");
++                    fprintf(stderr, "NETLINK: Received corrupt RTA_OIF payload.\n");
+                     return -1;
+                 }
+                 
+@@ -102,7 +102,7 @@
+             case RTA_PRIORITY:
+ 
+                 if (RTA_PAYLOAD(a) != sizeof(int)) {
+-                    fprintf(stderr, "NETLINK: Recieved corrupt RTA_PRIORITY payload.\n");
++                    fprintf(stderr, "NETLINK: Received corrupt RTA_PRIORITY payload.\n");
+                     return NULL;
+                 }
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/nlrequest.c_packet-too-small_fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/nlrequest.c_packet-too-small_fix.patch
new file mode 100644
index 0000000..15b3103
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric/nlrequest.c_packet-too-small_fix.patch
@@ -0,0 +1,16 @@
+Description: Fix "NETLINK: Packet too small or truncated!" error.
+Author: Benedek László <benedekl@gmail.com>
+Bug-Debian: http://bugs.debian.org/514197
+Index: ifmetric/src/nlrequest.c
+===================================================================
+--- ifmetric.orig/src/nlrequest.c	2013-09-05 14:10:42.000000000 -0500
++++ ifmetric/src/nlrequest.c	2013-09-05 14:19:06.573420862 -0500
+@@ -44,7 +44,7 @@
+ 
+     for (;;) {
+         int bytes;
+-        char replybuf[2048];
++        char replybuf[4096];
+         struct nlmsghdr *p = (struct nlmsghdr *) replybuf;
+         
+         if ((bytes = recv(s, &replybuf, sizeof(replybuf), 0)) < 0) {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric_0.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric_0.3.bb
new file mode 100644
index 0000000..4ee7c42
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ifmetric/ifmetric_0.3.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Set routing metrics for a network interface"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "http://0pointer.de/lennart/projects/ifmetric/ifmetric-${PV}.tar.gz \
+	   file://ifmetric.8_typo.patch \
+	   file://ifmetric.c_netlink-invalid-arg.patch \
+	   file://ifmetric.c_typo.patch \
+	   file://nlrequest.c_packet-too-small_fix.patch"
+SRC_URI[md5sum] = "74aa3f5ee8aca16a87e124ddcc64fa36"
+SRC_URI[sha256sum] = "0fa8510a4e34e555f136f9df81d26618313f2d69a4880c0fb5967f19502f1aec"
+
+inherit autotools
+
+# disable lynx support for now
+EXTRA_OECONF = "--disable-lynx"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb
new file mode 100644
index 0000000..0c8e494
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb
@@ -0,0 +1,14 @@
+SUMMARY = "iftop does for network usage what top(1) does for CPU usage"
+HOMEPAGE = "http://www.ex-parrot.com/pdw/iftop/"
+SECTION = "net"
+DEPENDS = "libpcap ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=76498170798db0f4f0fb685a225f702f"
+
+SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz"
+SRC_URI[md5sum] = "7e6decb4958e8a4890cccac335239f24"
+SRC_URI[sha256sum] = "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97"
+
+inherit autotools-brokensep
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
new file mode 100644
index 0000000..e95b6f9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
@@ -0,0 +1,29 @@
+From 7fd0e0b88df692dfc67335f235a1bb74854a0498 Mon Sep 17 00:00:00 2001
+From: Mariia Movchan <mmovchan@cisco.com>
+Date: Tue, 6 Mar 2018 16:03:39 +0200
+Subject: [PATCH] Makefile: pass extra linker flags
+
+Fixes
+ERROR: QA Issue: No GNU_HASH in the elf binary
+
+Upstream-Status: Pending
+
+Signed-off-by: Mariia Movchan <mmovchan@cisco.com>
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 54569c1..798988f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@ LIBS?=
+ VERSION=0.2.3
+ CC?=gcc
+ CFLAGS?=-O2 -g -Wall
+-LDFLAGS=$(LIBS)
++LDFLAGS+=$(LIBS)
+ 
+ ifeq ($(USE_GEOIP),yes)
+ ifeq ($(USE_DYN_GEOIP),yes)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb
new file mode 100644
index 0000000..ad0ec27
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6."
+HOMEPAGE = "https://github.com/nmav/ipcalc"
+
+SECTION = "net"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+SRCREV = "c3ee70c878b9c5833a77a1f339f1ca4dc6f225c5"
+SRC_URI = "\
+    git://github.com/nmav/ipcalc.git;protocol=https; \
+    file://0001-Makefile-pass-extra-linker-flags.patch \
+"
+
+export USE_GEOIP = "no"
+
+do_install() {
+    install -d ${D}/${bindir}
+    install -m 0755 ${S}/ipcalc ${D}/${bindir}
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch
new file mode 100644
index 0000000..d7b0267
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Modify-the-Makefile-for-cross-compile.patch
@@ -0,0 +1,73 @@
+From 801224257015788d3aff026bf2ae1cd8531d4fcc Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 25 Jul 2018 13:12:04 +0800
+Subject: [PATCH] Modify the Makefile for cross compile.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+
+update to version 1.29
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile         | 9 ++++-----
+ libipvs/Makefile |  3 +--
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 91a2991..906086d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -35,10 +35,9 @@ ARCH		= $(shell uname -m)
+ RPMSOURCEDIR	= $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR	= $(shell rpm --eval '%_specdir')
+ 
+-CC		= gcc
+ INCLUDE		=
+ SBIN		= $(BUILD_ROOT)/sbin
+-MANDIR		= usr/man
++MANDIR          = usr/share/man
+ MAN		= $(BUILD_ROOT)/$(MANDIR)/man8
+ INIT		= $(BUILD_ROOT)/etc/rc.d/init.d
+ MKDIR		= mkdir
+@@ -81,13 +80,13 @@ DEFINES		+= $(shell if [ ! -f ../ip_vs.h ]; then	\
+ 
+ .PHONY	= all clean install dist distclean rpm rpms
+ 
+-all:            libs ipvsadm
++all:            ipvsadm
+ 
+ libs:
+ 		make -C libipvs
+ 
+-ipvsadm:	$(OBJS) $(STATIC_LIBS)
+-		$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm:       $(OBJS) libs
++		$(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
+ 
+ install:        all
+ 		if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
+diff --git a/libipvs/Makefile b/libipvs/Makefile
+index f845c8b..dafab30 100644
+--- a/libipvs/Makefile
++++ b/libipvs/Makefile
+@@ -1,6 +1,5 @@
+ # Makefile for libipvs
+ 
+-CC		= gcc
+ CFLAGS		= -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS		+= -DLIBIPVS_USE_NL
+@@ -30,7 +29,7 @@ SHARED_LIB	= libipvs.so
+ all:		$(STATIC_LIB) $(SHARED_LIB)
+ 
+ $(STATIC_LIB):	libipvs.o ip_vs_nl_policy.o
+-		ar rv $@ $^
++		$(AR) rv $@ $^
+ 
+ $(SHARED_LIB):	libipvs.o ip_vs_nl_policy.o
+ 		$(CC) -shared -Wl,-soname,$@ -o $@ $^
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch
new file mode 100644
index 0000000..800114f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0003-ipvsadm-remove-dependency-on-bash.patch
@@ -0,0 +1,39 @@
+From 2f4cdf70cf92d3a9503d8ff045ba277db40bb4e7 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Monday, 13 Apr 2015 14:12:37 -0400
+Subject: [PATCH] ipvsadm: remove dependency on bash
+
+The save/restore scripts are very simple and don't depend on any BASH
+features at all, so switch the interpreter to /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ ipvsadm-restore | 2 +-
+ ipvsadm-save    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ipvsadm-restore b/ipvsadm-restore
+index f24e1b3..a9fa8bc 100644
+--- a/ipvsadm-restore
++++ b/ipvsadm-restore
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #      ipvsadm-restore - Restore IPVS rules
+ #
+ #      A very simple wrapper to restore IPVS rules
+diff --git a/ipvsadm-save b/ipvsadm-save
+index f4d399e..af51638 100644
+--- a/ipvsadm-save
++++ b/ipvsadm-save
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #      ipvsadm-save - Save IPVS rules
+ #
+ #      A very simple wrapper to save IPVS rules
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch
new file mode 100644
index 0000000..a2c5235
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/makefile-add-ldflags.patch
@@ -0,0 +1,33 @@
+From 8aff1e965ec17262f3a5b376f7eb3e053d81905c Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 18:18:05 +0800
+Subject: [PATCH] Add LDFLAGS variable to Makefile, make sure the extra linker
+ flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+Update to version 1.29
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index f29bbae..81beb5a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -86,7 +86,7 @@ libs:
+ 		make -C libipvs
+ 
+ ipvsadm:       $(OBJS) libs
+-		$(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
++		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
+ 
+ install:        all
+ 		if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.31.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.31.bb
new file mode 100644
index 0000000..8fb116f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm_1.31.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Linux Virtual Server administration Utility"
+HOMEPAGE = "http://www.linux-vs.org/software/index.html"
+DESCRIPTION = "Ipvsadm  is  used  to set up, maintain or inspect the virtual server \
+table in the Linux kernel. The Linux Virtual  Server  can  be  used  to \
+build  scalable  network  services  based  on  a cluster of two or more nodes. \
+The active node of the cluster redirects service requests  to  a \
+collection  of  server  hosts  that will actually perform the services. \
+Supported features include two protocols (TCP and UDP),  three  packet-forwarding \
+methods (NAT, tunneling, and direct routing), and eight load balancing algorithms \
+(round robin, weighted round robin,  least-connec-tion, weighted least-connection, \
+locality-based  least-connection, locality-based least-connection with replication, \
+destination-hashing, and source-hashing)."
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://README;beginline=40;endline=56;md5=b4e40069f15598d0e3fe2aa177e5ec77"
+
+DEPENDS += "libnl popt"
+
+SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/utils/kernel/ipvsadm/${BP}.tar.xz \
+        file://0001-Modify-the-Makefile-for-cross-compile.patch \
+        file://0003-ipvsadm-remove-dependency-on-bash.patch \
+        file://makefile-add-ldflags.patch \
+"
+
+SRC_URI[md5sum] = "f6d1707c5baf684b58fd33682d67871f"
+SRC_URI[sha256sum] = "1a0a5e25b5a1226435d2fb76341656f83a710183aebb0d204db39c0ec3bedfdb"
+
+UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/ipvsadm"
+
+do_compile() {
+    oe_runmake \
+    CC="${CC} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3 -L${STAGING_LIBDIR}" \
+    all
+}
+
+do_install() {
+    sed -i -e "s;SBIN\t\t= \$(BUILD_ROOT)/sbin;SBIN\t\t= \$(BUILD_ROOT)$base_sbindir;" \
+        -e "s;INIT\t\t= \$(BUILD_ROOT)/etc/rc.d/init.d;INIT\t\t= \$(BUILD_ROOT)${sysconfdir}/init.d;" \
+        ${S}/Makefile
+    oe_runmake 'BUILD_ROOT=${D}' install
+}
+
+inherit pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch
new file mode 100644
index 0000000..90c4ce7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch
@@ -0,0 +1,48 @@
+diff -Nurp libesmtp-1.0.6.org/crammd5/Makefile.am libesmtp-1.0.6/crammd5/Makefile.am
+--- libesmtp-1.0.6.org/crammd5/Makefile.am	2010-08-08 23:45:57.000000000 +0800
++++ libesmtp-1.0.6/crammd5/Makefile.am	2014-11-17 11:17:21.663624295 +0800
+@@ -2,7 +2,7 @@
+ 
+ libdir = @plugindir@
+ 
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+ 
+ lib_LTLIBRARIES = sasl-cram-md5.la
+diff -Nurp libesmtp-1.0.6.org/login/Makefile.am libesmtp-1.0.6/login/Makefile.am
+--- libesmtp-1.0.6.org/login/Makefile.am	2010-08-08 23:45:56.000000000 +0800
++++ libesmtp-1.0.6/login/Makefile.am	2014-11-17 11:17:54.339623018 +0800
+@@ -2,7 +2,7 @@
+ 
+ libdir = @plugindir@
+ 
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ 
+ lib_LTLIBRARIES = sasl-login.la
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+diff -Nurp libesmtp-1.0.6.org/ntlm/Makefile.am libesmtp-1.0.6/ntlm/Makefile.am
+--- libesmtp-1.0.6.org/ntlm/Makefile.am	2010-08-08 23:45:56.000000000 +0800
++++ libesmtp-1.0.6/ntlm/Makefile.am	2014-11-17 11:18:10.551622385 +0800
+@@ -2,7 +2,7 @@
+ 
+ libdir = @plugindir@
+ 
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+ 
+ lib_LTLIBRARIES = sasl-ntlm.la
+diff -Nurp libesmtp-1.0.6.org/plain/Makefile.am libesmtp-1.0.6/plain/Makefile.am
+--- libesmtp-1.0.6.org/plain/Makefile.am	2010-08-08 23:45:54.000000000 +0800
++++ libesmtp-1.0.6/plain/Makefile.am	2014-11-17 11:18:33.355621494 +0800
+@@ -2,7 +2,7 @@
+ 
+ libdir = @plugindir@
+ 
+-INCLUDES = -I@srcdir@
++INCLUDES = -I@srcdir@ -I@srcdir@/../
+ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
+ 
+ lib_LTLIBRARIES = sasl-plain.la
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
new file mode 100644
index 0000000..d0d203e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
@@ -0,0 +1,19 @@
+Use HAVE_WORKING_SNPRINTF to check for snprintf()
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libesmtp-1.0.6/missing.h
+===================================================================
+--- libesmtp-1.0.6.orig/missing.h
++++ libesmtp-1.0.6/missing.h
+@@ -43,7 +43,7 @@ int strncasecmp (const char *a, const ch
+ void *memrchr (const void *a, int c, size_t len);
+ #endif
+ 
+-#ifndef HAVE_SNPRINTF
++#ifndef HAVE_WORKING_SNPRINTF
+ #include <sys/types.h>
+ int snprintf(char *s, size_t n, const char *format, ...);
+ #endif
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
new file mode 100644
index 0000000..71c5d94
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb
@@ -0,0 +1,38 @@
+SUMMARY = "SMTP client library"
+DESCRIPTION = "LibESMTP is a library to manage posting \
+(or submission of) electronic mail using SMTP to a \
+preconfigured Mail Transport Agent (MTA) such as Exim or PostFix."
+HOMEPAGE = "http://www.stafford.uklinux.net/libesmtp/"
+LICENSE = "LGPLv2+"
+SECTION = "libs"
+
+DEPENDS = "openssl"
+
+SRC_URI = "http://www.stafford.uklinux.net/libesmtp/libesmtp-${PV}.tar.bz2 \
+           file://include-topdir.patch \
+           file://snprintf.patch \
+          "
+SRC_URI[md5sum] = "bf3915e627fd8f35524a8fdfeed979c8"
+SRC_URI[sha256sum] = "d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+inherit autotools binconfig
+
+EXTRA_OECONF = " \
+    --with-auth-plugin-dir=${libdir}/esmtp-plugins \
+    --enable-pthreads                              \
+    --enable-debug                                 \
+    --enable-etrn                                  \
+    --disable-isoc                                 \
+    --disable-more-warnings                        \
+    --disable-static                               \
+"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS} \
+               ${libdir}/esmtp-plugins/*${SOLIBSDEV}"
+
+FILES_${PN}-dev  += "${libdir}/esmtp-plugins/*.la"
+FILES_${PN}-static += "${libdir}/esmtp-plugins/*.a"
+FILES_${PN}-dbg += "${libdir}/esmtp-plugins/.debug/"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch
new file mode 100644
index 0000000..45c5aca
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch
@@ -0,0 +1,62 @@
+From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 25 Jan 2019 15:00:59 +0800
+Subject: [PATCH] waf: add support of cross_compile
+
+After upgrade, waf build system also upgraded.
+
+on 1.5.19, for cross_compile, subprocess.Popen is set to be
+samba_cross.cross_Popen, which will not execute testprog on
+host, but only read result from cross-answers.txt which is
+passed by option --cross-answer
+
+part of old code:
+    args = Utils.to_list(kw.get('exec_args', []))
+    proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE)
+
+but on new version, exec_args is not used and cause do_configure
+failed with Exec format error
+
+fixed by append cross anser related args to cmd
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ third_party/waf/waflib/Tools/c_config.py | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
+index 7608215..767cf33 100644
+--- a/third_party/waf/waflib/Tools/c_config.py
++++ b/third_party/waf/waflib/Tools/c_config.py
+@@ -660,20 +660,21 @@ class test_exec(Task.Task):
+ 	"""
+ 	color = 'PINK'
+ 	def run(self):
++		args = self.generator.bld.kw.get('exec_args', [])
+ 		if getattr(self.generator, 'rpath', None):
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
+-			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args)
++			else: 
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args)
+ 		else:
+ 			env = self.env.env or {}
+ 			env.update(dict(os.environ))
+ 			for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
+ 				env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
+ 			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env)
+ 
+ @feature('test_exec')
+ @after_method('apply_link')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch
new file mode 100644
index 0000000..b30afee
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch
@@ -0,0 +1,23 @@
+From 63570b98ef63c91d8508478fcbe6b89c90c8398f Mon Sep 17 00:00:00 2001
+From: Jens Rehsack <rehsack@gmail.com>
+Date: Thu, 19 Nov 2015 20:45:56 +0100
+
+---
+ wscript | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/wscript b/wscript
+index e7c05d2..1633593 100644
+--- a/wscript
++++ b/wscript
+@@ -161,9 +161,7 @@ def configure(conf):
+     if conf.env.standalone_ldb:
+         conf.CHECK_XSLTPROC_MANPAGES()
+ 
+-        # we need this for the ldap backend
+-        if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+-            conf.env.ENABLE_LDAP_BACKEND = True
++        conf.env.ENABLE_LDAP_BACKEND = False
+ 
+         # we don't want any libraries or modules to rely on runtime
+         # resolution of symbols
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 0000000..3f2921e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch
@@ -0,0 +1,67 @@
+From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 25 Jun 2019 14:25:08 +0800
+Subject: [PATCH] do not import target module while cross compile
+
+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>
+
+update to version 4.10.5, and switch to python3
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++--------
+ 1 file changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
+index 60ce7da..5468a36 100644
+--- a/buildtools/wafsamba/samba_bundled.py
++++ b/buildtools/wafsamba/samba_bundled.py
+@@ -4,6 +4,7 @@ import sys
+ from waflib import Build, Options, Logs
+ from waflib.Configure import conf
+ from wafsamba import samba_utils
++import importlib.util, os
+ 
+ def PRIVATE_NAME(bld, name, private_extension, private_library):
+     '''possibly rename a library to include a bundled extension'''
+@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+     # versions
+     minversion = minimum_library_version(conf, libname, minversion)
+ 
+-    try:
+-        m = __import__(modulename)
+-    except ImportError:
+-        found = False
+-    else:
++    # Find module in PYTHONPATH
++    spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]])
++    if spec:
+         try:
+-            version = m.__version__
+-        except AttributeError:
++            module = importlib.util.module_from_spec(spec)
++            spec.loader.load_module(module)
++        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.' % (spec.name))
++                found = True
+         else:
+-            found = tuplize_version(version) >= tuplize_version(minversion)
++            try:
++                version = module.__version__
++            except AttributeError:
++                found = False
++            else:
++                found = tuplize_version(version) >= tuplize_version(minversion)
+     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)
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-conflict-type-error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-conflict-type-error.patch
new file mode 100644
index 0000000..444fa3f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-conflict-type-error.patch
@@ -0,0 +1,45 @@
+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] 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>
+---
+ 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/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch
new file mode 100644
index 0000000..c0e7e89
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch
@@ -0,0 +1,31 @@
+From d90534469c5c43bf2a97e5698a5ddb4b7471f92a Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 10:53:16 +0800
+Subject: [PATCH] libldb: fix musl libc unkoown type error
+
+tevent.h:1440:8: error: unknown type name 'pid_t'; did you mean 'div_t'?
+        pid_t *pid,
+         ^~~~~
+         div_t
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/tevent/tevent.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
+index aa6fe0d..2572696 100644
+--- a/lib/tevent/tevent.h
++++ b/lib/tevent/tevent.h
+@@ -32,6 +32,8 @@
+ #include <talloc.h>
+ #include <sys/time.h>
+ #include <stdbool.h>
++#include <sys/stat.h>
++#include <sys/types.h>
+ 
+ struct tevent_context;
+ struct tevent_ops;
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch
new file mode 100644
index 0000000..bffd065
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch
@@ -0,0 +1,171 @@
+From 0841c3ed69c388251c1aeae63f2c3813555a54f6 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 1 Jul 2019 16:14:16 +0800
+Subject: [PATCH] ldb: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+upgrade to version 1.5.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 92 +++++++++++++++++++++++++++++++++++++++++------------
+ wscript             |  8 +++++
+ 2 files changed, 79 insertions(+), 21 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index a7fd25d..ad26041 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -24,6 +24,41 @@ def options(opt):
+     opt.BUILTIN_DEFAULT('NONE')
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
++    
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
+ 
+ @Utils.run_once
+ def configure(conf):
+@@ -34,12 +69,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -110,8 +158,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')
+-    conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++        conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.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')
+@@ -380,20 +429,21 @@ def configure(conf):
+ 
+     strlcpy_in_bsd = False
+ 
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd: 
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                                   checklibc=True):
++                strlcpy_in_bsd = True
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+diff --git a/wscript b/wscript
+index d3402a7..d4e0ce1 100644
+--- a/wscript
++++ b/wscript
+@@ -38,6 +38,14 @@ def options(opt):
+                    help='disable new LMDB backend for LDB',
+                    action='store_true', dest='without_ldb_lmdb', default=False)
+ 
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
++
++
+ 
+ def configure(conf):
+     conf.RECURSE('lib/tdb')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.5.8.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.5.8.bb
new file mode 100644
index 0000000..199db79
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.5.8.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://ldb.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
+
+DEPENDS += "libtdb libtalloc libtevent popt"
+RDEPENDS_pyldb += "python3"
+
+SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
+           file://do-not-import-target-module-while-cross-compile.patch \
+           file://libldb-fix-musl-libc-unkown-type-error.patch \
+           file://libldb-fix-musl-libc-conflict-type-error.patch \
+           file://0001-waf-add-support-of-cross_compile.patch \
+           file://options-1.5.4.patch \ 
+          "
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[ldap] = ",,openldap"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb,"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
+
+LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \
+                    file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
+                    file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
+
+SRC_URI[md5sum] = "d9b4bea8b48cd4c4d0c492e65881164b"
+SRC_URI[sha256sum] = "ddf7f770643e0a0dda60f2818913f883caeed37fa1e8d6eda0dfe9588c1e3a83"
+
+inherit waf-samba
+
+S = "${WORKDIR}/ldb-${PV}"
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --disable-rpath-install \
+                 --bundled-libraries=cmocka \
+                 --builtin-libraries=replace \
+                 --with-modulesdir=${libdir}/ldb/modules \
+                 --with-privatelibdir=${libdir}/ldb \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES =+ "pyldb pyldb-dbg pyldb-dev"
+
+NOAUTOPACKAGEDEBUG = "1"
+
+FILES_${PN} += "${libdir}/ldb/*"
+FILES_${PN}-dbg += "${bindir}/.debug/* \
+                    ${libdir}/.debug/* \
+                    ${libdir}/ldb/.debug/* \
+                    ${libdir}/ldb/modules/ldb/.debug/*"
+
+FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+               ${libdir}/libpyldb-util.*.so.* \
+              "
+FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+                   ${libdir}/.debug/libpyldb-util.*.so.*"
+FILES_pyldb-dev = "${libdir}/libpyldb-util.*.so"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch
new file mode 100644
index 0000000..26b5e25
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-Fix-comparison-types.patch
@@ -0,0 +1,38 @@
+From ed4422979b221c8613ca02eb5c57cb80009366d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:13:24 -0700
+Subject: [PATCH 1/2] Fix comparison types
+
+Fixes
+error: comparison between pointer and integer ('char *' and 'int')
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ clients/memflush.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/clients/memflush.cc b/clients/memflush.cc
+index 8bd0dbf..71545ea 100644
+--- a/clients/memflush.cc
++++ b/clients/memflush.cc
+@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
+ {
+   options_parse(argc, argv);
+ 
+-  if (opt_servers == false)
++  if (opt_servers == NULL)
+   {
+     char *temp;
+ 
+@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
+       opt_servers= strdup(temp);
+     }
+ 
+-    if (opt_servers == false)
++    if (opt_servers == NULL)
+     {
+       std::cerr << "No Servers provided" << std::endl;
+       exit(EXIT_FAILURE);
+-- 
+2.12.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch
new file mode 100644
index 0000000..06febc5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0001-configure.ac-Do-not-configure-build-aux.patch
@@ -0,0 +1,28 @@
+From fa0fe001a5373c1ef9ff2175555b14fc07399e1b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:01:44 -0700
+Subject: [PATCH] configure.ac: Do not configure build-aux
+
+Fixes
+configure: error: cannot find install-sh, install.sh, or shtool
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17b7351..0263112 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,7 +17,6 @@ AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
+ AC_PROG_CC([cc gcc clang])
+ AC_PROG_CXX([c++ g++ clang++])
+ 
+-AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+ 
+ AC_CANONICAL_HOST
+-- 
+2.12.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch
new file mode 100644
index 0000000..e1e1be8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch
@@ -0,0 +1,30 @@
+From e95609e4ae40a794ed198924505fd22d7d86a124 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 18 Mar 2017 10:16:14 -0700
+Subject: [PATCH 2/2] POSIX_SPAWN_USEVFORK is not linux specific but glibc
+ specific
+
+Fixes
+cmdline.cc:206:12: error: use of undeclared identifier 'POSIX_SPAWN_USEVFORK'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libtest/cmdline.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc
+index 29a22de..34f0a89 100644
+--- a/libtest/cmdline.cc
++++ b/libtest/cmdline.cc
+@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[])
+ 
+   fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0);
+ 
+-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__)
++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__)
+   // Use USEVFORK on linux
+   flags |= POSIX_SPAWN_USEVFORK;
+ #endif
+-- 
+2.12.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch
new file mode 100644
index 0000000..63511bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/files/crosscompile.patch
@@ -0,0 +1,30 @@
+ libmemcached/backtrace.cc |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- libmemcached-1.0.15.orig/libmemcached/backtrace.cc
++++ libmemcached-1.0.15/libmemcached/backtrace.cc
+@@ -75,10 +75,11 @@ void custom_backtrace(void)
+     {
+       for (int x= 0; x < stack_frames; x++) 
+       {
+         bool was_demangled= false;
+ 
++#if USE_DEMANGLE == 1
+         if (USE_DEMANGLE)
+         {
+ #ifdef HAVE_DLFCN_H
+           Dl_info dlinfo;
+           if (dladdr(backtrace_buffer[x], &dlinfo))
+@@ -107,11 +108,11 @@ void custom_backtrace(void)
+                       dlinfo.dli_fname);
+             }
+           }
+ #endif
+         }
+-
++#endif
+         if (was_demangled == false)
+         {
+           fprintf(stderr, "?%d  %p in %s\n", x, backtrace_buffer[x], symbollist[x]);
+         }
+       }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
new file mode 100644
index 0000000..319ab29
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached.inc
@@ -0,0 +1,17 @@
+DESCRIPTION = "open source C/C++ client library and tools for the memcached server"
+DEPENDS = "libevent util-linux"
+SECTION = "libdevel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=865490941c91ba790f0ea78dec93bd60"
+
+SRC_URI = "http://launchpad.net/libmemcached/1.0/${PV}/+download/libmemcached-${PV}.tar.gz"
+
+UPSTREAM_CHECK_URI = "https://launchpad.net/libmemcached"
+
+TARGET_LDFLAGS += "-luuid"
+TARGET_CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sasl] = "--enable-sasl,--disable-sasl,cyrus-sasl"
+
+inherit autotools gettext pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb
new file mode 100644
index 0000000..56778c0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.18.bb
@@ -0,0 +1,10 @@
+require libmemcached.inc
+
+SRC_URI += "\
+           file://crosscompile.patch \
+           file://0001-configure.ac-Do-not-configure-build-aux.patch \
+           file://0001-Fix-comparison-types.patch \
+           file://0002-POSIX_SPAWN_USEVFORK-is-not-linux-specific-but-glibc.patch \
+           "
+SRC_URI[md5sum] = "b3958716b4e53ddc5992e6c49d97e819"
+SRC_URI[sha256sum] = "e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb
new file mode 100644
index 0000000..cdf8415
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb
@@ -0,0 +1,4 @@
+require libmemcached.inc
+
+SRC_URI[md5sum] = "d59a462a92d296f76bff2d9bc72b2516"
+SRC_URI[sha256sum] = "3efa86c9733eaad55d7119cb16769424e2aa6c22b3392e8f973946fce6678d81"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch
new file mode 100644
index 0000000..e58339a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/0001-waf-add-support-of-cross_compile.patch
@@ -0,0 +1,62 @@
+From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 25 Jan 2019 15:00:59 +0800
+Subject: [PATCH] waf: add support of cross_compile
+
+After upgrade, waf also upgraded
+
+on 1.5.19, for cross_compile, subprocess.Popen is set to be
+samba_cross.cross_Popen, which will not execute testprog on
+host, but only read result from cross-answers.txt which is
+passed by option --cross-answer
+
+part of old code:
+    args = Utils.to_list(kw.get('exec_args', []))
+    proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE)
+
+but on new version, exec_args is not used and cause do_configure
+failed with Exec format error
+
+fixed by append cross anser related args to cmd
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ third_party/waf/waflib/Tools/c_config.py | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
+index 7608215..767cf33 100644
+--- a/third_party/waf/waflib/Tools/c_config.py
++++ b/third_party/waf/waflib/Tools/c_config.py
+@@ -660,20 +660,21 @@ class test_exec(Task.Task):
+ 	"""
+ 	color = 'PINK'
+ 	def run(self):
++		args = self.generator.bld.kw.get('exec_args', [])
+ 		if getattr(self.generator, 'rpath', None):
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
+-			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args)
++			else: 
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args)
+ 		else:
+ 			env = self.env.env or {}
+ 			env.update(dict(os.environ))
+ 			for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
+ 				env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
+ 			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env)
+ 
+ @feature('test_exec')
+ @after_method('apply_link')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
new file mode 100644
index 0000000..db3ddce
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
@@ -0,0 +1,20 @@
+--- a/lib/replace/wscript	2015-11-13 16:04:04.000000000 +0100
++++ b/lib/replace/wscript	2015-11-13 16:23:20.000000000 +0100
+@@ -837,8 +837,6 @@ def build(bld):
+     if not bld.CONFIG_SET('HAVE_INET_ATON'):     REPLACE_SOURCE += ' inet_aton.c'
+     if not bld.CONFIG_SET('HAVE_INET_NTOP'):     REPLACE_SOURCE += ' inet_ntop.c'
+     if not bld.CONFIG_SET('HAVE_INET_PTON'):     REPLACE_SOURCE += ' inet_pton.c'
+-    if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+-                                                 REPLACE_SOURCE += ' xattr.c'
+ 
+     if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
+         REPLACE_SOURCE += ' closefrom.c'
+@@ -852,7 +850,7 @@ def build(bld):
+                       # at the moment:
+                       # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+                       private_library=True,
+-                      deps='crypt dl nsl socket rt attr' + extra_libs)
++                      deps='crypt dl nsl socket rt ' + extra_libs)
+ 
+     replace_test_cflags="-Wno-format-zero-length"
+     if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.2.0.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.2.0.patch
new file mode 100644
index 0000000..3847b01
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.2.0.patch
@@ -0,0 +1,173 @@
+From c6d76c8ade57b996a8123b1c1a3a28ba4666e9c6 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 20 Jun 2019 10:57:06 +0800
+Subject: [PATCH] talloc: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 2.1.10.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+Modified tp apply to version 2.2.0
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 91 ++++++++++++++++++++++++++++++++++++++++-------------
+ wscript             |  7 ++++-
+ 2 files changed, 76 insertions(+), 22 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 1d01e1e..7bc7666 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -25,6 +25,41 @@ def options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -34,12 +69,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('attr/xattr.h compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -110,8 +158,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')
+-    conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++        conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.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')
+@@ -380,20 +429,20 @@ def configure(conf):
+ 
+     strlcpy_in_bsd = False
+ 
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                checklibc=True):
++                strlcpy_in_bsd = True
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+diff --git a/wscript b/wscript
+index e402069..9976f4c 100644
+--- a/wscript
++++ b/wscript
+@@ -31,7 +31,12 @@ def options(opt):
+         opt.add_option('--enable-talloc-compat1',
+                        help=("Build talloc 1.x.x compat library [False]"),
+                        action="store_true", dest='TALLOC_COMPAT1', default=False)
+-
++        opt.add_option('--with-valgrind',
++                       help=("enable use of valgrind"),
++                       action="store_true", dest='enable_valgrind')
++        opt.add_option('--without-valgrind',
++                       help=("disable use of valgrind"),
++                       action="store_false", dest='enable_valgrind', default=False)
+ 
+ def configure(conf):
+     conf.RECURSE('lib/replace')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.3.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.3.0.bb
new file mode 100644
index 0000000..59deb15
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.3.0.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://talloc.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+LIC_FILES_CHKSUM = "file://talloc.h;beginline=3;endline=27;md5=a301712782cad6dd6d5228bfa7825249 \
+                    file://pytalloc.h;beginline=1;endline=18;md5=2c498cc6f2263672483237b20f46b43d"
+
+
+SRC_URI = "https://www.samba.org/ftp/talloc/talloc-${PV}.tar.gz \
+           file://options-2.2.0.patch \
+           file://0001-waf-add-support-of-cross_compile.patch \
+"
+SRC_URI[md5sum] = "8416b153547add81cd1a4d24e598c890"
+SRC_URI[sha256sum] = "75d5bcb34482545a82ffb06da8f6c797f963a0da450d0830c669267b14992fc6"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/talloc-${PV}"
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --disable-rpath-install \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --disable-silent-rules \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES += "pytalloc pytalloc-dev"
+
+RPROVIDES_${PN}-dbg += "pytalloc-dbg"
+
+FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+                  ${libdir}/libpytalloc-util.so.2 \
+                  ${libdir}/libpytalloc-util.so.2.1.1 \
+                 "
+FILES_pytalloc-dev = "${libdir}/libpytalloc-util.so"
+RDEPENDS_pytalloc = "python3"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
new file mode 100644
index 0000000..c35cab7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch
@@ -0,0 +1,172 @@
+From 71a10c176c34da898c0169371b3c1b032d2f88b1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 19 Jun 2019 17:53:34 +0800
+Subject: [PATCH] tdb: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Update to 1.4.0
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 94 ++++++++++++++++++++++++++++++++++++++++-------------
+ wscript             |  6 ++++
+ 2 files changed, 78 insertions(+), 22 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 1d01e1e..2336dc3 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -25,6 +25,41 @@ def options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -34,12 +69,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('attr/xattr.h compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -110,9 +158,10 @@ 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')
+-    conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
+-    conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++        conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.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')
+     conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h')
+@@ -380,20 +429,21 @@ def configure(conf):
+ 
+     strlcpy_in_bsd = False
+ 
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                                   checklibc=True):
++                strlcpy_in_bsd = True
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+diff --git a/wscript b/wscript
+index 5598d02..8d47244 100644
+--- a/wscript
++++ b/wscript
+@@ -69,6 +69,12 @@ def options(opt):
+                    action="store_true", dest='disable_tdb_mutex_locking',
+                    default=False)
+ 
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
+ 
+ def configure(conf):
+     conf.env.disable_tdb_mutex_locking = getattr(Options.options,
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb
new file mode 100644
index 0000000..c131014
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb
@@ -0,0 +1,56 @@
+SUMMARY = "The tdb library"
+HOMEPAGE = "http://tdb.samba.org/"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
+                    file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
+
+SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
+           file://tdb-Add-configure-options-for-packages.patch \
+"
+
+SRC_URI[md5sum] = "e638e8890f743624a754304b3f994f4d"
+SRC_URI[sha256sum] = "c8058393dfa15f47e11ebd2f1d132693f0b3b3b8bf22d0201bfb305026f88a1b"
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+S = "${WORKDIR}/tdb-${PV}"
+
+inherit waf-samba
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+do_install_append() {
+     # add this link for cross check python module existence. eg: on x86-64 host, check python module
+     # under recipe-sysroot which is mips64.
+     cd ${D}${PYTHON_SITEPACKAGES_DIR}; ln -s tdb.*.so tdb.so
+}
+
+PACKAGES += "tdb-tools python3-tdb"
+
+RPROVIDES_${PN}-dbg += "python3-tdb-dbg"
+
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_tdb-tools = "${bindir}/*"
+FILES_python3-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+RDEPENDS_python3-tdb = "python3"
+INSANE_SKIP_${MLPREFIX}python3-tdb = "dev-so"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-libtevent-fix-musl-libc-compile-error.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-libtevent-fix-musl-libc-compile-error.patch
new file mode 100644
index 0000000..e3aeda9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-libtevent-fix-musl-libc-compile-error.patch
@@ -0,0 +1,32 @@
+From 7ba1de909c587b6773a39ba9f6f9890987f35b24 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 11:30:53 +0800
+Subject: [PATCH] libtevent: fix musl libc compile error
+
+libldb depend on libtevent,  build libldb with musl libc,
+will report error:
+tevent.h:1440:8: error: unknown type name 'pid_t'; did you mean 'div_t'?
+
+add missing headers to fix it.
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ tevent.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tevent.h b/tevent.h
+index aa6fe0d..2572696 100644
+--- a/tevent.h
++++ b/tevent.h
+@@ -32,6 +32,8 @@
+ #include <talloc.h>
+ #include <sys/time.h>
+ #include <stdbool.h>
++#include <sys/stat.h>
++#include <sys/types.h>
+ 
+ struct tevent_context;
+ struct tevent_ops;
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch
new file mode 100644
index 0000000..a717f1b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch
@@ -0,0 +1,62 @@
+From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 25 Jan 2019 15:00:59 +0800
+Subject: [PATCH] waf: add support of cross_compile
+
+After upgrade, waf also upgraded.
+
+on 1.5.19, for cross_compile, subprocess.Popen is set to be
+samba_cross.cross_Popen, which will not execute testprog on
+host, but only read result from cross-answers.txt which is
+passed by option --cross-answer
+
+part of old code:
+    args = Utils.to_list(kw.get('exec_args', []))
+    proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE)
+
+but on new version, exec_args is not used and cause do_configure
+failed with Exec format error
+
+fixed by append cross anser related args to cmd
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ third_party/waf/waflib/Tools/c_config.py | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
+index 7608215..767cf33 100644
+--- a/third_party/waf/waflib/Tools/c_config.py
++++ b/third_party/waf/waflib/Tools/c_config.py
+@@ -660,20 +660,21 @@ class test_exec(Task.Task):
+ 	"""
+ 	color = 'PINK'
+ 	def run(self):
++		args = self.generator.bld.kw.get('exec_args', [])
+ 		if getattr(self.generator, 'rpath', None):
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
+-			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args)
++			else: 
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args)
+ 		else:
+ 			env = self.env.env or {}
+ 			env.update(dict(os.environ))
+ 			for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
+ 				env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
+ 			if getattr(self.generator, 'define_ret', False):
+-				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
+ 			else:
+-				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
++				self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env)
+ 
+ @feature('test_exec')
+ @after_method('apply_link')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
new file mode 100644
index 0000000..3589033
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
@@ -0,0 +1,22 @@
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 079761d..07e0104 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -793,8 +793,6 @@ def build(bld):
+     if not bld.CONFIG_SET('HAVE_INET_ATON'):     REPLACE_SOURCE += ' inet_aton.c'
+     if not bld.CONFIG_SET('HAVE_INET_NTOP'):     REPLACE_SOURCE += ' inet_ntop.c'
+     if not bld.CONFIG_SET('HAVE_INET_PTON'):     REPLACE_SOURCE += ' inet_pton.c'
+-    if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+-                                                 REPLACE_SOURCE += ' xattr.c'
+ 
+     if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
+         REPLACE_SOURCE += ' closefrom.c'
+@@ -808,7 +806,7 @@ def build(bld):
+                       # at the moment:
+                       # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+                       private_library=True,
+-                      deps='crypt dl nsl socket rt attr' + extra_libs)
++                      deps='crypt dl nsl socket rt ' + extra_libs)
+ 
+     replace_test_cflags="-Wno-format-zero-length"
+     if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch
new file mode 100644
index 0000000..882af06
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch
@@ -0,0 +1,170 @@
+From b2b19aa9968258b22cf31db0b9dba6bcf96046cf Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 20 Jun 2019 13:55:44 +0800
+Subject: [PATCH] Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 0.9.33.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+Update patch to version 0.10.0
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 89 ++++++++++++++++++++++++++++++++++++++++-------------
+ wscript             |  6 ++++
+ 2 files changed, 74 insertions(+), 21 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 1d01e1e..5cf444a 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -25,6 +25,41 @@ def options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -34,12 +69,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -110,8 +158,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')
+-    conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++        conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.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')
+@@ -380,20 +429,18 @@ def configure(conf):
+ 
+     strlcpy_in_bsd = False
+ 
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                    checklibc=True)
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+diff --git a/wscript b/wscript
+index ded182a..824a6dd 100644
+--- a/wscript
++++ b/wscript
+@@ -25,6 +25,12 @@ def options(opt):
+     opt.RECURSE('lib/replace')
+     opt.RECURSE('lib/talloc')
+ 
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
+ 
+ def configure(conf):
+     conf.RECURSE('lib/replace')
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.10.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.10.1.bb
new file mode 100644
index 0000000..f1b170d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.10.1.bb
@@ -0,0 +1,58 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://tevent.samba.org"
+SECTION = "libs"
+LICENSE = "LGPLv3+"
+
+DEPENDS += "libtalloc libtirpc"
+RDEPENDS_python3-tevent = "python3"
+
+SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
+           file://options-0.10.0.patch \
+           file://0001-libtevent-fix-musl-libc-compile-error.patch \
+           file://0001-waf-add-support-of-cross_compile.patch \
+"
+LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
+
+SRC_URI[md5sum] = "1060eb69d6994a847eecb73c4d391ced"
+SRC_URI[sha256sum] = "79a4da68b38b86ac71d8ac824ee3605ab22a6a91cfa83033a7db73f3dd6910b6"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/tevent-${PV}"
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                 --without-gettext \
+                "
+do_install_append() {
+     # add this link for cross check python module existence. eg: on x86-64 host, check python module
+     # under recipe-sysroot which is mips64. 
+     cd ${D}${PYTHON_SITEPACKAGES_DIR}; ln -s _tevent.*.so _tevent.so
+}
+
+PACKAGES += "python3-tevent"
+
+RPROVIDES_${PN}-dbg += "python3-tevent-dbg"
+
+FILES_python3-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+
+INSANE_SKIP_${MLPREFIX}python3-tevent = "dev-so"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-IFNAMSIZ-is-defined-in-net-if.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-IFNAMSIZ-is-defined-in-net-if.h.patch
new file mode 100644
index 0000000..a7c7093
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-IFNAMSIZ-is-defined-in-net-if.h.patch
@@ -0,0 +1,48 @@
+From 29b37e45577c0921846c1709a190f08a3b032666 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Mar 2019 09:08:38 -0800
+Subject: [PATCH] IFNAMSIZ is defined in net/if.h
+
+Fixes
+/mnt/a/yoe/build/tmp/work/qemuriscv64-yoe-linux-musl/linux-atm/2.5.2-r0/recipe-sysroot/usr/include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
+|  char  arp_dev[IFNAMSIZ];
+|                ^~~~~~~~
+In file included from ../../../linux-atm-2.5.2/src/arpd/itf.c:17:
+/mnt/a/yoe/build/tmp/work/qemuriscv64-yoe-linux-musl/linux-atm/2.5.2-r0/recipe-sysroot/usr/include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
+|  char  arp_dev[IFNAMSIZ];
+|                ^~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/arpd/arp.c | 1 +
+ src/arpd/itf.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/arpd/arp.c b/src/arpd/arp.c
+index 92d3787..ff1574c 100644
+--- a/src/arpd/arp.c
++++ b/src/arpd/arp.c
+@@ -17,6 +17,7 @@
+ #include <netinet/in.h> /* for ntohs, etc. */
+ #define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
+ #include <linux/types.h>
++#include <net/if.h>
+ #include <linux/if_arp.h>
+ #include <linux/if_ether.h>
+ #include <atm.h>
+diff --git a/src/arpd/itf.c b/src/arpd/itf.c
+index 92f0951..d285e3b 100644
+--- a/src/arpd/itf.c
++++ b/src/arpd/itf.c
+@@ -14,6 +14,7 @@
+ #include <sys/socket.h>
+ #define _LINUX_NETDEVICE_H /* glibc2 */
+ #include <linux/types.h>
++#include <net/if.h>
+ #include <linux/if_arp.h>
+ 
+ #include "atmd.h"
+-- 
+2.21.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
new file mode 100644
index 0000000..583a6ca
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
@@ -0,0 +1,74 @@
+From 7cdafc0dee8054f82777ed3bf6d4c8b5582d09ad Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 18 Oct 2016 07:56:02 +0000
+Subject: [PATCH] fix compile error with linux kernel v4.8
+
+In src/maint/zntune.c, the glibc time.h is included before linux
+time.h, so when compile the zntune.c, it break down by errors:
+
+	redefinition of 'struct timespec' 'struct timeval'
+	                'struct timezone' 'struct itimerval'
+
+We should exclude the linux time.h by disable linux/atm_zatm.h and
+move some useful definition in linux/atm_zatm.h to zntune.c to resolve
+it.
+
+Upstream-status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ src/include/atm_zatm.h | 26 ++++++++++++++++++++++++++
+ src/maint/zntune.c     |  3 +--
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+ create mode 100644 src/include/atm_zatm.h
+
+diff --git a/src/include/atm_zatm.h b/src/include/atm_zatm.h
+new file mode 100644
+index 0000000..7d64f4d
+--- /dev/null
++++ b/src/include/atm_zatm.h
+@@ -0,0 +1,26 @@
++#include <linux/atmapi.h>
++#include <linux/atmioc.h>
++
++#define ZATM_GETPOOL    _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
++                                                /* get pool statistics */
++#define ZATM_GETPOOLZ   _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
++                                                /* get statistics and zero */
++#define ZATM_SETPOOL    _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
++
++struct zatm_pool_info {
++        int ref_count;                  /* free buffer pool usage counters */
++        int low_water,high_water;       /* refill parameters */
++        int rqa_count,rqu_count;        /* queue condition counters */
++        int offset,next_off;            /* alignment optimizations: offset */
++        int next_cnt,next_thres;        /* repetition counter and threshold */
++};                                                /* set pool parameters */
++
++struct zatm_pool_req {
++        int pool_num;                   /* pool number */
++        struct zatm_pool_info info;     /* actual information */
++};
++
++#define ZATM_OAM_POOL           0       /* free buffer pool for OAM cells */
++#define ZATM_AAL0_POOL          1       /* free buffer pool for AAL0 cells */
++#define ZATM_AAL5_POOL_BASE     2       /* first AAL5 free buffer pool */
++#define ZATM_LAST_POOL  ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
+diff --git a/src/maint/zntune.c b/src/maint/zntune.c
+index 62d62ab..bb93eab 100644
+--- a/src/maint/zntune.c
++++ b/src/maint/zntune.c
+@@ -13,9 +13,8 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <atm.h>
++#include <atm_zatm.h>
+ #include <sys/time.h> /* for struct timeval, although it's not used */
+-#include <linux/atm_zatm.h>
+-
+ 
+ static void usage(const char *name)
+ {
+-- 
+2.9.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
new file mode 100644
index 0000000..a54869d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
@@ -0,0 +1,59 @@
+From 4456e13880803a300e4b6f263ad22a37481b5df5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Aug 2019 09:33:43 -0700
+Subject: [PATCH] saaldump,atmdump: Include linux/sockios.h for SIOCGSTAMP
+
+In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
+the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
+Instead it provides only SIOCGSTAMP_OLD.
+
+The linux/sockios.h header now defines SIOCGSTAMP using either
+SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
+header file is not pulled so we get a build failure.
+
+Fixes
+../../../linux-atm-2.5.2/src/maint/atmdump.c:142:18: error: use of undeclared identifier 'SIOCGSTAMP'
+            if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                        ^
+1 error generated.
+make[3]: *** [Makefile:623: atmdump.o] Error 1
+make[3]: *** Waiting for unfinished jobs....
+../../../linux-atm-2.5.2/src/maint/saaldump.c:169:14: error: use of undeclared identifier 'SIOCGSTAMP'
+        if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                    ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/maint/atmdump.c  | 2 +-
+ src/maint/saaldump.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/maint/atmdump.c b/src/maint/atmdump.c
+index 8b17826..9e4853b 100644
+--- a/src/maint/atmdump.c
++++ b/src/maint/atmdump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
+diff --git a/src/maint/saaldump.c b/src/maint/saaldump.c
+index 83bdde9..69429a8 100644
+--- a/src/maint/saaldump.c
++++ b/src/maint/saaldump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+-- 
+2.23.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
new file mode 100644
index 0000000..87e7dc3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
@@ -0,0 +1,34 @@
+From b83fd54584fabd5d24f6645b4a3cf345c9d2020d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:11:59 -0700
+Subject: [PATCH 1/3] ttcp: Add printf format string
+
+Fixes compiler warnings when format security is enabled
+
+| ../../../linux-atm-2.5.2/src/test/ttcp.c:666:21: error: format not a string literal and no format arguments [-Werror=format-security]
+|      fprintf(stderr, Usage);
+|                      ^~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/test/ttcp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/ttcp.c b/src/test/ttcp.c
+index acb9185..337cee5 100644
+--- a/src/test/ttcp.c
++++ b/src/test/ttcp.c
+@@ -663,7 +663,7 @@ int no_check = 0;
+     exit(0);
+ 
+   usage:
+-    fprintf(stderr, Usage);
++    fprintf(stderr, "%s", Usage);
+     exit(1);
+ }
+ 
+-- 
+2.13.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
new file mode 100644
index 0000000..0302286
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
@@ -0,0 +1,37 @@
+From fe954b2fb17d813aaab3e926cee76144314a115a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:22:55 -0700
+Subject: [PATCH 3/3] mpoad: Drop old hack to compile with very old glibc
+
+Use poll.h instead of sys/poll.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mpoad/io.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/mpoad/io.c b/src/mpoad/io.c
+index 69900c2..8d1433f 100644
+--- a/src/mpoad/io.c
++++ b/src/mpoad/io.c
+@@ -10,14 +10,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <sys/param.h> /* for OPEN_MAX   */
+-#if __GLIBC__ >= 2
+-#include <sys/poll.h>
+-#else /* ugly hack to make it compile on RH 4.2 - WA */
+-#include <syscall.h>
+-#include <linux/poll.h>
+-#define SYS_poll 168
+-_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
+-#endif
++#include <poll.h>
+ #include <atm.h>
+ #include <linux/types.h>
+ #include <linux/atmioc.h>
+-- 
+2.13.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
new file mode 100644
index 0000000..d1380eb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
@@ -0,0 +1,19 @@
+install binaries from builddir not srcdir.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+--- linux-atm-2.5.2.orig/src/extra/Makefile.am	2010-12-21 05:07:22.000000000 +0800
++++ linux-atm-2.5.2/src/extra/Makefile.am	2014-12-22 10:56:04.458563269 +0800
+@@ -9,9 +9,9 @@ CLEANFILES = pca200e.bin pca200e_ecd.bin
+ 
+ install-exec-hook:
+ 	$(MKDIR_P) $(DESTDIR)/lib/firmware
+-	$(INSTALL_DATA) $(srcdir)/pca200e.bin $(DESTDIR)/lib/firmware
+-	$(INSTALL_DATA) $(srcdir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
+-	$(INSTALL_DATA) $(srcdir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
++	$(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)/lib/firmware
++	$(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
++	$(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
+ 
+ %.bin %.bin2: %.data
+ 	objcopy -Iihex $< -Obinary $@.gz
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
new file mode 100644
index 0000000..62fad2a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
@@ -0,0 +1,38 @@
+LDFLAGS_FOR_BUILD should be required when doing link for qgen.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp linux-atm-2.5.2.orig/configure.in linux-atm-2.5.2/configure.in
+--- linux-atm-2.5.2.orig/configure.in	2010-12-28 23:36:07.000000000 +0800
++++ linux-atm-2.5.2/configure.in	2014-12-22 10:25:23.830510932 +0800
+@@ -66,6 +66,7 @@ else
+ fi
+ AC_SUBST(CC_FOR_BUILD)
+ AC_SUBST(CFLAGS_FOR_BUILD)
++AC_SUBST(LDFLAGS_FOR_BUILD)
+ dnl Add -d flag to bison/yacc to create intermediate .h files
+ YACC="$YACC -d"
+ 
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.am linux-atm-2.5.2/src/qgen/Makefile.am
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.am	2010-12-28 22:29:31.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.am	2014-12-22 10:23:51.914508318 +0800
+@@ -5,7 +5,7 @@ qgen_SOURCES = common.c common.h file.c
+ qgen_LDADD = -lfl
+ 
+ COMPILE = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@
+-LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ -o $@
++LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ @LDFLAGS_FOR_BUILD@ -o $@
+ 
+ #TESTS = $(check_PROGRAMS)
+ 
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.in linux-atm-2.5.2/src/qgen/Makefile.in
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.in	2010-12-29 00:06:11.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.in	2014-12-22 10:23:51.914508318 +0800
+@@ -106,6 +106,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch
new file mode 100644
index 0000000..25211d7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch
@@ -0,0 +1,37 @@
+Description: musl lacks on_exit
+Author: Adrian Bunk <bunk@stusta.de>
+
+Only prints a trace on nonzero exit(),
+so can safely be disabled in musl builds.
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Inappropriate [musl specific]
+
+--- linux-atm-2.5.1.orig/src/sigd/atmsigd.c
++++ linux-atm-2.5.1/src/sigd/atmsigd.c
+@@ -283,6 +283,7 @@ static void setup_signals(void)
+ /* ------------------------------- main ...  ------------------------------- */
+ 
+ 
++#if 0
+ static void trace_on_exit(int status,void *dummy)
+ {
+     char path[PATH_MAX+1];
+@@ -300,6 +301,7 @@ static void trace_on_exit(int status,voi
+     dump_trace(file,"Message trace (after error exit)");
+     if (file != stderr) (void) fclose(file);
+ }
++#endif
+ 
+ 
+ static void manual_override(void)
+@@ -517,7 +519,9 @@ int main(int argc,char **argv)
+ 	    exit(0);
+ 	}
+     }
++#if 0
+     (void) on_exit(trace_on_exit,NULL);
++#endif
+     poll_loop();
+     close_all();
+     for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
new file mode 100644
index 0000000..e594906
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Drivers and tools to support ATM networking under Linux"
+HOMEPAGE = "http://linux-atm.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "GPL-2.0 & LGPL-2.0"
+
+DEPENDS = "flex flex-native"
+
+SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+           file://link-with-ldflags.patch \
+           file://install-from-buildir.patch \
+           file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \
+           file://0001-ttcp-Add-printf-format-string.patch \
+           file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
+           file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
+           file://0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch \
+"
+
+SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch"
+
+SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8"
+SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
+
+LIC_FILES_CHKSUM = "\
+file://COPYING;md5=d928de9537d846935a98af3bbc6e6ee1 \
+file://COPYING.GPL;md5=ac2db169b9309e240555bc77be4f1a33 \
+file://COPYING.LGPL;md5=6e29c688d912da12b66b73e32b03d812"
+
+inherit autotools pkgconfig
+
+# The firmware is explicitly put under /lib when installed.
+#
+
+FILES_${PN} += "/lib/firmware"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-0b0dce7a36fb-actually-belongs-to-v4.19.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-0b0dce7a36fb-actually-belongs-to-v4.19.patch
new file mode 100644
index 0000000..7599b1b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-0b0dce7a36fb-actually-belongs-to-v4.19.patch
@@ -0,0 +1,31 @@
+From e5952a0cdfa8b1b56a5823574835f1f771f14ae0 Mon Sep 17 00:00:00 2001
+From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Date: Fri, 24 Aug 2018 09:53:00 -0300
+Subject: [PATCH] build: 0b0dce7a36fb actually belongs to v4.19
+
+Typo or not, this commit actually belongs to v4.19 and made me wonder why
+on v4.18 it didn't find this feature.
+
+Fixes: 817f0bfa248f ("build: add two defines for Peer Address Parameters extensions on sctp_paddrparams")
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Reviewed-by: Xin Long <lucien.xin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f55775a..5de5c76 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -101,7 +101,7 @@ LKSCTP_CHECK_TYPE([struct sctp_prinfo], [HAVE_SCTP_SENDV])
+ # added on v4.16, 30f6ebf65bc4
+ LKSCTP_CHECK_DECL([SCTP_AUTH_NO_AUTH], [HAVE_SCTP_AUTH_NO_AUTH])
+ 
+-# New members to sctp_paddrparams, added on v4.18, 0b0dce7a36fb
++# New members to sctp_paddrparams, added on v4.19, 0b0dce7a36fb
+ LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_ipv6_flowlabel],
+ 		    [HAVE_SCTP_SPP_IPV6_FLOWLABEL])
+ LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_dscp],
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-netinet-sctp.h-not-to-be-installed.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-netinet-sctp.h-not-to-be-installed.patch
new file mode 100644
index 0000000..03c6c4f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-netinet-sctp.h-not-to-be-installed.patch
@@ -0,0 +1,35 @@
+From 378560050a8f93786c590cc99a55461666205b61 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Fri, 24 Aug 2018 01:13:32 +0800
+Subject: [PATCH] build: fix netinet/sctp.h not to be installed
+
+After libcnetinet_HEADERS was set to sctp.h.in, netinet/sctp.h can
+no longer be installed into ${includedir}.
+
+Since "AC_CONFIG_HEADERS([src/include/netinet/sctp.h])" is already
+added into configure.ac, there's no need to generate sctp.h by
+automake.
+
+So we simply set libcnetinet_HEADERS back to sctp.h.
+
+Fixes: 9607dd85e70a ("netinet/sctp.h: dynamically build based on system setup")
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+---
+ src/include/netinet/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/include/netinet/Makefile.am b/src/include/netinet/Makefile.am
+index ca0aac2..965db8c 100644
+--- a/src/include/netinet/Makefile.am
++++ b/src/include/netinet/Makefile.am
+@@ -11,5 +11,4 @@ libcnetinetdir = $(includedir)/netinet
+ # API.
+ include_HEADERS =
+ 
+-libcnetinet_HEADERS = sctp.h.in
+-BUILT_SOURCES = sctp.h
++libcnetinet_HEADERS = sctp.h
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-probing-for-HAVE_SCTP_SENDV.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-probing-for-HAVE_SCTP_SENDV.patch
new file mode 100644
index 0000000..89c8983
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-fix-probing-for-HAVE_SCTP_SENDV.patch
@@ -0,0 +1,35 @@
+From 596efd6631b83069d41782fb0ee2d6cf76a50dfa Mon Sep 17 00:00:00 2001
+From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Date: Fri, 24 Aug 2018 09:52:59 -0300
+Subject: [PATCH] build: fix probing for HAVE_SCTP_SENDV
+
+Somehow it was using a type that is non-existent. The right one is
+sctp_prinfo, introduced on ed63afb8a318 ("sctp: add support for PR-SCTP
+Information for sendmsg"), present on v4.17.
+
+Fixes: 1b798f1ca3b5 ("build: add define HAVE_SCTP_AUTH_NO_AUTH")
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Reviewed-by: Xin Long <lucien.xin@gmail.com>
+---
+ configure.ac | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dad658c..f55775a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -94,9 +94,8 @@ LKSCTP_CHECK_MEMBER([struct sctp_pdapi_event.pdapi_stream],
+ LKSCTP_CHECK_MEMBER([struct sctp_pdapi_event.pdapi_seq],
+ 		    [HAVE_SCTP_PDAPI_EVENT_PDAPI_SEQ])
+ 
+-# PR-SCTP field used to probe for sendv/recvv support, added on v4.17
+-LKSCTP_CHECK_MEMBER([struct sendv_prinfo.sctp_prinfo],
+-		    [HAVE_SCTP_SENDV])
++# PR-SCTP struct used to probe for sendv/recvv support, added on v4.17
++LKSCTP_CHECK_TYPE([struct sctp_prinfo], [HAVE_SCTP_SENDV])
+ 
+ # This event indicates that the peer does not support SCTP authentication,
+ # added on v4.16, 30f6ebf65bc4
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-remove-v4.12-secondary-defines-in-favor-of-HAV.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-remove-v4.12-secondary-defines-in-favor-of-HAV.patch
new file mode 100644
index 0000000..d22cda6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-build-remove-v4.12-secondary-defines-in-favor-of-HAV.patch
@@ -0,0 +1,52 @@
+From db6d15bf12a0123e4320e5fd7cb688331dea1bdc Mon Sep 17 00:00:00 2001
+From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Date: Fri, 24 Aug 2018 09:52:58 -0300
+Subject: [PATCH] build: remove v4.12 secondary defines in favor of
+ HAVE_SCTP_STREAM_RECONFIG
+
+These were backups, commented out since beginning.
+HAVE_SCTP_STREAM_RECONFIG is enough to identify that these are there, so
+lets use only one.
+
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Reviewed-by: Xin Long <lucien.xin@gmail.com>
+---
+ configure.ac                  | 8 --------
+ src/include/netinet/sctp.h.in | 2 --
+ 2 files changed, 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2ae36ec..dad658c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,14 +82,6 @@ AC_CHECK_FUNCS([bzero gethostbyname gettimeofday memmove memset select socket \
+ LKSCTP_CHECK_MEMBER([struct sctp_event_subscribe.sctp_stream_reset_event],
+ 		    [HAVE_SCTP_STREAM_RESET_EVENT])
+ 
+-# Support for assoc reset event, added on v4.12, c95129d127c6
+-#LKSCTP_CHECK_MEMBER([struct sctp_event_subscribe.sctp_assoc_reset_event], \
+-#		    [HAVE_SCTP_ASSOC_RESET_EVENT])
+-
+-# Support for stream change event, added on v4.12, b444153fb5a6
+-#LKSCTP_CHECK_MEMBER([struct sctp_event_subscribe.sctp_stream_change_event], \
+-#		    [HAVE_SCTP_STREAM_CHANGE_EVENT])
+-
+ # RFC 6525 (Stream Reconf), finished on v4.12, c0d8bab6ae51
+ LKSCTP_CHECK_DECL([SCTP_RECONFIG_SUPPORTED], [HAVE_SCTP_STREAM_RECONFIG])
+ 
+diff --git a/src/include/netinet/sctp.h.in b/src/include/netinet/sctp.h.in
+index c049077..2009f1c 100644
+--- a/src/include/netinet/sctp.h.in
++++ b/src/include/netinet/sctp.h.in
+@@ -61,8 +61,6 @@ extern "C" {
+ #define HAVE_SCTP_CANSET_PRIMARY
+ 
+ #undef HAVE_SCTP_STREAM_RESET_EVENT
+-#undef HAVE_SCTP_ASSOC_RESET_EVENT
+-#undef HAVE_SCTP_STREAM_CHANGE_EVENT
+ #undef HAVE_SCTP_STREAM_RECONFIG
+ #undef HAVE_SCTP_PEELOFF_FLAGS
+ #undef HAVE_SCTP_PDAPI_EVENT_PDAPI_STREAM
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-configure.ac-add-CURRENT-REVISION-and-AGE-for-libsct.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-configure.ac-add-CURRENT-REVISION-and-AGE-for-libsct.patch
new file mode 100644
index 0000000..bec9bf0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-configure.ac-add-CURRENT-REVISION-and-AGE-for-libsct.patch
@@ -0,0 +1,71 @@
+From 7de2bd7e769f10521e3d0c2cb42c6f6b9b505dd0 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Thu, 16 Aug 2018 14:12:30 +0800
+Subject: [PATCH] configure.ac: add CURRENT REVISION and AGE for libsctp and
+ libwithsctp
+
+Add CURRENT REVISION and AGE for libsctp and libwithsctp in
+configure.ac to update these 2 library version information.
+
+Compatible with before, they will start from 1:18:0. But each
+will get updated according to their definitions in the future.
+
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Acked-by: Neil Horman <nhorman@tuxdriver.com>
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+---
+ configure.ac             | 7 +++++++
+ src/lib/Makefile.am      | 7 +++++--
+ src/withsctp/Makefile.am | 3 ++-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 275ef4e..2ae36ec 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -14,6 +14,13 @@ dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE,
+ dnl configure will fail ...)
+ 
+ AC_INIT([lksctp-tools], [1.0.18], [], [], [http://www.lksctp.org/])
++AC_SUBST(LIBSCTP_CURRENT, 1)
++AC_SUBST(LIBSCTP_REVISION, 18)
++AC_SUBST(LIBSCTP_AGE, 0)
++AC_SUBST(LIBWITHSCTP_CURRENT, 1)
++AC_SUBST(LIBWITHSCTP_REVISION, 18)
++AC_SUBST(LIBWITHSCTP_AGE, 0)
++
+ AC_CONFIG_AUX_DIR(bin)
+ AC_CONFIG_SRCDIR([src/apps/sctp_darn.c])
+ AC_CONFIG_HEADERS([config.h])
+diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
+index 6100c56..1d62175 100644
+--- a/src/lib/Makefile.am
++++ b/src/lib/Makefile.am
+@@ -8,5 +8,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include
+ 
+ lib_LTLIBRARIES = libsctp.la
+ 
+-libsctp_la_SOURCES = bindx.c connectx.c peeloff.c opt_info.c addrs.c sendmsg.c recvmsg.c Versions.map
+-libsctp_la_LDFLAGS = -version-info 1:17:0 -Wl,--version-script=$(srcdir)/Versions.map
++libsctp_la_SOURCES = bindx.c connectx.c peeloff.c opt_info.c \
++		addrs.c sendmsg.c recvmsg.c Versions.map
++libsctp_la_LDFLAGS = -version-info \
++		@LIBSCTP_CURRENT@:@LIBSCTP_REVISION@:@LIBSCTP_AGE@ \
++		-Wl,--version-script=$(srcdir)/Versions.map
+diff --git a/src/withsctp/Makefile.am b/src/withsctp/Makefile.am
+index 70b1cca..1f6ca37 100644
+--- a/src/withsctp/Makefile.am
++++ b/src/withsctp/Makefile.am
+@@ -14,7 +14,8 @@ AM_CPPFLAGS=-I$(top_srcdir)/src/include
+ pkglib_LTLIBRARIES = libwithsctp.la
+ libwithsctp_la_SOURCES = sctp_load_libs.c sctp_socket.c sctp_bind.c \
+ 	sctp_sockopt.c sctp_socket.h
+-libwithsctp_la_LDFLAGS = -version-info 1:17:0 -ldl
++libwithsctp_la_LDFLAGS = -version-info \
++	@LIBWITHSCTP_CURRENT@:@LIBWITHSCTP_REVISION@:@LIBWITHSCTP_AGE@ -ldl
+ 
+ pkgdoc_DATA = sctp_load_libs.c sctp_socket.c sctp_bind.c \
+ 	sctp_sockopt.c sctp_socket.h checksctp.c
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-test_1_to_1_events.c-initialize-event-properly.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-test_1_to_1_events.c-initialize-event-properly.patch
new file mode 100644
index 0000000..621e6f4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-test_1_to_1_events.c-initialize-event-properly.patch
@@ -0,0 +1,44 @@
+From e1e670defb84d51efdd124e5f3fa166a1a4b7c1d Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Tue, 25 Sep 2018 11:39:43 +0800
+Subject: [PATCH] test_1_to_1_events.c: initialize event properly
+
+Initialize event properly to avoid below
+Segmentation fault when run below test
+related to AUTH_NO_AUTH.
+
+ # ./test_1_to_1_events
+test_1_to_1_events.c 1 PASS : COMM_UP notification on client socket - SUCCESS
+test_1_to_1_events.c 2 PASS : COMM_UP notification on server socket - SUCCESS
+test_1_to_1_events.c 3 BROK : Got a datamsg, expecting notification
+DUMP_CORE sctputil.c: 187
+[ 1468.733938] test_1_to_1_eve[2376]: segfault at 0 ip 0000561a4a3d5079 sp 00007ffd49101580 error 6 in test_1_to_1_events[561a4a3d4000+2000]
+[ 1468.734479] Code: ff bf 0a 00 00 00 e8 e6 ef ff ff b9 c9 00 00 00 48 8d 15 61 13 00 00 bf 01 00 00 00 31 c0 48 8d 35 c7 0f 00 00 e8 97 f0
+Segmentation fault
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ src/func_tests/test_1_to_1_events.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/func_tests/test_1_to_1_events.c b/src/func_tests/test_1_to_1_events.c
+index 46439bf..a086832 100644
+--- a/src/func_tests/test_1_to_1_events.c
++++ b/src/func_tests/test_1_to_1_events.c
+@@ -92,9 +92,11 @@ main(int argc, char *argv[])
+ 	/* Create the client socket.  */
+ 	clt_sk = test_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
+ 
++	memset(&event, 0, sizeof(event));
+ 	event.sctp_data_io_event = 1;
+ 	event.sctp_association_event = 1;
+ 	event.sctp_shutdown_event = 1;
++	event.sctp_authentication_event = 1;
+ 	len = sizeof(struct sctp_event_subscribe);
+ 	test_setsockopt(svr_sk, SCTP_EVENTS, &event, len);
+ 	test_setsockopt(clt_sk, SCTP_EVENTS, &event, len);
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch
new file mode 100644
index 0000000..2537bb9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch
@@ -0,0 +1,43 @@
+From 7c0ef4d441b3833e721df58f56e2cb8c81b34df4 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Thu, 16 Aug 2018 14:12:01 +0800
+Subject: [PATCH] withsctp: use @PACKAGE_VERSION@ in withsctp.h
+
+use @PACKAGE_VERSION@ to replace the hardcode version.
+
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Acked-by: Neil Horman <nhorman@tuxdriver.com>
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+---
+ Makefile.rules           | 3 ++-
+ src/withsctp/withsctp.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 83f5f0c..d3693fa 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -15,4 +15,5 @@
+ edit = @sed \
+ 	-e "s|\@bindir\@|$(bindir)|" \
+ 	-e "s|\@libdir\@|$(libdir)|" \
+-	-e "s|\@PACKAGE\@|$(PACKAGE)|"
++	-e "s|\@PACKAGE\@|$(PACKAGE)|" \
++	-e "s|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|"
+diff --git a/src/withsctp/withsctp.in b/src/withsctp/withsctp.in
+index 7f182ba..fda5ebc 100644
+--- a/src/withsctp/withsctp.in
++++ b/src/withsctp/withsctp.in
+@@ -2,7 +2,8 @@
+ # -*- sh -*-
+ LIBDIR=@libdir@/@PACKAGE@
+ BINDIR=@bindir@
+-export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.17
++LIBVER=@PACKAGE_VERSION@
++export LD_PRELOAD=${LIBDIR}/libwithsctp.so.${LIBVER}
+ if ! ${BINDIR}/checksctp 2> /dev/null
+ then
+     ${BINDIR}/checksctp;
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest
new file mode 100644
index 0000000..e67f18e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sh v4test.sh
+sh v6test.sh
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh
new file mode 100644
index 0000000..5130856
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v4test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo "v4test starting:"
+for t in $(find -maxdepth 1 -type f \! -name test\*_v6 -name test\*); do
+  echo "$t";
+  if $t; then
+    echo "PASS: $t"; echo "";
+  else
+    echo "FAIL: $t"; echo "";
+  fi
+  sleep 1;
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh
new file mode 100644
index 0000000..3a667df
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools/v6test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo "v6test starting:"
+for t in $(find -maxdepth 1 -name test\*_v6); do
+  echo "$t";
+  if $t; then
+    echo "PASS: $t"; echo "";
+  else
+    echo "FAIL: $t"; echo "";
+  fi
+  sleep 1;
+done
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb
new file mode 100644
index 0000000..3cabc4f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb
@@ -0,0 +1,70 @@
+SUMMARY = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project"
+HOMEPAGE = "http://lksctp.org"
+SECTION = "net"
+LICENSE = "LGPLv2.1 & GPLv2"
+
+LIC_FILES_CHKSUM = " \
+    file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \
+    file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \
+"
+
+SRCREV = "1b077af62d83d53c34b1bde8bad6648149d5edf9"
+
+PV .= "+git${SRCPV}"
+LK_REL = "1.0.18"
+
+SRC_URI = " \
+    git://github.com/sctp/lksctp-tools.git \
+    file://0001-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch \
+    file://0001-configure.ac-add-CURRENT-REVISION-and-AGE-for-libsct.patch \
+    file://0001-build-fix-netinet-sctp.h-not-to-be-installed.patch \
+    file://0001-build-remove-v4.12-secondary-defines-in-favor-of-HAV.patch \
+    file://0001-build-fix-probing-for-HAVE_SCTP_SENDV.patch \
+    file://0001-build-0b0dce7a36fb-actually-belongs-to-v4.19.patch \
+    file://0001-test_1_to_1_events.c-initialize-event-properly.patch \
+    file://run-ptest \
+    file://v4test.sh \
+    file://v6test.sh \
+"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools-brokensep pkgconfig binconfig ptest
+
+do_install_ptest () {
+    install -m 0755 ${WORKDIR}/v4test.sh ${D}${PTEST_PATH}
+    install -m 0755 ${WORKDIR}/v6test.sh ${D}${PTEST_PATH}
+    for testcase in `find ${B}/src/apps/.libs ${B}/src/func_tests/.libs -maxdepth 1 -type f -executable`; do
+        install $testcase ${D}${PTEST_PATH}
+    done
+}
+
+SOLIBVERSION="${LK_REL}"
+SOLIBMAJORVERSION="1"
+
+PACKAGES =+ "${PN}-withsctp ${PN}-utils"
+
+FILES_${PN} = " \
+    ${libdir}/libsctp.so.${SOLIBVERSION} \
+    ${libdir}/libsctp.so.${SOLIBMAJORVERSION} \
+"
+
+FILES_${PN}-withsctp = " \
+    ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBVERSION} \
+    ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBMAJORVERSION} \
+"
+
+FILES_${PN}-dev += " \
+    ${libdir}/libsctp.so \
+    ${libdir}/lksctp-tools/libwithsctp.so \
+    ${datadir}/lksctp-tools/*.c \
+    ${datadir}/lksctp-tools/*.h \
+"
+
+FILES_${PN}-utils = "${bindir}/*"
+
+RRECOMMENDS_${PN} += "kernel-module-sctp"
+RRECOMMENDS_${PN}-utils += "kernel-module-sctp"
+RRECOMMENDS_${PN}-ptest += "kernel-module-sctp"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch
new file mode 100644
index 0000000..8e906f7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-build-errors-with-clang.patch
@@ -0,0 +1,34 @@
+From 5f9e80acb0a1ac399839bf160e43f6120c4b5128 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Oct 2016 23:49:09 +0000
+Subject: [PATCH] Fix build errors with clang
+
+| ../../../../../../../workspace/sources/lowpan-tools/src/coordinator.c:313:50: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
+|                 fprintf(stderr, "Opt: %c (%hhx)\n", (char)opt, opt);
+|                                           ~~~~                 ^~~
+|                                           %x
+| 1 error generated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..f0de6d2 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -310,7 +310,7 @@ int main(int argc, char **argv)
+ #else
+ 		opt = getopt(argc, argv, "l:f:d:m:n:i:s:p:c:hv");
+ #endif
+-		fprintf(stderr, "Opt: %c (%hhx)\n", opt, opt);
++		fprintf(stderr, "Opt: %c (%hhx)\n", opt, (unsigned char)opt);
+ 		if (opt == -1)
+ 			break;
+ 
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-potential-string-truncation-in-strncpy.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-potential-string-truncation-in-strncpy.patch
new file mode 100644
index 0000000..e621d8f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-potential-string-truncation-in-strncpy.patch
@@ -0,0 +1,139 @@
+From 58b6d9a2efe101e5b80fd708e6f84c7ca779ce93 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 May 2018 20:27:43 -0700
+Subject: [PATCH] Fix potential string truncation in strncpy()
+
+GCC 8 complains about the string truncation during copy
+
+error: 'strncpy' specified bound 16 equals destination size
+
+Upstream-Status: Inappropriate [depricated component]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/listen-packet.c | 3 ++-
+ tests/listen.c        | 3 ++-
+ tests/test2.c         | 4 ++--
+ tests/test3.c         | 3 ++-
+ tests/test4.c         | 3 ++-
+ tests/test5.c         | 3 ++-
+ tests/test6.c         | 3 ++-
+ tests/test7.c         | 3 ++-
+ 8 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/tests/listen-packet.c b/tests/listen-packet.c
+index e40af81..eae0c71 100644
+--- a/tests/listen-packet.c
++++ b/tests/listen-packet.c
+@@ -50,7 +50,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, iface, IF_NAMESIZE);
++	strncpy(req.ifr_name, iface, IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFINDEX, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFINDEX");
+diff --git a/tests/listen.c b/tests/listen.c
+index 75c320b..5ce1ed9 100644
+--- a/tests/listen.c
++++ b/tests/listen.c
+@@ -47,7 +47,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, iface, IFNAMSIZ);
++	strncpy(req.ifr_name, iface, IFNAMSIZ - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test2.c b/tests/test2.c
+index 58eb74b..5d02838 100644
+--- a/tests/test2.c
++++ b/tests/test2.c
+@@ -45,8 +45,8 @@ int main(int argc, char **argv) {
+ 		perror("socket");
+ 		return 1;
+ 	}
+-
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test3.c b/tests/test3.c
+index fb36627..2f50a5a 100644
+--- a/tests/test3.c
++++ b/tests/test3.c
+@@ -46,7 +46,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test4.c b/tests/test4.c
+index 33c274c..8737149 100644
+--- a/tests/test4.c
++++ b/tests/test4.c
+@@ -46,7 +46,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test5.c b/tests/test5.c
+index 4439dfa..28db562 100644
+--- a/tests/test5.c
++++ b/tests/test5.c
+@@ -45,7 +45,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFADDR, &req);
+ 	if (ret < 0) {
+ 		perror("ioctl: SIOCGIFADDR");
+diff --git a/tests/test6.c b/tests/test6.c
+index e375bfb..ce7de59 100644
+--- a/tests/test6.c
++++ b/tests/test6.c
+@@ -45,7 +45,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFADDR, &req);
+ 	if (ret < 0) {
+ 		perror("ioctl: SIOCGIFADDR");
+diff --git a/tests/test7.c b/tests/test7.c
+index e9a5a55..37da22d 100644
+--- a/tests/test7.c
++++ b/tests/test7.c
+@@ -58,7 +58,8 @@ int main(int argc, char **argv) {
+ 	if (ret)
+ 		perror("setsockopt");
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
new file mode 100644
index 0000000..1453b75
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
@@ -0,0 +1,32 @@
+From a36afac485745cf980fba1809526f2025cb4d101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Apr 2017 00:16:45 -0700
+Subject: [PATCH] Remove newline from format line
+
+Fixes
+
+error: '__builtin___snprintf_chk' output truncated before the last format character [-Werror=format-truncation=]
+     "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+                                               ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ addrdb/addrdb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/addrdb/addrdb.c b/addrdb/addrdb.c
+index 4bb7f79..05d53f3 100644
+--- a/addrdb/addrdb.c
++++ b/addrdb/addrdb.c
+@@ -178,7 +178,7 @@ int addrdb_dump_leases(const char *lease_file)
+ 			continue;
+ 		}
+ 		snprintf(hwaddr_buf, sizeof(hwaddr_buf),
+-				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
++				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
+ 				lease->hwaddr[0], lease->hwaddr[1],
+ 				lease->hwaddr[2], lease->hwaddr[3],
+ 				lease->hwaddr[4], lease->hwaddr[5],
+-- 
+2.12.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch
new file mode 100644
index 0000000..0a81a22
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch
@@ -0,0 +1,44 @@
+From ab725a3faaeead90ae3c63cbcd370af087c413a5 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Mon, 27 Mar 2017 17:55:06 -0700
+Subject: [PATCH] addrdb/coord-config-parse.y: add missing <time.h> include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The %union definition uses the time_t structure. In order to use this
+structure, the <time.h> header has to be included. Otherwise, the build
+breaks with some C libraries, such as musl:
+
+In file included from coord-config-lex.l:23:0:
+coord-config-parse.y:107:2: error: unknown type name ‘time_t’
+  time_t timestamp;
+  ^
+
+This patch includes <time.h> using the '%code requires' directive of
+Yacc.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ addrdb/coord-config-parse.y | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y
+index 2e10a88..85ee058 100644
+--- a/addrdb/coord-config-parse.y
++++ b/addrdb/coord-config-parse.y
+@@ -102,6 +102,10 @@
+ 
+ %}
+ 
++%code requires {
++#include <time.h>
++}
++
+ %union {
+ 	unsigned long number;
+ 	time_t timestamp;
+-- 
+2.12.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
new file mode 100644
index 0000000..493832b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
@@ -0,0 +1,30 @@
+From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Apr 2018 14:31:05 -0700
+Subject: [PATCH] coordinator: Fix strncpy range warning
+
+Fixes
+error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..ca49418 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -296,7 +296,8 @@ int main(int argc, char **argv)
+ 	if(!lease_file)
+ 		lease_file = LEASE_FILE;
+ 
+-	strncpy(pname, argv[0], PATH_MAX);
++	strncpy(pname, argv[0], PATH_MAX - 1);
++	pname[PATH_MAX - 1] = '\0';
+ 
+ 	pid_file = getenv("PID_FILE");
+ 	if (!pid_file)
+-- 
+2.16.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch
new file mode 100644
index 0000000..6839306
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch
@@ -0,0 +1,27 @@
+From ad088233608ba2205511da4f270f8ba29844b84c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Apr 2017 09:02:02 -0700
+Subject: [PATCH] src/iz.c: Undef dprintf before redefining
+
+Clang is picky and warns about macros redefinition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/iz.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/iz.c b/src/iz.c
+index 32be1a8..886f0a5 100644
+--- a/src/iz.c
++++ b/src/iz.c
+@@ -60,6 +60,7 @@ static int iz_seq = 0;
+ /* Parsed options */
+ static int iz_debug = 0;
+ 
++#undef dprintf
+ #define dprintf(lvl, fmt...)			\
+ 	do {					\
+ 		if (iz_debug >= lvl)		\
+-- 
+2.12.2
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch
new file mode 100644
index 0000000..9ecd707
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch
@@ -0,0 +1,41 @@
+Disable building manpages so that make install doesn't fail due to lack of help2man
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 46c4017..d6ed312 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,11 +9,6 @@ izcoordinator_DESC = "simple coordinator for IEEE 802.15.4 network"
+ iz_DESC = "configure an IEEE 802.15.4 interface"
+ izchat_DESC = "simple chat program using IEEE 802.15.4"
+ 
+-if MANPAGES
+-dist_man_MANS = $(manpages)
+-endif
+-EXTRA_DIST = $(manpages)
+-
+ izattach_SOURCES = serial.c
+ 
+ iz_SOURCES = iz.c iz-common.c iz-mac.c iz-phy.c
+@@ -27,18 +22,6 @@ izcoordinator_LDADD = ../addrdb/libaddrdb.la $(LDADD) $(NL_LIBS) $(LEXLIB)
+ iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE
+ iz_LDADD = $(LDADD) $(NL_LIBS)
+ 
+-izattach.8: $(izattach_SOURCES) $(top_srcdir)/configure.ac
+-	-$(HELP2MAN) -o $@ -s 8 -N -n $(izattach_DESC) $(builddir)/izattach
+-
+-izcoordinator.8: $(izcoordinator_SOURCES) $(top_srcdir)/configure.ac
+-	-$(HELP2MAN) -o $@ -s 8 -N -n $(izcoordinator_DESC) $(builddir)/izcoordinator
+-
+-iz.8: $(iz_SOURCES) $(top_srcdir)/configure.ac
+-	-$(HELP2MAN) -o $@ -s 8 -N -n $(iz_DESC) $(builddir)/iz
+-
+-izchat.1: $(izchat_SOURCES) $(top_srcdir)/configure.ac
+-	-$(HELP2MAN) -o $@ -s 1 -N -n $(izchat_DESC) $(builddir)/izchat
+-
+ install-data-hook:
+ 	$(mkinstalldirs) $(DESTDIR)`dirname $(leasefile)`
+ 	$(mkinstalldirs) $(DESTDIR)`dirname $(pidfile)`
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
new file mode 100644
index 0000000..5917cfb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Utilities for managing the Linux LoWPAN stack"
+DESCRIPTION = "This is a set of utils to manage the Linux LoWPAN stack. \
+The LoWPAN stack aims for IEEE 802.15.4-2003 (and for lesser extent IEEE 802.15.4-2006) compatibility."
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "flex-native bison-native libnl python"
+
+PV = "0.3.1+git${SRCPV}"
+SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
+           file://no-help2man.patch \
+           file://0001-Fix-build-errors-with-clang.patch \
+           file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
+           file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
+           file://0001-Remove-newline-from-format-line.patch \
+           file://0001-coordinator-Fix-strncpy-range-warning.patch \
+           file://0001-Fix-potential-string-truncation-in-strncpy.patch \
+           "
+SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
+
+S = "${WORKDIR}/git"
+
+inherit autotools python3-dir pkgconfig
+
+CACHED_CONFIGUREVARS += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}/lowpan-tools"
+
+CFLAGS += "-Wno-initializer-overrides"
+
+do_install_append() {
+    rmdir ${D}${localstatedir}/run
+}
+
+FILES_${PN}-dbg += "${libexecdir}/lowpan-tools/.debug/"
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${libdir}/python*"
+
+PNBLACKLIST[lowpan-tools] = "WARNING these tools are deprecated! Use wpan-tools instead"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger/0001-Fix-musl-build.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger/0001-Fix-musl-build.patch
new file mode 100644
index 0000000..d36087d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger/0001-Fix-musl-build.patch
@@ -0,0 +1,31 @@
+From 12d1cc9da14b0cd0265bca3c4289a335ddf2e357 Mon Sep 17 00:00:00 2001
+From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+Date: Mon, 8 Apr 2019 21:00:20 +0200
+Subject: [PATCH] Fix musl build
+
+Fixes compilation error on musl:
+| ../macchanger-1.7.0/src/netinfo.c:116:26: error: expected ';' before 'epa'
+|   req.ifr_data = (caddr_t)epa;
+
+Missing data type is defined in <sys/types.h>.
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+---
+ src/netinfo.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/netinfo.c b/src/netinfo.c
+index 3525123..1aa3293 100644
+--- a/src/netinfo.c
++++ b/src/netinfo.c
+@@ -28,6 +28,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ 
+ #include <linux/ethtool.h>
+ #include <linux/sockios.h>
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.7.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.7.0.bb
new file mode 100644
index 0000000..6506fd8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/macchanger/macchanger_1.7.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Tool to view/change network interface MAC addresses"
+DESCRIPTION = "A GNU/Linux utility for viewing/manipulating the MAC address of network interfaces."
+HOMEPAGE = "https://github.com/alobbs/macchanger"
+LICENSE  = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+SECTION = "net"
+
+SRC_URI = "https://github.com/alobbs/macchanger/releases/download/${PV}/${BPN}-${PV}.tar.gz \
+           file://0001-Fix-musl-build.patch \
+"
+SRC_URI[md5sum] = "ca56f16142914337391dac91603eb332"
+SRC_URI[sha256sum] = "dae2717c270fd5f62d790dbf80c19793c651b1b26b62c101b82d5fdf25a845bf"
+
+FILES_${PN} = " \
+    ${bindir}/${BPN} \
+    ${datadir}/${BPN}/wireless.list \
+    ${datadir}/${BPN}/OUI.list \
+"
+
+FILES_${PN}-doc = " \
+    ${datadir}/info \
+    ${datadir}/man \
+"
+
+inherit autotools
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
new file mode 100644
index 0000000..544b840
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
@@ -0,0 +1,32 @@
+memcached: add knob to detect whether hugetlbfs are checked
+
+Add knob to detect whether hugetlbfs are checked or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7f22f21..21691b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -314,7 +314,12 @@ fi
+ dnl ----------------------------------------------------------------------------
+ 
+ AC_SEARCH_LIBS(umem_cache_create, umem)
+-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
++AC_ARG_ENABLE(hugetlbfs,
++  [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
++
++if test "x$enable_hugetlbfs" = "xyes"; then
++  AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
++fi
+ 
+ AC_HEADER_STDBOOL
+ AH_BOTTOM([#if HAVE_STDBOOL_H
+-- 
+1.8.3.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.20.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.20.bb
new file mode 100644
index 0000000..feb4f3f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/memcached/memcached_1.5.20.bb
@@ -0,0 +1,52 @@
+SUMMARY = "A high-performance memory object caching system"
+DESCRIPTION = "\
+ memcached optimizes specific high-load serving applications that are designed \
+ to take advantage of its versatile no-locking memory access system. Clients \
+ are available in several different programming languages, to suit the needs \
+ of the specific application. Traditionally this has been used in mod_perl \
+ apps to avoid storing large chunks of data in Apache memory, and to share \
+ this burden across several machines."
+SECTION = "web"
+HOMEPAGE = "http://memcached.org/"
+LICENSE = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff"
+
+inherit autotools
+
+DEPENDS += "libevent"
+RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
+    perl-module-tie-hash bash \
+    "
+
+SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
+           file://memcached-add-hugetlbfs-check.patch \
+           "
+SRC_URI[md5sum] = "4b64296ea0eeccdee9168c035e0488ab"
+SRC_URI[sha256sum] = "cfd7b023a9cefe7ae8a67184f51d841dbbf97994ed0e8a55e31ee092320ea1e4"
+
+# set the same COMPATIBLE_HOST as libhugetlbfs
+COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+
+python __anonymous () {
+    endianness = d.getVar('SITEINFO_ENDIANNESS')
+    if endianness == 'le':
+        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little")
+    else:
+        d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big")
+}
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "memcached"
+INITSCRIPT_PARAMS = "defaults"
+
+do_install_append() {
+    install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached
+    mkdir -p ${D}/usr/share/memcached/scripts
+    install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts
+    install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.93.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.93.bb
new file mode 100644
index 0000000..dd15070
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.93.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Combined traceroute and ping utility"
+DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool."
+HOMEPAGE = "http://www.bitwizard.nl/mtr/"
+SECTION = "net"
+DEPENDS = "ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://ui/mtr.c;beginline=5;endline=16;md5=00a894a39d53726a27386534d1c4e468"
+
+SRCREV = "304349bad86229aedbc62c07d5e98a8292967991"
+SRC_URI = "git://github.com/traviscross/mtr"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-gtk"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+PACKAGES += "${PN}-bash-completions"
+
+FILES_${PN}-bash-completions = "${datadir}/bash-completion/"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.20.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.20.bb
new file mode 100644
index 0000000..12a82c2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbd/nbd_3.20.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Network Block Device"
+HOMEPAGE = "http://nbd.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "910fe6c152f8c30ad8608388e6a4ce89"
+SRC_URI[sha256sum] = "e0e1b3538ab7ae5accf56180afd1a9887d415b98d21223b8ad42592b4af7d6cd"
+
+inherit autotools pkgconfig
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-dbg ${PN}-trdump ${PN}-doc"
+
+FILES_${PN}-client = "${sbindir}/${BPN}-client"
+FILES_${PN}-server = "${bindir}/${BPN}-server"
+FILES_${PN}-trdump = "${bindir}/${BPN}-trdump"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
new file mode 100644
index 0000000..c7ec41e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
@@ -0,0 +1,39 @@
+From 28f07715ab4d670ce81e12776bbece043305bd83 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 11 Apr 2020 15:08:39 -0700
+Subject: [PATCH] server: Fix build when printf is a macro
+
+clang complains on x86 when building
+
+main.c:116:2: error: embedding a #include directive within macro arguments is not supported
+ ^
+
+convert nesting include into a string assignment, to same effect but
+making it compatible with clang as well
+
+Upstream-Status: Submitted [https://github.com/libguestfs/nbdkit/pull/3]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ server/main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/server/main.c b/server/main.c
+index 748122f..c0ac874 100644
+--- a/server/main.c
++++ b/server/main.c
+@@ -112,9 +112,10 @@ static void
+ usage (void)
+ {
+   /* --{short,long}-options remain undocumented */
+-  printf (
++  char const *opt_list =
+ #include "synopsis.c"
+-  );
++	  ;
++  printf ("%s\n", opt_list);
+   printf ("\n"
+           "Please read the nbdkit(1) manual page for full usage.\n");
+ }
+-- 
+2.26.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_git.bb
new file mode 100644
index 0000000..a63e49e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "nbdkit is a toolkit for creating NBD servers."
+DESCRIPTION = "NBD — Network Block Device — is a protocol \
+for accessing Block Devices (hard disks and disk-like things) \
+over a Network. \
+\
+nbdkit is a toolkit for creating NBD servers."
+
+HOMEPAGE = "https://github.com/libguestfs/nbdkit"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4332a97808994cf2133a65b6c6f33eaf"
+
+SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https \
+           file://0001-server-Fix-build-when-printf-is-a-macro.patch \
+"
+
+PV = "1.19.6+git${SRCPV}"
+SRCREV = "257561bc9f2f01eb9f21686bcec4b863d17a26c4"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "curl xz e2fsprogs zlib"
+
+# autotools-brokensep is needed as nbdkit does not support build in external directory
+inherit pkgconfig python3native perlnative bash-completion autotools-brokensep
+
+# Those are required to build standalone
+EXTRA_OECONF = " --without-libvirt --without-libguestfs --disable-perl"
+
+# Disable some extended support (not desired for small embedded systems)
+#EXTRA_OECONF += " --disable-python"
+#EXTRA_OECONF += " --disable-ocaml"
+#EXTRA_OECONF += " --disable-rust"
+#EXTRA_OECONF += " --disable-ruby"
+#EXTRA_OECONF += " --disable-tcl"
+#EXTRA_OECONF += " --disable-lua"
+#EXTRA_OECONF += " --disable-vddk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat/0001-Depend-on-haveuint128.h-for-umult64.c.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat/0001-Depend-on-haveuint128.h-for-umult64.c.patch
new file mode 100644
index 0000000..6226e2c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat/0001-Depend-on-haveuint128.h-for-umult64.c.patch
@@ -0,0 +1,44 @@
+From 7f6a104a682d59f28f7df889129f4467cc45e912 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Nov 2019 19:55:42 -0800
+Subject: [PATCH] Depend on haveuint128.h for umult64.c
+
+This fixes parallel build issue e.g.
+mult/umult64.c:9:10: fatal error: 'haveuint128.h' file not found
+         ^~~~~~~~~~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ GNUmakefile | 1 +
+ Makefile    | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/GNUmakefile b/GNUmakefile
+index 3f3193d..751ca60 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -126,6 +126,7 @@ $(CDB_OBJS): cdb.h uint32.h
+ $(CRITBIT_OBJS): critbit.h
+ 
+ mult64.o: haveuint128.h
++umult64.o: haveuint128.h
+ 
+ 
+ iob_addbuf.o iob_addfile.o iob_new.o iob_reset.o iob_send.o: iob_internal.h iob.h
+diff --git a/Makefile b/Makefile
+index 0d08da4..02df6c6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -430,7 +430,7 @@ range_str4inbuf.o: mult/range_str4inbuf.c rangecheck.h
+ range_strinbuf.o: mult/range_strinbuf.c rangecheck.h
+ umult16.o: mult/umult16.c uint16.h
+ umult32.o: mult/umult32.c uint32.h
+-umult64.o: mult/umult64.c uint64.h
++umult64.o: mult/umult64.c uint64.h haveuint128.h
+ open_append.o: open/open_append.c open.h
+ open_excl.o: open/open_excl.c open.h
+ open_read.o: open/open_read.c open.h
+-- 
+2.24.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.32.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.32.bb
new file mode 100644
index 0000000..d2f4df7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/libowfat_0.32.bb
@@ -0,0 +1,31 @@
+SUMMARY = "reimplement libdjb"
+DESCRIPTION = "libowfat is a library of general purpose APIs extracted from Dan \
+Bernstein's software (libdjb), reimplemented and covered by the GNU \
+General Public License Version 2 (no later versions)."
+HOMEPAGE = "http://www.fefe.de/libowfat"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "https://www.fefe.de/${BPN}/${BP}.tar.xz \
+           file://0001-Depend-on-haveuint128.h-for-umult64.c.patch \
+          "
+SRC_URI[md5sum] = "ee015ccf45cb2bc61c942642038c2bdc"
+SRC_URI[sha256sum] = "f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    CC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}' \
+    CCC='${CC}' CFLAGS='${CFLAGS} -I.' CFLAGS_OPT='${CFLAGS} -I.' \
+"
+
+do_install() {
+    make install \
+        DESTDIR=${D} \
+        INCLUDEDIR=${includedir} \
+        LIBDIR=${libdir} \
+        MAN3DIR=${mandir}/man3
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 0000000..f42223b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ncp/ncp_1.2.4.bb
@@ -0,0 +1,31 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"
+
+do_install() {
+    install -d -m0755 ${D}${bindir} ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
+    ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch
new file mode 100644
index 0000000..eeae532
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch
@@ -0,0 +1,34 @@
+From 1ee2c998933c4a3d7e7b386352cbdb12f270774c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Sep 2017 20:50:48 -0700
+Subject: [PATCH] autogen: Do not symlink gettext.h from build host
+
+This will create a dependency on build host having gettext
+installed which may not always be the case.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [Cross-compile specific]
+ autogen.sh | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 3371011..bbc7add 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -25,12 +25,6 @@ echo "Running autoreconf ..."
+ autoreconf -sfi
+ unlink po/Makevars.template
+ 
+-for d in /usr /usr/local /opt/gettext /usr/pkg $HOME ; do
+-	if test -f $d/share/gettext/gettext.h ; then
+-		ln -sf $d/share/gettext/gettext.h include/gettext.h
+-	fi
+-done
+-
+ test -f "include/gettext.h" || {
+ echo "Error: can't find <gettext.h> convenience C header."
+ echo "Please put a link to it by hand as include/gettext.h"
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch
new file mode 100644
index 0000000..dc58b5b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch
@@ -0,0 +1,124 @@
+From 3a7d5396e633e6c02a4583be7faf3d79d0d33748 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Aug 2017 11:14:41 -0700
+Subject: [PATCH 1/2] replace VLAIS with malloc/free pair
+
+Makes it compatible with non-gnu compilers
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/trace-icmp.c |  7 +++++--
+ src/trace-tcp.c  | 14 ++++++++++----
+ src/trace-udp.c  |  7 +++++--
+ 3 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/src/trace-icmp.c b/src/trace-icmp.c
+index 842938e..c76cb54 100644
+--- a/src/trace-icmp.c
++++ b/src/trace-icmp.c
+@@ -43,16 +43,19 @@ send_echo_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct icmp6_hdr ih;
+-		uint8_t payload[plen - sizeof (struct icmp6_hdr)];
++		uint8_t *payload;
+ 	} packet;
+ 	memset (&packet, 0, plen);
++	packet.payload = malloc(plen - sizeof (struct icmp6_hdr));
+ 
+ 	packet.ih.icmp6_type = ICMP6_ECHO_REQUEST;
+ 	packet.ih.icmp6_id = htons (getpid ());
+ 	packet.ih.icmp6_seq = htons ((ttl << 8) | (n & 0xff));
+ 	(void)port;
+ 
+-	return send_payload (fd, &packet.ih, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet.ih, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+diff --git a/src/trace-tcp.c b/src/trace-tcp.c
+index 940f918..62d22ff 100644
+--- a/src/trace-tcp.c
++++ b/src/trace-tcp.c
+@@ -54,10 +54,11 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct tcphdr th;
+-		uint8_t payload[plen - sizeof (struct tcphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 
+ 	memset (&packet, 0, sizeof (packet));
++	packet.payload = malloc(plen - sizeof (struct tcphdr));
+ 	packet.th.th_sport = sport;
+ 	packet.th.th_dport = port;
+ 	packet.th.th_seq = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ());
+@@ -65,7 +66,9 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	packet.th.th_flags = TH_SYN | (ecn ? (TH_ECE | TH_CWR) : 0);
+ 	packet.th.th_win = htons (TCP_WINDOW);
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+@@ -131,10 +134,11 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct tcphdr th;
+-		uint8_t payload[plen - sizeof (struct tcphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 
+ 	memset (&packet, 0, sizeof (packet));
++	packet.payload = malloc(plen - sizeof (struct tcphdr));
+ 	packet.th.th_sport = sport;
+ 	packet.th.th_dport = port;
+ 	packet.th.th_ack = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ());
+@@ -142,7 +146,9 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	packet.th.th_flags = TH_ACK;
+ 	packet.th.th_win = htons (TCP_WINDOW);
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+diff --git a/src/trace-udp.c b/src/trace-udp.c
+index 4adde6b..a6cbb07 100644
+--- a/src/trace-udp.c
++++ b/src/trace-udp.c
+@@ -46,9 +46,10 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	struct
+ 	{
+ 		struct udphdr uh;
+-		uint8_t payload[plen - sizeof (struct udphdr)];
++		uint8_t *payload;
+ 	} packet;
+ 	memset (&packet, 0, plen);
++	packet.payload = malloc(plen - sizeof (struct udphdr));
+ 
+ 	(void)n;
+ 	packet.uh.uh_sport = sport;
+@@ -61,7 +62,9 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port)
+ 	/*if (plen > sizeof (struct udphdr))
+ 		packet.payload[0] = (uint8_t)ttl;*/
+ 
+-	return send_payload (fd, &packet, plen, ttl);
++	ssize_t ret = send_payload (fd, &packet, plen, ttl);
++	free(packet.payload);
++	return ret;
+ }
+ 
+ 
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch
new file mode 100644
index 0000000..3cc2ba8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch
@@ -0,0 +1,30 @@
+From 2a50154fbce38fd36be7e14f5cd4a8b03c65c72f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Aug 2017 11:15:37 -0700
+Subject: [PATCH 2/2] Do not undef _GNU_SOURCE
+
+There are functions from tcp.h which are under _GNU_SOURCE
+in musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/trace-tcp.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/trace-tcp.c b/src/trace-tcp.c
+index 62d22ff..380008e 100644
+--- a/src/trace-tcp.c
++++ b/src/trace-tcp.c
+@@ -21,7 +21,6 @@
+ # include <config.h>
+ #endif
+ 
+-#undef _GNU_SOURCE
+ #define _DEFAULT_SOURCE 1
+ 
+ #include <string.h>
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
new file mode 100644
index 0000000..5f86605
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
@@ -0,0 +1,75 @@
+DESCRIPTION = "This package includes some useful diagnostics tools for \
+IPv6 networks, including ndisc6, rdisc6, tcptraceroute6 and traceroute6."
+SECTION = "net"
+HOMEPAGE = "http://www.remlab.net/ndisc6/"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+PV = "1.0.4+git${SRCPV}"
+SRCREV = "4c794b5512d23c649def1f94a684225dcbb6ac3e"
+SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \
+           file://0001-replace-VLAIS-with-malloc-free-pair.patch \
+           file://0002-Do-not-undef-_GNU_SOURCE.patch \
+           file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "coreutils-native"
+
+inherit autotools gettext
+
+EXTRA_OECONF += "PERL=${USRBINPATH}/perl"
+
+USE_NLS = "yes"
+
+EXTRA_OECONF += "--disable-rpath"
+
+do_configure_prepend() {
+    cp ${STAGING_DATADIR_NATIVE}/gettext/gettext.h ${S}/include
+    ${S}/autogen.sh
+}
+
+do_install_append () {
+    rm -rf ${D}${localstatedir}
+    # Enable SUID bit for applications that need it
+    chmod 4555 ${D}${bindir}/rltraceroute6
+    chmod 4555 ${D}${bindir}/ndisc6
+    chmod 4555 ${D}${bindir}/rdisc6
+}
+ALLOW_EMPTY_${PN} = "1"
+
+# Split into seperate packages since we normal don't want them all
+# The main package is left empty and therefore not created.
+PACKAGES += "${PN}-ndisc6 ${PN}-tcpspray6 ${PN}-rdisc6 \
+    ${PN}-tcptraceroute6 ${PN}-rltraceroute6 \
+    ${PN}-tracert6 ${PN}-rdnssd ${PN}-misc"
+FILES_${PN}            = ""
+FILES_${PN}-ndisc6        = "${bindir}/ndisc6"
+FILES_${PN}-tcpspray6         = "${bindir}/tcpspray6"
+FILES_${PN}-rdisc6        = "${bindir}/rdisc6"
+FILES_${PN}-tcptraceroute6    = "${bindir}/tcptraceroute6"
+FILES_${PN}-rltraceroute6    = "${bindir}/rltraceroute6"
+FILES_${PN}-tracert6        = "${bindir}/tracert6"
+FILES_${PN}-rdnssd        = "${sbindir}/rdnssd ${sysconfdir}/rdnssd"
+FILES_${PN}-misc                = "${bindir}/dnssort ${bindir}/name2addr ${bindir}/tcpspray ${bindir}/addr2name"
+
+DESCRIPTION_${PN}-ndisc6    = "ICMPv6 Neighbor Discovery tool. \
+Performs IPv6 neighbor discovery in userland. Replaces arping from the \
+IPv4 world."
+DESCRIPTION_${PN}-rdisc6    = "ICMPv6 Router Discovery tool. \
+Queries IPv6 routers on the network for advertised prefixes. Can be used \
+to detect rogue IPv6 routers, monitor legitimate IPv6 routers."
+DESCRITPION_${PN}-tcpspray6    = "Performs bandwidth measurements of TCP \
+sessions between the local system and a remote echo server in either IPv6 \
+or IPv4."
+
+DESCRITPION_${PN}-rdnssd       = "Daemon to autoconfigure the list of DNS \
+servers through slateless IPv6 autoconfiguration."
+
+# The tcptraceroute6 and tracert6 commands depend on rltraceroute6 to
+# perform the actual trace operation.
+RDEPENDS_${PN}-tcptraceroute6 = "${PN}-rltraceroute6"
+RDEPENDS_${PN}-tracert6 = "${PN}-rltraceroute6"
+RDEPENDS_${PN}-misc += "perl"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
new file mode 100644
index 0000000..929f63f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
@@ -0,0 +1,389 @@
+From 3da48ec13a44b71ca51adbc803b42c1b29a43f57 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 24 Jul 2018 14:03:51 +0800
+Subject: [PATCH] bundle own base64 encode/decode functions
+
+Not all libc implementations provide it.
+as an aside libresolv is no longer needed
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Update to version 1.190-2
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile |   4 +-
+ base64.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ netcat.c |   3 +
+ socks.c  |   3 +
+ 4 files changed, 321 insertions(+), 2 deletions(-)
+ create mode 100644 base64.c
+
+diff --git a/Makefile b/Makefile
+index 8247cfd..b8d8547 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,10 @@
+ #	$OpenBSD: Makefile,v 1.7 2015/09/11 21:07:01 beck Exp $
+ 
+ PROG=	nc
+-SRCS=	netcat.c atomicio.c socks.c
++SRCS=	netcat.c atomicio.c socks.c base64.c
+ 
+ PKG_CONFIG ?= pkg-config
+-LIBS=  `$(PKG_CONFIG) --libs libbsd` -lresolv
++LIBS=  `$(PKG_CONFIG) --libs libbsd`
+ OBJS=  $(SRCS:.c=.o)
+ CFLAGS=  -g -O2
+ LDFLAGS=  -Wl,--no-add-needed
+diff --git a/base64.c b/base64.c
+new file mode 100644
+index 0000000..b0ee6c2
+--- /dev/null
++++ b/base64.c
+@@ -0,0 +1,313 @@
++/*
++ * Copyright (c) 1996-1999 by Internet Software Consortium.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ */
++
++/*
++ * Portions Copyright (c) 1995 by International Business Machines, Inc.
++ *
++ * International Business Machines, Inc. (hereinafter called IBM) grants
++ * permission under its copyrights to use, copy, modify, and distribute this
++ * Software with or without fee, provided that the above copyright notice and
++ * all paragraphs of this notice appear in all copies, and that the name of IBM
++ * not be used in connection with the marketing of any product incorporating
++ * the Software or modifications thereof, without specific, written prior
++ * permission.
++ *
++ * To the extent it has a right to do so, IBM grants an immunity from suit
++ * under its patents, if any, for the use, sale or manufacture of products to
++ * the extent that such products are used for performing Domain Name System
++ * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
++ * granted for any product per se or for any other function of any product.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
++ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
++ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
++ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
++ */
++
++#if !defined(LINT) && !defined(CODECENTER)
++static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $";
++#endif /* not lint */
++
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/socket.h>
++
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <arpa/nameser.h>
++
++#include <ctype.h>
++#include <resolv.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#define Assert(Cond) if (!(Cond)) abort()
++
++static const char Base64[] =
++	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
++static const char Pad64 = '=';
++
++/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
++   The following encoding technique is taken from RFC 1521 by Borenstein
++   and Freed.  It is reproduced here in a slightly edited form for
++   convenience.
++
++   A 65-character subset of US-ASCII is used, enabling 6 bits to be
++   represented per printable character. (The extra 65th character, "=",
++   is used to signify a special processing function.)
++
++   The encoding process represents 24-bit groups of input bits as output
++   strings of 4 encoded characters. Proceeding from left to right, a
++   24-bit input group is formed by concatenating 3 8-bit input groups.
++   These 24 bits are then treated as 4 concatenated 6-bit groups, each
++   of which is translated into a single digit in the base64 alphabet.
++
++   Each 6-bit group is used as an index into an array of 64 printable
++   characters. The character referenced by the index is placed in the
++   output string.
++
++                         Table 1: The Base64 Alphabet
++
++      Value Encoding  Value Encoding  Value Encoding  Value Encoding
++          0 A            17 R            34 i            51 z
++          1 B            18 S            35 j            52 0
++          2 C            19 T            36 k            53 1
++          3 D            20 U            37 l            54 2
++          4 E            21 V            38 m            55 3
++          5 F            22 W            39 n            56 4
++          6 G            23 X            40 o            57 5
++          7 H            24 Y            41 p            58 6
++          8 I            25 Z            42 q            59 7
++          9 J            26 a            43 r            60 8
++         10 K            27 b            44 s            61 9
++         11 L            28 c            45 t            62 +
++         12 M            29 d            46 u            63 /
++         13 N            30 e            47 v
++         14 O            31 f            48 w         (pad) =
++         15 P            32 g            49 x
++         16 Q            33 h            50 y
++
++   Special processing is performed if fewer than 24 bits are available
++   at the end of the data being encoded.  A full encoding quantum is
++   always completed at the end of a quantity.  When fewer than 24 input
++   bits are available in an input group, zero bits are added (on the
++   right) to form an integral number of 6-bit groups.  Padding at the
++   end of the data is performed using the '=' character.
++
++   Since all base64 input is an integral number of octets, only the
++         -------------------------------------------------
++   following cases can arise:
++
++       (1) the final quantum of encoding input is an integral
++           multiple of 24 bits; here, the final unit of encoded
++	   output will be an integral multiple of 4 characters
++	   with no "=" padding,
++       (2) the final quantum of encoding input is exactly 8 bits;
++           here, the final unit of encoded output will be two
++	   characters followed by two "=" padding characters, or
++       (3) the final quantum of encoding input is exactly 16 bits;
++           here, the final unit of encoded output will be three
++	   characters followed by one "=" padding character.
++   */
++
++int
++b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
++	size_t datalength = 0;
++	u_char input[3];
++	u_char output[4];
++	size_t i;
++
++	while (2 < srclength) {
++		input[0] = *src++;
++		input[1] = *src++;
++		input[2] = *src++;
++		srclength -= 3;
++
++		output[0] = input[0] >> 2;
++		output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++		output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++		output[3] = input[2] & 0x3f;
++		Assert(output[0] < 64);
++		Assert(output[1] < 64);
++		Assert(output[2] < 64);
++		Assert(output[3] < 64);
++
++		if (datalength + 4 > targsize)
++			return (-1);
++		target[datalength++] = Base64[output[0]];
++		target[datalength++] = Base64[output[1]];
++		target[datalength++] = Base64[output[2]];
++		target[datalength++] = Base64[output[3]];
++	}
++
++	/* Now we worry about padding. */
++	if (0 != srclength) {
++		/* Get what's left. */
++		input[0] = input[1] = input[2] = '\0';
++		for (i = 0; i < srclength; i++)
++			input[i] = *src++;
++
++		output[0] = input[0] >> 2;
++		output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++		output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++		Assert(output[0] < 64);
++		Assert(output[1] < 64);
++		Assert(output[2] < 64);
++
++		if (datalength + 4 > targsize)
++			return (-1);
++		target[datalength++] = Base64[output[0]];
++		target[datalength++] = Base64[output[1]];
++		if (srclength == 1)
++			target[datalength++] = Pad64;
++		else
++			target[datalength++] = Base64[output[2]];
++		target[datalength++] = Pad64;
++	}
++	if (datalength >= targsize)
++		return (-1);
++	target[datalength] = '\0';	/* Returned value doesn't count \0. */
++	return (datalength);
++}
++//libresolv_hidden_def (b64_ntop)
++
++/* skips all whitespace anywhere.
++   converts characters, four at a time, starting at (or after)
++   src from base - 64 numbers into three 8 bit bytes in the target area.
++   it returns the number of data bytes stored at the target, or -1 on error.
++ */
++
++int
++b64_pton(char const *src, u_char *target, size_t targsize) {
++	int tarindex, state, ch;
++	char *pos;
++
++	state = 0;
++	tarindex = 0;
++
++	while ((ch = *src++) != '\0') {
++		if (isspace(ch))	/* Skip whitespace anywhere. */
++			continue;
++
++		if (ch == Pad64)
++			break;
++
++		pos = strchr(Base64, ch);
++		if (pos == 0) 		/* A non-base64 character. */
++			return (-1);
++
++		switch (state) {
++		case 0:
++			if (target) {
++				if ((size_t)tarindex >= targsize)
++					return (-1);
++				target[tarindex] = (pos - Base64) << 2;
++			}
++			state = 1;
++			break;
++		case 1:
++			if (target) {
++				if ((size_t)tarindex + 1 >= targsize)
++					return (-1);
++				target[tarindex]   |=  (pos - Base64) >> 4;
++				target[tarindex+1]  = ((pos - Base64) & 0x0f)
++							<< 4 ;
++			}
++			tarindex++;
++			state = 2;
++			break;
++		case 2:
++			if (target) {
++				if ((size_t)tarindex + 1 >= targsize)
++					return (-1);
++				target[tarindex]   |=  (pos - Base64) >> 2;
++				target[tarindex+1]  = ((pos - Base64) & 0x03)
++							<< 6;
++			}
++			tarindex++;
++			state = 3;
++			break;
++		case 3:
++			if (target) {
++				if ((size_t)tarindex >= targsize)
++					return (-1);
++				target[tarindex] |= (pos - Base64);
++			}
++			tarindex++;
++			state = 0;
++			break;
++		default:
++			abort();
++		}
++	}
++
++	/*
++	 * We are done decoding Base-64 chars.  Let's see if we ended
++	 * on a byte boundary, and/or with erroneous trailing characters.
++	 */
++
++	if (ch == Pad64) {		/* We got a pad char. */
++		ch = *src++;		/* Skip it, get next. */
++		switch (state) {
++		case 0:		/* Invalid = in first position */
++		case 1:		/* Invalid = in second position */
++			return (-1);
++
++		case 2:		/* Valid, means one byte of info */
++			/* Skip any number of spaces. */
++			for ((void)NULL; ch != '\0'; ch = *src++)
++				if (!isspace(ch))
++					break;
++			/* Make sure there is another trailing = sign. */
++			if (ch != Pad64)
++				return (-1);
++			ch = *src++;		/* Skip the = */
++			/* Fall through to "single trailing =" case. */
++			/* FALLTHROUGH */
++
++		case 3:		/* Valid, means two bytes of info */
++			/*
++			 * We know this char is an =.  Is there anything but
++			 * whitespace after it?
++			 */
++			for ((void)NULL; ch != '\0'; ch = *src++)
++				if (!isspace(ch))
++					return (-1);
++
++			/*
++			 * Now make sure for cases 2 and 3 that the "extra"
++			 * bits that slopped past the last full byte were
++			 * zeros.  If we don't check them, they become a
++			 * subliminal channel.
++			 */
++			if (target && target[tarindex] != 0)
++				return (-1);
++		}
++	} else {
++		/*
++		 * We ended by seeing the end of the string.  Make sure we
++		 * have no partial bytes lying around.
++		 */
++		if (state != 0)
++			return (-1);
++	}
++
++	return (tarindex);
++}
+diff --git a/netcat.c b/netcat.c
+index a0fb51b..9c4ed23 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -240,6 +240,9 @@ static int connect_with_timeout(int fd, const struct sockaddr *sa,
+ 
+ static void quit();
+ 
++int    b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize);
++int    b64_pton(char const *src, u_char *target, size_t targsize);
++
+ int
+ main(int argc, char *argv[])
+ {
+diff --git a/socks.c b/socks.c
+index 9068f39..c576f6b 100644
+--- a/socks.c
++++ b/socks.c
+@@ -53,6 +53,9 @@
+ #define SOCKS_DOMAIN	3
+ #define SOCKS_IPV6	4
+ 
++int    b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize);
++int    b64_pton(char const *src, u_char *target, size_t targsize);
++
+ int	remote_connect(const char *, const char *, struct addrinfo);
+ int	socks_connect(const char *, const char *, struct addrinfo,
+ 	    const char *, const char *, struct addrinfo, int,
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb
new file mode 100644
index 0000000..20ad43a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb
@@ -0,0 +1,56 @@
+require netcat.inc
+SUMMARY = "OpenBSD Netcat"
+HOMEPAGE = "http://ftp.debian.org"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f39e60ae4ea9fdb559c833be2e59de99"
+
+DEPENDS += "glib-2.0 libbsd"
+do_patch[depends] = "quilt-native:do_populate_sysroot"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20181022T085404Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
+           http://snapshot.debian.org/archive/debian/20181022T085404Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-1.debian.tar.xz;name=netcat-patch;subdir=${BP} \
+           file://0001-bundle-own-base64-encode-decode-functions.patch \
+           "
+
+SRC_URI[netcat.md5sum] = "219d5e49c45658e229a3bda63063a986"
+SRC_URI[netcat.sha256sum] = "0e283b2a214313c69447cd962c528ac19afb3ddfe606b25de6d179f187cde4c3"
+SRC_URI[netcat-patch.md5sum] = "7eba241989dbef6caa78ec4bc8e35151"
+SRC_URI[netcat-patch.sha256sum] = "c6736fcbab5254cbbc52278993a951da1126e42800a297c27db297e332e2017e"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'"
+
+do_configure[noexec] = "1"
+
+netcat_do_patch() {
+    cd ${S}
+    quilt pop -a || true
+    if [ -d ${S}/.pc-netcat ]; then
+            rm -rf ${S}/.pc
+            mv ${S}/.pc-netcat ${S}/.pc
+            QUILT_PATCHES=${S}/debian/patches quilt pop -a
+            rm -rf ${S}/.pc
+    fi
+    QUILT_PATCHES=${S}/debian/patches quilt push -a
+    mv ${S}/.pc ${S}/.pc-netcat
+}
+
+do_unpack[cleandirs] += "${S}"
+
+python do_patch() {
+    bb.build.exec_func('netcat_do_patch', d)
+    bb.build.exec_func('patch_do_patch', d)
+}
+
+do_compile() {
+    cd ${S}
+    pkgrel=4
+    oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN}
+}
+ALTERNATIVE_PRIORITY = "60"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc
new file mode 100644
index 0000000..1544164
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat.inc
@@ -0,0 +1,15 @@
+SUMMARY = "GNU Netcat"
+HOMEPAGE = "http://netcat.sourceforge.net"
+DESCRIPTION = "A simple Unix utility which reads and writes data across network \
+connections using TCP or UDP protocol.  It is designed to be a reliable \
+'back-end' tool that can be used directly or easily driven by other \
+programs and scripts. At the same time it is a feature-rich network \
+debugging and exploration tool, since it can create almost any kind of \
+connection you would need and has several interesting built-in \
+capabilities."
+
+SECTION = "net"
+inherit update-alternatives gettext pkgconfig
+
+ALTERNATIVE_${PN} = "nc"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/gettext.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/gettext.patch
new file mode 100644
index 0000000..f2e5f99
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/gettext.patch
@@ -0,0 +1,16 @@
+Fix build with gettext 0.20.x
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -49,7 +49,7 @@ AC_SUBST(all_libraries)
+ dnl I18n support
+ ALL_LINGUAS="it sk"
+ AM_GNU_GETTEXT([external], need-ngettext)
+-AM_INTL_SUBDIR
++#AM_INTL_SUBDIR
+ 
+ dnl find resolver functions and the socket library on some broken OS
+ AC_LBL_LIBRARY_NET
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 0000000..dd1938a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
@@ -0,0 +1,34 @@
+Make netcat_flag_count() return positive value
+
+C language has 3 distinct char types:
+         char
+         unsigned char
+         signed char
+A char has the same range of values as signed char on X86,
+but same as unsigned char on PPC which made netcat_flag_count
+return a negative value, now we force variable c as signed char
+to make netcat_flag_count return positive value.
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ src/flagset.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/flagset.c b/src/flagset.c
+index 442b634..54ac898 100644
+--- a/src/flagset.c
++++ b/src/flagset.c
+@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
+ 
+ int netcat_flag_count(void)
+ {
+-  register char c;
++  register signed char c;
+   register int i;
+   int ret = 0;
+ 
+-- 
+1.7.5.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 0000000..5cbcb08
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
@@ -0,0 +1,25 @@
+Apparently somewhere along the line HAVE_LOCALE_H was changed to
+HAVE_LC_MESSAGES.  Adjust netcat to match.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: netcat-0.7.1/src/intl.h
+===================================================================
+--- netcat-0.7.1.orig/src/intl.h
++++ netcat-0.7.1/src/intl.h
+@@ -25,11 +25,11 @@
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+ 
+-#ifdef HAVE_LOCALE_H
++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #else
+ #error You must have locale.h in your system
+-#endif	/* HAVE_LOCALE_H */
++#endif	/* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
+ 
+ /* Our dear (and very common) gettext macros */
+ #define _(String) gettext(String)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
new file mode 100644
index 0000000..9b0ed58
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
@@ -0,0 +1,32 @@
+Replace obsoleted AM_CONFIG_HEADER flagged by autoconf 2.69
+locale.h check was picked from old gettext macros but with new aclocal
+it picks the right 0.18 gettext.m4 and does not get the check
+therefore we explicitly add it to configure.ac
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: netcat-0.7.1/configure.ac
+===================================================================
+--- netcat-0.7.1.orig/configure.ac	2013-01-18 01:30:01.928069739 -0800
++++ netcat-0.7.1/configure.ac	2013-01-18 01:32:50.568073009 -0800
+@@ -26,8 +26,7 @@
+ AC_PREREQ(2.53)
+ 
+ dnl without this order in this file, automake will be confused!
+-AM_CONFIG_HEADER(config.h)
+-
++AC_CONFIG_HEADERS(config.h)
+ dnl check for programs.  first the c compiler.
+ AC_PROG_CC
+ AC_PROG_CPP
+@@ -56,7 +55,7 @@
+ AC_LBL_LIBRARY_NET
+ 
+ dnl Fortunately we have Solaris...
+-AC_CHECK_HEADERS(sys/sockio.h)
++AC_CHECK_HEADERS(sys/sockio.h locale.h)
+ 
+ AC_CHECK_FUNCS(srandom random)
+ if test $ac_cv_func_srandom = no; then
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
new file mode 100644
index 0000000..14d743f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -0,0 +1,23 @@
+require netcat.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+PR = "r3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
+           file://obsolete_autoconf_macros.patch \
+           file://netcat-locale_h.patch \
+           file://make-netcat_flag_count_work.patch \
+           file://gettext.patch \
+"
+
+SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
+SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb"
+
+inherit autotools
+
+do_install_append() {
+    install -d ${D}${bindir}
+    mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN}
+}
+ALTERNATIVE_PRIORITY = "100"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
new file mode 100644
index 0000000..a180571
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
@@ -0,0 +1,75 @@
+SUMMARY = "netcf"
+DESCRIPTION = "netcf is a cross-platform network configuration library."
+HOMEPAGE = "https://pagure.io/netcf"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
+
+SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4"
+PV .= "+git${SRCPV}"
+
+SRC_URI = "git://pagure.io/netcf.git;protocol=https \
+"
+
+UPSTREAM_CHECK_GITTAGREGEX = "release-(?P<pver>(\d+(\.\d+)+))"
+
+DEPENDS += "augeas libnl libxslt libxml2"
+
+do_configure[depends] += "${MLPREFIX}gnulib:do_populate_sysroot"
+
+S = "${WORKDIR}/git"
+
+inherit gettext autotools perlnative pkgconfig systemd
+
+EXTRA_OECONF_append_class-target = " --with-driver=redhat"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend() {
+    currdir=`pwd`
+    cd ${S}
+
+    # avoid bootstrap cloning gnulib on every configure
+    # the dir starts out empty from the pkg, but unconditionally blow it
+    # away so if we reconfigure due to gnulib sysroot sig changes, we will
+    # get the newer gnulib content into the build here.
+    rm -rf ${S}/.gnulib
+    cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
+
+    # --force to avoid errors on reconfigure e.g if recipes changed we depend on
+    # | bootstrap: running: libtoolize --quiet
+    # | libtoolize:   error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
+    # | ...
+    ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
+
+    cd $currdir
+}
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+       install -d ${D}${systemd_unitdir}/system
+       if [ -d "${D}${libdir}/systemd/system" ]; then
+           if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then 
+               mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+               rm -rf ${D}${libdir}/systemd/
+	   fi
+       elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then 
+           mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
+           rm -rf ${D}${nonarch_libdir}/systemd/
+       fi
+    else
+       mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
+       rm -rf ${D}${sysconfdir}/rc.d/
+    fi
+}
+
+FILES_${PN} += " \
+        ${libdir} \
+        ${nonarch_libdir} \
+        "
+
+SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch
new file mode 100644
index 0000000..515737c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch
@@ -0,0 +1,50 @@
+From 51a092ebb36dcc6180ceb93a9777258e826d9990 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Sep 2018 18:11:10 -0700
+Subject: [PATCH] netlib.c: Move including sched.h out og function
+
+The shutdown_control() has this code where system headers are being
+included inside function body and this results in compile errors on musl
+especially when sched.h is included because sched.h defines a macro
+which defines a static function. This means it ends up being a static
+function inside another function and compiler calls it out
+
+In function 'bind_to_specific_processor':
+|
+/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/netperf/2.7.0+git999-r0/recipe-sysroot/usr/include/sched.h:102:1:
+error: invalid storage class for function '__CPU_AND_S'
+|  __CPU_op_func_S(AND, &)
+|  ^~~~~~~~~~~~~~~
+
+Moving the definition out of function definition fixes the problem
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/netlib.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/netlib.c b/src/netlib.c
+index 9258424..60b032d 100644
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -2262,6 +2262,10 @@ shutdown_control()
+ 
+ }
+ 
++#if HAVE_SCHED_SETAFFINITY
++#include <sched.h>
++#endif
++
+ /*
+   bind_to_specific_processor will bind the calling process to the
+   processor in "processor"  It has lots of ugly ifdefs to deal with
+@@ -2308,7 +2312,6 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
+      value will not tell you if you are bound vs unbound. */
+   bindprocessor(BINDPROCESS,getpid(),(cpu_t)mapped_affinity);
+ #elif HAVE_SCHED_SETAFFINITY
+-#include <sched.h>
+   /* in theory this should cover systems with more CPUs than bits in a
+      long, without having to specify __USE_GNU.  we "cheat" by taking
+      defines from /usr/include/bits/sched.h, which we ass-u-me is
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch
new file mode 100644
index 0000000..434b790
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch
@@ -0,0 +1,30 @@
+Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ src/netlib.c |    7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/src/netlib.c b/src/netlib.c
+index 206e002..e33aae6 100644
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -2265,7 +2265,12 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
+      fall-back on what we had before, which is to use just the size of
+      an unsigned long. raj 2006-09-14 */
+ 
+-#if defined(__CPU_SETSIZE)
++#if defined(CPU_SETSIZE)
++#define NETPERF_CPU_SETSIZE CPU_SETSIZE
++#define NETPERF_CPU_SET(cpu, cpusetp)  CPU_SET(cpu, cpusetp)
++#define NETPERF_CPU_ZERO(cpusetp)      CPU_ZERO (cpusetp)
++  typedef cpu_set_t netperf_cpu_set_t;
++#elif defined(__CPU_SETSIZE)
+ #define NETPERF_CPU_SETSIZE __CPU_SETSIZE
+ #if defined(__CPU_SET_S)
+ #define NETPERF_CPU_SET(cpu, cpusetp)  __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp)
+-- 
+1.7.1.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/init
new file mode 100644
index 0000000..8ba2a63
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/init
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>.
+# Modified for Debian by Christoph Lameter <clameter@debian.org>
+# Modified for openembedded by Bruno Randolf <bruno.randolf@4g-systems.biz>
+
+### BEGIN INIT INFO
+# Provides:             netperf
+# Required-Start:       $remote_fs $local_fs $time
+# Required-Stop:        $remote_fs $local_fs $time
+# Should-Start:         $network $named
+# Should-Stop:          $network $named
+# Default-Start:        2 3 4 5
+# Default-Stop:         0 1 6
+# Short-Description:    network benchmark
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/netserver
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+  start)
+    echo -n "Starting network benchmark server: netserver"
+    start-stop-daemon -S -x $DAEMON > /dev/null 2>&1 
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping network benchmark server: netserver"
+    start-stop-daemon -K -x $DAEMON
+    echo "."
+    ;;
+  #reload)
+    #
+    # If the daemon can reload its config files on the fly
+    # for example by sending it SIGHUP, do it here.
+    #
+    # If the daemon responds to changes in its config file
+    # directly anyway, make this a do-nothing entry.
+    #
+    # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
+    # ;;
+  restart|force-reload)
+    #
+    # If the "reload" option is implemented, move the "force-reload"
+    # option to the "reload" entry above. If not, "force-reload" is
+    # just the same as "restart".
+    #
+    start-stop-daemon -K -x $DAEMON
+    sleep 1
+    start-stop-daemon -S -x $DAEMON
+    ;;
+  *)
+    echo "Usage: /etc/init.d/netperf {start|stop|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch
new file mode 100644
index 0000000..eff98bf
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/files/vfork.patch
@@ -0,0 +1,58 @@
+Subject: [PATCH] netperf: fix vfork/fork
+
+Upstream-Status: Pending
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ src/netserver.c |   12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/netserver.c b/src/netserver.c
+index 379a106..f6a8b09 100644
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -1020,7 +1020,7 @@ process_requests()
+ void
+ spawn_child() {
+ 
+-#if defined(HAVE_FORK)
++#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+ 
+   if (debug) {
+     fprintf(where,
+@@ -1038,7 +1038,11 @@ spawn_child() {
+ 
+   signal(SIGCLD,SIG_IGN);
+ 
++#if defined(HAVE_FORK)
+   switch (fork()) {
++#else
++  switch (vfork()) {
++#endif
+   case -1:
+     fprintf(where,
+ 	    "%s: fork() error %s (errno %d)\n",
+@@ -1405,7 +1409,7 @@ scan_netserver_args(int argc, char *argv[]) {
+ 
+ void
+ daemonize() {
+-#if defined(HAVE_FORK)
++#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+ 
+   if (debug) {
+     fprintf(where,
+@@ -1419,7 +1423,11 @@ daemonize() {
+   fflush(stdout);
+   fflush(stderr);
+ 
++#if defined(HAVE_FORK)
+   switch (fork()) {
++#else
++  switch (vfork()) {
++#endif
+   case -1:
+     fprintf(stderr,
+ 	    "%s: fork() error %s (errno %d)\n",
+-- 
+1.7.1.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
new file mode 100644
index 0000000..d48f3ae
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
@@ -0,0 +1,70 @@
+SUMMARY = "A networking benchmarking tool"
+DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
+SECTION = "net"
+HOMEPAGE = "http://www.netperf.org/"
+LICENSE = "netperf"
+LICENSE_FLAGS = "non-commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
+
+PV = "2.7.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/HewlettPackard/netperf.git \
+           file://cpu_set.patch \
+           file://vfork.patch \
+           file://init \
+           file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \
+           "
+
+SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d autotools texinfo
+
+# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
+CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
+
+# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
+# larger than 2GB
+CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \
+    ' -D_FILE_OFFSET_BITS=64', '', d)}"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
+PACKAGECONFIG[intervals] = "--enable-intervals,--disable-intervals,,"
+PACKAGECONFIG[histogram] = "--enable-histogram,--disable-histogram,,"
+
+# autotools.bbclass attends to include m4 files with path depth <= 2 by
+# "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
+do_configure_prepend() {
+    test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files
+}
+
+do_install() {
+    sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init
+
+    install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d
+    install -m 4755 src/netperf ${D}${bindir}
+    install -m 4755 src/netserver ${D}${sbindir}
+    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf
+
+    # man
+    install -d ${D}${mandir}/man1/
+    install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
+    install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
+
+    # move scripts to examples directory
+    install -d ${D}${docdir}/netperf/examples
+    install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
+
+    # docs ..
+    install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
+    install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
+    install -m 0644 ${S}/README ${D}${docdir}/netperf
+    install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
+}
+
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
+
+INITSCRIPT_NAME="netperf"
+INITSCRIPT_PARAMS="defaults"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch
new file mode 100644
index 0000000..e4db096
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch
@@ -0,0 +1,27 @@
+From 73ec79432fc557a8be4f1500982b1c0f5fdf12a9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Thu, 7 Nov 2019 09:58:52 +0000
+Subject: [PATCH] fetch-ocsp-response: use python3
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: André Draszik <git@andred.net>
+---
+ script/fetch-ocsp-response | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/script/fetch-ocsp-response b/script/fetch-ocsp-response
+index 0ff7461..185116b 100755
+--- a/script/fetch-ocsp-response
++++ b/script/fetch-ocsp-response
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ # nghttp2 - HTTP/2 C Library
+-- 
+2.23.0.rc1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-1.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-1.patch
new file mode 100644
index 0000000..ca181bb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-1.patch
@@ -0,0 +1,31 @@
+From f8da73bd042f810f34d19f9eae02b46d870af394 Mon Sep 17 00:00:00 2001
+From: James M Snell <jasnell@gmail.com>
+Date: Sun, 19 Apr 2020 09:12:24 -0700
+Subject: [PATCH] Earlier check for settings flood
+
+CVE: CVE-2020-11080
+Upstream-Status: Backport [https://github.com/nghttp2/nghttp2/commit/f8da73bd042f810f34d19f9eae02b46d870af394.patch]
+Comment: No hunk refreshed
+Affects-version: < v1.41.0
+Signed-off-by: Rahul Taya <Rahul.Taya@kpit.com>
+---
+ lib/nghttp2_session.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+Index: nghttp2-1.40.0/lib/nghttp2_session.c
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_session.c
++++ nghttp2-1.40.0/lib/nghttp2_session.c
+@@ -5678,6 +5678,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2
+           break;
+         }
+ 
++        /* Check the settings flood counter early to be safe */
++        if (session->obq_flood_counter_ >= session->max_outbound_ack &&
++            !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
++          return NGHTTP2_ERR_FLOODED;
++        }
++
+         iframe->state = NGHTTP2_IB_READ_SETTINGS;
+ 
+         if (iframe->payloadleft) {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-2.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-2.patch
new file mode 100644
index 0000000..d3c57e9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/CVE-2020-11080-2.patch
@@ -0,0 +1,308 @@
+From 336a98feb0d56b9ac54e12736b18785c27f75090 Mon Sep 17 00:00:00 2001
+From: James M Snell <jasnell@gmail.com>
+Date: Fri, 17 Apr 2020 16:53:51 -0700
+Subject: [PATCH] Implement max settings option
+
+CVE: CVE-2020-11080
+Upstream-Status: Backport [https://github.com/nghttp2/nghttp2/commit/336a98feb0d56b9ac54e12736b18785c27f75090.patch]
+Comment: No hunks refreshed
+Affects-version: < v1.41.0
+Signed-off-by: Rahul Taya <Rahul.Taya@kpit.com>
+---
+ doc/CMakeLists.txt             |  1 +
+ doc/Makefile.am                |  1 +
+ lib/includes/nghttp2/nghttp2.h | 23 +++++++++++++
+ lib/nghttp2_helper.c           |  2 ++
+ lib/nghttp2_option.c           |  5 +++
+ lib/nghttp2_option.h           |  5 +++
+ lib/nghttp2_session.c          | 21 ++++++++++++
+ lib/nghttp2_session.h          |  2 ++
+ tests/main.c                   |  2 ++
+ tests/nghttp2_session_test.c   | 61 ++++++++++++++++++++++++++++++++++
+ tests/nghttp2_session_test.h   |  1 +
+ 11 files changed, 124 insertions(+)
+
+Index: nghttp2-1.40.0/doc/CMakeLists.txt
+===================================================================
+--- nghttp2-1.40.0.orig/doc/CMakeLists.txt
++++ nghttp2-1.40.0/doc/CMakeLists.txt
+@@ -42,6 +42,7 @@ set(APIDOCS
+   nghttp2_option_set_no_recv_client_magic.rst
+   nghttp2_option_set_peer_max_concurrent_streams.rst
+   nghttp2_option_set_user_recv_extension_type.rst
++  nghttp2_option_set_max_settings.rst
+   nghttp2_pack_settings_payload.rst
+   nghttp2_priority_spec_check_default.rst
+   nghttp2_priority_spec_default_init.rst
+Index: nghttp2-1.40.0/lib/includes/nghttp2/nghttp2.h
+===================================================================
+--- nghttp2-1.40.0.orig/lib/includes/nghttp2/nghttp2.h
++++ nghttp2-1.40.0/lib/includes/nghttp2/nghttp2.h
+@@ -229,6 +229,13 @@ typedef struct {
+ #define NGHTTP2_CLIENT_MAGIC_LEN 24
+ 
+ /**
++ * @macro
++ *
++ * The default max number of settings per SETTINGS frame
++ */
++#define NGHTTP2_DEFAULT_MAX_SETTINGS 32
++
++/**
+  * @enum
+  *
+  * Error codes used in this library.  The code range is [-999, -500],
+@@ -399,6 +406,11 @@ typedef enum {
+    */
+   NGHTTP2_ERR_SETTINGS_EXPECTED = -536,
+   /**
++   * When a local endpoint receives too many settings entries
++   * in a single SETTINGS frame.
++   */
++  NGHTTP2_ERR_TOO_MANY_SETTINGS = -537,
++  /**
+    * The errors < :enum:`NGHTTP2_ERR_FATAL` mean that the library is
+    * under unexpected condition and processing was terminated (e.g.,
+    * out of memory).  If application receives this error code, it must
+@@ -2661,6 +2673,17 @@ NGHTTP2_EXTERN void nghttp2_option_set_m
+ 
+ /**
+  * @function
++ *
++ * This function sets the maximum number of SETTINGS entries per
++ * SETTINGS frame that will be accepted. If more than those entries
++ * are received, the peer is considered to be misbehaving and session
++ * will be closed. The default value is 32.
++ */
++NGHTTP2_EXTERN void nghttp2_option_set_max_settings(nghttp2_option *option,
++                                                    size_t val);
++
++/**
++ * @function
+  *
+  * Initializes |*session_ptr| for client use.  The all members of
+  * |callbacks| are copied to |*session_ptr|.  Therefore |*session_ptr|
+Index: nghttp2-1.40.0/lib/nghttp2_helper.c
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_helper.c
++++ nghttp2-1.40.0/lib/nghttp2_helper.c
+@@ -334,6 +334,8 @@ const char *nghttp2_strerror(int error_c
+   case NGHTTP2_ERR_FLOODED:
+     return "Flooding was detected in this HTTP/2 session, and it must be "
+            "closed";
++  case NGHTTP2_ERR_TOO_MANY_SETTINGS:
++    return "SETTINGS frame contained more than the maximum allowed entries";
+   default:
+     return "Unknown error code";
+   }
+Index: nghttp2-1.40.0/lib/nghttp2_option.c
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_option.c
++++ nghttp2-1.40.0/lib/nghttp2_option.c
+@@ -121,3 +121,8 @@ void nghttp2_option_set_max_outbound_ack
+   option->opt_set_mask |= NGHTTP2_OPT_MAX_OUTBOUND_ACK;
+   option->max_outbound_ack = val;
+ }
++
++void nghttp2_option_set_max_settings(nghttp2_option *option, size_t val) {
++  option->opt_set_mask |= NGHTTP2_OPT_MAX_SETTINGS;
++  option->max_settings = val;
++}
+Index: nghttp2-1.40.0/lib/nghttp2_option.h
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_option.h
++++ nghttp2-1.40.0/lib/nghttp2_option.h
+@@ -67,6 +67,7 @@ typedef enum {
+   NGHTTP2_OPT_MAX_DEFLATE_DYNAMIC_TABLE_SIZE = 1 << 9,
+   NGHTTP2_OPT_NO_CLOSED_STREAMS = 1 << 10,
+   NGHTTP2_OPT_MAX_OUTBOUND_ACK = 1 << 11,
++  NGHTTP2_OPT_MAX_SETTINGS = 1 << 12,
+ } nghttp2_option_flag;
+ 
+ /**
+@@ -86,6 +87,10 @@ struct nghttp2_option {
+    */
+   size_t max_outbound_ack;
+   /**
++   * NGHTTP2_OPT_MAX_SETTINGS
++   */
++  size_t max_settings;
++  /**
+    * Bitwise OR of nghttp2_option_flag to determine that which fields
+    * are specified.
+    */
+Index: nghttp2-1.40.0/lib/nghttp2_session.c
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_session.c
++++ nghttp2-1.40.0/lib/nghttp2_session.c
+@@ -458,6 +458,7 @@ static int session_new(nghttp2_session *
+ 
+   (*session_ptr)->max_send_header_block_length = NGHTTP2_MAX_HEADERSLEN;
+   (*session_ptr)->max_outbound_ack = NGHTTP2_DEFAULT_MAX_OBQ_FLOOD_ITEM;
++  (*session_ptr)->max_settings = NGHTTP2_DEFAULT_MAX_SETTINGS;
+ 
+   if (option) {
+     if ((option->opt_set_mask & NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE) &&
+@@ -521,6 +522,11 @@ static int session_new(nghttp2_session *
+     if (option->opt_set_mask & NGHTTP2_OPT_MAX_OUTBOUND_ACK) {
+       (*session_ptr)->max_outbound_ack = option->max_outbound_ack;
+     }
++
++    if ((option->opt_set_mask & NGHTTP2_OPT_MAX_SETTINGS) &&
++        option->max_settings) {
++      (*session_ptr)->max_settings = option->max_settings;
++    }
+   }
+ 
+   rv = nghttp2_hd_deflate_init2(&(*session_ptr)->hd_deflater,
+@@ -5694,6 +5700,16 @@ ssize_t nghttp2_session_mem_recv(nghttp2
+           iframe->max_niv =
+               iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1;
+ 
++          if (iframe->max_niv - 1 > session->max_settings) {
++            rv = nghttp2_session_terminate_session_with_reason(
++                session, NGHTTP2_ENHANCE_YOUR_CALM,
++                "SETTINGS: too many setting entries");
++            if (nghttp2_is_fatal(rv)) {
++              return rv;
++            }
++            return (ssize_t)inlen;
++          }
++
+           iframe->iv = nghttp2_mem_malloc(mem, sizeof(nghttp2_settings_entry) *
+                                                    iframe->max_niv);
+ 
+@@ -7460,6 +7476,11 @@ static int nghttp2_session_upgrade_inter
+   if (settings_payloadlen % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) {
+     return NGHTTP2_ERR_INVALID_ARGUMENT;
+   }
++  /* SETTINGS frame contains too many settings */
++  if (settings_payloadlen / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH
++        > session->max_settings) {
++    return NGHTTP2_ERR_TOO_MANY_SETTINGS;
++  }
+   rv = nghttp2_frame_unpack_settings_payload2(&iv, &niv, settings_payload,
+                                               settings_payloadlen, mem);
+   if (rv != 0) {
+Index: nghttp2-1.40.0/lib/nghttp2_session.h
+===================================================================
+--- nghttp2-1.40.0.orig/lib/nghttp2_session.h
++++ nghttp2-1.40.0/lib/nghttp2_session.h
+@@ -267,6 +267,8 @@ struct nghttp2_session {
+   /* The maximum length of header block to send.  Calculated by the
+      same way as nghttp2_hd_deflate_bound() does. */
+   size_t max_send_header_block_length;
++  /* The maximum number of settings accepted per SETTINGS frame. */
++  size_t max_settings;
+   /* Next Stream ID. Made unsigned int to detect >= (1 << 31). */
+   uint32_t next_stream_id;
+   /* The last stream ID this session initiated.  For client session,
+Index: nghttp2-1.40.0/tests/main.c
+===================================================================
+--- nghttp2-1.40.0.orig/tests/main.c
++++ nghttp2-1.40.0/tests/main.c
+@@ -315,6 +315,8 @@ int main() {
+                    test_nghttp2_session_set_local_window_size) ||
+       !CU_add_test(pSuite, "session_cancel_from_before_frame_send",
+                    test_nghttp2_session_cancel_from_before_frame_send) ||
++      !CU_add_test(pSuite, "session_too_many_settings",
++                   test_nghttp2_session_too_many_settings) ||
+       !CU_add_test(pSuite, "session_removed_closed_stream",
+                    test_nghttp2_session_removed_closed_stream) ||
+       !CU_add_test(pSuite, "session_pause_data",
+Index: nghttp2-1.40.0/tests/nghttp2_session_test.c
+===================================================================
+--- nghttp2-1.40.0.orig/tests/nghttp2_session_test.c
++++ nghttp2-1.40.0/tests/nghttp2_session_test.c
+@@ -10558,6 +10558,67 @@ void test_nghttp2_session_cancel_from_be
+   nghttp2_session_del(session);
+ }
+ 
++void test_nghttp2_session_too_many_settings(void) {
++  nghttp2_session *session;
++  nghttp2_option *option;
++  nghttp2_session_callbacks callbacks;
++  nghttp2_frame frame;
++  nghttp2_bufs bufs;
++  nghttp2_buf *buf;
++  ssize_t rv;
++  my_user_data ud;
++  nghttp2_settings_entry iv[3];
++  nghttp2_mem *mem;
++  nghttp2_outbound_item *item;
++
++  mem = nghttp2_mem_default();
++  frame_pack_bufs_init(&bufs);
++
++  memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
++  callbacks.on_frame_recv_callback = on_frame_recv_callback;
++  callbacks.send_callback = null_send_callback;
++
++  nghttp2_option_new(&option);
++  nghttp2_option_set_max_settings(option, 1);
++
++  nghttp2_session_client_new2(&session, &callbacks, &ud, option);
++
++  CU_ASSERT(1 == session->max_settings);
++
++  nghttp2_option_del(option);
++
++  iv[0].settings_id = NGHTTP2_SETTINGS_HEADER_TABLE_SIZE;
++  iv[0].value = 3000;
++
++  iv[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
++  iv[1].value = 16384;
++
++  nghttp2_frame_settings_init(&frame.settings, NGHTTP2_FLAG_NONE, dup_iv(iv, 2),
++                              2);
++
++  rv = nghttp2_frame_pack_settings(&bufs, &frame.settings);
++
++  CU_ASSERT(0 == rv);
++  CU_ASSERT(nghttp2_bufs_len(&bufs) > 0);
++
++  nghttp2_frame_settings_free(&frame.settings, mem);
++
++  buf = &bufs.head->buf;
++  assert(nghttp2_bufs_len(&bufs) == nghttp2_buf_len(buf));
++
++  ud.frame_recv_cb_called = 0;
++
++  rv = nghttp2_session_mem_recv(session, buf->pos, nghttp2_buf_len(buf));
++  CU_ASSERT((ssize_t)nghttp2_buf_len(buf) == rv);
++
++  item = nghttp2_session_get_next_ob_item(session);
++  CU_ASSERT(NGHTTP2_GOAWAY == item->frame.hd.type);
++
++  nghttp2_bufs_reset(&bufs);
++  nghttp2_bufs_free(&bufs);
++  nghttp2_session_del(session);
++}
++
+ static void
+ prepare_session_removed_closed_stream(nghttp2_session *session,
+                                       nghttp2_hd_deflater *deflater) {
+Index: nghttp2-1.40.0/tests/nghttp2_session_test.h
+===================================================================
+--- nghttp2-1.40.0.orig/tests/nghttp2_session_test.h
++++ nghttp2-1.40.0/tests/nghttp2_session_test.h
+@@ -156,6 +156,7 @@ void test_nghttp2_session_repeated_prior
+ void test_nghttp2_session_repeated_priority_submission(void);
+ void test_nghttp2_session_set_local_window_size(void);
+ void test_nghttp2_session_cancel_from_before_frame_send(void);
++void test_nghttp2_session_too_many_settings(void);
+ void test_nghttp2_session_removed_closed_stream(void);
+ void test_nghttp2_session_pause_data(void);
+ void test_nghttp2_session_no_closed_streams(void);
+Index: nghttp2-1.40.0/doc/Makefile.am
+===================================================================
+--- nghttp2-1.40.0.orig/doc/Makefile.am
++++ nghttp2-1.40.0/doc/Makefile.am
+@@ -69,6 +69,7 @@ APIDOCS= \
+ 	nghttp2_option_set_peer_max_concurrent_streams.rst \
+ 	nghttp2_option_set_user_recv_extension_type.rst \
+ 	nghttp2_option_set_max_outbound_ack.rst \
++    nghttp2_option_set_max_settings.rst \
+ 	nghttp2_pack_settings_payload.rst \
+ 	nghttp2_priority_spec_check_default.rst \
+ 	nghttp2_priority_spec_default_init.rst \
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.40.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.40.0.bb
new file mode 100644
index 0000000..b497058
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.40.0.bb
@@ -0,0 +1,43 @@
+SUMMARY = "HTTP/2 C Library and tools"
+HOMEPAGE = "https://nghttp2.org/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec"
+DEPENDS = "c-ares cunit jansson libev libevent libxml2 openssl zlib"
+
+UPSTREAM_CHECK_URI = "https://github.com/nghttp2/nghttp2/releases"
+
+SRC_URI = "\
+    https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.xz \
+    file://0001-fetch-ocsp-response-use-python3.patch \
+    file://CVE-2020-11080-1.patch \
+    file://CVE-2020-11080-2.patch \
+"
+SRC_URI[md5sum] = "8d1a6b96760254e4dd142d7176e8fb7c"
+SRC_URI[sha256sum] = "09fc43d428ff237138733c737b29fb1a7e49d49de06d2edbed3bc4cdcee69073"
+
+inherit cmake manpages python3native
+PACKAGECONFIG[manpages] = ""
+
+# examples are never installed, and don't need to be built in the
+# first place
+EXTRA_OECMAKE = "-DENABLE_EXAMPLES=OFF -DENABLE_APP=ON"
+
+do_install_append() {
+	rm ${D}${bindir}/deflatehd ${D}${bindir}/inflatehd
+}
+
+PACKAGES =+ "lib${PN} ${PN}-client ${PN}-proxy ${PN}-server"
+
+RDEPENDS_${PN} = "${PN}-client (>= ${PV}) ${PN}-proxy (>= ${PV}) ${PN}-server (>= ${PV})"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-proxy = "openssl python3-core python3-io python3-shell"
+
+ALLOW_EMPTY_${PN} = "1"
+FILES_${PN} = ""
+FILES_lib${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-client = "${bindir}/h2load ${bindir}/nghttp"
+FILES_${PN}-proxy = "${bindir}/nghttpx ${datadir}/${BPN}/fetch-ocsp-response"
+FILES_${PN}-server = "${bindir}/nghttpd"
+
+BBCLASSEXTEND = "native"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
new file mode 100644
index 0000000..669c19c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de>
+#
+# /etc/init.d/ypbind
+#
+#   and symbolic its link
+#
+# /usr/sbin/rcypbind
+#
+# System startup script for the ypbind daemon
+#
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $remote_fs $portmap
+# Should-Start: ypserv slpd
+# Required-Stop: portmap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Start ypbind (necessary for a NIS client)
+# Description: ypbind finds the server for NIS domains and maintains
+#	the NIS binding information.
+### END INIT INFO
+
+# Need to use status function
+. /etc/init.d/functions
+
+YPBIND_BIN=/usr/sbin/ypbind
+pidfile=/var/run/ypbind.pid
+YPDOMAINNAME_bin=/usr/bin/ypdomainname
+
+[ -f /etc/default/ypbind ] && . /etc/default/ypbind
+
+case "$1" in
+    start)
+	echo -n "Starting ypbind"
+	## If the domainname is not set, skip starting of ypbind
+	## and return with "program not configured"
+        $YPDOMAINNAME_bin >/dev/null 2>&1
+        if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+           if [ -f /etc/defaultdomain ]; then
+             XDOMAINNAME=`cat /etc/defaultdomain`
+             $YPDOMAINNAME_bin "$XDOMAINNAME"
+	   fi
+           $YPDOMAINNAME_bin >/dev/null 2>&1
+           if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+	     # Tell the user this has skipped
+	     echo -n " . . . . . . . . . . No domainname set"
+             # service is not configured
+	     exit 1
+           fi
+        fi
+
+	## If we don't have a /etc/yp.conf file, skip starting of
+        ## ypbind and return with "program not configured"
+        ## if you add the -broadcast Option later, comment this out.
+	if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
+	  # Tell the user this has skipped
+	  echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
+          # service is not configured
+	  exit 1
+        fi
+
+	# evaluate the OPTIONS for ypbind-mt
+	OPTIONS=""
+	test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS"
+	test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS"
+	test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS"
+
+	start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS
+        if [ $? -eq 0 ]; then
+            notfound=1
+            for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+                ypwhich >/dev/null 2>&1 && { notfound=0 ; break; };
+                echo -n " ."
+                sleep 1;
+            done
+            if [ $notfound -eq 1 ]; then
+                echo -n " ${warn}No NIS server found${norm}";
+	    fi
+        else
+            exit 1
+        fi
+	;;
+    stop)
+	echo -n "Shutting down ypbind"
+	start-stop-daemon --stop --quiet --pidfile $pidfile
+	# Remove static data, else glibc will continue to use NIS
+        rm -f /var/yp/binding/* /var/run/ypbind.pid
+	;;
+    restart)
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+    reload | force-reload)
+	echo -n "Reload service ypbind"
+	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
+	;;
+    status)
+	echo -n "Checking for ypbind: "
+	status $YPBIND_BIN
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+	exit 1
+	;;
+esac
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/nis.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
new file mode 100644
index 0000000..a968af1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
@@ -0,0 +1,31 @@
+# This include file contains global definitions for the
+# various NIS packages.
+#
+# These packages will only function correctly with glibc -
+# the rpcsvc functionality is not present in uclibc
+DESCRIPTION = "NIS Server and Tools"
+HOMEPAGE = "http://www.linux-nis.org/nis/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools gettext pkgconfig
+
+# install is broken because src/Makefile heroically adds '-s'
+# to the install flags - passing -s to the build /usr/bin/install!
+# install-strip gets it right but installs ypbind -m <default>,
+# not -m 555.  In an OE build this is not, so far as I can see,
+# a security problem (and this fix to the build problem is *much*
+# easier and more maintainable.)
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install-strip
+}
+
+# An attempt to build on uclibc will fail, causing annoyance,
+# so force the package to be skipped here (this will cause a
+# 'nothing provides' error)
+python () {
+    os = d.getVar("TARGET_OS")
+    if os == "linux-uclibc":
+        raise bb.parse.SkipRecipe("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
new file mode 100644
index 0000000..21aa92c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NIS Domainname
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/nisdomainname
+ExecStart=/usr/bin/domainname $NISDOMAINNAME
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
new file mode 100644
index 0000000..8c6837b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
@@ -0,0 +1,34 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+\
+This is the final IPv4-only version of yp-tools. \
+"
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+           file://domainname.service \
+"
+SRC_URI[md5sum] = "ba1f121c17e3ad65368be173b977cd13"
+SRC_URI[sha256sum] = "d01f70fadc643a55107a0edc47c6be99d0306bcc4f66df56f65e74238b0124c9"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
new file mode 100644
index 0000000..bb40166
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
@@ -0,0 +1,47 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+"
+
+# v4.2.3
+SRCREV = "1bfda29c342a81b97cb1995ffd9e8da5de63e7ab"
+
+SRC_URI = "git://github.com/thkukuk/yp-tools \
+           file://domainname.service \
+           "
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libtirpc libnsl2 virtual/crypt"
+
+inherit autotools systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = " \
+                --disable-rpath --disable-domainname \
+               "
+CFLAGS_append_libc-musl = " -Wno-error=cpp"
+
+FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
+FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
+FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
+FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch
new file mode 100644
index 0000000..9484d0b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch
@@ -0,0 +1,45 @@
+From 25d5daf30aa2dc451ba528712f668036d8506054 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 07:50:26 -0700
+Subject: [PATCH] Add configure time check for gettid API
+
+glibc 2.30 has added this syscalls wrapper
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac  | 1 +
+ src/log_msg.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9e32a4a..6d1067b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,7 @@ if test -n "$TIRPC_LIBS"; then
+   AC_DEFINE(HAVE_TIRPC, 1, [Define to 1 if TIRPC is available])
+ fi
+ 
++AC_CHECK_FUNCS(gettid)
+ dnl The difficult part: could we reconfigure NSS or must we use DNS ?
+ AC_CHECK_FUNCS(__nss_configure_lookup)
+ if eval "test \"`echo '$ac_cv_func___nss_configure_lookup'`\" != yes"; then
+diff --git a/src/log_msg.c b/src/log_msg.c
+index 49f0905..37da311 100644
+--- a/src/log_msg.c
++++ b/src/log_msg.c
+@@ -26,6 +26,7 @@
+ #include "log_msg.h"
+ 
+ #include <sys/syscall.h>
++#if !HAVE_GETTID
+ #ifdef __NR_gettid
+ static pid_t
+ gettid (void)
+@@ -39,6 +40,7 @@ gettid (void)
+     return getpid ();
+ }
+ #endif
++#endif
+ 
+ int debug_flag = 0;
+ int logfile_flag = 0;
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
new file mode 100644
index 0000000..643b0a9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
@@ -0,0 +1,67 @@
+From 5452961750275b1e3f7c95e9528338f0ee0357ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 09:17:35 -0700
+Subject: [PATCH] dns_hosts: Fix build with musl
+
+Add NETDB_* defines which are not available in musl
+remove need for sys/cdefs.h by remove __P
+Add _GNU_SOURCE for missing u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/Makefile.am | 2 +-
+ lib/dns_hosts.c | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 977a8db..35cb5b3 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,7 +8,7 @@
+ noinst_LIBRARIES = libcompat.a
+ noinst_HEADERS = ypbind3_binding.h
+ 
+-AM_CFLAGS = -D_REENTRANT=1 @WARNFLAGS@
++AM_CFLAGS = -D_GNU_SOURCE -D_REENTRANT=1 @WARNFLAGS@
+ AM_CPPFLAGS = -I$(srcdir) @TIRPC_CFLAGS@ @NSL_CFLAGS@ -DLOCALEDIR=\"$(localedir)\"
+ 
+ libcompat_a_SOURCES = dns_hosts.c res_options.h ypbind3_binding_dup.c \
+diff --git a/lib/dns_hosts.c b/lib/dns_hosts.c
+index fd421fd..6067879 100644
+--- a/lib/dns_hosts.c
++++ b/lib/dns_hosts.c
+@@ -64,6 +64,7 @@
+ 
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+@@ -84,6 +85,12 @@ extern struct hostent *_gethtbyaddr(const char *, int, int);
+ #ifndef LOG_AUTH
+ # define LOG_AUTH 0
+ #endif
++#ifndef NETDB_SUCCESS
++# define NETDB_SUCCESS 0
++#endif
++#ifndef NETDB_INTERNAL
++# define NETDB_INTERNAL -1
++#endif
+ 
+ #define MULTI_PTRS_ARE_ALIASES 1	/* XXX - experimental */
+ 
+@@ -101,7 +108,7 @@ static char hostbuf[8*1024];
+ static struct in_addr host_addr;
+ 
+ #ifdef RESOLVSORT
+-static void addrsort __P((char **, int));
++static void addrsort (char **, int);
+ #endif
+ 
+ #if PACKETSZ > 1024
+-- 
+2.14.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
new file mode 100644
index 0000000..1f8df42
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=YP Bind
+Requires=domainname.service
+After=domainname.service network.target
+Before=systemd-user-sessions.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/ypbind.pid
+ExecStart=/usr/sbin/ypbind
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb
new file mode 100644
index 0000000..03b98c9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb
@@ -0,0 +1,63 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+require nis.inc
+
+DESCRIPTION = " \
+Multithreaded NIS bind service (ypbind-mt).  \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features.  Supports ypbind protocol V1 and V2.  \
+Uses threads for better response.  Supports multiple \
+domain bindings.  Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x.  Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first. \
+\
+This is the final IPv4-only version of ypbind-mt. \
+"
+HOMEPAGE = "https://github.com/thkukuk/ypbind-mt/"
+DEPENDS = " \
+           yp-tools \
+           ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+          "
+DEPENDS_append_libc-musl = " bsd-headers nss"
+RDEPENDS_${PN} += "yp-tools"
+
+# ypbind-mt now provides all the functionality of ypbind
+# and is used in place of it.
+PROVIDES += "ypbind"
+
+SRC_URI = "https://github.com/thkukuk/ypbind-mt/releases/download/v${PV}/${BPN}-${PV}.tar.xz \
+           file://ypbind.init \
+           file://ypbind.service \
+           file://0001-dns_hosts-Fix-build-with-musl.patch \
+           file://0001-Add-configure-time-check-for-gettid-API.patch \
+           "
+SRC_URI[md5sum] = "7cf89641fdc128d0919207e4b7caaf1d"
+SRC_URI[sha256sum] = "0696c0263c4fd48a4ff2ce6c109f05f37aab0f71646d81cb22c7c28591bf80eb"
+
+inherit systemd update-rc.d
+
+SYSTEMD_SERVICE_${PN} = "ypbind.service"
+INITSCRIPT_NAME = "ypbind"
+INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+
+CFLAGS_append = " -I${STAGING_INCDIR}/nss3 -I${STAGING_INCDIR}/nspr"
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/rcS.d
+
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
+}
+
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch
new file mode 100644
index 0000000..87a7778
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed/use-ldflags.patch
@@ -0,0 +1,16 @@
+Obey LDFLAGS.
+
+Signed-off-by: Christopher Larson <kergoth@gmail.com>
+Upstream-Status: Pending
+
+--- Ntimed.orig/configure	2015-05-30 11:57:59.927796993 -0700
++++ Ntimed/configure	2015-05-30 11:58:26.143948894 -0700
+@@ -142,7 +142,7 @@
+ 
+ 	echo
+ 	echo "ntimed-client:	${l}"
+-	echo "	\${CC} \${CFLAGS} -o ntimed-client ${l} -lm"
++	echo "	\${CC} \${CFLAGS} -o ntimed-client ${l} \${LDFLAGS} -lm"
+ 	echo
+ 	echo "clean:"
+ 	echo "	rm -f ${l} ntimed-client"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
new file mode 100644
index 0000000..a749b16
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Network time synchronization software, NTPD replacement"
+DESCRIPTION = "This is a preview/early-access/alpha/buzzword-of-the-times \
+release of a new FOSS project written to gradually take over the world of \
+networked timekeeping."
+HOMEPAGE = "https://github.com/bsdphk/Ntimed"
+SECTION = "net"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://main.c;beginline=2;endline=24;md5=89db8e76f2951f3fad167e7aa9718a44"
+
+SRC_URI = "git://github.com/bsdphk/Ntimed \
+           file://use-ldflags.patch"
+
+PV = "0.0+git${SRCPV}"
+SRCREV = "db0abbb4c80f2ecef6bc5d9639bca5bea28532a2"
+
+S = "${WORKDIR}/git"
+
+# use adjtimex on musl
+CFLAGS_append_libc-musl = " -Dntp_adjtime=adjtimex"
+
+EXTRA_OEMAKE = "\
+    'CC=${CC}' \
+    'CFLAGS=${CFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+"
+
+do_configure () {
+    sh ${S}/configure
+}
+
+do_install () {
+    install -D -m 0755 ntimed-client ${D}${sbindir}/ntimed-client
+}
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "ntimed-client"
+
+PACKAGE_BEFORE_PN += "ntimed-client"
+FILES_ntimed-client = "${sbindir}/ntimed-client"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
new file mode 100644
index 0000000..81ffeec
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-nDPI-Include-sys-types.h.patch
@@ -0,0 +1,26 @@
+From 6543f3e2d5fe214e2fc6c050289bf1ae73b18724 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 13:56:24 -0700
+Subject: [PATCH] nDPI: Include sys/types.h
+
+Needed for uint_t types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ nDPI/src/include/ipq_api.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: ntop-5.0.1/nDPI/src/include/ipq_api.h
+===================================================================
+--- ntop-5.0.1.orig/nDPI/src/include/ipq_api.h
++++ ntop-5.0.1/nDPI/src/include/ipq_api.h
+@@ -24,6 +24,7 @@
+ #ifndef __IPOQUE_API_INCLUDE_FILE__

+ #define __IPOQUE_API_INCLUDE_FILE__

+ 

++#include <sys/types.h>

+ 

+ #if defined(HAVE_NTOP) && defined(WIN32)

+ #include <winsock2.h>

diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch
new file mode 100644
index 0000000..d6f7eb5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch
@@ -0,0 +1,74 @@
+From d22ddc73f00ed056032a635ee8379305ec83bf81 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 11 Jul 2018 12:02:50 +0800
+Subject: [PATCH] plugins/Makefile.am: fix for automake 1.16.1
+
+Fixed:
+| i586-poky-linux-gcc: error: netflowPlugin.o: No such file or directory
+| i586-poky-linux-gcc: error: unrecognized command line option '-flat_namespace'; did you mean '-Wnamespaces'?
+| i586-poky-linux-gcc: fatal error: no input files
+
+The previous code make things complicated, but we don't have to, let libtool do
+most of the things can fix the problem.
+
+Upstream-Status: Pending [ntop is not longer maintained any more, we need consider moving to ntopng]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ plugins/Makefile.am | 34 ++++++----------------------------
+ 1 file changed, 6 insertions(+), 28 deletions(-)
+
+diff --git a/plugins/Makefile.am b/plugins/Makefile.am
+index 64492e0..bcd0c10 100644
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
+@@ -69,40 +69,18 @@ libsflowPlugin_la_CFLAGS = $(AM_CFLAGS)
+ # by default ntop looks for plugins in the plugins/ subdirectory
+ #
+ 
+-
+-.libs/libnetflowPlugin.so@SO_VERSION_PATCH@:
+-	@if test -f libnetflowPlugin_la-netflowPlugin.o; then \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ libnetflowPlugin_la-netflowPlugin.o; \
+-	else \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ netflowPlugin.o; \
+-	fi
+-
+-netflowPlugin.so$(EXEEXT): .libs/libnetflowPlugin.so@SO_VERSION_PATCH@
+-	@$(LN_S) .libs/libnetflowPlugin.so netflowPlugin.so
++netflowPlugin.so$(EXEEXT): libnetflowPlugin.la
++	@$(LN_S) -f .libs/libnetflowPlugin.so netflowPlugin.so
+ 
+ ###############
+ 
+-.libs/librrdPlugin.so@SO_VERSION_PATCH@:
+-	@if test -f librrdPlugin_la-rrdPlugin.o; then \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ librrdPlugin_la-rrdPlugin.o; \
+-	else \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ rrdPlugin.o; \
+-	fi
+-
+-rrdPlugin.so$(EXEEXT): .libs/librrdPlugin.so@SO_VERSION_PATCH@
+-	@$(LN_S) .libs/librrdPlugin.so rrdPlugin.so
++rrdPlugin.so$(EXEEXT): librrdPlugin.la
++	@$(LN_S) -f .libs/librrdPlugin.so rrdPlugin.so
+ 
+ ###############
+ 
+-.libs/libsflowPlugin.so@SO_VERSION_PATCH@:
+-	@if test -f libsflowPlugin_la-sflowPlugin.o; then \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ libsflowPlugin_la-sflowPlugin.o; \
+-	else \
+-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ sflowPlugin.o; \
+-	fi
+-
+-sflowPlugin.so$(EXEEXT): .libs/libsflowPlugin.so@SO_VERSION_PATCH@
+-	@$(LN_S) .libs/libsflowPlugin.so sflowPlugin.so
++sflowPlugin.so$(EXEEXT): libsflowPlugin.la
++	@$(LN_S) -f .libs/libsflowPlugin.so sflowPlugin.so
+ 
+ ###############
+ 
+-- 
+2.7.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/embed-libs.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/embed-libs.patch
new file mode 100644
index 0000000..2d1ab73
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/embed-libs.patch
@@ -0,0 +1,20 @@
+Use --embed option so that it can return libpython as well
+
+% ../recipe-sysroot-native/usr/bin/python3-native/python3-config --libs --embed
+-lpython3.8 -lcrypt -lpthread -ldl -lutil -lm -lm
+[kraj@apollo /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/ntop/5.0.1-r0/ntop-5.0.1]
+% ../recipe-sysroot-native/usr/bin/python3-native/python3-config --libs
+-lcrypt -lpthread -ldl -lutil -lm -lm
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/configure.in
++++ b/configure.in
+@@ -1463,7 +1463,7 @@ dnl>
+   fi
+ 
+   if test "x$PYTHON_CONFIG" != "x"; then
+-    PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
++    PYTHON_LIBS="`$PYTHON_CONFIG --libs --embed`"
+     if test "x$PYTHON_LIBS" = "x"; then
+       AC_MSG_RESULT(Python[-devel] support is present but misconfigured)     
+     else   
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch
new file mode 100644
index 0000000..e627e59
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/fix-missing-return-from-non-void-function.patch
@@ -0,0 +1,19 @@
+Fix following error:
+
+netflowPlugin.c: In function 'netflowUtilsLoop':
+netflowPlugin.c:2144:1: error: no return statement in function returning non-void [-Werror=return-type]
+ 2144 | }
+      | ^
+
+Return NULL like netflowMainLoop does.
+
+--- ntop-5.0.1.orig/plugins/netflowPlugin.c	2012-03-09 17:44:17.000000000 +0000
++++ ntop-5.0.1/plugins/netflowPlugin.c	2019-08-09 10:25:40.878799852 +0000
+@@ -2141,6 +2141,7 @@
+       waitCondvar(&myGlobals.device[deviceId].netflowGlobals->ifStatsQueueCondvar);
+     }
+   }
++  return(NULL);
+ }
+ #endif
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
new file mode 100644
index 0000000..1ead2a0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=A network traffic probe similar to the UNIX top command
+Requires=network.target
+
+ConditionPathExists=@SYSCONFDIR@/ntop.conf
+After=syslog.target network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/ntop-helper start
+ExecStop=@LIBEXECDIR@/ntop-helper stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
new file mode 100644
index 0000000..392cb08
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in.patch
@@ -0,0 +1,164 @@
+1)add --with-pcap-config option to use libpcap's pcap-config
+2)add AC_CHECK_LIB if user didn't specify PCAP_ROOT and pcap-config
+  put it before host check to make cross-compiling easier.
+  pcap doesn't need extra include and libs so it is fine.
+3)remove old rrd configure code but use pkg-config to config rrd
+  rrdtool should have the pkg-config file installed.
+4)fix python-config
+5)change AC_TRY_RUN to AC_COMPILE_IFELSE for pthread_rwlock_t checking
+6)fix a net-snmp-config bug
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 0c7c0a5..cad40be 100644
+--- a/configure.in
++++ b/configure.in
+@@ -230,14 +230,14 @@ dnl>
+ AC_ARG_WITH(void,
+               [  +-External-source-locations:-------------------------------------------------+])
+ 
+-AC_ARG_WITH(  rrd-home,
+-              [  --with-rrd-home=DIR        Usually /usr/local/rrdtool-1.2.x],
+-              RRD_HOME="$withval",
+-              RRD_HOME=/usr/local/rrdtool-1.2.19)
+ AC_ARG_WITH(  pcap-root,
+               [  --with-pcap-root=DIR        LBNL pcap located in DIR],
+               PCAP_ROOT="$withval",
+               PCAP_ROOT=)
++AC_ARG_WITH(  pcap-config,
++              [  --with-pcap-config=path/pcap-config where to find pcap-config],
++              PCAP_CONFIG="$withval",
++              PCAP_CONFIG=)
+ AC_ARG_WITH(  gdbm-root,
+               [  --with-gdbm-root=DIR        gdbm located in DIR],
+               GDBM_DIRECTORY="$withval",
+@@ -556,6 +556,7 @@ if test ".${PCAPRING_DIR}" != .; then
+ else
+ 
+ TMP_ROOT=${HOME}/PF_RING/userland/libpcap/
++FOUND_PCAP=1
+ if test ".${PCAP_ROOT}" == . &&
+    test -d ${TMP_ROOT} &&
+    test -r ${TMP_ROOT}/libpcap.a; then
+@@ -563,6 +564,18 @@ if test ".${PCAP_ROOT}" == . &&
+        CORELIBS="${CORELIBS} -L${TMP_ROOT} -L${HOME}/PF_RING/userland/lib -lpfring -lpcap "
+        INCS="${INCS} -I ${PCAP_ROOT}"
+        AC_MSG_RESULT([found in $PCAP_ROOT])
++elif test -n "${PCAP_CONFIG}" && test -x "${PCAP_CONFIG}"; then
++       CORELIBS="${CORELIBS} $(${PCAP_CONFIG} --libs)" 
++       INCS="${INCS} $(${PCAP_CONFIG} --cflags)"
++       AC_DEFINE_UNQUOTED(HAVE_LIBPCAP, 1, [have libpcap ])
++       AC_MSG_RESULT([found pcap-config: $PCAP_CONFIG, libs:$(${PCAP_CONFIG} --libs) cflags:$(${PCAP_CONFIG} --cflags)])
++else
++     AC_CHECK_LIB(pcap, pcap_lookupdev, ,
++        [FOUND_PCAP=])
++fi
++
++if test -n "$FOUND_PCAP"; then
++	:
+ elif test ".${PCAP_ROOT}" != .; then
+   if test -d $PCAP_ROOT &&
+      test -r $PCAP_ROOT/lib/libpcap.a &&
+@@ -880,44 +893,11 @@ AC_CHECK_LIB([z], [zlibVersion], [], [
+         exit -1
+         ])
+ 
+-# RRD
+-if test -d "$RRD_HOME"; then
+-   AC_MSG_RESULT(checking for RRD home... yes)
+-else
+-   RRD_HOME=/usr/local/rrdtool
+-   if test -d "$RRD_HOME"; then
+-      AC_MSG_RESULT(Checking rrdtool in $RRD_HOME)
+-   else
+-      RRD_HOME=/usr/local
+-   fi
+-fi
+-
+-RRD_LIB="-L${RRD_HOME}/lib -lrrd_th"
+-
+-if test -f "$RRD_HOME/lib/librrd_th.so"; then
+-   AC_MSG_RESULT(checking for rrdtool... yes)
+-else
+-  if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX
+-     AC_MSG_RESULT(checking for rrdtool... yes)
+-  else
+-     if test -f "$RRD_HOME/lib/librrd_th.a"; then
+-       AC_MSG_RESULT(checking for rrdtool... yes)
+-     else
+-       AC_CHECK_LIB([rrd_th], [main])
+-       if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then
+-         AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR);
+-	 AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/);
+-       else
+-         RRD_LIB=
+-       fi
+-     fi
+-  fi
+-fi
+-
+-RRD_INC=
+-if test -d "${RRD_HOME}/include"; then
+-  RRD_INC="-I${RRD_HOME}/include"
+-fi
++PKG_CHECK_MODULES( [RRD], [librrd] )
++AC_SUBST(RRD_CFLAGS)
++AC_SUBST(RRD_LIBS)
++RRD_INC=$RRD_FLAGS
++RRD_LIB=$RRD_LIBS
+ 
+ dnl> The failed recheck stuff below is courtesy of Chris Turbeville [turbo@verio.net]
+ dnl> Chris developed this for Solaris 9, confirming work I had done earlier for FreeBSD
+@@ -1041,7 +1021,7 @@ AC_CHECK_HEADERS([sched.h sys/sched.h])
+ AC_CHECK_HEADERS([pthread.h])
+ 
+ AC_MSG_CHECKING([if r/w locks are supported])
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <pthread.h>
+ 
+ int main()
+@@ -1443,15 +1423,15 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+   AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+-  if test "x$ac_cv_prog_ac_ct_NETSNMP" = "xnet-snmp-config"; then
++  if test -n "$NETSNMP"; then
+     AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+-    SNMPLIBS="`net-snmp-config --libs`"
++    SNMPLIBS="`$NETSNMP --libs`"
+     SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
+     echo "net-snmp libs: ${SNMPLIBS}"
+     LIBS="${LIBS} ${SNMPLIBS}"
+ dnl remove unecessary path
+     LIBS=`echo ${LIBS}|sed -e s,'-R../lib',,g`
+-    INCS="${INCS} `net-snmp-config --cflags`"
++    INCS="${INCS} `$NETSNMP --cflags`"
+   else
+     AC_MSG_RESULT(NETSNMP is not present: SNMP support is disabled)
+   fi
+@@ -1464,10 +1444,9 @@ SAVED_LIBS=$LIBS
+ dnl>
+ dnl> PYTHON
+ dnl>
+-  AC_CHECK_TOOL(PYTHON, python-config)
+-  PYTHON_CONFIG=""
++  AC_CHECK_TOOL(PYTHON_CONFIG, python-config)
+ 
+-  if test "x$ac_cv_prog_ac_ct_PYTHON" != "xpython-config"; then   
++  if test -z "$PYTHON_CONFIG"; then   
+        if test -f "/etc/debian_version"; then
+        	   AC_MSG_RESULT(Please install python-dev and rerun configure)
+ 	   exit 1
+@@ -1481,8 +1460,6 @@ dnl>
+           PYTHON_CONFIG="python-config"
+         fi
+      fi
+-  else
+-     PYTHON_CONFIG="python-config"
+   fi
+ 
+   if test "x$PYTHON_CONFIG" != "x"; then
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
new file mode 100644
index 0000000..269138d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_configure_in_net_snmp_config_exist.patch
@@ -0,0 +1,21 @@
+Check net-snmp-config's existence in case user specified the
+ac_cv_prog_NETSNMP to avoid HAVE_SNMP defined if the specified
+net-snmp-config doesn't exist.
+
+Upstream-Status: Inappropriate [Embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index 6f3e88f..8ddf017 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1423,7 +1423,7 @@ dnl> NET-SNMP
+ dnl>
+ if test ".${ac_disable_snmp}" != ".yes"; then
+   AC_CHECK_TOOL(NETSNMP, net-snmp-config)
+-  if test -n "$NETSNMP"; then
++  if test -n "$NETSNMP" -a -e "$NETSNMP"; then
+     AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
+     SNMPLIBS="`$NETSNMP --libs`"
+     SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
new file mode 100644
index 0000000..e7684c1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_init.patch
@@ -0,0 +1,228 @@
+Modify ntop.init to WRLinux 5.0 style.
+
+Fix a small problem that when ntop not running,
+/etc/init.d/ntop stop will return 1
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+ packages/RedHat/ntop.init |  102 +++++++++-----------------------------------
+ 1 files changed, 21 insertions(+), 81 deletions(-)
+
+diff --git a/packages/RedHat/ntop.init b/packages/RedHat/ntop.init
+index 40d49f1..a189c59 100755
+--- a/packages/RedHat/ntop.init
++++ b/packages/RedHat/ntop.init
+@@ -10,19 +10,9 @@
+ #           You have set the admin password - read docs/1STRUN.txt
+ #           You have created /etc/ntop.conf with appropriate parameters.
+ 
+-#  To identify an interface to ntop, use the following flags 
+-#  in /etc/sysconfig/network-scripts/ifcfg-ethx
+-
+-#   NTOP="yes"      <--- means for ntop to use this interface
+-#   NTOPCONFIG="yes"  <--- means for ntop to configure this interface
+-
+ # Note that if you give a -i parameter in either /etc/ntop.conf or
+ # the command line, the scan is NOT performed.  
+ 
+-# However, when it comes to the configuration step, with NTOPCONFIG="yes"
+-# the interface is configured regardless of how the interface list was
+-# specified.
+-
+ #
+ #  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ # 
+@@ -107,11 +97,7 @@ ntopusesyslog="local3"
+ invoked=$0
+ 
+ # Source function library.
+-. /etc/rc.d/init.d/functions
+-
+-# Source networking configuration.
+-. /etc/sysconfig/network
+-
++. /etc/init.d/functions
+ 
+ # Basic sanity checks...
+ if ! [ -x $prog ]; then
+@@ -124,16 +110,6 @@ if ! [ -x $prog ]; then
+   exit 1
+ fi
+ 
+-if [ ${NETWORKING} = "no" ]; then
+-  echo ""
+-  echo "ERROR -"
+-  echo "        Networking is not up!"
+-  echo ""
+-  echo "Aborting..."
+-  echo ""
+-  exit 1
+-fi
+-
+ if ! [ -f ${conf} ]; then
+   echo ""
+   echo "ERROR -"
+@@ -180,8 +156,8 @@ fi
+ if [ "${debug}" = "y" ]; then echo "DEBUG: parm file temp is ${parmfile}"; fi
+  
+ cmd=`echo \
+-    @${conf} \
+     -i tbd \
++    @${conf} \
+     $extra $@`
+ 
+ echo ${cmd} | awk ' \
+@@ -305,42 +281,6 @@ logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD -      Configuration
+ 
+ # Build list of interfaces, e.g  eth0 eth1 eth1:1
+ # (Yeah, we'll have to convert that to eth0,eth1,eth1:1 later
+-if [ ".${ntopinterface}" = ".tbd" ]; then
+-
+-    ntopinterface=""
+-    iflist=`ip link show | \
+-        awk '/^[0-9]*:\ eth/ { printf("%s ", substr($2, 1, length($2)-1)) }'`
+-    logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Scanning all interfaces $iflist"
+-    if [ "${debug}" = "y" ]; then echo "DEBUG: Interface candidates are ${iflist}"; fi
+-
+-    for eth in $iflist; do
+-
+-       if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp]=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-            logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntop=yes, skipping"
+-            if [ "${debug}" = "y" ]; then echo "DEBUG: $eth not ntop=yes"; fi
+-            continue
+-       fi
+-
+-       ntopinterface="${ntopinterface} $eth"
+-  
+-       ip=`ip addr show $eth | \
+-           awk '/inet/ { printf("%s", substr($2, 1, index($2, "/")-1)) }'`
+-
+-       if [ ".$ip" = "." ]; then
+-           is="is unnumbered interface"
+-       else
+-           is="has IP address $ip"
+-       fi
+-       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is ntop=yes, ${is}"
+-       if [ "${debug}" = "y" ]; then echo "DEBUG: $eth ntop=yes, ${is}"; fi
+-
+-    done
+-
+-else
+-    logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Skipping interface scan - list in parms"
+-fi
+-
+ if [ "x${ntopinterface}" = "x" ]; then
+   ntopinterface="none"
+ fi
+@@ -462,12 +402,6 @@ config_interfaces () {
+           if="${if},${eth}"
+       fi
+ 
+-       if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-            logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+-            continue
+-       fi
+-
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Configuring $eth"
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Configuring $eth"; fi
+ 
+@@ -527,7 +461,7 @@ start () {
+   show_extra
+   config_interfaces
+ 
+-  cmd=`echo $prog \
++  cmd=`echo \
+                @${conf} \
+                -i $if \
+                $extra $@`
+@@ -541,7 +475,7 @@ start () {
+   if [ ".${ldlibpath}" != "." ]; then
+     export LD_LIBRARY_PATH="${ldlibpath}"
+   fi
+-  daemon ${cmd}
++  start-stop-daemon --start --quiet --exec $prog -- ${cmd}
+   RETVAL=$?
+ 
+   [ $RETVAL = 0 ] && touch /var/lock/subsys/${name}${instance}
+@@ -551,6 +485,7 @@ start () {
+ stop () {
+   # stop daemon
+ 
++  NOT_RUNNING=1
+   RETVAL=1
+   echo -n $"Stopping ${name}${instance}: "
+   logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Stopping: ${name}${instance}"
+@@ -563,13 +498,14 @@ stop () {
+     if [ $rc = 0 ]; then
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${pid}"
+       if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${pid}"; fi
+-      kill -s SIGTERM ${pid}
++      kill -TERM ${pid} 2>&1 > /dev/null
+       RETVAL=$?
+       rm -f ${ntopdbfilepath}/ntop.pid
+     else 
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find process ${pid} ... will kill by name"
+       if [ "${debug}" = "y" ]; then echo "Unable to find process ${pid} ... will kill by name"; fi
+     fi
++    NOT_RUNNING=0
+   else
+ 
+     logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unable to find ${ntopdbfilepath}/ntop.pid file ... will kill by name"
+@@ -577,15 +513,16 @@ stop () {
+ 
+   fi
+ 
+-  echo 
+-
+   if [ $RETVAL != 0 ]; then
+     pids=`ps axf | grep '\/usr\/bin\/ntop' | awk '{ printf(" %s", $1) }; END { print "" }'`
+-    if [ "${pids}" != " " ]; then
++    if [ "${pids}" != "" ]; then
+       logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Sending SIGTERM to ${prog}...${pids}"
+       if [ "${debug}" = "y" ]; then echo "Sending SIGTERM to ${prog}...${pids}"; fi
+-      kill -INT ${pids}
++      kill -TERM ${pids} > /dev/null 2>&1
+       RETVAL=$?
++      NOT_RUNNING=0
++    else
++      NOT_RUNNING=1
+     fi
+   fi
+ 
+@@ -597,13 +534,9 @@ stop () {
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring interfaces"; fi
+ 
+       for eth in ${ntopinterface}; do
+-          if ! LANG=C egrep -L "^[Nn][Tt][Oo][Pp][Cc].*=['\"]?[Yy][Ee][Ss]['\"]?" \
+-                   /etc/sysconfig/network-scripts/ifcfg-$eth > /dev/null ; then
+-              logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - $eth is not ntopconfigure=yes, skipping"
+-              if [ "${debug}" = "y" ]; then echo "DEBUG: $eth is not ntopconfigure=yes"; fi
+-              continue
++          if [ "$eth" = "none" ]; then
++               continue
+           fi
+-
+           logger -p ${ntopusesyslog} -t ${name}${instance} -- "INITD - Unconfiguring $eth"
+           if [ "${debug}" = "y" ]; then echo "DEBUG: Unconfiguring $eth"; fi
+     
+@@ -623,6 +556,13 @@ stop () {
+       if [ "${debug}" = "y" ]; then echo "DEBUG: Interfaces are unconfigured"; fi
+   fi
+ 
++  if [ $NOT_RUNNING -eq 1 -o $RETVAL -eq 0 ]; then
++    echo " [ OK ]"
++    RETVAL=0
++  else
++    echo " [ FAILED ]"
++  fi
++
+   return $RETVAL
+ }
+ 
+-- 
+1.7.5.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
new file mode 100644
index 0000000..9f57ca4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/ntop_webInterface.patch
@@ -0,0 +1,19 @@
+change osName to version as it prints out "ntop Version".
+
+Upstream-Status: Pending
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+---
+diff --git a/webInterface.c b/webInterface.c
+index 5622e69..8cb7a67 100644
+--- a/webInterface.c
++++ b/webInterface.c
+@@ -5816,7 +5816,7 @@ static void printNtopConfigInfoData(int textPrintFlag, UserPref *pref) {
+   printInfoSectionTitle(textPrintFlag, "Basic Information");
+ 
+   safe_snprintf(__FILE__, __LINE__, formatBuf, sizeof(formatBuf), "%s (%d bit)",
+-		osName, sizeof(long) == 8 ? 64 : 32);
++		version, sizeof(long) == 8 ? 64 : 32);
+   printFeatureConfigInfo(textPrintFlag, "ntop Version", formatBuf);
+ 
+ #ifndef WIN32
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
new file mode 100644
index 0000000..2b001c1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop/use-static-inline.patch
@@ -0,0 +1,32 @@
+[PATCH] replace 'inline' with 'static inline' for gcc 5.x
+
+gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which change
+the semantics for inline functions and the standalone 'inline'
+causes error with "gcc5 -g -o0"
+ 
+Replace inline with static inline to be compatible with both gcc 4
+and 5.
+
+Upstream-status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ nDPI/src/lib/protocols/ssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nDPI/src/lib/protocols/ssl.c b/nDPI/src/lib/protocols/ssl.c
+index 245b8c3..72beda9 100644
+--- a/nDPI/src/lib/protocols/ssl.c
++++ b/nDPI/src/lib/protocols/ssl.c
+@@ -39,7 +39,7 @@ static void ipoque_int_ssl_add_connection(struct ipoque_detection_module_struct
+ 
+ #ifdef HAVE_NTOP
+ #ifndef WIN32
+-inline int min(int a, int b) { return(a < b ? a : b); }
++static inline int min(int a, int b) { return(a < b ? a : b); }
+ #endif
+ 
+ static void stripCertificateTrailer(char *buffer, int buffer_len) {
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
new file mode 100644
index 0000000..d835e39
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntop/ntop_5.0.1.bb
@@ -0,0 +1,142 @@
+SUMMARY = "ntop is network top"
+DESCRIPTION = "ntop is a network traffic probe that shows the network usage, \
+similar to what the popular top Unix command does."
+
+SECTION = "console/network"
+
+LICENSE = "GPLv2+ & GPLv3 & OpenSSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE-OpenSSL.txt;md5=a409f902e447ddd889cffa0c70e7c7c2 \
+                   "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ntop/ntop-${PV}.tar.gz \
+           file://ntop_configure_in.patch \
+           file://ntop_init.patch \
+           file://ntop_webInterface.patch \
+           file://ntop_configure_in_net_snmp_config_exist.patch \
+           file://ntop.service \
+           file://use-static-inline.patch \
+           file://0001-nDPI-Include-sys-types.h.patch \
+           file://0001-plugins-Makefile.am-fix-for-automake-1.16.1.patch \
+           file://fix-missing-return-from-non-void-function.patch \
+           file://embed-libs.patch \
+          "
+SRC_URI[md5sum] = "01710b6925a8a5ffe1a41b8b512ebd69"
+SRC_URI[sha256sum] = "7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/ntop/files/ntop/Stable"
+
+inherit autotools-brokensep useradd python3native pkgconfig systemd
+
+DEPENDS = "geoip rrdtool python3 zlib libpcap gdbm"
+
+PACKAGECONFIG ??= "openssl snmp plugins"
+PACKAGECONFIG[openssl] = "--with-ssl, --without-ssl, openssl, openssl"
+PACKAGECONFIG[snmp] = "--enable-snmp=yes NETSNMP=${STAGING_BINDIR_CROSS}/net-snmp-config, \
+--disable-snmp,net-snmp,"
+PACKAGECONFIG[plugins] = "--enable-plugins=yes, --disable-plugins, ,"
+
+EXTRA_OECONF += "ac_cv_file_aclocal_m4=yes ac_cv_file_depcomp=no PYTHON_CONFIG=python3-config"
+
+do_configure() {
+    cp ${STAGING_DATADIR_NATIVE}/aclocal/libtool.m4 libtool.m4.in
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/nDPI
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/nDPI
+    cat acinclude.m4.in acinclude.m4.ntop libtool.m4.in > acinclude.m4
+    cp 3rd_party/* ./
+
+    # config nDPI
+    cd nDPI
+    ./configure ${CONFIGUREOPTS} --with-pic
+    cd ..
+
+    sed -i -e 's:^CFG_DBFILE_DIR=$localstatedir/ntop:CFG_DBFILE_DIR=$localstatedir/lib/ntop:' ${S}/configure.in
+
+    # fix the CFLAGS, CPPFLAGS, LDFLAGS, remove the host include
+    sed -i \
+        -e 's:\(^CFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^CPPFLAGS="\$.*\) -I/usr/local/include -I/opt/local/include":\1":' \
+        -e 's:\(^LDFLAGS="\$.*\) -L/usr/local/lib -L/opt/local/lib":\1":' \
+        ${S}/configure.in
+
+    # replace the DISTRO RELEASE in configure.in which are host's
+    # with our release, although those doesn't affect functionality
+    sed -i -e \
+        '/DEFINEOS="LINUX"/{N;s/DISTRO=.*/DISTRO="${DISTRO}"/;N;s/RELEASE=.*/RELEASE="${DISTRO_VERSION}"/;}' \
+        ${S}/configure.in
+
+    # osName in original configure.in should be ${TARGET_SYS}
+    # which will show in ntop's "show configuration"
+    sed -i -e \
+        's:^osName=.*:osName=${TARGET_SYS}:' \
+        ${S}/configure.in
+
+    # rename configureextra to configureextra_rename to avoid
+    # configure.in to guess host OS and pull in more configure, non needed
+    # which will cause some cross-compiling failure on specific host
+    # e.g. SUSE(SLED...)
+    test ! -f configureextra || mv -f configureextra configureextra_rename
+
+    # make sure configure finds python includdirs/libs with these envs
+    export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+        STAGING_INCDIR=${STAGING_INCDIR} \
+        STAGING_LIBDIR=${STAGING_LIBDIR}
+
+    autotools_do_configure
+}
+
+do_compile_prepend() {
+    cd nDPI
+    oe_runmake
+    cd ..
+}
+
+do_install_append() {
+    # remove the empty dirs
+    rm -rf ${D}${libdir}/plugins
+
+    install -D -m 0755 ${S}/packages/RedHat/ntop.init \
+        ${D}${sysconfdir}/init.d/ntop
+    install -D -m 0644 ${S}/packages/RedHat/ntop.conf.sample \
+        ${D}${sysconfdir}/ntop.conf
+
+    # change ntop dir in ntop.conf
+    # don't use the -P as the ntop.init didn't support it
+    sed -i -e "s:^--db-file-path /usr/share/ntop:--db-file-path /var/lib/ntop:" \
+        -e "s:^#? -P /var/ntop:#? -P /var/lib/ntop:" \
+        ${D}${sysconfdir}/ntop.conf
+
+    # For systemd
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0755 ${S}/packages/RedHat/ntop.init ${D}${libexecdir}/ntop-helper
+        install -D -m 0644 ${WORKDIR}/ntop.service ${D}${systemd_system_unitdir}/ntop.service
+        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+            -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+            ${D}${systemd_system_unitdir}/ntop.service
+    fi
+
+    # Fix host-user-contaminated issue
+    chown -R root:root ${D}
+
+    chown -R ntop.ntop ${D}${datadir}/ntop
+    chown -R ntop:ntop ${D}${localstatedir}/lib/ntop
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-M -g ntop -r -d ${localstatedir}/lib/ntop \
+-s /usr/sbin/nologin -c 'ntop' ntop"
+GROUPADD_PARAM_${PN} = "-r ntop"
+
+SYSTEMD_SERVICE_${PN} = "ntop.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN}_append = "${libdir}/ntop/plugins ${libdir}/libntop-*.so \
+                      ${libdir}/libntopreport-*.so ${libdir}/lib*-${PV}.so"
+FILES_${PN}-dev = "${includedir} ${libdir}/libntop.so \
+                   ${libdir}/libntopreport.so \
+                   ${libdir}/libnetflowPlugin.so ${libdir}/libsflowPlugin.so \
+                   ${libdir}/librrdPlugin.so \
+                   ${libdir}/*.a ${libdir}/libntopreport.a ${libdir}/*.la"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
new file mode 100644
index 0000000..d45b7e3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
@@ -0,0 +1,27 @@
+From 2310898533f059d875dcffd26ab6cf1b280292fd Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 12 Jan 2011 21:38:46 +0100
+
+---
+ include/ntp_syscall.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/include/ntp_syscall.h b/include/ntp_syscall.h
+index d1ce03e..9e18432 100644
+--- a/include/ntp_syscall.h
++++ b/include/ntp_syscall.h
+@@ -10,6 +10,14 @@
+ # include <sys/timex.h>
+ #endif
+ 
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ # ifdef NTP_SYSCALLS_STD
+ #  define ntp_adjtime(t)	syscall(SYS_ntp_adjtime, (t))
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf
new file mode 100644
index 0000000..b590030
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp.conf
@@ -0,0 +1,21 @@
+# This is the most basic ntp configuration file
+# The driftfile must remain in a place specific to this
+# machine - it records the machine specific clock error
+driftfile /var/lib/ntp/drift
+# This should be a server that is close (in IP terms)
+# to the machine.  Add other servers as required.
+# Unless you un-comment the line below ntpd will sync
+# only against the local system clock.
+#
+# server time.server.example.com
+#
+# Using local hardware clock as fallback
+# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
+server 127.127.1.0
+fudge 127.127.1.0 stratum 14
+# Defining a default security setting
+restrict -4 default notrap nomodify nopeer noquery
+restrict -6 default notrap nomodify nopeer noquery
+
+restrict 127.0.0.1    # allow local host
+restrict ::1          # allow local host
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd
new file mode 100755
index 0000000..d1b9c49
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd
@@ -0,0 +1,84 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides:        ntp
+# Required-Start:  $network $remote_fs $syslog
+# Required-Stop:   $network $remote_fs $syslog
+# Default-Start:   2 3 4 5
+# Default-Stop:
+# Short-Description: Start NTP daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/ntpd
+PIDFILE=/var/run/ntpd.pid
+
+# ntpd	init.d script for ntpdc from ntp.isc.org
+test -x $DAEMON -a -r /etc/ntp.conf || exit 0
+
+# rcS contains TICKADJ
+test -r /etc/default/rcS && . /etc/default/rcS
+
+# Source function library.
+. /etc/init.d/functions
+
+# Functions to do individual actions
+settick(){
+  	# If TICKADJ is set we *must* adjust it before we start, because the
+	# driftfile relies on the correct setting
+	test -n "$TICKADJ" -a -x /usr/sbin/tickadj && {
+		echo -n "Setting tick to $TICKADJ: "
+		/usr/sbin/tickadj "$TICKADJ"
+		echo "done"
+	}
+}
+startdaemon(){
+	# The -g option allows ntpd to step the time to correct it just
+	# once.  The daemon will exit if the clock drifts too much after
+	# this.  If ntpd seems to disappear after a while assume TICKADJ
+	# above is set to a totally incorrect value.
+	echo -n "Starting ntpd: "
+	start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -u ntp:ntp -p $PIDFILE "$@"
+	echo "done"
+}
+stopdaemon(){
+	echo -n "Stopping ntpd: "
+	start-stop-daemon --stop --quiet --oknodo -p $PIDFILE
+	echo "done"
+}
+
+case "$1" in
+  start)
+  	settick
+	startdaemon -g
+	;;
+  stop)
+  	stopdaemon
+	;;
+  force-reload)
+  	stopdaemon
+  	settick
+	startdaemon -g
+	;;
+  restart)
+  	# Don't reset the tick here
+	stopdaemon
+	startdaemon -g
+	;;
+  reload)
+  	# Must do this by hand, but don't do -g
+	stopdaemon
+	startdaemon
+	;;
+  status)
+	status /usr/sbin/ntpd;
+	exit $?
+	;;
+  *)
+	echo "Usage: ntpd { start | stop | status | restart | reload }" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
new file mode 100644
index 0000000..d1fe6b7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.list
@@ -0,0 +1 @@
+ntpd.service
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service
new file mode 100644
index 0000000..0e3d7cd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/ntpd.pid
+ExecStart=/usr/sbin/ntpd -u ntp:ntp -p /run/ntpd.pid -g
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate
new file mode 100755
index 0000000..17b64d1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+test -x /usr/sbin/ntpdate || exit 0
+
+if test -f /etc/default/ntpdate ; then
+. /etc/default/ntpdate
+fi
+
+if [ "$NTPSERVERS" = "" ] ; then
+	if [ "$METHOD" = "" -a "$1" != "silent" ] ; then
+		echo "Please set NTPSERVERS in /etc/default/ntpdate"
+		exit 1
+	else
+		exit 0
+	fi
+fi
+
+# This is a heuristic:  The idea is that if a static interface is brought
+# up, that is a major event, and we can put in some extra effort to fix
+# the system time.  Feel free to change this, especially if you regularly
+# bring up new network interfaces.
+if [ "$METHOD" = static ]; then
+	OPTS="-b"
+fi
+
+if [ "$METHOD" = loopback ]; then
+	exit 0
+fi
+
+(
+
+LOCKFILE=/var/lock/ntpdate
+
+# Avoid running more than one at a time
+if [ -x /usr/bin/lockfile-create ]; then
+	lockfile-create $LOCKFILE
+	lockfile-touch $LOCKFILE &
+	LOCKTOUCHPID="$!"
+fi
+
+if /usr/sbin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
+	if [ "$UPDATE_HWCLOCK" = "yes" ]; then
+		hwclock --systohc || :
+	fi
+fi
+
+if [ -x /usr/bin/lockfile-create ] ; then
+	kill $LOCKTOUCHPID
+	lockfile-remove $LOCKFILE
+fi
+
+) &
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default
new file mode 100644
index 0000000..486b6e0
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.default
@@ -0,0 +1,7 @@
+# Configuration script used by ntpdate-sync script
+
+NTPSERVERS=""
+
+# Set to "yes" to write time to hardware clock on success
+UPDATE_HWCLOCK="no"
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service
new file mode 100644
index 0000000..10cbd70
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntpdate.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service (one-shot ntpdate mode)
+Before=ntpd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ntpdate-sync silent
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/reproducibility-fixed-path-to-posix-shell.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/reproducibility-fixed-path-to-posix-shell.patch
new file mode 100644
index 0000000..571db75
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/reproducibility-fixed-path-to-posix-shell.patch
@@ -0,0 +1,15 @@
+--- ntp-4.2.8p12.original/sntp/libopts/m4/libopts.m4	2018-11-12 17:54:57.747220846 +1300
++++ ntp-4.2.8p12/sntp/libopts/m4/libopts.m4	2018-11-12 18:00:50.626211641 +1300
+@@ -114,12 +114,6 @@
+   AC_PROG_SED
+   [while :
+   do
+-      POSIX_SHELL=`which bash`
+-      test -x "$POSIX_SHELL" && break
+-      POSIX_SHELL=`which dash`
+-      test -x "$POSIX_SHELL" && break
+-      POSIX_SHELL=/usr/xpg4/bin/sh
+-      test -x "$POSIX_SHELL" && break
+       POSIX_SHELL=`/bin/sh -c '
+           exec 2>/dev/null
+           if ! true ; then exit 1 ; fi
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
new file mode 100644
index 0000000..f8c5895
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp
@@ -0,0 +1 @@
+NTPSERVER="ntpserver.example.org"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service
new file mode 100644
index 0000000..4898b8a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp/sntp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Simple Network Time Service Client
+After=network.target
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/sntp
+ExecStart=/usr/sbin/sntp -s $NTPSERVER
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
new file mode 100644
index 0000000..7e16882
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
@@ -0,0 +1,177 @@
+SUMMARY = "Network Time Protocol daemon and utilities"
+DESCRIPTION = "The Network Time Protocol (NTP) is used to \
+synchronize the time of a computer client or server to \
+another server or reference time source, such as a radio \
+or satellite receiver or modem."
+HOMEPAGE = "http://support.ntp.org"
+SECTION = "net"
+LICENSE = "NTP"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4190b39435611e92a4da74e682623f19"
+
+DEPENDS = "libevent"
+
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
+           file://ntp-4.2.4_p6-nano.patch \
+           file://reproducibility-fixed-path-to-posix-shell.patch \
+           file://ntpd \
+           file://ntp.conf \
+           file://ntpdate \
+           file://ntpdate.default \
+           file://ntpdate.service \
+           file://ntpd.service \
+           file://sntp.service \
+           file://sntp \
+           file://ntpd.list \
+"
+
+SRC_URI[sha256sum] = "f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19"
+
+inherit autotools update-rc.d useradd systemd pkgconfig
+
+# The ac_cv_header_readline_history is to stop ntpdc depending on either
+# readline or curses
+EXTRA_OECONF += "--with-net-snmp-config=no \
+                 --without-ntpsnmpd \
+                 ac_cv_header_readline_history_h=no \
+                 --with-yielding_select=yes \
+                 --with-locfile=redhat \
+                 --without-rpath \
+                 "
+CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
+
+USERADD_PACKAGES = "${PN}"
+NTP_USER_HOME ?= "/var/lib/ntp"
+USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
+                       --no-create-home \
+                       --shell /bin/false --user-group ntp"
+
+# NB: debug is default-enabled by NTP; keep it default-enabled here.
+PACKAGECONFIG ??= "cap debug refclocks openssl \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
+                          --with-openssl-incdir=${STAGING_INCDIR} \
+                          --with-crypto, \
+                          --without-openssl --without-crypto, \
+                          openssl"
+PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
+PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
+PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
+PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
+PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/init.d
+    install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
+    install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
+    install -d ${D}${bindir}
+    install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
+
+    install -m 755 -d ${D}${NTP_USER_HOME}
+    chown ntp:ntp ${D}${NTP_USER_HOME}
+
+    # Fix hardcoded paths in scripts
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
+    sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
+    sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
+
+    install -d ${D}/${sysconfdir}/default
+    install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
+    install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
+
+    install -d ${D}/${sysconfdir}/network/if-up.d
+    ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
+
+    install -d ${D}${systemd_unitdir}/ntp-units.d
+    install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
+
+    # Remove an empty libexecdir.
+    rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
+}
+
+PACKAGES += "ntpdate sntp ntpdc ntpq ${PN}-tickadj ${PN}-utils"
+# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
+
+# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
+# with wonky clocks (e.g. OpenSlug)
+RDEPENDS_${PN} = "${PN}-tickadj"
+# ntpd require libgcc for execution
+RDEPENDS_${PN} += "libgcc"
+# Handle move from bin to utils package
+RPROVIDES_${PN}-utils = "${PN}-bin"
+RREPLACES_${PN}-utils = "${PN}-bin"
+RCONFLICTS_${PN}-utils = "${PN}-bin"
+# ntpdc and ntpq were split out of ntp-utils
+RDEPENDS_${PN}-utils = "ntpdc ntpq"
+
+SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
+SYSTEMD_SERVICE_${PN} = "ntpd.service"
+SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
+SYSTEMD_SERVICE_sntp = "sntp.service"
+SYSTEMD_AUTO_ENABLE_sntp = "disable"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+RPROVIDES_ntpdate += "ntpdate-systemd"
+RREPLACES_ntpdate += "ntpdate-systemd"
+RCONFLICTS_ntpdate += "ntpdate-systemd"
+
+RSUGGESTS_${PN} = "iana-etc"
+
+FILES_${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd \
+    ${NTP_USER_HOME} \
+    ${systemd_unitdir}/ntp-units.d/60-ntpd.list \
+"
+FILES_${PN}-tickadj = "${sbindir}/tickadj"
+FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
+RDEPENDS_${PN}-utils += "perl"
+FILES_ntpdate = "${sbindir}/ntpdate \
+    ${sysconfdir}/network/if-up.d/ntpdate-sync \
+    ${bindir}/ntpdate-sync \
+    ${sysconfdir}/default/ntpdate \
+    ${systemd_unitdir}/system/ntpdate.service \
+"
+FILES_sntp = "${sbindir}/sntp \
+              ${sysconfdir}/default/sntp \
+              ${systemd_unitdir}/system/sntp.service \
+             "
+FILES_ntpdc = "${sbindir}/ntpdc"
+FILES_ntpq = "${sbindir}/ntpq"
+
+CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
+CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
+
+INITSCRIPT_NAME = "ntpd"
+# No dependencies, so just go in at the standard level (20)
+INITSCRIPT_PARAMS = "defaults"
+
+pkg_postinst_ntpdate() {
+    if ! grep -q -s ntpdate $D/var/spool/cron/root; then
+        echo "adding crontab"
+        test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
+        echo "30 * * * *    ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
+    fi
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "ntpd"
+ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket
new file mode 100644
index 0000000..a8ae74f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Network Performance Testing Server Activation Socket
+
+[Socket]
+ListenStream=5000
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service
new file mode 100644
index 0000000..b778e85
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Network Performance Testing Server
+After=local-fs.target
+
+[Service]
+User=nobody
+ExecStart=/usr/bin/nuttcp -S
+StandardInput=socket
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb
new file mode 100644
index 0000000..193caf3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb
@@ -0,0 +1,38 @@
+SUMMARY = "network performance measurement tool"
+DESCRIPTION = "nuttcp is a network performance measurement tool intended for use by network \
+and system managers. Its most basic usage is to determine the raw TCP (or UDP) \
+network layer throughput by transferring memory buffers from a source system \
+across an interconnecting network to a destination system, either transferring \
+data for a specified time interval, or alternatively transferring a specified \
+number of bytes."
+HOMEPAGE = "http://www.nuttcp.net/Welcome%20Page.html"
+LICENSE = "GPL-2.0"
+SECTION = "net"
+LIC_FILES_CHKSUM = "file://${BP}.c;beginline=4;endline=30;md5=496a7c0bb83c07ff528d226bf85e05c5"
+
+UPSTREAM_CHECK_URI = "https://www.nuttcp.net/nuttcp/beta/"
+
+SRC_URI = "http://nuttcp.net/${BPN}/beta/${BP}.c \
+           file://nuttcp@.service \
+           file://nuttcp.socket"
+SRC_URI[md5sum] = "d3c92c4d2f261221193c3726c1b9a42f"
+SRC_URI[sha256sum] = "8c5595bcd27c2fd66831be74c390df078cfb1870aa427f2511ac2586d236c8a1"
+
+S = "${WORKDIR}"
+
+do_compile () {
+    ${CC} ${CFLAGS} ${LDFLAGS} -o nuttcp nuttcp-${PV}.c
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0755 nuttcp ${D}${bindir}
+    install -m 0644 ${WORKDIR}/nuttcp@.service ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/nuttcp.socket ${D}${systemd_system_unitdir}
+}
+
+FILES_${PN} += " \
+    ${bindir} \
+    ${systemd_system_unitdir} \
+"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nvmetcli/nvmetcli_0.7.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nvmetcli/nvmetcli_0.7.bb
new file mode 100644
index 0000000..31f55e3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/nvmetcli/nvmetcli_0.7.bb
@@ -0,0 +1,39 @@
+SUMMARY = "NVM-Express target user space configuration utility."
+DESCRIPTION = "This package contains the command line interface to the NVMe \
+over Fabrics nvmet in the Linux kernel.  It allows configuring the nvmet \
+interactively as well as saving / restoring the configuration to / from a json \
+file."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1dece7821bf3fd70fe1309eaa37d52a2"
+
+inherit systemd setuptools3
+
+# nvmet service will start and stop the NVMe Target configuration on boot and
+# shutdown from a saved NVMe Target configuration in the /etc/nvmet/config.json
+# file. This file is not installed by default since the configuration will vary
+# on real systems. Example configuration files are provided by including the
+# nvmetcli-examples package.
+SYSTEMD_SERVICE_${PN} = "nvmet.service"
+
+SYSTEMD_AUTO_ENABLE ?= "disable"
+
+RDEPENDS_${PN} += "python3 python3-six python3-pyparsing python3-configshell-fb"
+
+SRCREV = "0a6b088db2dc2e5de11e6f23f1e890e4b54fee64"
+SRC_URI = "git://git.infradead.org/users/hch/nvmetcli.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+do_install_append() {
+    # Install example configuration scripts.
+    install -d ${D}${datadir}/nvmet
+    cp -fr ${S}/examples ${D}${datadir}/nvmet/
+
+    # Install systemd service file.
+    install -d ${D}${systemd_unitdir}/system
+    cp -fr ${S}/nvmet.service ${D}${systemd_unitdir}/system
+}
+
+# Examples package contains example json files used to configure nvmet.
+PACKAGES += "${PN}-examples"
+FILES_${PN}-examples = "${datadir}/nvmet/examples/*"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.99.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.99.bb
new file mode 100644
index 0000000..a03b92f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.99.bb
@@ -0,0 +1,38 @@
+# Copyright (C) 2016 Joe MacDonald <joe_macdonald@mentor.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "iSNS daemon and utility programs"
+DESCRIPTION = "This is a partial implementation of RFC4171, the Internet \
+Storage Name Service (iSNS).  The distribution includes the iSNS server, \
+supporting persisten storage of registrations, isnsadm, a command line \
+utility for managing nodes, and isnsdd, a corresponding discovery daemon."
+HOMEPAGE = "http://github.com/gonzoleeman/open-isns/"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
+SECTION = "net"
+
+DEPENDS = "openssl"
+
+SRC_URI = "git://github.com/open-iscsi/open-isns"
+
+SRCREV = "cfdbcff867ee580a71bc9c18c3a38a6057df0150"
+
+S = "${WORKDIR}/git"
+
+inherit systemd autotools-brokensep update-rc.d
+
+EXTRA_OECONF = " --prefix=${prefix} --enable-shared"
+EXTRA_OEMAKE += "SYSTEMDDIR=${D}${systemd_unitdir}/system"
+
+do_install_append () {
+    oe_runmake INCDIR=${D}${includedir}/libisns/ install_hdrs
+    oe_runmake LIBDIR=${D}${libdir} install_lib
+
+    install -D -m 755 ${S}/etc/openisns.init ${D}${sysconfdir}/init.d/openisns
+    sed -i 's|daemon isnsd|start-stop-daemon --start --quiet --oknodo --exec ${sbindir}/isnsd --|' \
+        ${D}${sysconfdir}/init.d/openisns
+}
+
+FILES_${PN} += "${libdir} ${systemd_unitdir}"
+
+INITSCRIPT_NAME = "openisns"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
new file mode 100644
index 0000000..2434884
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
@@ -0,0 +1,27 @@
+From 7854c60c92243adb14ea89e16fc226d2e47dd4f9 Mon Sep 17 00:00:00 2001
+From: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu, 7 Jun 2012 16:00:13 -0400
+Subject: [PATCH] Fix symlink install error in cmdlang
+
+This patch fixes the error during the install stage when
+creating a symbolic link for opeipmish in openipmi/cmdlang
+
+Upstream-Status: Pending
+
+Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+---
+ cmdlang/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
+index 0ca3827..d9a941f 100644
+--- a/cmdlang/Makefile.am
++++ b/cmdlang/Makefile.am
+@@ -35,6 +35,7 @@ openipmish_LDADD =  libOpenIPMIcmdlang.la \
+ # compatability.
+ install-data-local:
+ 	rm -f $(DESTDIR)$(bindir)/ipmish
++	mkdir -p $(DESTDIR)$(bindir)/
+ 	$(LN_S) openipmish $(DESTDIR)$(bindir)/ipmish
+ 
+ uninstall-local:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
new file mode 100644
index 0000000..61b3999
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
@@ -0,0 +1,30 @@
+From 4f41e090e33a00117a27f0c77b6338fb8b495f37 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Jun 2017 21:58:32 -0700
+Subject: [PATCH] openipmi: Fix build with musl
+
+include sys/types.h for u_int32_t
+
+ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'?
+     u_int32_t     addr;
+     ^~~~~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ui/ui.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ui/ui.c b/ui/ui.c
+index 529ff22..066d118 100644
+--- a/ui/ui.c
++++ b/ui/ui.c
+@@ -42,6 +42,7 @@
+ #include <fcntl.h>
+ #include <time.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <ctype.h>
+ 
+ #include <OpenIPMI/ipmi_err.h>
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
new file mode 100644
index 0000000..c4559c9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
@@ -0,0 +1,42 @@
+From 6542ebe7a0d37dee8e9afb856feb8f6c3d334632 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 29 Dec 2014 18:16:04 +0800
+Subject: [PATCH] ipmi-init: fix the arguments
+
+The functions success/failure/warning defined in /etc/init.d/functions
+(provided by initscripts) only accepts numeric argument as return code,
+not a string.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ ipmi.init | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ipmi.init b/ipmi.init
+index ea10b11..aac9f83 100644
+--- a/ipmi.init
++++ b/ipmi.init
+@@ -45,17 +45,17 @@ elif [ -r /etc/init.d/functions ]; then
+ 	case "$ACTION" in
+ 	    success)
+ 		echo -n $*
+-		success "$*"
++		success 0
+ 		echo
+ 		;;
+ 	    failure)
+ 		echo -n $*
+-		failure "$*"
++		failure 1
+ 		echo
+ 		;;
+ 	    warning)
+ 		echo -n $*
+-		warning "$*"
++		warning 0
+ 		echo
+ 		;;
+ 	    *)
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
new file mode 100644
index 0000000..6fe1378
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/ipmi.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=IPMI Driver
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/openipmi-helper start
+ExecStop=@LIBEXECDIR@/openipmi-helper stop-all
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
new file mode 100755
index 0000000..4cebfb9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-helper
@@ -0,0 +1,512 @@
+#!/bin/sh
+#############################################################################
+#
+# ipmi:		OpenIPMI Driver helper script
+#
+# Authors:	Jan Safranek <jsafrane@redhat.com>
+#
+# Based on IPMI init script by:
+#               Matt Domsch <Matt_Domsch@dell.com>
+#               Chris Poblete <Chris_Poblete@dell.com>
+#
+# Status return code bits
+# no bits set = no errors
+# bit 0 set = minimum modules aren't loaded
+# bit 1 set = requested feature module isn't loaded
+# bit 2 set = /dev/ipmi0 (or /dev/imb if using that instead) doesn't exist
+# bit 3 set = /dev/watchdog doesn't exist
+# bit 4 set = lockfile doesn't exist
+# bit 5 set = modules are loaded even when asked to be unloaded
+
+CONFIGFILE=/etc/sysconfig/ipmi
+# source config info
+[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
+
+#############################################################################
+# GLOBALS
+#############################################################################
+MODULE_NAME="ipmi"
+INTF_NUM=0
+
+IPMI_SMB_MODULE_NAME="ipmi_smb"
+IPMI_SI_MODULE_NAME="ipmi_si"
+kernel=`uname -r | cut -d. -f1-2`
+if [ "${kernel}" == "2.4" ]; then
+    IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
+    IPMI_SI_MODULE_NAME="ipmi_si_drv"
+fi
+
+MODULES_INTERFACES=""
+[ "${DEV_IPMI}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_devintf"
+[ "${IPMI_IMB}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_imb"
+
+MODULES_FEATURES=""
+[ "${IPMI_WATCHDOG}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_watchdog"
+[ "${IPMI_POWEROFF}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_poweroff"
+
+MODULES_HW=""
+[ "${IPMI_SI}"  = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SI_MODULE_NAME}"
+[ "${IPMI_SMB}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SMB_MODULE_NAME}"
+
+MODULES_BASE="ipmi_msghandler"
+MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
+
+RETVAL=0
+LOCKFILE=/var/lock/subsys/ipmi
+DEV_IPMI_TIMEOUT=150
+
+UDEV_EXISTS=0
+if [ -e /sbin/udev -o -e /sbin/udevd ]; then
+    UDEV_EXISTS=1
+fi
+
+#############################################################################
+# NOTES:
+# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
+#   because SLES9 and RHEL4 kernels don't send a message for udev to delete
+#   it for us.
+# 
+#############################################################################
+
+modules_loaded_verbose()
+{
+	OnePlusLoaded=0
+	OnePlusUnloaded=0
+	for m in $@; do
+		if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+			echo "$m module loaded."
+			OnePlusLoaded=1
+		else
+			echo "$m module not loaded."
+			OnePlusUnloaded=1
+		fi
+	done
+}
+
+modules_loaded()
+{
+	OnePlusLoaded=0
+	OnePlusUnloaded=0
+	for m in $@; do
+		if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+			OnePlusLoaded=1
+		else
+			OnePlusUnloaded=1
+		fi
+	done
+}
+
+device_node_exists ()
+{
+	if [ -e "$1" ]; then
+		echo "$1 exists."
+		return 1
+	fi
+	echo "$1 does not exist."
+	return 0
+}
+
+minimum_modules_loaded()
+{
+        rc_base=1
+	rc_hw=1
+        modules_loaded_verbose "${MODULES_BASE}"
+	[ ${OnePlusLoaded} -eq 0 ] && rc_base=0
+	    
+	modules_loaded_verbose "${MODULES_HW}"
+	[ ${OnePlusLoaded} -eq 0 ] && rc_hw=0
+	
+	return $((rc_base && rc_hw))
+}
+
+#############################################################################
+
+load_si()
+{
+	if [ "${IPMI_SI}" = "yes" ]; then
+		modprobe ${IPMI_SI_MODULE_NAME} > /dev/null 2>&1
+		modules_loaded ${IPMI_SI_MODULE_NAME}
+		[ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+	fi
+}
+
+load_smb()
+{
+	if [ "${IPMI_SMB}" = "yes" ]; then
+		modprobe ${IPMI_SMB_MODULE_NAME} > /dev/null 2>&1
+		modules_loaded ${IPMI_SMB_MODULE_NAME}
+		[ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+	fi
+}
+
+load_hw_modules()
+{
+	load_si
+	load_smb
+}
+
+start_watchdog_common()
+{
+	load_hw_modules
+	modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
+	modules_loaded ipmi_watchdog
+	[ ${OnePlusUnloaded} -ne 0 ] &&
+		RETVAL=$((RETVAL | 2)) &&
+		echo "Watchdog startup failed: cannot load ipmi_watchdog module" &&
+		return
+	if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
+		mknod -m 0600 /dev/watchdog c 10 130
+		[ $? -ne 0 ] &&
+			RETVAL=$((RETVAL | 8)) &&
+			echo "Watchdog startup failed: cannot create /dev/watchdog" &&
+			return
+	fi
+}
+
+start_watchdog_quiet()
+{
+	[ "${IPMI_WATCHDOG}" != "yes" ] &&
+		return
+	start_watchdog_common
+}
+
+start_watchdog()
+{
+	[ "${IPMI_WATCHDOG}" != "yes" ] &&
+		RETVAL=$((RETVAL | 2)) &&
+		echo "Watchdog not configured" &&
+		return
+	start_watchdog_common
+}
+
+stop_watchdog()
+{
+	modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+	modules_loaded ipmi_watchdog
+	if [ ${OnePlusLoaded} -ne 0 ]; then
+	    RETVAL=$((RETVAL | 32))
+	    echo "Watchog shutdown failed: cannot unload ipmi_watchdog module"
+	else
+	    if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+		[ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+	    fi
+	fi
+}
+
+stop_watchdog_quiet()
+{
+	modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+	modules_loaded ipmi_watchdog
+	if [ ${OnePlusLoaded} -ne 0 ]; then
+	    RETVAL=$((RETVAL | 32))
+	else
+	    if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+		[ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+	    fi
+	fi
+}
+
+start_powercontrol_common()
+{
+	local poweroff_opts=""
+	load_hw_modules
+	if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
+	    modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
+		poweroff_opts="poweroff_control=2"
+	    modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
+		poweroff_opts="poweroff_powercycle=1"
+	fi
+	modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
+	modules_loaded ipmi_poweroff
+	[ ${OnePlusUnloaded} -ne 0 ] &&
+		RETVAL=$((RETVAL | 2)) &&
+		echo "Powercontroll startup failed: cannot load ipmi_poweroff module" &&
+		return
+}
+
+start_powercontrol_quiet()
+{
+	[ "${IPMI_POWEROFF}" != "yes" ] &&
+		return
+	start_powercontrol_common
+}
+
+start_powercontrol()
+{
+	[ "${IPMI_POWEROFF}" != "yes" ] &&
+		RETVAL=$((RETVAL | 2)) &&
+		echo "Powercontroll not configured" &&
+		return
+	start_powercontrol_common
+}
+
+stop_powercontrol()
+{
+	modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+	modules_loaded ipmi_poweroff
+	if [ ${OnePlusLoaded} -ne 0 ]; then
+	    RETVAL=$((RETVAL | 32))
+	    echo "Powercontroll shutdown failed: cannot unload ipmi_poweroff module"
+	fi
+}
+
+stop_powercontrol_quiet()
+{
+	modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+	modules_loaded ipmi_poweroff
+	[ ${OnePlusLoaded} -ne 0 ] && RETVAL=$((RETVAL | 32))
+}
+
+#############################################################################
+unload_all_ipmi_modules()
+{
+	stop_watchdog_quiet
+	stop_powercontrol_quiet
+	for m in ${MODULES}; do
+		modprobe -q -r ${m} > /dev/null 2>&1
+	done
+        # delete interface node ONLY if ipmi_devintf is unloaded
+        [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+	        rm -f "/dev/ipmi${INTF_NUM}"
+}
+
+unload_ipmi_modules_leave_features()
+{
+	for m in ${MODULES_INTERFACES}; do
+		modprobe -q -r ${m} > /dev/null 2>&1
+	done
+        # delete interface node ONLY if ipmi_devintf is unloaded
+        [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+	        rm -f "/dev/ipmi${INTF_NUM}"
+	lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
+	if [ "$?" -ne "0" ]; then
+		stop_watchdog_quiet
+		stop_powercontrol_quiet
+		for m in ${MODULES}; do
+			modprobe -q -r ${m} > /dev/null 2>&1
+		done
+	fi
+}
+
+#############################################################################
+load_ipmi_modules ()
+{
+	local locdelay
+	modprobe ipmi_msghandler > /dev/null 2>&1
+	modules_loaded ipmi_msghandler
+	[ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+	load_hw_modules
+	[ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+
+	if [ "${DEV_IPMI}" = "yes" ]; then
+		modprobe ipmi_devintf > /dev/null 2>&1
+		modules_loaded ipmi_devintf
+		RETVAL=$((RETVAL & ~2))
+		[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+		if [ ${OnePlusLoaded} -eq 1 ]; then
+			if [ ${UDEV_EXISTS} -eq 0 ]; then
+				DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
+				rm -f /dev/ipmi${INTF_NUM}
+				mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+			fi
+
+			# udev can take several seconds to create /dev/ipmi0, 
+			# but it happens asynchronously, so delay here
+			locdelay=${DEV_IPMI_TIMEOUT}
+			while [ ! -e /dev/ipmi${INTF_NUM} -a ${locdelay} -gt 0 ]; do
+				locdelay=$((locdelay - 1))
+				sleep 0.1
+			done
+		fi
+	fi
+
+	if [ "${IPMI_IMB}" = "yes" ]; then
+		modprobe ipmi_imb > /dev/null 2>&1
+		modules_loaded ipmi_imb
+		RETVAL=$((RETVAL & ~2))
+		[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+		if [ ${OnePlusLoaded} -eq 1 ]; then
+			DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
+			rm -f /dev/imb
+			mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+		fi
+	fi
+
+	# Per Corey Minyard, essentially no one uses ipmi_radisys
+	# and we don't want to encourage its further use
+	# so it won't be handled here.
+	return
+}
+
+#############################################################################
+start()
+{
+	load_ipmi_modules
+	if [ ${RETVAL} -eq 0 ]; then
+		touch ${LOCKFILE}
+	else
+		if [ $((RETVAL & 1)) -eq 1 ]; then
+			echo "Startup failed."
+		else
+			touch ${LOCKFILE} && echo "Warning!?"
+		fi
+	fi
+	start_watchdog_quiet
+	start_powercontrol_quiet
+}
+
+#############################################################################
+stop()
+{
+	unload_ipmi_modules_leave_features
+	modules_loaded ${MODULES_INTERFACES}
+	if [ ${OnePlusLoaded} -ne 0 ]; then
+		RETVAL=$((RETVAL | 32))
+		echo "Shutdown failed, something may be in use"
+	else
+		rm -f ${LOCKFILE}
+	fi
+}
+
+stop_all()
+{
+	unload_all_ipmi_modules
+	modules_loaded ${MODULES}
+	if [ ${OnePlusLoaded} -ne 0 ]; then
+		RETVAL=$((RETVAL | 32))
+		echo "Shutdown failed, something may be in use"
+	else
+		rm -f ${LOCKFILE}
+	fi
+}
+
+#############################################################################
+restart()
+{
+	stop_all
+	RETVAL=0
+	start
+}
+
+#############################################################################
+
+reload()
+{
+	stop_all
+	RETVAL=0
+	start
+}
+
+#############################################################################
+
+status_all()
+{
+	minimum_modules_loaded
+	[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+	
+	modules_loaded_verbose ${MODULES_FEATURES} ${MODULES_INTERFACES}
+	[ ${OnePlusUnloaded} -ne 0 ] && RETVAL=$((RETVAL | 2))
+
+	if [ "${DEV_IPMI}" = "yes" ]; then 
+	    device_node_exists /dev/ipmi${INTF_NUM}
+	    [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+	fi
+
+	if [ "${IPMI_IMB}" = "yes" ]; then
+	    device_node_exists /dev/imb
+	    [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+	fi
+
+	if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+	    device_node_exists /dev/watchdog
+	    [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+	fi
+
+	[ ! -e ${LOCKFILE} ] && RETVAL=$((RETVAL | 16))
+}
+
+status()
+{
+	minimum_modules_loaded
+	[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+	
+	if [ "${DEV_IPMI}" = "yes" ]; then 
+	    modules_loaded_verbose ipmi_devintf
+	    [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+	    device_node_exists /dev/ipmi${INTF_NUM}
+	    [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+	fi
+
+	if [ "${IPMI_IMB}" = "yes" ]; then
+	    device_node_exists /dev/imb
+	    [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+	fi
+}
+
+status_watchdog()
+{
+	minimum_modules_loaded
+	[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+	modules_loaded_verbose ipmi_watchdog
+	[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+	device_node_exists /dev/watchdog
+	[ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+}
+
+status_powercontrol()
+{
+	minimum_modules_loaded
+	[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+	modules_loaded_verbose ipmi_powercontrol
+	[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+}
+
+#############################################################################
+usage ()
+{
+	echo $"Usage: $0 {start|stop|status" 1>&2
+	echo $"          restart|condrestart|try-restart|reload|force-reload" 1>&2
+	echo $"          start-watchdog|stop-watchdog|status-watchdog" 1>&2
+	echo $"          start-powercontrol|stop-powercontrol|status-powercontrol" 1>&2
+	echo $"          stop-all|status-all}" 1>&2
+	RETVAL=2
+}
+
+condrestart ()
+{
+	[ -e ${LOCKFILE} ] && restart
+}
+
+#############################################################################
+# MAIN
+#############################################################################
+case "$1" in
+	start) start ;;
+	stop)  stop ;;
+	restart) restart ;;
+	force-reload) reload ;;
+	reload) reload ;;
+	status)	status ;;
+	status-all) status_all ;;
+	condrestart) condrestart ;;
+	try-restart) condrestart ;;
+	start-watchdog) start_watchdog ;;
+	stop-watchdog) stop_watchdog ;;
+	status-watchdog) status_watchdog ;;
+	start-powercontrol) start_powercontrol ;;
+	stop-powercontrol) stop_powercontrol ;;
+	status-powercontrol) status_powercontrol ;;
+	stop-all) stop_all ;;
+	*) usage ;;
+esac
+
+exit ${RETVAL}
+
+#############################################################################
+# end of file
+#############################################################################
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
new file mode 100644
index 0000000..858adc5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
@@ -0,0 +1,29 @@
+From a6ffa3939a3ab2ad6a8d277cd8292b7dad6469c6 Mon Sep 17 00:00:00 2001
+From: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu, 7 Jun 2012 12:28:34 -0400
+Subject: [PATCH] Do not build openipmigui man page
+
+This patch was carried over from WRL4.3 (openipmi v2.0.16)
+It was updated for openipmi v2.0.19
+Disable making openipmigui man page since we don't need it
+
+Upstream-Status: Pending
+
+Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ man/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 632f55b..5ce79f5 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,6 +1,6 @@
+ 
+ man_MANS = ipmi_ui.1 openipmicmd.1 openipmish.1 ipmi_cmdlang.7 \
+-	openipmigui.1 openipmi_conparms.7 solterm.1 rmcp_ping.1 \
++	openipmi_conparms.7 solterm.1 rmcp_ping.1 \
+ 	openipmi_eventd.1
+ 
+ EXTRA_DIST = $(man_MANS)
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
new file mode 100644
index 0000000..ce37d5e
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
@@ -0,0 +1,48 @@
+From 6395659ca6d64b20bf78bb640c2cc523d6c1d9c2 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 29 Dec 2014 18:16:04 +0800
+Subject: [PATCH] remove host path from la_LDFLAGS
+
+Upstream-Status: Inappropriate [ cross compile specific ]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ cmdlang/Makefile.am | 3 +--
+ unix/Makefile.am    | 6 ++----
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
+index d9a941f..21b9531 100644
+--- a/cmdlang/Makefile.am
++++ b/cmdlang/Makefile.am
+@@ -15,8 +15,7 @@ libOpenIPMIcmdlang_la_SOURCES = cmdlang.c cmd_domain.c cmd_entity.c cmd_mc.c \
+ libOpenIPMIcmdlang_la_LIBADD = -lm \
+ 	$(top_builddir)/utils/libOpenIPMIutils.la \
+ 	$(top_builddir)/lib/libOpenIPMI.la
+-libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ bin_PROGRAMS = openipmish
+ 
+diff --git a/unix/Makefile.am b/unix/Makefile.am
+index 5128839..bd0f897 100644
+--- a/unix/Makefile.am
++++ b/unix/Makefile.am
+@@ -10,14 +10,12 @@ lib_LTLIBRARIES = libOpenIPMIposix.la libOpenIPMIpthread.la
+ libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c
+ libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \
+ 	$(top_builddir)/utils/libOpenIPMIutils.la $(RT_LIB)
+-libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c
+ libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \
+ 	$(GDBM_LIB) $(RT_LIB)
+-libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+-	-L$(libdir)
++libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION)
+ 
+ noinst_HEADERS = heap.h
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.29.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.29.bb
new file mode 100644
index 0000000..6918485
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.29.bb
@@ -0,0 +1,112 @@
+SUMMARY = "IPMI (Intelligent Platform Management Interface) library and tools"
+DESCRIPTION = "OpenIPMI is an effort to create a full-function IPMI system, \
+to allow full access to all IPMI information on a server \
+and to abstract it to a level that will make it easy to use"
+
+HOMEPAGE = "http://openipmi.sourceforge.net"
+
+DEPENDS = " \
+    glib-2.0 \
+    ncurses \
+    net-snmp \
+    openssl \
+    popt \
+    python3 \
+    swig-native \
+    readline \
+    "
+
+LICENSE = "GPLv2 & LGPLv2.1 & BSD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+                    file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \
+                    "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
+           file://fix-symlink-install-error-in-cmdlang.patch \
+           file://openipmi-no-openipmigui-man.patch \
+           file://openipmi-remove-host-path-from-la_LDFLAGS.patch \
+           file://ipmi-init-fix-the-arguments.patch \
+           file://include_sys_types.patch \
+           file://openipmi-helper \
+           file://ipmi.service \
+           "
+
+S = "${WORKDIR}/OpenIPMI-${PV}"
+
+SRC_URI[md5sum] = "46b452e95d69c92e4172b3673ed88d52"
+SRC_URI[sha256sum] = "2244124579afb14e569f34393e9ac61e658a28b6ffa8e5c0d2c1c12a8ce695cd"
+
+inherit autotools-brokensep pkgconfig python3native perlnative update-rc.d systemd cpan-base python3targetconfig
+
+EXTRA_OECONF = "--disable-static \
+                --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
+                --with-python='${STAGING_BINDIR_NATIVE}/python3-native/python3' \
+                --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \
+                --with-glibver=2.0"
+
+PACKAGECONFIG ??= "gdbm"
+PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
+
+PACKAGES += "${PN}-perl ${PN}-python"
+PRIVATE_LIBS_${PN}-perl = "libOpenIPMI.so.0"
+
+FILES_${PN}-perl = " \
+    ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \
+    ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \
+    "
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_${PN}-dbg += " \
+    ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \
+    ${PYTHON_SITEPACKAGES_DIR}/.debug \
+    "
+
+do_configure () {
+
+    # Let's perform regular configuration first then handle perl issues.
+    autotools_do_configure
+
+    perl_ver=`perl -V:version | cut -d\' -f 2`
+    
+    # Force openipmi perl bindings to be compiled using perl-native instead of
+    # the host's perl. Set the proper install directory for the resulting
+    # openipmi.pm and openipmi.so
+    for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do
+        echo "SAL: i = $i"
+        echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE"
+        echo "SAL: libdir = $libdir"
+        sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i
+        sed -i -e "/^PERL_CFLAGS/s:-I .* :-I ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE :g" $i
+        sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i
+    done
+}
+
+do_install_append () {
+    echo "SAL: D = $D"
+    echo "SAL: libdir = $libdir"
+    install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d
+    install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi
+    install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi
+    # SAL: mv: cannot stat `/localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/openipmi-2.0.19-r4/image/usr/lib64/perl5': No such file or directory
+    # SAL: real path to perl is /localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/perl-5.14.2-r8.3/package/usr/lib64/perl5 and it is a symlink to perl so no need to mv.
+    if [ -d ${D}${libdir}/perl5 ]
+    then
+        mv ${D}${libdir}/perl5 ${D}${libdir}/perl
+    fi
+ 
+    # for systemd
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system
+    sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service
+    install -d ${D}${libexecdir}
+    install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir}
+}
+
+INITSCRIPT_NAME = "ipmi"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ipmi.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn
new file mode 100755
index 0000000..e5af4b2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn
@@ -0,0 +1,112 @@
+#!/bin/sh -e
+#
+# Original version by Robert Leslie
+# <rob@mars.org>, edited by iwj and cs
+# Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
+# Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>
+# Modified for respecting pid file on service start by Fabian Klemp <fabian.klemp@axino-group.com>
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+DAEMON=/usr/sbin/openvpn
+CONFIG_DIR=/etc/openvpn
+test -x $DAEMON || exit 0
+test -d $CONFIG_DIR || exit 0
+
+start_vpn () {
+    modprobe tun >/dev/null 2>&1 || true
+    start-stop-daemon --start --quiet --pidfile /var/run/openvpn.$NAME.pid \
+            --exec $DAEMON -- \
+            --daemon --writepid /var/run/openvpn.$NAME.pid \
+            --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || rc="$?"
+    case $rc in
+        1) echo -n " ALREADY STARTED->";;
+        3) echo -n " FAILED->";;
+    esac
+    echo -n " $NAME"
+}
+
+stop_vpn () {
+   kill `cat $PIDFILE` || true
+  rm $PIDFILE
+}
+
+case "$1" in
+start)
+  echo -n "Starting openvpn:"
+
+  if test -z $2 ; then
+    for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
+      NAME=${CONFIG%%.conf}
+      start_vpn
+    done
+  else
+    if test -e $CONFIG_DIR/$2.conf ; then
+      NAME=$2
+      start_vpn
+    else
+      echo -n " No such VPN: $2"
+    fi
+  fi
+  echo "."
+
+  ;;
+stop)
+  echo -n "Stopping openvpn:"
+
+  if test -z $2 ; then
+    for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
+      NAME=`echo $PIDFILE | cut -c18-`
+      NAME=${NAME%%.pid}
+      stop_vpn
+      echo -n " $NAME"
+    done
+  else
+    if test -e /var/run/openvpn.$2.pid ; then
+      PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
+      NAME=`echo $PIDFILE | cut -c18-`
+      NAME=${NAME%%.pid}
+      stop_vpn
+      echo -n " $NAME"
+    else
+      echo -n " No such VPN: $2"
+    fi
+  fi
+  echo "."
+  ;;
+# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
+reload|force-reload)
+  echo -n "Reloading openvpn:"
+  for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
+    NAME=`echo $PIDFILE | cut -c18-`
+    NAME=${NAME%%.pid}
+# If openvpn if running under a different user than root we'll need to restart
+    if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
+      stop_vpn
+      sleep 1
+      start_vpn
+      echo -n "(restarted)"
+    else
+      kill -HUP `cat $PIDFILE` || true
+#    start-stop-daemon --stop --signal HUP --quiet --oknodo \
+#      --exec $DAEMON --pidfile $PIDFILE
+    echo -n " $NAME"
+    fi
+  done
+  echo "."
+  ;;
+
+restart)
+  $0 stop $2
+  sleep 1
+  $0 start $2
+  ;;
+*)
+  echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
new file mode 100644
index 0000000..1205806
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn-volatile.conf
@@ -0,0 +1 @@
+d @LOCALSTATEDIR@/run/openvpn 0755 root root -
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
new file mode 100644
index 0000000..358dcb7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn/openvpn@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
+After=syslog.target network.target
+
+[Service]
+PrivateTmp=true
+Type=forking
+PIDFile=/var/run/openvpn/%i.pid
+ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb
new file mode 100644
index 0000000..529e391
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb
@@ -0,0 +1,73 @@
+SUMMARY = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "https://openvpn.net/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7aee596ed2deefe3e8a861e24292abba"
+DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd update-rc.d
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
+           file://openvpn \
+           file://openvpn@.service \
+           file://openvpn-volatile.conf"
+
+UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
+
+SRC_URI[md5sum] = "52863fa9b98e5a3d7f8bec1d5785a2ba"
+SRC_URI[sha256sum] = "46b268ef88e67ca6de2e9f19943eb9e5ac8544e55f5c1f3af677298d03e64b6e"
+
+SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "openvpn"
+INITSCRIPT_PARAMS_${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ."
+
+CFLAGS += "-fno-inline"
+
+# I want openvpn to be able to read password from file (hrw)
+EXTRA_OECONF += "--enable-iproute2"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
+
+# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
+EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+
+    install -d ${D}/${sysconfdir}/openvpn
+    install -d ${D}/${sysconfdir}/openvpn/sample
+    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
+    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
+    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
+    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
+
+        install -d ${D}/${localstatedir}
+        install -d ${D}/${localstatedir}/lib
+        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
+
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+    fi
+}
+
+PACKAGES =+ " ${PN}-sample "
+
+RRECOMMENDS_${PN} = "kernel-module-tun"
+
+FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
+FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
+                ${sysconfdir}/tmpfiles.d \
+               "
+FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
+                       ${sysconfdir}/openvpn/sample/"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb
new file mode 100644
index 0000000..29499d6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/phytool/phytool.bb
@@ -0,0 +1,15 @@
+SUMMARY = "PHY interface tool for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
+
+PV = "2+git${SRCPV}"
+SRCREV = "8882328c08ba2efb13c049812098f1d0cb8adf0c"
+SRC_URI = "git://github.com/wkz/phytool.git"
+
+S = "${WORKDIR}/git"
+
+# The Makefile has "$PREFIX/bin" hardcoded into it, hence not using $bindir here
+do_install() {
+    install -d ${D}${prefix}/bin
+    oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
new file mode 100644
index 0000000..eb549de
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch
@@ -0,0 +1,28 @@
+From f3e04281bad361249a8dad0cde150a801d720f67 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 18:46:52 -0700
+Subject: [PATCH] configure: Dont use uname to determine target OS
+
+Helps with cross-compiling
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 6c35a72..f9714e2 100755
+--- a/configure
++++ b/configure
+@@ -31,7 +31,7 @@
+ #DEFS += -DSCOPED_ACL
+ #
+ 
+-OS=`uname`
++OS="Linux"
+ CFG=config.mk
+ TMP=`mktemp /tmp/XXXXXX`
+ BUGREPORT_URL="https://github.com/troglobit/pimd/issues"
+-- 
+2.13.3
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
new file mode 100644
index 0000000..2faa7cb
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/pimd/pimd_2.3.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon."
+HOMEPAGE = "http://troglobit.com/pimd.html"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790"
+
+SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.gz \
+           file://0001-configure-Dont-use-uname-to-determine-target-OS.patch \
+           "
+SRC_URI[md5sum] = "a3c03e40540980b2c06e265a17988e60"
+SRC_URI[sha256sum] = "c77a9812751f114490a28a6839b16aac8b020c8d9fd6aa22bf3880c054e19f1d"
+
+EXTRA_OECONF_append_libc-musl = " --embedded-libc"
+
+inherit autotools-brokensep
+
+do_configure() {
+    oe_runconf
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Remove-man-files-which-cant-be-built.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Remove-man-files-which-cant-be-built.patch
new file mode 100644
index 0000000..feed021
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Remove-man-files-which-cant-be-built.patch
@@ -0,0 +1,341 @@
+From 5a8a2f81ef8650f06d1d9d268add612ab46025f1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Jun 2018 22:57:04 -0700
+Subject: [PATCH] Remove man files which cant be built
+
+Remove need for pandoc-prebuilt during cross build
+
+Fixes errors
+
+| CMake Error at libibumad/man/cmake_install.cmake:105 (file):
+|   file INSTALL cannot find
+|   "/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/rdma-core/18.1-r0/git/buildlib/pandoc-prebuilt/41bbb0bed7a781be59e8c0dcd8b7278af2ce6882".
+| Call Stack (most recent call first):
+|   cmake_install.cmake:48 (include)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Update for version 26.1. Remove more man files which can no be built.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ infiniband-diags/man/CMakeLists.txt | 34 -------------------
+ libibumad/man/CMakeLists.txt        |  2 --
+ libibverbs/man/CMakeLists.txt       | 52 -----------------------------
+ librdmacm/man/CMakeLists.txt        |  2 --
+ providers/efa/man/CMakeLists.txt    |  2 --
+ providers/mlx4/man/CMakeLists.txt   |  1 -
+ providers/mlx5/man/CMakeLists.txt   | 65 -------------------------------------
+ 7 files changed, 158 deletions(-)
+
+diff --git a/infiniband-diags/man/CMakeLists.txt b/infiniband-diags/man/CMakeLists.txt
+index 1f1f91c9..094a389f 100644
+--- a/infiniband-diags/man/CMakeLists.txt
++++ b/infiniband-diags/man/CMakeLists.txt
+@@ -46,40 +46,6 @@ rdma_rst_common(
+ )
+ 
+ rdma_man_pages(
+-  check_lft_balance.8.in.rst
+-  dump_fts.8.in.rst
+-  ibaddr.8.in.rst
+-  ibcacheedit.8.in.rst
+-  ibccconfig.8.in.rst
+-  ibccquery.8.in.rst
+-  ibfindnodesusing.8.in.rst
+-  ibhosts.8.in.rst
+-  ibidsverify.8.in.rst
+-  iblinkinfo.8.in.rst
+-  ibnetdiscover.8.in.rst
+-  ibnodes.8.in.rst
+-  ibping.8.in.rst
+-  ibportstate.8.in.rst
+-  ibqueryerrors.8.in.rst
+-  ibroute.8.in.rst
+-  ibrouters.8.in.rst
+-  ibstat.8.in.rst
+-  ibstatus.8.in.rst
+-  ibswitches.8.in.rst
+-  ibsysstat.8.in.rst
+-  ibtracert.8.in.rst
+-  infiniband-diags.8.in.rst
+-  perfquery.8.in.rst
+-  saquery.8.in.rst
+-  sminfo.8.in.rst
+-  smpdump.8.in.rst
+-  smpquery.8.in.rst
+-  vendstat.8.in.rst
+-  )
+-
+-rdma_alias_man_pages(
+-  dump_fts.8 dump_lfts.8
+-  dump_fts.8 dump_mfts.8
+   )
+ 
+ if (ENABLE_IBDIAGS_COMPAT)
+diff --git a/libibumad/man/CMakeLists.txt b/libibumad/man/CMakeLists.txt
+index 185584a0..857a4b8b 100644
+--- a/libibumad/man/CMakeLists.txt
++++ b/libibumad/man/CMakeLists.txt
+@@ -15,7 +15,6 @@ rdma_man_pages(
+   umad_get_mad_addr.3
+   umad_get_pkey.3
+   umad_get_port.3
+-  umad_init.3.md
+   umad_open_port.3
+   umad_poll.3
+   umad_recv.3
+@@ -38,5 +37,4 @@ rdma_alias_man_pages(
+   umad_class_str.3 umad_method_str.3
+   umad_get_ca.3 umad_release_ca.3
+   umad_get_port.3 umad_release_port.3
+-  umad_init.3 umad_done.3
+   )
+diff --git a/libibverbs/man/CMakeLists.txt b/libibverbs/man/CMakeLists.txt
+index e1d5edf8..92c68611 100644
+--- a/libibverbs/man/CMakeLists.txt
++++ b/libibverbs/man/CMakeLists.txt
+@@ -1,24 +1,18 @@
+ rdma_man_pages(
+-  ibv_advise_mr.3.md
+   ibv_alloc_dm.3
+   ibv_alloc_mw.3
+-  ibv_alloc_null_mr.3.md
+   ibv_alloc_parent_domain.3
+   ibv_alloc_pd.3
+   ibv_alloc_td.3
+   ibv_asyncwatch.1
+-  ibv_attach_counters_point_flow.3.md
+-  ibv_attach_mcast.3.md
+   ibv_bind_mw.3
+   ibv_create_ah.3
+   ibv_create_ah_from_wc.3
+   ibv_create_comp_channel.3
+-  ibv_create_counters.3.md
+   ibv_create_cq.3
+   ibv_create_cq_ex.3
+   ibv_modify_cq.3
+   ibv_create_flow.3
+-  ibv_create_flow_action.3.md
+   ibv_create_qp.3
+   ibv_create_qp_ex.3
+   ibv_create_rwq_ind_table.3
+@@ -27,16 +21,8 @@ rdma_man_pages(
+   ibv_create_wq.3
+   ibv_devices.1
+   ibv_devinfo.1
+-  ibv_event_type_str.3.md
+-  ibv_fork_init.3.md
+   ibv_get_async_event.3
+   ibv_get_cq_event.3
+-  ibv_get_device_guid.3.md
+-  ibv_get_device_list.3.md
+-  ibv_get_device_name.3.md
+-  ibv_get_pkey_index.3.md
+-  ibv_get_srq_num.3.md
+-  ibv_inc_rkey.3.md
+   ibv_modify_qp.3
+   ibv_modify_qp_rate_limit.3
+   ibv_modify_srq.3
+@@ -51,24 +37,15 @@ rdma_man_pages(
+   ibv_post_srq_recv.3
+   ibv_query_device.3
+   ibv_query_device_ex.3
+-  ibv_query_gid.3.md
+-  ibv_query_pkey.3.md
+   ibv_query_port.3
+   ibv_query_qp.3
+   ibv_query_rt_values_ex.3
+   ibv_query_srq.3
+-  ibv_rate_to_mbps.3.md
+-  ibv_rate_to_mult.3.md
+   ibv_rc_pingpong.1
+-  ibv_read_counters.3.md
+   ibv_reg_mr.3
+-  ibv_req_notify_cq.3.md
+-  ibv_rereg_mr.3.md
+-  ibv_resize_cq.3.md
+   ibv_srq_pingpong.1
+   ibv_uc_pingpong.1
+   ibv_ud_pingpong.1
+-  ibv_wr_post.3.md
+   ibv_xsrq_pingpong.1
+   )
+ rdma_alias_man_pages(
+@@ -79,47 +56,18 @@ rdma_alias_man_pages(
+   ibv_alloc_mw.3 ibv_dealloc_mw.3
+   ibv_alloc_pd.3 ibv_dealloc_pd.3
+   ibv_alloc_td.3 ibv_dealloc_td.3
+-  ibv_attach_mcast.3 ibv_detach_mcast.3
+   ibv_create_ah.3 ibv_destroy_ah.3
+   ibv_create_ah_from_wc.3 ibv_init_ah_from_wc.3
+   ibv_create_comp_channel.3 ibv_destroy_comp_channel.3
+-  ibv_create_counters.3 ibv_destroy_counters.3
+   ibv_create_cq.3 ibv_destroy_cq.3
+   ibv_create_flow.3 ibv_destroy_flow.3
+-  ibv_create_flow_action.3 ibv_destroy_flow_action.3
+-  ibv_create_flow_action.3 ibv_modify_flow_action.3
+   ibv_create_qp.3 ibv_destroy_qp.3
+   ibv_create_rwq_ind_table.3 ibv_destroy_rwq_ind_table.3
+   ibv_create_srq.3 ibv_destroy_srq.3
+   ibv_create_wq.3 ibv_destroy_wq.3
+-  ibv_event_type_str.3 ibv_node_type_str.3
+-  ibv_event_type_str.3 ibv_port_state_str.3
+   ibv_get_async_event.3 ibv_ack_async_event.3
+   ibv_get_cq_event.3 ibv_ack_cq_events.3
+-  ibv_get_device_list.3 ibv_free_device_list.3
+   ibv_open_device.3 ibv_close_device.3
+   ibv_open_xrcd.3 ibv_close_xrcd.3
+-  ibv_rate_to_mbps.3 mbps_to_ibv_rate.3
+-  ibv_rate_to_mult.3 mult_to_ibv_rate.3
+   ibv_reg_mr.3 ibv_dereg_mr.3
+-  ibv_wr_post.3 ibv_wr_abort.3
+-  ibv_wr_post.3 ibv_wr_complete.3
+-  ibv_wr_post.3 ibv_wr_start.3
+-  ibv_wr_post.3 ibv_wr_atomic_cmp_swp.3
+-  ibv_wr_post.3 ibv_wr_atomic_fetch_add.3
+-  ibv_wr_post.3 ibv_wr_bind_mw.3
+-  ibv_wr_post.3 ibv_wr_local_inv.3
+-  ibv_wr_post.3 ibv_wr_rdma_read.3
+-  ibv_wr_post.3 ibv_wr_rdma_write.3
+-  ibv_wr_post.3 ibv_wr_rdma_write_imm.3
+-  ibv_wr_post.3 ibv_wr_send.3
+-  ibv_wr_post.3 ibv_wr_send_imm.3
+-  ibv_wr_post.3 ibv_wr_send_inv.3
+-  ibv_wr_post.3 ibv_wr_send_tso.3
+-  ibv_wr_post.3 ibv_wr_set_inline_data.3
+-  ibv_wr_post.3 ibv_wr_set_inline_data_list.3
+-  ibv_wr_post.3 ibv_wr_set_sge.3
+-  ibv_wr_post.3 ibv_wr_set_sge_list.3
+-  ibv_wr_post.3 ibv_wr_set_ud_addr.3
+-  ibv_wr_post.3 ibv_wr_set_xrc_srqn.3
+   )
+diff --git a/librdmacm/man/CMakeLists.txt b/librdmacm/man/CMakeLists.txt
+index 2d1efbff..d016c926 100644
+--- a/librdmacm/man/CMakeLists.txt
++++ b/librdmacm/man/CMakeLists.txt
+@@ -20,7 +20,6 @@ rdma_man_pages(
+   rdma_destroy_qp.3
+   rdma_destroy_srq.3
+   rdma_disconnect.3
+-  rdma_establish.3.md
+   rdma_event_str.3
+   rdma_free_devices.3
+   rdma_get_cm_event.3
+@@ -33,7 +32,6 @@ rdma_man_pages(
+   rdma_get_send_comp.3
+   rdma_get_src_port.3
+   rdma_getaddrinfo.3
+-  rdma_init_qp_attr.3.md
+   rdma_join_multicast.3
+   rdma_join_multicast_ex.3
+   rdma_leave_multicast.3
+diff --git a/providers/efa/man/CMakeLists.txt b/providers/efa/man/CMakeLists.txt
+index d6a4f57b..376f293d 100644
+--- a/providers/efa/man/CMakeLists.txt
++++ b/providers/efa/man/CMakeLists.txt
+@@ -1,4 +1,2 @@
+ rdma_man_pages(
+-  efadv_create_driver_qp.3.md
+-  efadv.7.md
+ )
+diff --git a/providers/mlx4/man/CMakeLists.txt b/providers/mlx4/man/CMakeLists.txt
+index 3df77caf..99a75101 100644
+--- a/providers/mlx4/man/CMakeLists.txt
++++ b/providers/mlx4/man/CMakeLists.txt
+@@ -1,6 +1,5 @@
+ rdma_man_pages(
+   mlx4dv_init_obj.3
+   mlx4dv_query_device.3
+-  mlx4dv_set_context_attr.3.md
+   mlx4dv.7
+ )
+diff --git a/providers/mlx5/man/CMakeLists.txt b/providers/mlx5/man/CMakeLists.txt
+index 0bd9eba1..876b6fcf 100644
+--- a/providers/mlx5/man/CMakeLists.txt
++++ b/providers/mlx5/man/CMakeLists.txt
+@@ -1,81 +1,7 @@
+ rdma_man_pages(
+-  mlx5dv_alloc_dm.3.md
+-  mlx5dv_alloc_var.3.md
+-  mlx5dv_create_cq.3.md
+-  mlx5dv_create_flow.3.md
+-  mlx5dv_create_flow_action_modify_header.3.md
+-  mlx5dv_create_flow_action_packet_reformat.3.md
+-  mlx5dv_create_flow_matcher.3.md
+-  mlx5dv_create_mkey.3.md
+-  mlx5dv_create_qp.3.md
+-  mlx5dv_devx_alloc_uar.3.md
+-  mlx5dv_devx_create_cmd_comp.3.md
+-  mlx5dv_devx_create_event_channel.3.md
+-  mlx5dv_devx_get_event.3.md
+-  mlx5dv_devx_obj_create.3.md
+-  mlx5dv_devx_qp_modify.3.md
+-  mlx5dv_devx_query_eqn.3.md
+-  mlx5dv_devx_subscribe_devx_event.3.md
+-  mlx5dv_devx_umem_reg.3.md
+-  mlx5dv_dr_flow.3.md
+-  mlx5dv_dump.3.md
+-  mlx5dv_flow_action_esp.3.md
+   mlx5dv_get_clock_info.3
+   mlx5dv_init_obj.3
+-  mlx5dv_is_supported.3.md
+-  mlx5dv_open_device.3.md
+   mlx5dv_query_device.3
+   mlx5dv_ts_to_ns.3
+-  mlx5dv_wr_post.3.md
+   mlx5dv.7
+ )
+-rdma_alias_man_pages(
+- mlx5dv_alloc_var.3 mlx5dv_free_var.3
+- mlx5dv_create_mkey.3 mlx5dv_destroy_mkey.3
+- mlx5dv_devx_alloc_uar.3 mlx5dv_devx_free_uar.3
+- mlx5dv_devx_create_cmd_comp.3 mlx5dv_devx_destroy_cmd_comp.3
+- mlx5dv_devx_create_event_channel.3 mlx5dv_devx_destroy_event_channel.3
+- mlx5dv_devx_create_cmd_comp.3 mlx5dv_devx_get_async_cmd_comp.3
+- mlx5dv_devx_obj_create.3 mlx5dv_devx_general_cmd.3
+- mlx5dv_devx_obj_create.3 mlx5dv_devx_obj_destroy.3
+- mlx5dv_devx_obj_create.3 mlx5dv_devx_obj_query.3
+- mlx5dv_devx_obj_create.3 mlx5dv_devx_obj_query_async.3
+- mlx5dv_devx_obj_create.3 mlx5dv_devx_obj_modify.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_qp_query.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_cq_modify.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_cq_query.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_wq_modify.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_wq_query.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_srq_modify.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_srq_query.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_ind_tbl_modify.3
+- mlx5dv_devx_qp_modify.3 mlx5dv_devx_ind_tbl_query.3
+- mlx5dv_devx_subscribe_devx_event.3 mlx5dv_devx_subscribe_devx_event_fd.3
+- mlx5dv_devx_umem_reg.3 mlx5dv_devx_umem_dereg.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_dest_table.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_dest_ibv_qp.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_dest_vport.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_flow_counter.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_drop.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_flow_meter.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_modify_header.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_packet_reformat.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_create_tag.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_destroy.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_action_modify_flow_meter.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_domain_create.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_domain_destroy.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_domain_sync.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_matcher_create.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_matcher_destroy.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_rule_create.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_rule_destroy.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_table_create.3
+- mlx5dv_dr_flow.3 mlx5dv_dr_table_destroy.3
+- mlx5dv_dump.3 mlx5dv_dump_dr_domain.3
+- mlx5dv_dump.3 mlx5dv_dump_dr_matcher.3
+- mlx5dv_dump.3 mlx5dv_dump_dr_rule.3
+- mlx5dv_dump.3 mlx5dv_dump_dr_table.3
+- mlx5dv_wr_post.3 mlx5dv_wr_set_dc_addr.3
+- mlx5dv_wr_post.3 mlx5dv_qp_ex_from_ibv_qp_ex.3
+-)
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb
new file mode 100644
index 0000000..15fd7ff
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Userspace support for InfiniBand/RDMA verbs"
+DESCRIPTION = "This is the userspace components for the Linux Kernel's drivers Infiniband/RDMA subsystem."
+SECTION = "libs"
+
+DEPENDS = "libnl"
+RDEPENDS_${PN} = "bash perl"
+
+BRANCH = "stable-v${@d.getVar('PV').split('.')[0]}"
+SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \
+           file://0001-Remove-man-files-which-cant-be-built.patch \
+           "
+SRCREV = "f12c953f0864691eacc9fcc4cda489b92ffd5a85"
+S = "${WORKDIR}/git"
+
+#Default Dual License https://github.com/linux-rdma/rdma-core/blob/master/COPYING.md
+LICENSE = "BSD-2-Clause | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.BSD_FB;md5=0ec18bae1a9df92c8d6ae01f94a289ae \
+		   file://COPYING.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+EXTRA_OECMAKE = " \
+    -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=${systemd_system_unitdir} \
+    -DCMAKE_INSTALL_PERLDIR=${libdir}/perl5/${@get_perl_version(d)} \
+"
+
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/*"
+INSANE_SKIP_${PN} += "dev-so"
+
+inherit cmake cpan-base systemd
+
+SYSTEMD_SERVICE_${PN} = " \
+    srp_daemon.service \
+    iwpmd.service \
+    ibacm.socket \
+    rdma-load-modules@.service \
+    srp_daemon_port@.service \
+    rdma-hw.target \
+    ibacm.service \
+"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch
new file mode 100644
index 0000000..8ca26b5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch
@@ -0,0 +1,50 @@
+From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 10:14:20 -0700
+Subject: [PATCH] Fix build with format string checks
+
+Fixes
+| ruli_addr.c:418:5: error: format not a string literal and no format arguments [-Werror=format-security]
+|      return fprintf(out, inet_ntoa(addr->ipv4));
+|      ^~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/ruli_addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/ruli_addr.c
++++ b/src/ruli_addr.c
+@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli
+ {
+   switch (family) {
+   case PF_INET:
+-    return fprintf(out, inet_ntoa(addr->ipv4));
++    return fprintf(out, "%s", inet_ntoa(addr->ipv4));
+ 
+   case PF_INET6:
+     return ruli_inet6_print(out, &addr->ipv6);
+--- a/sample/getaddrinfo.c
++++ b/sample/getaddrinfo.c
+@@ -174,7 +174,7 @@ static void solve(const char *fullname)
+ 
+       for (ai = ai_res; ai; ai = ai->ai_next) {
+ 
+-	printf(fullname);
++	printf("%s", fullname);
+ 
+ 	switch (ai->ai_family) {
+ 	case PF_INET:
+--- a/sample/ruli-getaddrinfo.c
++++ b/sample/ruli-getaddrinfo.c
+@@ -176,7 +176,7 @@ static void solve(const char *fullname)
+ 
+       for (ai = ai_res; ai; ai = ai->ai_next) {
+ 
+-	printf(fullname);
++	printf("%s", fullname);
+ 
+ 	switch (ai->ai_family) {
+ 	case PF_INET:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch
new file mode 100644
index 0000000..c3ca07a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch
@@ -0,0 +1,95 @@
+From bb19a2c7e5b3142d70d3e13c2d8a92a63f2b840a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Nov 2019 22:12:52 -0800
+Subject: [PATCH] Make space for flags from environment
+
+Add force option to ln cmd, so do_install can be rerun in same directory
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sample/Makefile | 20 ++++++++++----------
+ src/Makefile    |  8 ++++----
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/sample/Makefile b/sample/Makefile
+index 15cafd9..d83641f 100644
+--- a/sample/Makefile
++++ b/sample/Makefile
+@@ -35,9 +35,9 @@ ifeq ($(PLATFORM),SunOS)
+ SOLARIS_LIBS = -lresolv -lnsl -lsocket
+ endif
+ 
+-CC      = gcc
+-CFLAGS  = -O2 -pipe -Wall -g -I../src -I$(OOP_INCLUDE_DIR)
+-LDFLAGS = -L../src -L$(OOP_LIB_DIR) $(SOLARIS_LDFLAGS)
++CC      ?= gcc
++CFLAGS  += -O2 -pipe -Wall -g -I../src -I$(OOP_INCLUDE_DIR)
++LDFLAGS += -L../src -L$(OOP_LIB_DIR) $(SOLARIS_LDFLAGS)
+ UNRULI_LINK = $(CC) $(ARCH) $(LDFLAGS) -o $@ $^ $(SOLARIS_LIBS)
+ LINK = $(UNRULI_LINK) -lruli -loop
+ 
+@@ -65,13 +65,13 @@ install: $(TARGETS)
+ 	mkdir -p $(INSTALL_BIN_DIR) $(INSTALL_MAN1_DIR)
+ 	cp $(TARGETS) $(INSTALL_BIN_DIR)
+ 	cp ../doc/man/*.1 $(INSTALL_MAN1_DIR)
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 smtpsearch.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 httpsearch.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_srvsearch.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_smtpsearch.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_httpsearch.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 ruli-getaddrinfo.1
+-	cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 getaddrinfo.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 smtpsearch.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 httpsearch.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_srvsearch.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_smtpsearch.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_httpsearch.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 ruli-getaddrinfo.1
++	cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 getaddrinfo.1
+ 
+ %.o: %.c
+ 	$(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c $<
+diff --git a/src/Makefile b/src/Makefile
+index 9b56b5e..39a5ea1 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -45,7 +45,7 @@ endif
+ 
+ WARN = -pedantic -ansi -Wshadow -Wpointer-arith -Wcast-qual \
+ 	-Wcast-align -Wwrite-strings -Wredundant-decls
+-CC = gcc
++CC ?= gcc
+ 
+ # gcc-specific options (not valid for g++)
+ ifeq ($(CC),gcc)
+@@ -58,7 +58,7 @@ SHARED = -fPIC
+ FLAGS = $(DEBUG) -O2 -pipe -Wall -g -shared -D_REENTRANT \
+         $(DEFINE_SOLARIS) -I. -I$(OOP_INCLUDE_DIR)
+ SOFT_CFLAGS = $(WARN) $(FLAGS)
+-CFLAGS = $(WARN) -Werror $(FLAGS)
++CFLAGS += $(WARN) -Werror $(FLAGS)
+ LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \
+ 	ruli_addr.o ruli_sock.o ruli_txt.o ruli_msg.o ruli_fsm.o \
+ 	ruli_res.o ruli_parse.o ruli_host.o ruli_srv.o ruli_conf.o \
+@@ -66,7 +66,7 @@ LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \
+ 	ruli_getaddrinfo.o
+ SHAREDOBJ = $(LIBOBJ:%.o=%.os)
+ SONAME = libruli.so.4
+-LDFLAGS = -L$(OOP_LIB_DIR)
++LDFLAGS += -L$(OOP_LIB_DIR)
+ 
+ COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c
+ SHARED_COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(SHARED) $(CFLAGS) -o $@ -c
+@@ -95,7 +95,7 @@ install: ruli
+ 	cp $(SONAME) libruli.a $(INSTALL_LIB_DIR)
+ 	cp *.h $(INSTALL_INCLUDE_DIR)
+ 	cp ../doc/man/*.3 $(INSTALL_MAN3_DIR)
+-	cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so
++	cd $(INSTALL_LIB_DIR) && ln -sf $(SONAME) libruli.so
+ 	@echo
+ 	@echo "REMINDER:"
+ 	@echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:"
+-- 
+2.24.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch
new file mode 100644
index 0000000..213006a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch
@@ -0,0 +1,35 @@
+From 895ae26e36c4498677ad0b2695a6e5af05548a29 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Nov 2019 22:02:43 -0800
+Subject: [PATCH] ruli_srv: Mark prev_addr_list_size as unused
+
+This ensures that compiler does not trip on building it
+
+ruli_srv.c:157:20: error: variable 'prev_addr_list_size' set but not used [-Werror=unused-but-set-variable]
+|   int              prev_addr_list_size;
+|                    ^~~~~~~~~~~~~~~~~~~
+cc1: all warnings being treated as errors
+
+Upstream-Status: Inappropriate [Workaround]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/ruli_srv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ruli_srv.c b/src/ruli_srv.c
+index 45c70c7..ff82349 100644
+--- a/src/ruli_srv.c
++++ b/src/ruli_srv.c
+@@ -154,7 +154,7 @@ static void *on_walk_answer(ruli_host_t *host_qry, void *qry_arg)
+   walk_t           *walk_qry = (walk_t *) qry_arg;
+   ruli_srv_t       *srv_qry = walk_qry->srv_query;
+   ruli_srv_entry_t *srv_entry;
+-  int              prev_addr_list_size;
++  __attribute__((unused)) int              prev_addr_list_size;
+ 
+   assert(ruli_host_answer_code(host_qry) != RULI_SRV_CODE_VOID);
+ 
+-- 
+2.24.0
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
new file mode 100644
index 0000000..9044415
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
@@ -0,0 +1,35 @@
+From d3fb471f53712e710fb5777b1b0851c46b7be64c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Jun 2017 01:23:03 -0700
+Subject: [PATCH] src/ruli_addr.c: Add missing format string
+
+fixes
+
+| ruli_addr.c: In function 'ruli_in_snprint':
+| ruli_addr.c:491:5: error: format not a string literal and no format arguments [-Werror=format-security]
+|      return snprintf(buf, size, inet_ntoa(addr->ipv4));
+|      ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ruli_addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ruli_addr.c b/src/ruli_addr.c
+index f1eabae..5f1fd4f 100644
+--- a/src/ruli_addr.c
++++ b/src/ruli_addr.c
+@@ -488,7 +488,7 @@ int ruli_in_snprint(char *buf, size_t size, const _ruli_addr *addr, int family)
+ {
+   switch (family) {
+   case PF_INET:
+-    return snprintf(buf, size, inet_ntoa(addr->ipv4));
++    return snprintf(buf, size, "%s", inet_ntoa(addr->ipv4));
+ 
+   case PF_INET6:
+     return ruli_inet6_snprint(buf, size, &addr->ipv6);    
+-- 
+2.13.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/float-conversion.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/float-conversion.patch
new file mode 100644
index 0000000..999f23f
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/files/float-conversion.patch
@@ -0,0 +1,19 @@
+clarify type conversion
+
+fixes
+| ruli_rand.c:54:47: error: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion]
+|
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/src/ruli_rand.c
++++ b/src/ruli_rand.c
+@@ -51,7 +51,7 @@ int ruli_rand_next(ruli_rand_t *rand_ctx
+ 
+   u = isaac_rand(&rand_ctx->isaac_ctx);
+ 
+-  r = (int) ((float) (1.0 + max - min) *  u / ISAAC_UB4MAXVAL + min);
++  r = (int) ((float) (1.0 + max - min) *  u / (float) (ISAAC_UB4MAXVAL + min));
+ 
+   assert(min <= r);
+   assert(r <= max);
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb
new file mode 100644
index 0000000..f920b59
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb
@@ -0,0 +1,38 @@
+SUMMARY = "RULI stands for Resolver User Layer Interface It's a library	built on top of an asynchronous DNS stub resolver"
+
+HOMEPAGE = "http://www.nongnu.org/ruli/"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "liboop"
+
+SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \
+           file://0001-Fix-build-with-format-string-checks.patch \
+           file://0001-src-ruli_addr.c-Add-missing-format-string.patch \
+           file://0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch \
+           file://0001-Make-space-for-flags-from-environment.patch \
+           file://float-conversion.patch \
+           "
+
+SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468"
+SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa"
+
+B = "${S}"
+
+EXTRA_OEMAKE = 'CC="${CC}" OOP_BASE_DIR="${STAGING_EXECPREFIXDIR}" \
+                INSTALL_BASE_DIR="${D}${exec_prefix}" \
+                OOP_LIB_DIR=${STAGING_EXECPREFIXDIR}/${baselib} \
+                INSTALL_LIB_DIR=${D}${libdir}'
+
+do_configure() {
+    touch configure-stamp
+}
+
+do_install() {
+    oe_runmake install
+}
+
+PACKAGES =+ "${PN}-bin"
+
+FILES_${PN} =+ "${bindir}"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb
new file mode 100644
index 0000000..0b63f79
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Static Multicast Routing Daemon"
+DESCRIPTION = "SMCRoute is a daemon and command line tool to manipulate the multicast routing table in the UNIX kernel."
+HOMEPAGE = "http://troglobit.github.io/smcroute.html"
+SECTION = "net"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "a8e5847e5f7e411be424f9b52a6cdf9d2ed4aeb5"
+SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-protocol_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-protocol_git.bb
new file mode 100644
index 0000000..1d56bea
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice-protocol_git.bb
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "Simple Protocol for Independent Computing Environments"
+DESCRIPTION = "SPICE (the Simple Protocol for Independent Computing \
+Environments) is a remote-display system built for virtual \
+environments which allows users to view a computing 'desktop' \ 
+environment - not only on its computer-server machine, but also from \
+anywhere on the Internet and using a wide variety of machine \
+architectures."
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b37311cb5604f3e5cc2fb0fd23527e95"
+
+PV = "0.14.1+git${SRCPV}"
+
+SRCREV = "e0ec178a72aa33e307ee5ac02b63bf336da921a5"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/spice-protocol \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Convert-pthread_t-to-be-numeric.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Convert-pthread_t-to-be-numeric.patch
new file mode 100644
index 0000000..e63cbe3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Convert-pthread_t-to-be-numeric.patch
@@ -0,0 +1,59 @@
+From 0726ce6d6f52e135e28f15ca8392568c84909b1d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Jun 2018 16:21:39 -0700
+Subject: [PATCH] Convert pthread_t to be numeric
+
+typecast pthread_t to unsigned long
+pthread_t is implemented as a struct point in musl and its as per standard
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ server/red-channel.c | 5 +++--
+ server/red-client.c  | 6 +++---
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+--- a/server/red-channel.c
++++ b/server/red-channel.c
+@@ -204,7 +204,7 @@ red_channel_constructed(GObject *object)
+ {
+     RedChannel *self = RED_CHANNEL(object);
+ 
+-    red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", self->priv->thread_id);
++    red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", (unsigned long)self->priv->thread_id);
+ 
+     RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
+ 
+@@ -479,7 +479,8 @@ void red_channel_remove_client(RedChanne
+                             "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
+                             "If one of the threads is != io-thread && != vcpu-thread, "
+                             "this might be a BUG",
+-                            channel->priv->thread_id, pthread_self());
++                            (unsigned long)channel->priv->thread_id,
++                            (unsigned long)pthread_self());
+     }
+     spice_return_if_fail(channel);
+     link = g_list_find(channel->priv->clients, rcc);
+--- a/server/red-client.c
++++ b/server/red-client.c
+@@ -180,7 +180,7 @@ void red_client_migrate(RedClient *clien
+                       "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+-                      client->thread_id, pthread_self());
++                      (unsigned long)client->thread_id, (unsigned long)pthread_self());
+     }
+     FOREACH_CHANNEL_CLIENT(client, rcc) {
+         if (red_channel_client_is_connected(rcc)) {
+@@ -199,8 +199,8 @@ void red_client_destroy(RedClient *clien
+                       "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+-                      client->thread_id,
+-                      pthread_self());
++                      (unsigned long)client->thread_id,
++                      (unsigned long)pthread_self());
+     }
+     red_client_set_disconnecting(client);
+     FOREACH_CHANNEL_CLIENT(client, rcc) {
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch
new file mode 100644
index 0000000..d04bee9
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch
@@ -0,0 +1,96 @@
+From a2af005b5d4a62839e56f42a43df793356e78f58 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Tue, 4 Jun 2019 03:58:17 -0400
+Subject: [PATCH] Fix compile errors on Linux 32bit system
+
+There are folowing compile errors on Linux 32bit system:
+
+red-channel.c:207:73: error: format '%x' expects argument of type
+'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=]
+|207| red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x",
+                                ~~~~~~~~~~~~~~~~~~~~~^
+                        self->priv->thread_id);
+                ~~~~~~~~~~~~~~~~~~~~~^
+
+On 32bit system, #define G_GSIZE_MODIFIER "". But the type of
+'self->priv->thread_id' is 'unsigned long int' which should match '%lx'
+not '%x'.
+
+So we should recovery the <0x%" G_GSIZE_MODIFIER "x"> to <0x%lx">.
+And others files modification are similar to G_GSIZE_MODIFIER.
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+Upstream-Status: Submitted [https://lists.freedesktop.org/archives/spice-devel/2019-June/049285.html]
+
+ server/red-channel.c    | 6 +++---
+ server/red-client.c     | 8 ++++----
+ server/red-replay-qxl.c | 2 +-
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/server/red-channel.c b/server/red-channel.c
+index f81142d..6a03ec2 100644
+--- a/server/red-channel.c
++++ b/server/red-channel.c
+@@ -202,7 +202,7 @@ red_channel_constructed(GObject *object)
+ {
+     RedChannel *self = RED_CHANNEL(object);
+ 
+-    red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", (unsigned long)self->priv->thread_id);
++    red_channel_debug(self, "thread_id 0x%lx", (unsigned long)self->priv->thread_id);
+ 
+     RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
+ 
+@@ -473,8 +473,8 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc)
+ 
+     if (!pthread_equal(pthread_self(), channel->priv->thread_id)) {
+         red_channel_warning(channel,
+-                            "channel->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
+-                            "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
++                            "channel->thread_id (0x%lx) != "
++                            "pthread_self (0x%lx)."
+                             "If one of the threads is != io-thread && != vcpu-thread, "
+                             "this might be a BUG",
+                             (unsigned long)channel->priv->thread_id,
+diff --git a/server/red-client.c b/server/red-client.c
+index 2b859cb..ff4da2a 100644
+--- a/server/red-client.c
++++ b/server/red-client.c
+@@ -174,8 +174,8 @@ void red_client_migrate(RedClient *client)
+     RedChannel *channel;
+ 
+     if (!pthread_equal(pthread_self(), client->thread_id)) {
+-        spice_warning("client->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
+-                      "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
++        spice_warning("client->thread_id (0x%lx) != "
++                      "pthread_self (0x%lx)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+                       (unsigned long)client->thread_id, (unsigned long)pthread_self());
+@@ -193,8 +193,8 @@ void red_client_destroy(RedClient *client)
+     RedChannelClient *rcc;
+ 
+     if (!pthread_equal(pthread_self(), client->thread_id)) {
+-        spice_warning("client->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
+-                      "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
++        spice_warning("client->thread_id (0x%lx) != "
++                      "pthread_self (0x%lx)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+                       (unsigned long)client->thread_id,
+diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
+index 6d34818..0deb406 100644
+--- a/server/red-replay-qxl.c
++++ b/server/red-replay-qxl.c
+@@ -264,7 +264,7 @@ static replay_t read_binary(SpiceReplay *replay, const char *prefix, size_t *siz
+             exit(1);
+         }
+         if ((ret = inflate(&strm, Z_NO_FLUSH)) != Z_STREAM_END) {
+-            spice_error("inflate error %d (disc: %" G_GSSIZE_FORMAT ")",
++            spice_error("inflate error %d (disc: %li)",
+                         ret, *size - strm.total_out);
+             if (ret == Z_DATA_ERROR) {
+                 /* last operation may be wrong. since we do the recording
+-- 
+2.8.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb
new file mode 100644
index 0000000..9d3a0e6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/spice_git.bb
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "Simple Protocol for Independent Computing Environments"
+DESCRIPTION = "SPICE (the Simple Protocol for Independent Computing \
+Environments) is a remote-display system built for virtual \
+environments which allows users to view a computing 'desktop' \ 
+environment - not only on its computer-server machine, but also from \
+anywhere on the Internet and using a wide variety of machine \
+architectures."
+
+LICENSE = "BSD & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+PV = "0.14.2+git${SRCPV}"
+
+SRCREV_spice = "7cbd70b931db76c69c89c2d9d5d704f67381a81b"
+SRCREV_spice-common = "4fc4c2db36c7f07b906e9a326a9d3dc0ae6a2671"
+
+SRCREV_FORMAT = "spice_spice-common"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/spice;name=spice \
+    git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/subprojects/spice-common;name=spice-common \
+    file://0001-Convert-pthread_t-to-be-numeric.patch \
+    file://0001-Fix-compile-errors-on-Linux-32bit-system.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext python3native python3-dir pkgconfig
+
+DEPENDS += "spice-protocol jpeg pixman alsa-lib glib-2.0 python3-pyparsing-native python3-six-native glib-2.0-native"
+DEPENDS_append_class-nativesdk = "nativesdk-openssl"
+
+export PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
+
+CFLAGS_append = " -Wno-error"
+
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+PACKAGECONFIG ?= "sasl"
+
+PACKAGECONFIG[celt051] = "--enable-celt051,--disable-celt051,celt051"
+PACKAGECONFIG[smartcard] = "--enable-smartcard,--disable-smartcard,libcacard,"
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,"
+PACKAGECONFIG[client] = "--enable-client,--disable-client,,"
+PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
+PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus,"
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,,"
+PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,libxinerama,"
+
+COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
+
+BBCLASSEXTEND = "native nativesdk"
+
+EXTRA_OECONF_append_toolchain-clang = " --disable-werror"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.8.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.8.0.bb
new file mode 100644
index 0000000..9ee43be
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/spice/usbredir_0.8.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "usbredir libraries and utilities"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://COPYING.LIB;md5=4b54a1fd55a448865a0b32d41598759d \
+"
+
+DEPENDS = "libusb1"
+
+SRCREV = "07b98b8e71f620dfdd57e92ddef6b677b259a092"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/usbredir \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch
new file mode 100644
index 0000000..0cb981c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/files/0001-Makefile-tweak-install-dir.patch
@@ -0,0 +1,35 @@
+From 693cfce5431e191a3955fd56fa822927d92c9e43 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 7 Nov 2014 14:27:00 +0800
+Subject: [PATCH] Makefile: tweak install dir
+
+For oe-core, the man doc should be installed to /usr/share/man
+rather than /usr/locale/man.
+
+Upstream-Status: inappropriate (oe specific)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b5d12f8..9b2663c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,9 +14,9 @@ install: ssmping asmping ssmpingd mcfirst
+ 	install -D asmping $(DESTDIR)$(PREFIX)/bin/asmping
+ 	install -D ssmpingd $(DESTDIR)$(PREFIX)/bin/ssmpingd
+ 	install -D mcfirst $(DESTDIR)$(PREFIX)/bin/mcfirst
+-	install -D ssmping.1 $(DESTDIR)$(PREFIX)/man/man1/ssmping.1
+-	install -D asmping.1 $(DESTDIR)$(PREFIX)/man/man1/asmping.1
+-	install -D mcfirst.1 $(DESTDIR)$(PREFIX)/man/man1/mcfirst.1
++	install -D ssmping.1 $(DESTDIR)$(PREFIX)/share/man/man1/ssmping.1
++	install -D asmping.1 $(DESTDIR)$(PREFIX)/share/man/man1/asmping.1
++	install -D mcfirst.1 $(DESTDIR)$(PREFIX)/share/man/man1/mcfirst.1
+ 
+ clean:
+ 	rm -f $(OBJ) joinch.o joingrp.o ssmping asmping ssmpingd mcfirst
+-- 
+1.9.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb
new file mode 100644
index 0000000..0531ffe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "ssmping is a tool for checking whether one can receive SSM from a given host"
+HOMEPAGE = "http://www.venaas.no/multicast/ssmping/"
+SECTION = "net"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://asmping.c;beginline=2;endline=11;md5=1ca8d1a1ca931e5cfe604ebf20a78b71"
+
+SRC_URI = "http://www.venaas.no/multicast/ssmping/${BP}.tar.gz \
+    file://0001-Makefile-tweak-install-dir.patch \
+"
+SRC_URI[md5sum] = "ad8e3d13f6d72918f73be7e7975d7fad"
+SRC_URI[sha256sum] = "22103a37eaa28489169a0927bc01e0596c3485fc4d29fc8456c07fd2c70fca6d"
+
+CFLAGS += "-D_GNU_SOURCE "
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch
new file mode 100644
index 0000000..d53cff2
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch
@@ -0,0 +1,17 @@
+help compile when S != B
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: ssmtp-2.64/Makefile.in
+===================================================================
+--- ssmtp-2.64.orig/Makefile.in
++++ ssmtp-2.64/Makefile.in
+@@ -24,7 +24,7 @@ INSTALLED_REVALIASES_FILE=$(REVALIASES_F
+ # Programs
+ GEN_CONFIG=$(srcdir)/generate_config
+ 
+-SRCS=ssmtp.c arpadate.c base64.c xgethostname.c @SRCS@
++SRCS=$(srcdir)/ssmtp.c $(srcdir)/arpadate.c $(srcdir)/base64.c $(srcdir)/xgethostname.c @SRCS@
+ 
+ OBJS=$(SRCS:.c=.o)
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
new file mode 100644
index 0000000..e087bc7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
@@ -0,0 +1,126 @@
+Bug-Debian: http://bugs.debian.org/584162
+Reported-By: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Forwarded: not-needed
+Reviewed-By: Anibal Monsalve Salazar <anibal@debian.org>
+Last-Update: 2014-08-15
+
+From: "Daniel Richard G." <skunk@iSKUNK.ORG>
+Subject: Re: ssmtp: Partial loss of message body, sending message to wrong recipicients
+Date: Thu, 19 Jun 2014 14:44:30 -0400
+
+Attached is a patch against the original 2.64 source that should address
+this bug, and hopefully not break anything. An overview of my changes:
+
+* Added code to standarise() to drop the trailing '\r' if the line
+  originally ended with "\r\n".
+
+* Added a check to header_parse() that effectively converts an "\r\n" in
+  the input into '\n'.
+
+* Added a conditional so that header_parse() doesn't pass the empty
+  string to header_save()---a behavior I observed in testing, at the end
+  of a header block with "\r\n" line endings.
+
+* Simplified the last if(in_header) conditional in header_parse(),
+  because it erroneously assumes that if in_header == True, then c could
+  have some value other than EOF. (See the condition on the previous
+  "while" loop, and the lack of any other way to exit said loop.)
+
+  header_parse() will now properly grab a header if fed a message
+  without a body (i.e. no "\n\n" ending the header block), although this
+  code will still drop a header if there is no newline at the end.
+
+Christoph, thank you for your excellent analysis, and the test cases. I
+made use of them, and with my changes sSMTP appears to do the right
+thing.
+
+Debian patch from: https://sources.debian.net/patches/ssmtp/2.64-8/
+
+Upstream-Status: Backport [debian]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: ssmtp-2.64/ssmtp.c
+===================================================================
+--- ssmtp-2.64.orig/ssmtp.c
++++ ssmtp-2.64/ssmtp.c
+@@ -375,6 +375,12 @@ bool_t standardise(char *str, bool_t *li
+ 	if((p = strchr(str, '\n'))) {
+ 		*p = (char)NULL;
+ 		*linestart = True;
++
++		/* If the line ended in "\r\n", then drop the '\r' too */
++		sl = strlen(str);
++		if(sl >= 1 && str[sl - 1] == '\r') {
++			str[sl - 1] = (char)NULL;
++		}
+ 	}
+ 	return(leadingdot);
+ }
+@@ -768,6 +774,14 @@ void header_parse(FILE *stream)
+ 		}
+ 		len++;
+ 
++		if(l == '\r' && c == '\n') {
++			/* Properly handle input that already has "\r\n"
++			   line endings; see https://bugs.debian.org/584162 */
++			l = (len >= 2 ? *(q - 2) : '\n');
++			q--;
++			len--;
++		}
++
+ 		if(l == '\n') {
+ 			switch(c) {
+ 				case ' ':
+@@ -790,7 +804,9 @@ void header_parse(FILE *stream)
+ 						if((q = strrchr(p, '\n'))) {
+ 							*q = (char)NULL;
+ 						}
+-						header_save(p);
++						if(len > 0) {
++							header_save(p);
++						}
+ 
+ 						q = p;
+ 						len = 0;
+@@ -800,35 +816,12 @@ void header_parse(FILE *stream)
+ 
+ 		l = c;
+ 	}
+-	if(in_header) {
+-		if(l == '\n') {
+-			switch(c) {
+-				case ' ':
+-				case '\t':
+-						/* Must insert '\r' before '\n's embedded in header
+-						   fields otherwise qmail won't accept our mail
+-						   because a bare '\n' violates some RFC */
+-						
+-						*(q - 1) = '\r';	/* Replace previous \n with \r */
+-						*q++ = '\n';		/* Insert \n */
+-						len++;
+-						
+-						break;
+-
+-				case '\n':
+-						in_header = False;
+-
+-				default:
+-						*q = (char)NULL;
+-						if((q = strrchr(p, '\n'))) {
+-							*q = (char)NULL;
+-						}
+-						header_save(p);
+-
+-						q = p;
+-						len = 0;
+-			}
++	if(in_header && l == '\n') {
++		/* Got EOF while reading the header */
++		if((q = strrchr(p, '\n'))) {
++			*q = (char)NULL;
+ 		}
++		header_save(p);
+ 	}
+ 	(void)free(p);
+ }
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch
new file mode 100644
index 0000000..26d8527
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch
@@ -0,0 +1,74 @@
+Use DESTDIR during  install/uninstall, this helps
+with cross or staged builds. Additionally pass LDFLAGS
+during linking.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+
+Index: ssmtp-2.64/Makefile.in
+===================================================================
+--- ssmtp-2.64.orig/Makefile.in
++++ ssmtp-2.64/Makefile.in
+@@ -46,40 +46,40 @@ all: ssmtp
+ 
+ .PHONY: install
+ install: ssmtp $(GEN_CONFIG)
+-	$(INSTALL) -d -m 755 $(bindir)
+-	$(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp
+-	$(INSTALL) -d -m 755 $(mandir)
+-	$(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8
+-	$(INSTALL) -d -m 755 $(SSMTPCONFDIR)
+-	$(INSTALL) -m 644 $(srcdir)/revaliases $(INSTALLED_REVALIASES_FILE)
+-	$(GEN_CONFIG) $(INSTALLED_CONFIGURATION_FILE)
++	$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
++	$(INSTALL) -m 755 ssmtp $(DESTDIR)$(bindir)/ssmtp
++	$(INSTALL) -d -m 755 $(DESTDIR)$(mandir)
++	$(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(DESTDIR)$(mandir)/ssmtp.8
++	$(INSTALL) -d -m 755 $(DESTDIR)$(SSMTPCONFDIR)
++	$(INSTALL) -m 644 $(srcdir)/revaliases $(DESTDIR)$(INSTALLED_REVALIASES_FILE)
++	$(GEN_CONFIG) $(DESTDIR)$(INSTALLED_CONFIGURATION_FILE)
+ 
+ 
+ .PHONY: install-sendmail
+ install-sendmail: install
+-	$(RM) $(bindir)/sendmail
+-	$(LN_S) ssmtp $(bindir)/sendmail
+-	$(INSTALL) -d -m 755 $(libexecdir)
+-	$(RM) $(libexecdir)/sendmail
+-	$(LN_S) sendmail /lib/sendmail
+-	$(RM) $(mandir)/sendmail.8
+-	$(LN_S) ssmtp.8 $(mandir)/sendmail.8
++	$(RM) $(DESTDIR)$(bindir)/sendmail
++	$(LN_S) ssmtp $(DESTDIR)$(bindir)/sendmail
++	$(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
++	$(RM) $(DESTDIR)$(libexecdir)/sendmail
++	$(LN_S) sendmail $(DESTDIR)/lib/sendmail
++	$(RM) $(DESTDIR)$(mandir)/sendmail.8
++	$(LN_S) ssmtp.8 $(DESTDIR)$(mandir)/sendmail.8
+ 
+ .PHONY: uninstall
+ uninstall:
+-	$(RM) $(bindir)/ssmtp
+-	$(RM) $(mandir)/ssmtp.8
+-	$(RM) $(CONFIGURATION_FILE) $(REVALIASES_FILE)
+-	$(RM) -r $(SSMTPCONFDIR)
++	$(RM) $(DESTDIR)$(bindir)/ssmtp
++	$(RM) $(DESTDIR)$(mandir)/ssmtp.8
++	$(RM) $(DESTDIR)$(CONFIGURATION_FILE) $(DESTDIR)$(REVALIASES_FILE)
++	$(RM) -r $(DESTDIR)$(SSMTPCONFDIR)
+ 
+ .PHONY: uninstall-sendmail
+ uninstall-sendmail: uninstall
+-	$(RM)  $(bindir)/sendmail /lib/sendmail
+-	$(RM)  $(mandir)/sendmail.8
++	$(RM)  $(DESTDIR)$(bindir)/sendmail $(DESTDIR)/lib/sendmail
++	$(RM)  $(DESTDIR)$(mandir)/sendmail.8
+ 
+ # Binaries:
+ ssmtp: $(OBJS)
+-	$(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS)
++	$(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS) $(LDFLAGS)
+ 
+ .PHONY: clean
+ clean:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
new file mode 100644
index 0000000..bae29aa
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
@@ -0,0 +1,42 @@
+SUMMARY = "extremely simple MTA to get mail off the system to a mail hub"
+HOMEPAGE = "http://packages.qa.debian.org/s/ssmtp.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
+           file://ssmtp-bug584162-fix.patch \
+           file://build-ouside_srcdir.patch \
+           file://use-DESTDIR.patch \
+"
+
+SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"
+SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36"
+
+inherit autotools update-alternatives
+
+PACKAGECONFIG ?= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ssl] = "--enable-ssl,--disable-ssl,openssl"
+PACKAGECONFIG[ipv6] = "--enable-inet6,--disable-inet6"
+
+EXTRA_OECONF += "--mandir=${mandir}"
+
+EXTRA_OEMAKE = "GEN_CONFIG='/bin/true'"
+
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'ssl', '-lssl -lcrypto', '', d)}"
+
+do_install_append () {
+    install -d ${D}${mandir}/
+    mv ${D}${exec_prefix}/man/* ${D}${mandir}/
+    rmdir ${D}${exec_prefix}/man
+    ln -s ssmtp ${D}${sbindir}/sendmail
+    ln -s ssmtp ${D}${sbindir}/newaliases
+    ln -s ssmtp ${D}${sbindir}/mailq
+}
+
+ALTERNATIVE_PRIORITY_${PN} = "100"
+
+ALTERNATIVE_${PN} = "mailq newaliases sendmail"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_LINK_NAME[newaliases] = "${sbindir}/newaliases"
+ALTERNATIVE_LINK_NAME[mailq] = "${sbindir}/mailq"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-Remove-obsolete-setting-regarding-the-Standard-Outpu.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-Remove-obsolete-setting-regarding-the-Standard-Outpu.patch
new file mode 100644
index 0000000..78adcf8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-Remove-obsolete-setting-regarding-the-Standard-Outpu.patch
@@ -0,0 +1,34 @@
+From 7b1e376d7d22244feab466e9889ba77561117357 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 23 Sep 2020 16:20:22 +0800
+Subject: [PATCH] Remove obsolete setting regarding the Standard Output
+
+The Standard output type "syslog" is obsolete, causing a warning since systemd
+version 246 [1].
+
+Please consider using "journal" or "journal+console"
+
+[1] https://github.com/systemd/systemd/blob/master/NEWS#L202
+
+Upstream-Status: Submitted [https://github.com/strongswan/strongswan/pull/181]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ init/systemd-starter/strongswan-starter.service.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/init/systemd-starter/strongswan-starter.service.in b/init/systemd-starter/strongswan-starter.service.in
+index 474284a19..6a0672352 100644
+--- a/init/systemd-starter/strongswan-starter.service.in
++++ b/init/systemd-starter/strongswan-starter.service.in
+@@ -4,7 +4,6 @@ After=syslog.target network-online.target
+ 
+ [Service]
+ ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
+-StandardOutput=syslog
+ Restart=on-abnormal
+ 
+ [Install]
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
new file mode 100644
index 0000000..2d17507
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
@@ -0,0 +1,22 @@
+From 33a53dc13fd924949a582109b45fedd8d0bed59b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:42:11 -0700
+Subject: [PATCH] memory.h: Include stdint.h for uintptr_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/libstrongswan/utils/utils/memory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/libstrongswan/utils/utils/memory.h
++++ b/src/libstrongswan/utils/utils/memory.h
+@@ -26,6 +26,8 @@
+ #include <string.h>
+ #endif
+ 
++#include <stdint.h>
++
+ /**
+  * Helper function that compares two binary blobs for equality
+  */
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
new file mode 100644
index 0000000..5945507
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
@@ -0,0 +1,99 @@
+From 9f97479373f3fceedc471074b81486d77a49618d Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Tue, 4 Mar 2014 14:38:42 +0800
+Subject: [PATCH] fix the function parameter
+
+Upstream-Status: Pending
+
+Original openssl_diffie_hellman_create has three parameters, but
+it is reassigned a function pointer which has one parameter, and
+is called with one parameter, which will lead to segment fault
+on PPC, Now we simply correct the number of parameters.
+
+    #0  0x484d4aa0 in __GI_raise (sig=6)
+         at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
+    #1  0x484d9930 in __GI_abort () at abort.c:91
+    #2  0x10002064 in segv_handler (signal=11) at charon.c:224
+    #3  <signal handler called>
+    #4  0x48d89630 in openssl_diffie_hellman_create (group=MODP_1024_BIT, g=...,
+         p=<error reading variable: Cannot access memory at address 0x0>)
+         at openssl_diffie_hellman.c:143
+    #5  0x482c54f8 in create_dh (this=0x11ac6e68, group=MODP_1024_BIT)
+         at crypto/crypto_factory.c:358
+    #6  0x48375884 in create_dh (this=<optimized out>, group=<optimized out>)
+         at sa/keymat.c:132
+    #7  0x483843b8 in process_payloads (this=0x51400a78, message=<optimized
+    out>)
+         at sa/tasks/ike_init.c:200
+    #8  0x483844d0 in process_r (this=0x51400a78, message=0x51500778)
+         at sa/tasks/ike_init.c:319
+    #9  0x48374c9c in process_request (message=0x51500778, this=0x51400d20)
+         at sa/task_manager.c:870
+    #10 process_message (this=0x51400d20, msg=0x51500778) at
+    sa/task_manager.c:925
+    #11 0x4836c378 in process_message (this=0x514005f0, message=0x51500778)
+         at sa/ike_sa.c:1317
+    #12 0x48362270 in execute (this=0x515008d0)
+         at processing/jobs/process_message_job.c:74
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 8 +++++++-
+ src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | 4 +++-
+ src/libstrongswan/plugins/openssl/openssl_plugin.c         | 1 +
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
+index 8e9c118..a73b038 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
+@@ -192,7 +192,7 @@ METHOD(diffie_hellman_t, destroy, void,
+ /*
+  * Described in header.
+  */
+-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
+ 											diffie_hellman_group_t group, ...)
+ {
+ 	private_openssl_diffie_hellman_t *this;
+@@ -255,5 +255,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
+ 	DBG2(DBG_LIB, "size of DH secret exponent: %d bits", BN_num_bits(privkey));
+ 	return &this->public;
+ }
++openssl_diffie_hellman_t *openssl_diffie_hellman_create( diffie_hellman_group_t group)
++{
++	chunk_t g;
++	chunk_t p;
++	openssl_diffie_hellman_create_custom(group, g, p);
++}
+ 
+ #endif /* OPENSSL_NO_DH */
+diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
+index 5de5520..22586e0 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
++++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
+@@ -43,8 +43,10 @@ struct openssl_diffie_hellman_t {
+  * @param ...			expects generator and prime as chunk_t if MODP_CUSTOM
+  * @return				openssl_diffie_hellman_t object, NULL if not supported
+  */
+-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
+ 											diffie_hellman_group_t group, ...);
++openssl_diffie_hellman_t *openssl_diffie_hellman_create(
++							diffie_hellman_group_t group);
+ 
+ #endif /** OPENSSL_DIFFIE_HELLMAN_H_ @}*/
+ 
+diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
+index 8b0a7c5..114d575 100644
+--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
++++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
+@@ -609,6 +609,7 @@ METHOD(plugin_t, get_features, int,
+ 			PLUGIN_PROVIDE(DH, MODP_1024_BIT),
+ 			PLUGIN_PROVIDE(DH, MODP_1024_160),
+ 			PLUGIN_PROVIDE(DH, MODP_768_BIT),
++		PLUGIN_REGISTER(DH, openssl_diffie_hellman_create_custom),
+ 			PLUGIN_PROVIDE(DH, MODP_CUSTOM),
+ #endif
+ #ifndef OPENSSL_NO_RSA
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb
new file mode 100644
index 0000000..8a88092
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb
@@ -0,0 +1,136 @@
+DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
+Linux operating system."
+SUMMARY = "strongSwan is an OpenSource IPsec implementation"
+HOMEPAGE = "http://www.strongswan.org"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gmp openssl flex-native flex bison-native"
+
+SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
+           file://fix-funtion-parameter.patch \
+           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+           file://0001-Remove-obsolete-setting-regarding-the-Standard-Outpu.patch \
+           "
+
+SRC_URI[md5sum] = "0634e7f40591bd3f6770e583c3f27d29"
+SRC_URI[sha256sum] = "2d9a57e33813b62d58cba07531c4d5a35c6b823dfe9b8ff7c623b6571f02553c"
+
+UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar"
+
+EXTRA_OECONF = " \
+        --without-lib-prefix \
+        --with-dev-headers=${includedir}/strongswan \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
+        ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
+PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
+PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
+
+# requires swanctl
+PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
+
+inherit autotools systemd pkgconfig
+
+RRECOMMENDS_${PN} = "kernel-module-ipsec"
+
+FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${bindir}/.debug ${sbindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/include/config.h"
+FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
+
+CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
+
+PACKAGES += "${PN}-plugins"
+ALLOW_EMPTY_${PN}-plugins = "1"
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+python split_strongswan_plugins () {
+    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
+    libdir = d.expand('${libdir}/ipsec/plugins')
+    dbglibdir = os.path.join(libdir, '.debug')
+
+    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
+        dvar = d.getVar('PKGD')
+        oldfiles = d.getVar('CONFFILES_' + pkg)
+        newfile = '/' + os.path.relpath(f, dvar)
+
+        if not oldfiles:
+            d.setVar('CONFFILES_' + pkg, newfile)
+        else:
+            d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
+
+    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
+    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
+
+    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
+    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
+    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
+
+    if split_packages:
+        pn = d.getVar('PN')
+        d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
+
+# Install some default plugins based on default strongSwan ./configure options
+# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
+RDEPENDS_${PN} += "\
+    ${PN}-plugin-aes \
+    ${PN}-plugin-attr \
+    ${PN}-plugin-cmac \
+    ${PN}-plugin-constraints \
+    ${PN}-plugin-des \
+    ${PN}-plugin-dnskey \
+    ${PN}-plugin-hmac \
+    ${PN}-plugin-kernel-netlink \
+    ${PN}-plugin-md5 \
+    ${PN}-plugin-nonce \
+    ${PN}-plugin-pem \
+    ${PN}-plugin-pgp \
+    ${PN}-plugin-pkcs1 \
+    ${PN}-plugin-pkcs7 \
+    ${PN}-plugin-pkcs8 \
+    ${PN}-plugin-pkcs12 \
+    ${PN}-plugin-pubkey \
+    ${PN}-plugin-random \
+    ${PN}-plugin-rc2 \
+    ${PN}-plugin-resolve \
+    ${PN}-plugin-revocation \
+    ${PN}-plugin-sha1 \
+    ${PN}-plugin-sha2 \
+    ${PN}-plugin-socket-default \
+    ${PN}-plugin-sshkey \
+    ${PN}-plugin-updown \
+    ${PN}-plugin-vici \
+    ${PN}-plugin-x509 \
+    ${PN}-plugin-xauth-generic \
+    ${PN}-plugin-xcbc \
+    ${PN}-plugin-curve25519 \
+    "
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} ${BPN}-starter.service"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
new file mode 100644
index 0000000..209b0dd
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Pending
+
+When openssl disable des support with configure option 'no-des', it doesn't
+provide des related header file and functions. That causes stunnel compile
+failed. Fix it by checking macro OPENSSL_NO_DES to use openssl des related
+library conditionaly.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/src/common.h b/src/common.h
+index f7d38b0..bf485af 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -471,7 +471,9 @@ extern char *sys_errlist[];
+ #ifndef OPENSSL_NO_MD4
+ #include <openssl/md4.h>
+ #endif /* !defined(OPENSSL_NO_MD4) */
++#ifndef OPENSSL_NO_DES
+ #include <openssl/des.h>
++#endif
+ #ifndef OPENSSL_NO_DH
+ #include <openssl/dh.h>
+ #if OPENSSL_VERSION_NUMBER<0x10100000L
+diff --git a/src/protocol.c b/src/protocol.c
+index 587df09..8198eb6 100644
+--- a/src/protocol.c
++++ b/src/protocol.c
+@@ -66,7 +66,7 @@ NOEXPORT char *imap_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *nntp_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ NOEXPORT void ntlm(CLI *, SERVICE_OPTIONS *);
+ NOEXPORT char *ntlm1();
+ NOEXPORT char *ntlm3(char *, char *, char *, char *);
+@@ -1175,7 +1175,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+     fd_printf(c, c->remote_fd.fd, "Host: %s", opt->protocol_host);
+     if(opt->protocol_username && opt->protocol_password) {
+         if(!strcasecmp(opt->protocol_authentication, "ntlm")) {
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+             ntlm(c, opt);
+ #else
+             s_log(LOG_ERR, "NTLM authentication is not available");
+@@ -1216,7 +1216,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+     return NULL;
+ }
+ 
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ 
+ /*
+  * NTLM code is based on the following documentation:
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.56.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.56.bb
new file mode 100644
index 0000000..3411e5d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/stunnel/stunnel_5.56.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Program for providing universal TLS/SSL tunneling service"
+DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server."
+HOMEPAGE = "https://www.stunnel.org/"
+SECTION = "net"
+# Note: Linking stunnel statically or dynamically with other modules is making
+# a combined work based on stunnel. Thus, the terms and conditions of the GNU
+# General Public License cover the whole combination.
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.md;md5=d6d635d290ba1705821254a0278f1ef7"
+
+DEPENDS = "autoconf-archive libnsl2 openssl"
+
+SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz \
+           file://fix-openssl-no-des.patch \
+"
+
+SRC_URI[md5sum] = "01b0ca9e071f582ff803a85d5ed72166"
+SRC_URI[sha256sum] = "7384bfb356b9a89ddfee70b5ca494d187605bb516b4fff597e167f97e2236b22"
+
+inherit autotools
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} libwrap"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[libwrap] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
+
+EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips"
+
+# When cross compiling, configure defaults to nobody, but provides no option to change it.
+EXTRA_OEMAKE += "DEFAULT_GROUP='nogroup'"
+
+# stunnel3 is a Perl wrapper to allow use of the legacy stunnel 3.x commandline
+# syntax with stunnel >= 4.05
+PACKAGES =+ "stunnel3"
+FILES_stunnel3 = "${bindir}/stunnel3"
+RDEPENDS_stunnel3 += "${PN} perl"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
new file mode 100644
index 0000000..9b74e00
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
@@ -0,0 +1,70 @@
+From 32027e199368dad9508965aae8cd8de5b6ab5231 Mon Sep 17 00:00:00 2001
+From: Guy Harris <guy@alum.mit.edu>
+Date: Sat, 18 Apr 2020 14:04:59 -0700
+Subject: [PATCH] PPP: When un-escaping, don't allocate a too-large buffer.
+
+The buffer should be big enough to hold the captured data, but it
+doesn't need to be big enough to hold the entire on-the-network packet,
+if we haven't captured all of it.
+
+(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
+
+Upstream-Status: Backport
+Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
+
+---
+ print-ppp.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/print-ppp.c b/print-ppp.c
+index 89176172..33fb0341 100644
+--- a/print-ppp.c
++++ b/print-ppp.c
+@@ -1367,19 +1367,29 @@ trunc:
+ 	return 0;
+ }
+ 
++/*
++ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes.
++ * The length argument is the on-the-wire length, not the captured
++ * length; we can only un-escape the captured part.
++ */
+ static void
+ ppp_hdlc(netdissect_options *ndo,
+          const u_char *p, int length)
+ {
++	u_int caplen = ndo->ndo_snapend - p;
+ 	u_char *b, *t, c;
+ 	const u_char *s;
+-	int i, proto;
++	u_int i;
++	int proto;
+ 	const void *se;
+ 
++	if (caplen == 0)
++		return;
++
+         if (length <= 0)
+                 return;
+ 
+-	b = (u_char *)malloc(length);
++	b = (u_char *)malloc(caplen);
+ 	if (b == NULL)
+ 		return;
+ 
+@@ -1388,10 +1398,10 @@ ppp_hdlc(netdissect_options *ndo,
+ 	 * Do this so that we dont overwrite the original packet
+ 	 * contents.
+ 	 */
+-	for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
++	for (s = p, t = b, i = caplen; i != 0; i--) {
+ 		c = *s++;
+ 		if (c == 0x7d) {
+-			if (i <= 1 || !ND_TTEST(*s))
++			if (i <= 1)
+ 				break;
+ 			i--;
+ 			c = *s++ ^ 0x20;
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
new file mode 100644
index 0000000..f8ff354
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
@@ -0,0 +1,37 @@
+From 8c9c728757f89ebe6c4019114b83a63c63596f69 Mon Sep 17 00:00:00 2001
+From: "Hongjun.Yang" <hongjun.yang@windriver.com>
+Date: Wed, 2 Oct 2019 16:57:06 -0400
+Subject: [PATCH] Add ptest for tcpdump
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
+Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
+
+---
+ Makefile.in | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 3b589184..7b10e38c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -437,9 +437,17 @@ distclean:
+ 	    tests/failure-outputs.txt
+ 	rm -rf autom4te.cache tests/DIFF tests/NEW
+ 
+-check: tcpdump
++buildtest-TESTS: tcpdump
++
++runtest-PTEST:
+	(mkdir -p tests && SRCDIR=`cd ${srcdir}; pwd` && export SRCDIR && $$SRCDIR/tests/TESTrun.sh )
+ 
++install-ptest:
++	cp -r tests                     $(DESTDIR)
++	cp -r config.h                  $(DESTDIR)
++	install -m 0755 Makefile        $(DESTDIR)
++	ln -sf /usr/sbin/tcpdump        $(DESTDIR)/tcpdump
++
+ extags: $(TAGFILES)
+ 	ctags $(TAGFILES)
+ 
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
new file mode 100644
index 0000000..977ab95
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
@@ -0,0 +1,31 @@
+From 02085028cdaf075943c27ebc02bb6de0289ec1d3 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 2 Oct 2019 16:43:48 -0400
+Subject: [PATCH] avoid absolute path when searching for libdlpi
+
+Let the build environment control library search paths.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3401a7a3..6a52485a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -528,7 +528,7 @@ don't.])
+ fi
+ 
+ # libdlpi is needed for Solaris 11 and later.
+-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
++AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi")
+ 
+ dnl
+ dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest
new file mode 100755
index 0000000..2bfb226
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
+			-e '/: TEST FAILED.*/ s/^/FAIL: /g' \
+			-e 's/: passed//g' \
+			-e 's/: TEST FAILED.*//g'
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
new file mode 100644
index 0000000..8793bf7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
@@ -0,0 +1,40 @@
+From dd023c133980fcc0cff5896e85377675e0571894 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 8 Jul 2014 13:20:47 +0800
+Subject: [PATCH] unnecessary to check libpcap
+
+since the check of libpcap did not consider the cross-compile, lead to the
+below error:
+	This autoconf log indicates errors, it looked at host include and/or
+	library paths while determining system capabilities.
+
+In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to
+check if libpcap existed.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 56e2a624..3401a7a3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -404,7 +404,9 @@ dnl Some platforms may need -lnsl for getrpcbynumber.
+ AC_SEARCH_LIBS(getrpcbynumber, nsl,
+     AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
+ 
+-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
++# Simplified (more cross compile friendly) check for libpcap. All we really
++# need is to sanity check that libpcap is available and add -lpcap to LIBS.
++AC_CHECK_LIB(pcap, pcap_compile, LIBS="$LIBS -lpcap")
+ 
+ #
+ # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
new file mode 100644
index 0000000..8f7bd59
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
@@ -0,0 +1,52 @@
+SUMMARY = "A sophisticated network protocol analyzer"
+HOMEPAGE = "http://www.tcpdump.org/"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
+
+DEPENDS = "libpcap"
+
+RDEPENDS_${PN}-ptest += " make perl \
+	perl-module-file-basename \
+	perl-module-posix \
+	perl-module-carp"
+
+SRC_URI = " \
+    http://www.tcpdump.org/release/${BP}.tar.gz \
+    file://unnecessary-to-check-libpcap.patch \
+    file://avoid-absolute-path-when-searching-for-libdlpi.patch \
+    file://add-ptest.patch \
+    file://run-ptest \
+    file://0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch \
+"
+
+SRC_URI[md5sum] = "a4ead41d371f91aa0a2287f589958bae"
+SRC_URI[sha256sum] = "2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410"
+
+inherit autotools-brokensep ptest
+
+PACKAGECONFIG ?= "openssl"
+
+PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng"
+PACKAGECONFIG[openssl] = "--with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi"
+# Note: CVE-2018-10103 (SMB - partially fixed, but SMB printing disabled)
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb"
+
+EXTRA_AUTORECONF += "-I m4"
+
+do_configure_prepend() {
+    mkdir -p ${S}/m4
+    if [ -f aclocal.m4 ]; then
+        mv aclocal.m4 ${S}/m4
+    fi
+}
+
+do_install_append() {
+    # make install installs an unneeded extra copy of the tcpdump binary
+    rm -f ${D}${sbindir}/tcpdump.${PV}
+}
+
+do_compile_ptest() {
+    oe_runmake buildtest-TESTS
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch
new file mode 100644
index 0000000..386b7f8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+--- tcpslice-1.2a3.orig/search.c	2000-09-10 10:52:40.000000000 +0200
++++ tcpslice-1.2a3/search.c	2006-07-28 14:56:55.000000000 +0200
+@@ -53,7 +53,7 @@
+ /* Size of a packet header in bytes; easier than typing the sizeof() all
+  * the time ...
+  */
+-#define PACKET_HDR_LEN (sizeof( struct pcap_pkthdr ))
++#define PACKET_HDR_LEN (sizeof( struct pcap_sf_pkthdr ))
+ 
+ extern int snaplen;
+ 
+@@ -111,16 +111,24 @@
+ static void
+ extract_header( pcap_t *p, u_char *buf, struct pcap_pkthdr *hdr )
+ 	{
+-	memcpy((char *) hdr, (char *) buf, sizeof(struct pcap_pkthdr));
++	struct pcap_sf_pkthdr hdri;
++
++	memcpy((char *) &hdri, (char *) buf, sizeof(struct pcap_sf_pkthdr));
+ 
+ 	if ( pcap_is_swapped( p ) )
+ 		{
+-		hdr->ts.tv_sec = SWAPLONG(hdr->ts.tv_sec);
+-		hdr->ts.tv_usec = SWAPLONG(hdr->ts.tv_usec);
+-		hdr->len = SWAPLONG(hdr->len);
+-		hdr->caplen = SWAPLONG(hdr->caplen);
++		hdr->ts.tv_sec = SWAPLONG(hdri.ts.tv_sec);
++		hdr->ts.tv_usec = SWAPLONG(hdri.ts.tv_usec);
++		hdr->len = SWAPLONG(hdri.len);
++		hdr->caplen = SWAPLONG(hdri.caplen);
++		}
++	else
++		{
++		hdr->ts.tv_sec = hdri.ts.tv_sec;
++		hdr->ts.tv_usec = hdri.ts.tv_usec;
++		hdr->len = hdri.len;
++		hdr->caplen = hdri.caplen;
+ 		}
+-
+ 	/*
+ 	 * From bpf/libpcap/savefile.c:
+ 	 *
+--- tcpslice-1.2a3.orig/tcpslice.h	1995-11-02 00:40:53.000000000 +0100
++++ tcpslice-1.2a3/tcpslice.h	2006-07-28 14:56:55.000000000 +0200
+@@ -20,6 +20,26 @@
+  */
+ 
+ 
++#include <time.h>
++/* #include <net/bpf.h> */
++
++/*
++ * This is a timeval as stored in disk in a dumpfile.
++ * It has to use the same types everywhere, independent of the actual
++ * `struct timeval'
++ */
++
++struct pcap_timeval {
++    bpf_int32 tv_sec;           /* seconds */
++    bpf_int32 tv_usec;          /* microseconds */
++};
++
++struct pcap_sf_pkthdr {
++    struct pcap_timeval ts;     /* time stamp */
++    bpf_u_int32 caplen;         /* length of portion present */
++    bpf_u_int32 len;            /* length this packet (off wire) */
++};
++
+ time_t	gwtm2secs( struct tm *tm );
+ 
+ int	sf_find_end( struct pcap *p, struct timeval *first_timestamp,
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch
new file mode 100644
index 0000000..0a73593
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm]
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+diff -ur tcpdump-3.8.1/tcpslice/tcpslice.c tcpdump-3.8.1.new/tcpslice/tcpslice.c
+--- tcpslice/tcpslice.c	2004-01-15 17:35:53.000000000 +0100
++++ tcpslice/tcpslice.c	2004-01-15 16:12:57.000000000 +0100
+@@ -35,7 +35,7 @@
+ #include <sys/file.h>
+ #include <sys/stat.h>
+ 
+-#include <net/bpf.h>
++/* #include <net/bpf.h> */
+ 
+ #include <ctype.h>
+ #ifdef HAVE_FCNTL_H
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb
new file mode 100644
index 0000000..e65739a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb
@@ -0,0 +1,36 @@
+SUMMARY = "tcpslice"
+DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace."
+HOMEPAGE = "http://www.tcpdump.org/related.html"
+SECTION = "net"
+
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e"
+
+SRC_URI = "ftp://ftp.ee.lbl.gov/${BP}.tar.gz \
+           file://tcpslice-1.2a3-time.patch \
+           file://tcpslice-CVS.20010207-bpf.patch \
+           "
+SRC_URI[md5sum] = "e329cbeb7e589f132d92c3447c477190"
+SRC_URI[sha256sum] = "4096e8debc898cfaa16b5306f1c42f8d18b19e30e60da8d4deb781c8f684c840"
+
+inherit autotools-brokensep
+
+DEPENDS += "libpcap"
+
+# We do not want to autoreconf.  We must specify srcdir as ".".
+# We have to set the ac_cv_* cache variables as well as pass the normal
+# cross-compilation options to configure!
+#
+do_configure () {
+    oe_runconf \
+        --srcdir="." \
+        ac_cv_build=${BUILD_SYS} \
+        ac_cv_host=${HOST_SYS} \
+        ac_cv_target=${HOST_SYS}
+}
+
+do_install () {
+    mkdir -p ${D}/usr/sbin
+    install -c -m 555 tcpslice ${D}/usr/sbin
+}
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
new file mode 100644
index 0000000..39be950
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Use previously captured traffic to test network devices"
+
+HOMEPAGE = "http://tcpreplay.synfin.net/"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
+
+SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "53b52bf64f0b6b9443428e657b37bc6b"
+SRC_URI[sha256sum] = "ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde"
+
+DEPENDS = "libpcap"
+
+EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
+
+inherit siteinfo autotools-brokensep
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch
new file mode 100644
index 0000000..91508d7
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/disable-documentation.patch
@@ -0,0 +1,48 @@
+From b71eb384522b5ce4629dee6e8be257fb4880fef3 Mon Sep 17 00:00:00 2001
+From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
+Date: Thu, 20 Apr 2017 14:25:18 +0200
+
+---
+ Makefile.am  | 1 -
+ configure.ac | 9 ---------
+ 2 files changed, 10 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e9113c2..2fe3d54 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,7 +2,6 @@ SUBDIRS = \
+ 	src \
+ 	data \
+ 	etc \
+-	docs \
+ 	m4macros \
+ 	tests
+ 
+diff --git a/configure.ac b/configure.ac
+index 48ee0b2..a1a5fa1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -194,10 +194,6 @@ AC_SUBST(ADDITIONAL_OBJECTS)
+ AC_PATH_PROG(XSLTPROC, xsltproc, no)
+ AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
+ 
+-# Check for asciidoc
+-AC_PATH_PROG(A2X, a2x, no)
+-AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
+-
+ # checking xmllint
+ AC_PATH_PROG(XMLLINT, xmllint, no)
+ if test "x$XMLLINT" != "xno"; then
+@@ -219,11 +215,6 @@ src/Makefile
+ data/Makefile
+ data/templates/Makefile
+ etc/Makefile
+-docs/Makefile
+-docs/man5/Makefile
+-docs/man5/tinyproxy.conf.txt
+-docs/man8/Makefile
+-docs/man8/tinyproxy.txt
+ m4macros/Makefile
+ tests/Makefile
+ tests/scripts/Makefile
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.conf b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.conf
new file mode 100644
index 0000000..4ca18ef
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.conf
@@ -0,0 +1,330 @@
+##
+## tinyproxy.conf -- tinyproxy daemon configuration file
+##
+## This example tinyproxy.conf file contains example settings
+## with explanations in comments. For decriptions of all
+## parameters, see the tinproxy.conf(5) manual page.
+##
+
+#
+# User/Group: This allows you to set the user and group that will be
+# used for tinyproxy after the initial binding to the port has been done
+# as the root user. Either the user or group name or the UID or GID
+# number may be used.
+#
+User tinyproxy
+Group nogroup
+
+#
+# Port: Specify the port which tinyproxy will listen on.  Please note
+# that should you choose to run on a port lower than 1024 you will need
+# to start tinyproxy using root.
+#
+Port 8888
+
+#
+# Listen: If you have multiple interfaces this allows you to bind to
+# only one. If this is commented out, tinyproxy will bind to all
+# interfaces present.
+#
+#Listen 192.168.0.1
+
+#
+# Bind: This allows you to specify which interface will be used for
+# outgoing connections.  This is useful for multi-home'd machines where
+# you want all traffic to appear outgoing from one particular interface.
+#
+#Bind 192.168.0.1
+
+#
+# BindSame: If enabled, tinyproxy will bind the outgoing connection to the
+# ip address of the incoming connection.
+#
+#BindSame yes
+
+#
+# Timeout: The maximum number of seconds of inactivity a connection is
+# allowed to have before it is closed by tinyproxy.
+#
+Timeout 600
+
+#
+# ErrorFile: Defines the HTML file to send when a given HTTP error
+# occurs.  You will probably need to customize the location to your
+# particular install.  The usual locations to check are:
+#   /usr/local/share/tinyproxy
+#   /usr/share/tinyproxy
+#   /etc/tinyproxy
+#
+#ErrorFile 404 "/usr/share/tinyproxy/404.html"
+#ErrorFile 400 "/usr/share/tinyproxy/400.html"
+#ErrorFile 503 "/usr/share/tinyproxy/503.html"
+#ErrorFile 403 "/usr/share/tinyproxy/403.html"
+#ErrorFile 408 "/usr/share/tinyproxy/408.html"
+
+#
+# DefaultErrorFile: The HTML file that gets sent if there is no
+# HTML file defined with an ErrorFile keyword for the HTTP error
+# that has occured.
+#
+DefaultErrorFile "/usr/share/tinyproxy/default.html"
+
+#
+# StatHost: This configures the host name or IP address that is treated
+# as the stat host: Whenever a request for this host is received,
+# Tinyproxy will return an internal statistics page instead of
+# forwarding the request to that host.  The default value of StatHost is
+# tinyproxy.stats.
+#
+#StatHost "tinyproxy.stats"
+#
+
+#
+# StatFile: The HTML file that gets sent when a request is made
+# for the stathost.  If this file doesn't exist a basic page is
+# hardcoded in tinyproxy.
+#
+StatFile "/usr/share/tinyproxy/stats.html"
+
+#
+# LogFile: Allows you to specify the location where information should
+# be logged to.  If you would prefer to log to syslog, then disable this
+# and enable the Syslog directive.  These directives are mutually
+# exclusive.
+#
+#LogFile "/var/log/tinyproxy/tinyproxy.log"
+
+#
+# Syslog: Tell tinyproxy to use syslog instead of a logfile.  This
+# option must not be enabled if the Logfile directive is being used.
+# These two directives are mutually exclusive.
+#
+#Syslog On
+
+#
+# LogLevel: 
+#
+# Set the logging level. Allowed settings are:
+#	Critical	(least verbose)
+#	Error
+#	Warning
+#	Notice
+#	Connect		(to log connections without Info's noise)
+#	Info		(most verbose)
+#
+# The LogLevel logs from the set level and above. For example, if the
+# LogLevel was set to Warning, then all log messages from Warning to
+# Critical would be output, but Notice and below would be suppressed.
+#
+LogLevel Info
+
+#
+# PidFile: Write the PID of the main tinyproxy thread to this file so it
+# can be used for signalling purposes.
+#
+PidFile "/var/run/tinyproxy/tinyproxy.pid"
+
+#
+# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which
+# contains the client's IP address.
+#
+#XTinyproxy Yes
+
+#
+# Upstream:
+#
+# Turns on upstream proxy support.
+#
+# The upstream rules allow you to selectively route upstream connections
+# based on the host/domain of the site being accessed.
+#
+# For example:
+#  # connection to test domain goes through testproxy
+#  upstream testproxy:8008 ".test.domain.invalid"
+#  upstream testproxy:8008 ".our_testbed.example.com"
+#  upstream testproxy:8008 "192.168.128.0/255.255.254.0"
+#
+#  # no upstream proxy for internal websites and unqualified hosts
+#  no upstream ".internal.example.com"
+#  no upstream "www.example.com"
+#  no upstream "10.0.0.0/8"
+#  no upstream "192.168.0.0/255.255.254.0"
+#  no upstream "."
+#
+#  # connection to these boxes go through their DMZ firewalls
+#  upstream cust1_firewall:8008 "testbed_for_cust1"
+#  upstream cust2_firewall:8008 "testbed_for_cust2"
+#
+#  # default upstream is internet firewall
+#  upstream firewall.internal.example.com:80
+#
+# The LAST matching rule wins the route decision.  As you can see, you
+# can use a host, or a domain:
+#  name     matches host exactly
+#  .name    matches any host in domain "name"
+#  .        matches any host with no domain (in 'empty' domain)
+#  IP/bits  matches network/mask
+#  IP/mask  matches network/mask
+#
+#Upstream some.remote.proxy:port
+
+#
+# MaxClients: This is the absolute highest number of threads which will
+# be created. In other words, only MaxClients number of clients can be
+# connected at the same time.
+#
+MaxClients 100
+
+#
+# MinSpareServers/MaxSpareServers: These settings set the upper and
+# lower limit for the number of spare servers which should be available.
+#
+# If the number of spare servers falls below MinSpareServers then new
+# server processes will be spawned.  If the number of servers exceeds
+# MaxSpareServers then the extras will be killed off.
+#
+MinSpareServers 5
+MaxSpareServers 20
+
+#
+# StartServers: The number of servers to start initially.
+#
+StartServers 10
+
+#
+# MaxRequestsPerChild: The number of connections a thread will handle
+# before it is killed. In practise this should be set to 0, which
+# disables thread reaping. If you do notice problems with memory
+# leakage, then set this to something like 10000.
+#
+MaxRequestsPerChild 0
+
+#
+# Allow: Customization of authorization controls. If there are any
+# access control keywords then the default action is to DENY. Otherwise,
+# the default action is ALLOW.
+#
+# The order of the controls are important. All incoming connections are
+# tested against the controls based on order.
+#
+Allow 127.0.0.1
+
+#
+# AddHeader: Adds the specified headers to outgoing HTTP requests that
+# Tinyproxy makes. Note that this option will not work for HTTPS
+# traffic, as Tinyproxy has no control over what headers are exchanged.
+#
+#AddHeader "X-My-Header" "Powered by Tinyproxy"
+
+#
+# ViaProxyName: The "Via" header is required by the HTTP RFC, but using
+# the real host name is a security concern.  If the following directive
+# is enabled, the string supplied will be used as the host name in the
+# Via header; otherwise, the server's host name will be used.
+#
+ViaProxyName "tinyproxy"
+
+#
+# DisableViaHeader: When this is set to yes, Tinyproxy does NOT add
+# the Via header to the requests. This virtually puts Tinyproxy into
+# stealth mode. Note that RFC 2616 requires proxies to set the Via
+# header, so by enabling this option, you break compliance.
+# Don't disable the Via header unless you know what you are doing...
+#
+#DisableViaHeader Yes
+
+#
+# Filter: This allows you to specify the location of the filter file.
+#
+#Filter "/etc/filter"
+
+#
+# FilterURLs: Filter based on URLs rather than domains.
+#
+#FilterURLs On
+
+#
+# FilterExtended: Use POSIX Extended regular expressions rather than
+# basic.
+#
+#FilterExtended On
+
+#
+# FilterCaseSensitive: Use case sensitive regular expressions.
+#
+#FilterCaseSensitive On
+
+#
+# FilterDefaultDeny: Change the default policy of the filtering system.
+# If this directive is commented out, or is set to "No" then the default
+# policy is to allow everything which is not specifically denied by the
+# filter file.
+#
+# However, by setting this directive to "Yes" the default policy becomes
+# to deny everything which is _not_ specifically allowed by the filter
+# file.
+#
+#FilterDefaultDeny Yes
+
+#
+# Anonymous: If an Anonymous keyword is present, then anonymous proxying
+# is enabled.  The headers listed are allowed through, while all others
+# are denied. If no Anonymous keyword is present, then all headers are
+# allowed through.  You must include quotes around the headers.
+#
+# Most sites require cookies to be enabled for them to work correctly, so
+# you will need to allow Cookies through if you access those sites.
+#
+#Anonymous "Host"
+#Anonymous "Authorization"
+#Anonymous "Cookie"
+
+#
+# ConnectPort: This is a list of ports allowed by tinyproxy when the
+# CONNECT method is used.  To disable the CONNECT method altogether, set
+# the value to 0.  If no ConnectPort line is found, all ports are
+# allowed (which is not very secure.)
+#
+# The following two ports are used by SSL.
+#
+ConnectPort 443
+ConnectPort 563
+
+#
+# Configure one or more ReversePath directives to enable reverse proxy
+# support. With reverse proxying it's possible to make a number of
+# sites appear as if they were part of a single site.
+#
+# If you uncomment the following two directives and run tinyproxy
+# on your own computer at port 8888, you can access Google using
+# http://localhost:8888/google/ and Wired News using
+# http://localhost:8888/wired/news/. Neither will actually work
+# until you uncomment ReverseMagic as they use absolute linking.
+#
+#ReversePath "/google/"	"http://www.google.com/"
+#ReversePath "/wired/"	"http://www.wired.com/"
+
+#
+# When using tinyproxy as a reverse proxy, it is STRONGLY recommended
+# that the normal proxy is turned off by uncommenting the next directive.
+#
+#ReverseOnly Yes
+
+#
+# Use a cookie to track reverse proxy mappings. If you need to reverse
+# proxy sites which have absolute links you must uncomment this.
+#
+#ReverseMagic Yes
+
+#
+# The URL that's used to access this reverse proxy. The URL is used to
+# rewrite HTTP redirects so that they won't escape the proxy. If you
+# have a chain of reverse proxies, you'll need to put the outermost
+# URL here (the address which the end user types into his/her browser).
+#
+# If not set then no rewriting occurs.
+#
+#ReverseBaseURL "http://localhost:8888/"
+
+
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service
new file mode 100644
index 0000000..78df437
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy/tinyproxy.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Tinyproxy, Lightweight http(s) proxy daemon
+RequiresMountsFor=/var
+
+[Service]
+ExecStartPre=/bin/mkdir -p /var/log/tinyproxy
+ExecStartPre=/bin/chown -R tinyproxy.nogroup /var/log/tinyproxy
+ExecStartPre=/bin/mkdir -p /var/run/tinyproxy
+ExecStartPre=/bin/chown -R tinyproxy.nogroup /var/run/tinyproxy
+ExecStart=/usr/bin/tinyproxy -d
+PIDFile=/var/run/tinyproxy/tinyproxy.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.10.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.10.0.bb
new file mode 100644
index 0000000..7d97f52
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.10.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Lightweight http(s) proxy daemon"
+HOMEPAGE = "https://tinyproxy.github.io/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz \
+           file://disable-documentation.patch \
+           file://tinyproxy.service \
+           file://tinyproxy.conf \
+           "
+
+SRC_URI[md5sum] = "423047c8dc53a15e19f78e238198549c"
+SRC_URI[sha256sum] = "6020955e6a0ef0ef898ad5bb17a448c47f9e4c003c464b4ae7c4dba063272055"
+
+EXTRA_OECONF += " \
+	--enable-filter \
+	--enable-transparent \
+	--enable-reverse \
+	--enable-upstream \
+	--enable-xtinyproxy \
+	"
+
+inherit autotools systemd useradd
+
+#User specific
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home /dev/null \
+                       --no-user-group --gid nogroup tinyproxy"
+
+SYSTEMD_PACKAGES += "${BPN}"
+SYSTEMD_SERVICE_${PN} = "tinyproxy.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+do_install_append() {
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${systemd_system_unitdir}
+		install -m 0644 ${WORKDIR}/tinyproxy.service ${D}${systemd_system_unitdir}
+	fi
+	install -m 0644 ${WORKDIR}/tinyproxy.conf ${D}${sysconfdir}/tinyproxy.conf
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch
new file mode 100644
index 0000000..1bda576
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch
@@ -0,0 +1,42 @@
+[PATCH] Update configure.ac and Makefile.am to resolve warnings/errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ configure.ac          |    2 ++
+ libnetbsd/Makefile.am |    2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a96d2ab..b3b3069 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,9 +71,11 @@ AH_TEMPLATE([WITH_SSL],
+ #
+ # Checks for programs.
+ #
++AM_PROG_AR()
+ AC_PROG_CC()
+ AC_PROG_AWK()
+ AC_PROG_LIBTOOL()
++AM_PROG_CC_C_O()
+ 
+ #
+ # Checks for tool features.
+diff --git a/libnetbsd/Makefile.am b/libnetbsd/Makefile.am
+index 3e5c3ce..39bb12d 100644
+--- a/libnetbsd/Makefile.am
++++ b/libnetbsd/Makefile.am
+@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libnetbsd.la
+ libnetbsd_la_SOURCES =
+ 
+ 
+-CPPFLAGS = \
++AM_CPPFLAGS = \
+ 	-I$(srcdir) \
+ 	-I$(top_srcdir) \
+ 	-I$(top_builddir)
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb
new file mode 100644
index 0000000..83ad11b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftp_20151004.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Enhanced NetBSD ftp client"
+DESCRIPTION = "tnftp (formerly known as lukemftp) is a port of the NetBSD FTP client \
+to other systems. It offers many enhancements over the traditional \
+BSD FTP client, including command-line editing, command-line fetches \
+of FTP and HTTP URLs (including via proxies), command-line uploads of \
+FTP URLs, context-sensitive word completion, dynamic progress bar, \
+IPv6 support, modification time preservation, paging of local and \
+remote files, passive mode support (with fallback to active mode), \
+SOCKS support, TIS FWTK gate-ftp server support, and transfer rate \
+throttling."
+
+SECTION = "net"
+LICENSE = "BSD-4-Clause"
+
+DEPENDS = "ncurses"
+
+SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \
+    file://tnftp-autotools.patch \
+"
+
+inherit autotools update-alternatives pkgconfig
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "ftp"
+ALTERNATIVE_LINK_NAME_${PN} = "${bindir}/ftp"
+ALTERNATIVE_TARGET_${PN}  = "${bindir}/tnftp"
+
+FILES_${PN} = "${bindir}/tnftp"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6d6796cb166a9bb050958241dad9479e"
+SRC_URI[md5sum] = "a49fbe752318d5a7893f900046ea00d5"
+SRC_URI[sha256sum] = "c94a8a49d3f4aec1965feea831d4d5bf6f90c65fd8381ee0863d11a5029a43a0"
+
+PACKAGECONFIG ?= "openssl \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[openssl] = "--enable-ssl, --disable-ssl --with-ssl=no, openssl"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch
new file mode 100644
index 0000000..2c030b5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch
@@ -0,0 +1,47 @@
+From e273e0ebc753645555909bcc4874c72458b17891 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 17 Jan 2014 03:17:44 -0500
+Subject: [PATCH] Make.rules: filter-out the patches from subdirs
+
+The $(subdirs) contains all the dirs under the ${B}, and this one:
+
+do_unpack[cleandirs] = "${S}/patches"
+
+will create a "patches" dir, then there will be compile errors, filter
+out the patches will fix the problem.
+
+Note: poky doesn't have this problem since it separates the ${S} and
+${B}
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Make.rules |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Make.rules b/Make.rules
+index b077cd5..0bfce2d 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -97,7 +97,7 @@ endif
+ subdirs := $(filter-out $(SKIPDIRS), $(subdirs))
+ endif
+ 
+-install install-%: subdirs := $(filter-out $(SKIPINSTALL), $(subdirs))
++install install-%: subdirs := $(filter-out $(SKIPINSTALL) patches, $(subdirs))
+ 
+ 
+ override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared)
+@@ -106,7 +106,7 @@ override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared)
+ INCLUDEDIRS := $(filter $(INCLUDEDIRS), $(subdirs))
+ LIBDIRS := $(filter $(LIBDIRS), $(subdirs))
+ MODDIRS := $(filter $(MODDIRS), $(subdirs))
+-EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS), $(subdirs))
++EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS) patches, $(subdirs))
+ MODUSERS := $(filter $(MODUSERS), $(subdirs))
+ SBINUSERS := $(filter $(SBINUSERS), $(subdirs))
+ 
+-- 
+1.7.10.4
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb
new file mode 100644
index 0000000..19bbf03
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb
@@ -0,0 +1,47 @@
+SUMMARY = "A new modern implementation of traceroute(8) utility for Linux systems"
+DESCRIPTION = "The traceroute utility displays the route used by IP packets on \
+their way to a specified network (or Internet) host.  Traceroute displays \
+the IP number and host name (if possible) of the machines along the \
+route taken by the packets.  Traceroute is used as a network debugging \
+tool.  If you're having network connectivity problems, traceroute will \
+show you where the trouble is coming from along the route."
+SECTION = "net"
+HOMEPAGE = "http://traceroute.sourceforge.net/"
+LICENSE = "GPL-2.0+ & LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+inherit update-alternatives
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/traceroute/files/traceroute/"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \
+           file://filter-out-the-patches-from-subdirs.patch \
+"
+
+SRC_URI[md5sum] = "84d329d67abc3fb83fc8cb12aeaddaba"
+SRC_URI[sha256sum] = "3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6"
+
+EXTRA_OEMAKE = "VPATH=${STAGING_LIBDIR}"
+
+do_compile() {
+    export LDFLAGS="${TARGET_LDFLAGS} -L${S}/libsupp"
+    oe_runmake "env=yes"
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m755 ${BPN}/${BPN} ${D}${bindir}
+
+    install -m755 wrappers/tcptraceroute ${D}${bindir}
+
+    install -d ${D}${mandir}/man8
+    install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir}/man8
+    ln -s ${BPN}.8 ${D}${mandir}/man8/${BPN}6.8
+    ln -s ${BPN}.8 ${D}${mandir}/man8/tcptraceroute.8
+
+}
+
+ALTERNATIVE_PRIORITY = "60"
+ALTERNATIVE_${PN} = "traceroute"
+ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
new file mode 100644
index 0000000..1c11823
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl.inc
@@ -0,0 +1,17 @@
+SUMMARY = "Tool for controlling the Linux TUN/TAP driver"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://tunctl.c;beginline=1;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/tunctl/tunctl-${PV}.tar.gz \
+           file://makefile-add-ldflags.patch \
+          "
+
+do_compile() {
+    oe_runmake tunctl
+}
+
+do_install() {
+    install -d ${D}/${sbindir}
+    install -m 755 tunctl ${D}/${sbindir}
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch
new file mode 100644
index 0000000..c96f538
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index a0aa7f6..d6ce2c7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,7 @@ MAN_DIR ?= /usr/share/man/man$(MANS)
+ all : $(BIN) $(MAN)
+ 
+ $(BIN) : $(BIN).c
+-	$(CC) $(CFLAGS) -o $(BIN) $(BIN).c
++	$(CC) $(CFLAGS) ${LDFLAGS} -o $(BIN) $(BIN).c
+ 
+ $(MAN) : $(PACKAGE).sgml
+ 	docbook2man $(PACKAGE).sgml
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb
new file mode 100644
index 0000000..dd26561
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/tunctl/tunctl_1.5.bb
@@ -0,0 +1,4 @@
+require tunctl.inc
+
+SRC_URI[md5sum] = "fdbedc263b3e85bb0e087cd567414607"
+SRC_URI[sha256sum] = "aa2a6c4cc6bfacb11e0d9f62334a6638a0d435475c61230116f00b6af8b14fff"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.10.2.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.10.2.bb
new file mode 100644
index 0000000..8e35ee1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/uftp/uftp_4.10.2.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Encrypted UDP based FTP with multicast"
+HOMEPAGE = "https://sourceforge.net/projects/uftp-multicast"
+SECTION = "libs/network"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/uftp-multicast/files/source-tar/"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/uftp-multicast/source-tar/uftp-${PV}.tar.gz"
+SRC_URI[md5sum] = "db0519bf7b1e0329449e81c1e68262f8"
+SRC_URI[sha256sum] = "ecab6ab07fe0ebaf7bfe35d99fe2da28ede3ddc6f21f825d3b259cf171258505"
+
+DEPENDS = "openssl"
+
+do_install () {
+	oe_runmake install DESTDIR=${D}
+}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/0001-contrib-add-yocto-compatible-startup-scripts.patch b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/0001-contrib-add-yocto-compatible-startup-scripts.patch
new file mode 100644
index 0000000..46f6a7b
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound/0001-contrib-add-yocto-compatible-startup-scripts.patch
@@ -0,0 +1,78 @@
+From 186ac39de8eb9aedcf3d87cdbe389d10cde03d66 Mon Sep 17 00:00:00 2001
+From: Beniamin Sandu <beniaminsandu@gmail.com>
+Date: Tue, 16 Jul 2019 19:59:23 +0300
+Subject: [PATCH] contrib: add yocto compatible startup scripts
+
+Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
+---
+ contrib/unbound.init       | 10 +++++-----
+ contrib/unbound.service.in |  4 ++--
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+ mode change 100644 => 100755 contrib/unbound.init
+
+diff --git a/contrib/unbound.init b/contrib/unbound.init
+old mode 100644
+new mode 100755
+index cccadecc..4eba752b
+--- a/contrib/unbound.init
++++ b/contrib/unbound.init
+@@ -19,11 +19,11 @@
+ ### END INIT INFO
+ 
+ # Source function library.
+-. /etc/rc.d/init.d/functions
++. /etc/init.d/functions
+ 
+ exec="/usr/sbin/unbound"
+ prog="unbound"
+-config="/var/unbound/unbound.conf"
++config="/etc/unbound/unbound.conf"
+ pidfile="/var/unbound/unbound.pid"
+ rootdir="/var/unbound"
+ 
+@@ -61,7 +61,7 @@ start() {
+     fi;
+ 
+     # if not running, start it up here
+-    daemon $exec
++    daemonize $exec
+     retval=$?
+     echo
+     [ $retval -eq 0 ] && touch $lockfile
+@@ -71,7 +71,7 @@ start() {
+ stop() {
+     echo -n $"Stopping $prog: "
+     # stop it here, often "killproc $prog"
+-    killproc -p $pidfile $prog
++    killproc $prog
+     retval=$?
+     echo
+     [ $retval -eq 0 ] && rm -f $lockfile
+@@ -99,7 +99,7 @@ force_reload() {
+ 
+ rh_status() {
+     # run checks to determine if the service is running or use generic status
+-    status -p $pidfile $prog
++    status $prog
+ }
+ 
+ rh_status_q() {
+diff --git a/contrib/unbound.service.in b/contrib/unbound.service.in
+index 95976dd9..0e7f79a9 100644
+--- a/contrib/unbound.service.in
++++ b/contrib/unbound.service.in
+@@ -10,9 +10,9 @@ WantedBy=multi-user.target
+ 
+ [Service]
+ ExecReload=/bin/kill -HUP $MAINPID
+-ExecStart=@UNBOUND_SBIN_DIR@/unbound
++ExecStart=@UNBOUND_SBIN_DIR@/unbound -d
+ NotifyAccess=main
+-Type=notify
++Type=simple
+ CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_SYS_RESOURCE
+ MemoryDenyWriteExecute=true
+ NoNewPrivileges=true
+-- 
+2.17.1
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.9.4.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.9.4.bb
new file mode 100644
index 0000000..6200214
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.9.4.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Unbound is a validating, recursive, and caching DNS resolver"
+DESCRIPTION = "Unbound's design is a set of modular components which incorporate \
+	features including enhanced security (DNSSEC) validation, Internet Protocol \
+	Version 6 (IPv6), and a client resolver library API as an integral part of the \
+	architecture"
+
+HOMEPAGE = "https://www.unbound.net/"
+SECTION = "net"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06"
+
+SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=http;branch=master \
+	file://0001-contrib-add-yocto-compatible-startup-scripts.patch \
+"
+SRCREV="b60c4a472c856f0a98120b7259e991b3a6507eb5"
+
+inherit autotools pkgconfig systemd update-rc.d
+
+DEPENDS = "openssl libevent libtool-native bison-native expat"
+RDEPENDS_${PN} = "bash openssl-bin daemonize"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-libexpat=${STAGING_EXECPREFIXDIR} \
+		--with-ssl=${STAGING_EXECPREFIXDIR} \
+		libtool=${HOST_SYS}-libtool \
+"
+		
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile systemd', d)}"
+PACKAGECONFIG[dnscrypt] = "--enable-dnscrypt, --disable-dnscrypt, libsodium"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
+
+do_install_append() {
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system
+
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${S}/contrib/unbound.init ${D}${sysconfdir}/init.d/unbound
+}
+
+SYSTEMD_SERVICE_${PN} = "${BPN}.service"
+
+INITSCRIPT_NAME = "unbound"
+INITSCRIPT_PARAMS = "defaults"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/README b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/README
new file mode 100644
index 0000000..63b5b72
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/README
@@ -0,0 +1,45 @@
+#
+Wireshark - Notes
+
+URL: http://www.wireshark.org/
+User Guide: http://www.wireshark.org/docs/wsug_html_chunked/
+Secruity advisories: http://www.wireshark.org/security/
+
+Wireshark is slowly moving away from gtk and towards QT as their graphical stack.
+Currently gtk is supported with this release and I plan on integrating QT. 
+
+
+
+Adding the wireshark to your build
+========================================
+
+via local.conf
+IMAGE_INSTALL_append = " wireshark"
+
+Adding the wireshark to your graphical build
+========================================
+via local.conf
+IMAGE_INSTALL_append = " wireshark"
+
+and one of:
+
+EXTRA_IMAGE_FEATURES += "x11-base"
+
+or use the "core-image-x11"
+
+
+Maintenance
+-----------
+
+Send patches, comments or questions to openembedded-devel@lists.openembedded.org
+
+When sending single patches, please use something like:
+
+   git send-email -1 -M \
+       --to openembedded-devel@lists.openembedded.org \
+       --cc akuster@mvista.com \
+       --subject-prefix=meta-networking][PATCH
+
+Maintainer:    Armin Kuster <akuster@mvista.com>
+
+
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_3.2.10.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_3.2.10.bb
new file mode 100644
index 0000000..d284824
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_3.2.10.bb
@@ -0,0 +1,80 @@
+DESCRIPTION = "wireshark - a popular network protocol analyzer"
+HOMEPAGE = "http://www.wireshark.org"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
+
+DEPENDS = "pcre expat glib-2.0 glib-2.0-native libgcrypt libgpg-error libxml2 bison-native"
+
+DEPENDS_append_class-target = " wireshark-native chrpath-replacement-native "
+
+SRC_URI = "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-${PV}.tar.xz"
+
+UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
+
+SRC_URI[sha256sum] = "1e9e239f2449f240a7910ed598084ccaf8ea308b2b46b196c5adbec59612226c"
+
+PE = "1"
+
+inherit cmake pkgconfig python3native perlnative upstream-version-is-even mime mime-xdg
+
+PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
+
+PACKAGECONFIG_class-native = "libpcap gnutls ssl libssh"
+
+PACKAGECONFIG[libcap] = "-DENABLE_CAP=ON,-DENABLE_CAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON, libcap"
+PACKAGECONFIG[libpcap] = "-DENABLE_PCAP=ON,-DENABLE_PCAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON , libpcap"
+PACKAGECONFIG[libsmi] = "-DENABLE_SMI=ON,-DENABLE_SMI=OFF,libsmi"
+PACKAGECONFIG[libnl] = ",,libnl"
+PACKAGECONFIG[portaudio] = "-DENABLE_PORTAUDIO=ON,-DENABLE_PORTAUDIO=OFF, portaudio-v19"
+PACKAGECONFIG[gnutls] = "-DENABLE_GNUTLS=ON,-DENABLE_GNUTLS=OFF, gnutls"
+PACKAGECONFIG[ssl] = ",,openssl"
+PACKAGECONFIG[krb5] = "-DENABLE_KRB5=ON,-DENABLE_KRB5=OFF, krb5"
+PACKAGECONFIG[lua] = "-DENABLE_LUA=ON,-DENABLE_LUA=OFF, lua"
+PACKAGECONFIG[zlib] = "-DENABLE_ZLIB=ON,-DENABLE_ZLIB=OFF, zlib"
+PACKAGECONFIG[geoip] = ",, geoip"
+PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
+PACKAGECONFIG[sbc] = "-DENABLE_SBC=ON,-DENABLE_SBC=OFF, sbc"
+PACKAGECONFIG[libssh] = ",,libssh2"
+PACKAGECONFIG[lz4] = "-DENABLE_LZ4=ON,-DENABLE_LZ4=OFF, lz4"
+
+# these next two options require addional layers
+PACKAGECONFIG[c-ares] = "-DENABLE_CARES=ON,-DENABLE_CARES=OFF, c-ares"
+PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON -DBUILD_wireshark=ON, -DENABLE_QT5=OFF -DBUILD_wireshark=OFF, qttools-native qtmultimedia qtsvg"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
+
+EXTRA_OECMAKE += "-DENABLE_NETLINK=ON \
+                  -DBUILD_mmdbresolve=OFF \
+                  -DBUILD_randpktdump=OFF \
+                  -DBUILD_androiddump=OFF \
+                  -DBUILD_dcerpcidl2wrs=OFF \
+                  -DM_INCLUDE_DIR=${includedir} \
+                  -DM_LIBRARY=${libdir} \
+                 "
+CFLAGS_append = " -lm"
+
+do_install_append_class-native() {
+	install -d ${D}${bindir}
+	for f in lemon
+	do
+		install -m 0755 ${B}/run/$f ${D}${bindir}
+	done
+}
+
+do_install_append_class-target() {
+	for f in `find ${D}${libdir} ${D}${bindir} -type f -executable`
+	do
+		chrpath --delete $f
+	done
+}
+
+PACKAGE_BEFORE_PN += "tshark"
+
+FILES_tshark = "${bindir}/tshark ${mandir}/man1/tshark.*"
+
+FILES_${PN} += "${datadir}*"
+
+RDEPENDS_tshark = "wireshark"
+
+BBCLASSEXTEND = "native"
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb
new file mode 100644
index 0000000..bab75fe
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Userspace tools for Linux IEEE 802.15.4 stack"
+HOMEPAGE = "http://wpan.cakelab.org/releases/"
+DESCRIPTION = "This is a set of utils to manage the Linux WPAN stack via \
+netlink interface. This requires recent kernel with nl802154 interface."
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4cfd939b1d7e6aba9fcefb7f6e2fd45d"
+
+DEPENDS = "libnl"
+
+SRC_URI = "git://github.com/linux-wpan/wpan-tools"
+SRCREV = "a316ca2caa746d60817400e5bf646c2820f09273"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-big b/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-big
new file mode 100644
index 0000000..3a968e3
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-big
@@ -0,0 +1,2 @@
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=normal}
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-little b/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-little
new file mode 100644
index 0000000..0bcd966
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-networking/site/endian-little
@@ -0,0 +1,2 @@
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev}