diff options
Diffstat (limited to 'meta-networking/recipes-protocols')
129 files changed, 2109 insertions, 3017 deletions
diff --git a/meta-networking/recipes-protocols/babeld/babeld_1.10.bb b/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb index 529cccf872..a799ad197e 100644 --- a/meta-networking/recipes-protocols/babeld/babeld_1.10.bb +++ b/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb @@ -12,18 +12,20 @@ SECTION = "net" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENCE;md5=411a48ac3c2e9e0911b8dd9aed26f754" -SRC_URI = "git://github.com/jech/babeld.git;protocol=https;branch=master" -SRCREV = "dbb8799d1b5b3bfaf4387386c92369c847704480" +SRC_URI = "gitsm://github.com/jech/babeld.git;protocol=https;branch=master" +SRCREV = "3d61ea1e843e2c5f9706c74d1adad4e1d24d44b9" UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" +EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" + do_compile () { oe_runmake babeld } do_install () { - oe_runmake install.minimal PREFIX=${D} + oe_runmake install.minimal TARGET=${D} PREFIX=${root_prefix} } diff --git a/meta-networking/recipes-protocols/dante/dante_1.4.1.bb b/meta-networking/recipes-protocols/dante/dante_1.4.3.bb index 48f9708560..4badff8bbd 100644 --- a/meta-networking/recipes-protocols/dante/dante_1.4.1.bb +++ b/meta-networking/recipes-protocols/dante/dante_1.4.3.bb @@ -9,12 +9,11 @@ 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" +LIC_FILES_CHKSUM = "file://LICENSE;md5=edd508404db7339042dfc861a3a690ad" SRC_URI = "https://www.inet.no/dante/files/dante-${PV}.tar.gz \ " -SRC_URI[md5sum] = "68c2ce12119e12cea11a90c7a80efa8f" -SRC_URI[sha256sum] = "b6d232bd6fefc87d14bf97e447e4fcdeef4b28b16b048d804b50b48f261c4f53" +SRC_URI[sha256sum] = "418a065fe1a4b8ace8fbf77c2da269a98f376e7115902e76cda7e741e4846a5d" # without --without-gssapi, config.log will contain reference to /usr/lib # as a consequence of GSSAPI path being set to /usr by default. @@ -23,16 +22,18 @@ SRC_URI[sha256sum] = "b6d232bd6fefc87d14bf97e447e4fcdeef4b28b16b048d804b50b48f26 # --enable-release build prerelease as full release EXTRA_OECONF += "--without-gssapi --sbindir=${bindir}" -DEPENDS += "flex-native bison-native libpam" - +DEPENDS += "flex-native bison-native libpam libtirpc" inherit autotools-brokensep features_check +CPPFLAGS += "-P" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LIBS += "-ltirpc" + REQUIRED_DISTRO_FEATURES = "pam" EXTRA_AUTORECONF = "-I ${S}" PACKAGECONFIG[libwrap] = ",--disable-libwrap,tcp-wrappers,libwrap" -PACKAGECONFIG[krb5] = ",--without-krb5,krb5" PACKAGECONFIG ??= "" diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch b/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch deleted file mode 100644 index d5e242ac21..0000000000 --- a/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch +++ /dev/null @@ -1,97 +0,0 @@ -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/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch b/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch new file mode 100644 index 0000000000..4cedc21ce8 --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch @@ -0,0 +1,92 @@ +From 935fcac46e2790e0e297ca855b8033895c1b8941 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Wed, 24 Aug 2022 13:45:32 +0800 +Subject: [PATCH] tests: use EXTENSIONS_DIR + +Use EXTENSIONS_DIR to replace BUILD_DIR as the BUILD_DIR is meanlingless +on target and also fix buildpaths issue. + +Upstream-Status: Inappropriate [OE ptest specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + tests/CMakeLists.txt | 1 + + tests/testloadext.c | 12 ++++++------ + tests/testmesg_stress.c | 12 ++++++------ + 3 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 8b698ce..2c83cbb 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -37,6 +37,7 @@ SET(TEST_LIST + + ADD_DEFINITIONS(-DTEST_DEBUG) + ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}") ++ADD_DEFINITIONS(-DEXTENSIONS_DIR="${EXTENSIONS_DIR}") + + INCLUDE_DIRECTORIES( "../libfdproto" ) + INCLUDE_DIRECTORIES( "../libfdcore" ) +diff --git a/tests/testloadext.c b/tests/testloadext.c +index 452737f..3fffef5 100644 +--- a/tests/testloadext.c ++++ b/tests/testloadext.c +@@ -35,9 +35,9 @@ + + #include "tests.h" + +-#ifndef BUILD_DIR +-#error "Missing BUILD_DIR information" +-#endif /* BUILD_DIR */ ++#ifndef EXTENSIONS_DIR ++#error "Missing EXTENSIONS_DIR information" ++#endif /* EXTENSIONS_DIR */ + + #include <sys/types.h> + #include <dirent.h> +@@ -59,9 +59,9 @@ int main(int argc, char *argv[]) + CHECK( 0, fd_rtdisp_init() ); + + /* 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'", EXTENSIONS_DIR); ++ CHECK( 0, (dir = opendir (EXTENSIONS_DIR)) == NULL ? 1 : 0 ); ++ pathlen = snprintf(fullname, sizeof(fullname), EXTENSIONS_DIR "/"); + + while ((dp = readdir (dir)) != NULL) { + char * dot = strrchr(dp->d_name, '.'); +diff --git a/tests/testmesg_stress.c b/tests/testmesg_stress.c +index 310a9d2..97dfe07 100644 +--- a/tests/testmesg_stress.c ++++ b/tests/testmesg_stress.c +@@ -38,9 +38,9 @@ + #include <libgen.h> + #include <dlfcn.h> + +-#ifndef BUILD_DIR +-#error "Missing BUILD_DIR information" +-#endif /* BUILD_DIR */ ++#ifndef EXTENSIONS_DIR ++#error "Missing EXTENSIONS_DIR information" ++#endif /* EXTENSIONS_DIR */ + + + /* The number of times each operation is repeated to measure the average operation time */ +@@ -73,9 +73,9 @@ static void load_all_extensions(char * prefix) + struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends); + + /* 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/"); ++ LOG_D("Loading %s*.fdx from: '%s'", EXTENSIONS_DIR, prefix ?: ""); ++ CHECK( 0, (dir = opendir (EXTENSIONS_DIR)) == NULL ? 1 : 0 ); ++ pathlen = snprintf(fullname, sizeof(fullname), EXTENSIONS_DIR "/"); + + while ((dp = readdir (dir)) != NULL) { + char * dot = strrchr(dp->d_name, '.'); +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch b/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch deleted file mode 100644 index ea857af7d6..0000000000 --- a/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch +++ /dev/null @@ -1,72 +0,0 @@ -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/meta-networking/recipes-protocols/freediameter/files/run-ptest b/meta-networking/recipes-protocols/freediameter/files/run-ptest index d0ca8d9621..7d0648935c 100644 --- a/meta-networking/recipes-protocols/freediameter/files/run-ptest +++ b/meta-networking/recipes-protocols/freediameter/files/run-ptest @@ -6,6 +6,9 @@ if ! lsmod | grep -q sctp && ! modprobe sctp 2>/dev/null; then echo fi -export EXTENSIONS_DIR=$EXTENSIONS_DIR cmake -E cmake_echo_color --cyan "Running tests..." -ctest --force-new-ctest-process +if ctest --force-new-ctest-process ; then + echo "PASS: freediameter" +else + echo "FAIL: freediameter" +fi diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb index 3ec20d3ab9..b3282d273b 100644 --- a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb +++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb @@ -7,28 +7,28 @@ Accounting needs." HOMEPAGE = "http://www.freediameter.net" -DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools virtual/kernel bison-native" +DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn2 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 \ +PV .= "+git" +SRCREV = "f9f1e464e6c675d222b3be4cab9c13408d544c83" +SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=master \ file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \ + file://run-ptest \ 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://install_test.patch \ + file://0001-tests-use-EXTENSIONS_DIR.patch \ " -SRC_URI[sha256sum] = "7a537401bd110c606594b7c6be71b993f0ccc73ae151ad68040979286ba4e50e" - -S = "${WORKDIR}/${fd_pkgname}-${PV}" +S = "${WORKDIR}/git" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=69bdc1d97648a2d35914563fcbbb361a" +LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" @@ -46,6 +46,7 @@ EXTRA_OECMAKE = " \ -DBUILD_TEST_RT_ANY:BOOL=ON \ -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \ -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \ + -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ -DCMAKE_SKIP_RPATH:BOOL=ON \ " @@ -107,13 +108,15 @@ EOF 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 + find ${B} \( -name "*.c" -o -name "*.h" \) -exec sed -i -e 's#${WORKDIR}##g' {} \; } 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}/ + sed -i -e 's#${WORKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake + sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake } FILES:${PN}-dbg += "${libdir}/${fd_pkgname}/.debug/*" @@ -129,7 +132,7 @@ 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 ." +INITSCRIPT_PARAMS:${PN} = "start 30 . stop 70 0 1 2 3 4 5 6 ." SYSTEMD_SERVICE:${PN} = "freediameter.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch b/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch new file mode 100644 index 0000000000..8c83d5c8eb --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch @@ -0,0 +1,34 @@ +From 49aeccbec4bf620bb594999bbd4a9de669a3984c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 15 Mar 2024 14:34:06 -0700 +Subject: [PATCH] zebra: Mimic GNU basename() API for non-glibc library e.g. + musl musl only provides POSIX version of basename and it has also removed + providing it via string.h header [1] which now results in compile errors with + newer compilers e.g. clang-18 + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + zebra/zebra_netns_notify.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c +index 1bb1292e34..d55df2f62d 100644 +--- a/zebra/zebra_netns_notify.c ++++ b/zebra/zebra_netns_notify.c +@@ -41,6 +41,10 @@ + #define ZEBRA_NS_POLLING_INTERVAL_MSEC 1000 + #define ZEBRA_NS_POLLING_MAX_RETRIES 200 + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif ++ + DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo"); + static struct event *zebra_netns_notify_current; + +-- +2.44.0 + diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.pam b/meta-networking/recipes-protocols/frr/frr/frr.pam index 3541a975ae..a9ec35dd69 100644 --- a/meta-networking/recipes-protocols/quagga/files/quagga.pam +++ b/meta-networking/recipes-protocols/frr/frr/frr.pam @@ -1,10 +1,11 @@ # -# The PAM configuration file for the quagga `vtysh' service +# The PAM configuration file for the frr `vtysh' service # # This allows root to change user infomation without being # prompted for a password auth sufficient pam_rootok.so +account sufficient pam_rootok.so # The standard Unix authentication modules, used with # NIS (man nsswitch) as well as normal /etc/passwd and diff --git a/meta-networking/recipes-protocols/frr/frr_9.1.bb b/meta-networking/recipes-protocols/frr/frr_9.1.bb new file mode 100644 index 0000000000..eea6d62f5f --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr_9.1.bb @@ -0,0 +1,136 @@ +SUMMARY = "BGP/OSPF/RIP routing daemon" +DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ +and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ +and VRRP, with alpha support for EIGRP and NHRP." +HOMEPAGE = "https://frrouting.org/" +SECTION = "net" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" + + +SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ + file://frr.pam \ + file://0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch \ + " + +SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5" + +UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$" + +CVE_PRODUCT = "frrouting" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep python3native pkgconfig useradd systemd + +DEPENDS:class-native = "bison-native elfutils-native" +DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c" + +RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG:class-native = "" + +PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" +PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" +PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" +PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" +PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" +PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" +PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" +PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" +PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" + +EXTRA_OECONF:class-native = "--enable-clippy-only" + +EXTRA_OECONF:class-target = "--sbindir=${libexecdir}/frr \ + --sysconfdir=${sysconfdir}/frr \ + --localstatedir=${localstatedir}/run/frr \ + --enable-vtysh \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --disable-doc \ + --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ + " + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +# https://github.com/FRRouting/frr/issues/14469 +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" + +LDFLAGS:append:mips = " -latomic" +LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "frr.service" +SYSTEMD_AUTO_ENABLE = "disable" + +inherit update-alternatives multilib_script multilib_header + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN} = " ietf-interfaces " +ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" +do_compile:prepend () { + sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h +} + +do_compile:class-native () { + oe_runmake clippy-only +} + +do_install:class-native () { + install -d ${D}${libdir} + install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy +} + +do_install:append:class-target () { + install -m 0755 -d ${D}${sysconfdir}/frr + install -m 0755 -d ${D}${libexecdir}/frr + install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ + chown frr:frrvty ${D}${sysconfdir}/frr + chown frr:frr ${D}${sysconfdir}/frr/* + chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf + chmod 640 ${D}${sysconfdir}/frr/* + + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + install -d ${D}/${sysconfdir}/pam.d + install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr + + install -d ${D}${sysconfdir}/default/volatiles + echo "d frr frr 0755 ${localstatedir}/run/frr none" \ + > ${D}${sysconfdir}/default/volatiles/99_frr + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} + + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/frr 0755 frr frr -" \ + > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + oe_multilib_header frr/version.h +} + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" +USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" + +FILES:${PN} += "${datadir}/yang" + +BBCLASSEXTEND = "native" diff --git a/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch b/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch deleted file mode 100644 index c743b3eddb..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ea442b57f7a9bcd41d5b5bd1cafde4dbe5685d41 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 4 Nov 2021 07:31:32 -0700 -Subject: [PATCH] dns-sd: Include missing headers - -Fixes build on Musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - Clients/dns-sd.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/Clients/dns-sd.c -+++ b/Clients/dns-sd.c -@@ -58,11 +58,13 @@ - //#define TEST_NEW_CLIENTSTUB 1 - - #include <ctype.h> -+#include <stdarg.h> // For va_args - #include <stdio.h> // For stdout, stderr - #include <stdlib.h> // For exit() - #include <string.h> // For strlen(), strcpy() - #include <errno.h> // For errno, EINTR - #include <time.h> -+#include <sys/param.h> // For MIN - #include <sys/types.h> // For u_char - #ifdef APPLE_OSX_mDNSResponder - #include <inttypes.h> // For PRId64 ---- a/mDNSPosix/nss_mdns.c -+++ b/mDNSPosix/nss_mdns.c -@@ -89,6 +89,9 @@ - - #include <dns_sd.h> - -+#if !defined(NETDB_INTERNAL) -+# define NETDB_INTERNAL (-1) -+#endif - - //---------- - // Public functions diff --git a/meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch b/meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch deleted file mode 100644 index c57ce8fa53..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d744609c56f9872e5aa71707f1f71feec9867f51 Mon Sep 17 00:00:00 2001 -From: Mikko Rapeli <mikko.rapeli@bmw.de> -Date: Tue, 14 Jul 2020 16:36:29 +0000 -Subject: [PATCH 1/2] mdns: include <stddef.h> for NULL - -Fixes build error with version 1096.40.7: - -../mDNSCore/mDNS.c:11385:26: error: 'NULL' undeclared (first use in this function) -11385 | const char *reason = NULL; - | ^~~~ -../mDNSCore/mDNS.c:56:1: note: 'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'? - 55 | #include "dns_sd_internal.h" - +++ |+#include <stddef.h> - 56 | -../mDNSCore/mDNS.c:11385:26: note: each undeclared identifier is reported only once for each function it appears in -11385 | const char *reason = NULL; - | ^~~~ - -Upstream-Status: Pending - -Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> ---- - mDNSCore/mDNS.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c -index 2fbea04..d4b9af5 100755 ---- a/mDNSCore/mDNS.c -+++ b/mDNSCore/mDNS.c -@@ -23,6 +23,7 @@ - * routines, or types (which may or may not be present on any given platform). - */ - -+#include <stddef.h> /* for NULL */ - #include "DNSCommon.h" // Defines general DNS utility routines - #include "uDNS.h" // Defines entry points into unicast-specific routines - --- -2.20.1 - diff --git a/meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch b/meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch deleted file mode 100644 index 33590ffc57..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 72405143f9d16514e70b88bc4843c9634b88036a 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 -Subject: [PATCH 2/2] mdns: cross compilation fixes for bitbake - -Fixes several build errors when incorrect compiler or -compiler flags are used. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> -Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> ---- - mDNSPosix/Makefile | 44 ++++++++++++++++++++------------------------ - 1 file changed, 20 insertions(+), 24 deletions(-) - -diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile -index 78222e0..18a3af5 100755 ---- a/mDNSPosix/Makefile -+++ b/mDNSPosix/Makefile -@@ -50,6 +50,7 @@ - - LIBVERS = 1 - -+POSIXDIR = ../mDNSPosix - COREDIR = ../mDNSCore - SHAREDDIR ?= ../mDNSShared - DSODIR ?= ../DSO -@@ -62,16 +63,16 @@ else ifeq ($(SYSTEM), Linux) - os=linux - endif - --CC = cc --BISON = bison --FLEX = flex --ST = strip --LD = ld -+CC ?= cc -+BISON ?= bison -+FLEX ?= flex -+ST ?= strip -+LD ?= ld - SOOPTS = -shared - CP = cp - RM = rm - LN = ln -s -f --CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(DSODIR) -I$(PROXYDIR) -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$(DSODIR) -I$(PROXYDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" - CFLAGS_PTHREAD = - LINKOPTS = - LINKOPTS_PTHREAD = -lpthread -@@ -85,6 +86,7 @@ CFLAGS_OPEN_SOURCE= - endif - - # Set up diverging paths for debug vs. prod builds -+DEBUG ?= 1 - ifeq "$(DEBUG)" "1" - CFLAGS_DEBUGGING = -g -DMDNS_DEBUGMSGS=2 - OBJDIR = objects/debug -@@ -101,8 +103,8 @@ else - # 1. We want to make small binaries, suitable for putting into hardware devices - # 2. Some of the code analysis warnings only work when some form of optimization is enabled - CFLAGS_DEBUGGING = -g -DMDNS_DEBUGMSGS=0 --OBJDIR ?= objects/prod --BUILDDIR ?= build/prod -+OBJDIR = objects/prod -+BUILDDIR = build/prod - STRIP = $(ST) -S - endif - endif -@@ -125,7 +127,7 @@ else - # any target that contains the string "linux" - ifeq ($(findstring linux,$(os)),linux) - CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -ftabstop=4 --LD = $(CC) -+LD ?= $(CC) - SOOPTS = -shared - FLEXFLAGS_OS = -l - JAVACFLAGS_OS += -I$(JDK)/include/linux -@@ -276,8 +278,7 @@ Daemon: setup $(BUILDDIR)/mdnsd - @echo "Responder daemon done" - - $(BUILDDIR)/mdnsd: $(DAEMONOBJS) -- $(CC) -o $@ $+ $(LINKOPTS) -- $(STRIP) $@ -+ $(LD) -o $@ $+ - - # libdns_sd target builds the client library - libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) -@@ -286,13 +287,9 @@ 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) $(SOOPTS) $(LINKOPTS) -o $@ $+ -- $(STRIP) $@ -- --Clients: setup libdns_sd ../Clients/build/dns-sd -- @echo "Clients done" -+ $(LD) -shared $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+ - --../Clients/build/dns-sd: ../Clients/dns-sd.c -+Clients: setup libdns_sd - $(MAKE) -C ../Clients DEBUG=$(DEBUG) SUPMAKE_CFLAGS="$(MDNSCFLAGS)" - - # nss_mdns target builds the Name Service Switch module -@@ -300,8 +297,7 @@ nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE) - @echo "Name Service Switch module done" - - $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o -- $(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+ -- $(STRIP) $@ -+ $(LD) -shared $(LINKOPTS) -o $@ $+ - - ############################################################################# - -@@ -494,21 +490,21 @@ 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)/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) - - ############################################################################# - --- -2.20.1 - diff --git a/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch b/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch deleted file mode 100644 index b461a60df7..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch +++ /dev/null @@ -1,51 +0,0 @@ -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/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch b/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch deleted file mode 100644 index 362d69768e..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch +++ /dev/null @@ -1,45 +0,0 @@ -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/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch b/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch deleted file mode 100644 index d9adde04c2..0000000000 --- a/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 9ff06108cd44e84ba6c68bfa6737e793f117e303 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] 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 | 14 ++++---------- - 1 file changed, 4 insertions(+), 10 deletions(-) - -diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 7aeee7b..2d25016 100755 ---- a/mDNSPosix/mDNSPosix.c -+++ b/mDNSPosix/mDNSPosix.c -@@ -81,6 +81,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) -@@ -1641,18 +1642,11 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) - mDNSlocal mStatus WatchForInterfaceChange(mDNS *const m) - { - mStatus err; -- IfChangeRec *pChgRec; - -- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocateClear(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); -- if (err) -- mDNSPlatformMemFree(pChgRec); -+ err = mDNSPosixAddFDToEventLoop(gChgRec.NotifySD, InterfaceChangeCallback, &gChgRec); - - return err; - } --- -2.20.1 - diff --git a/meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch index f8efc10448..f5d424d58f 100644 --- a/meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch @@ -1,7 +1,7 @@ -From 6d90f9fdaf008f5c3b8fd8d91594fa1461437888 Mon Sep 17 00:00:00 2001 +From c1f3e19d3cb0aa948248616eb1684a1e80aa39b4 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] Create subroutine for cleaning recent interfaces +Subject: [PATCH 1/8] Create subroutine for cleaning recent interfaces Moves functionality for cleaning the list of recent interfaces into its own subroutine. @@ -9,15 +9,16 @@ interfaces into its own subroutine. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> --- - mDNSPosix/mDNSPosix.c | 23 ++++++++++++++--------- - 1 file changed, 14 insertions(+), 9 deletions(-) + mDNSPosix/mDNSPosix.c | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) -diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index a63cd19..7aeee7b 100755 ---- a/mDNSPosix/mDNSPosix.c -+++ b/mDNSPosix/mDNSPosix.c -@@ -1199,6 +1199,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1322,6 +1322,19 @@ mDNSlocal int SetupSocket(struct sockadd return err; } @@ -30,17 +31,18 @@ index a63cd19..7aeee7b 100755 + { + PosixNetworkInterface *pi = *ri; + if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next; -+ else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); } ++ else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_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) -@@ -1388,15 +1401,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) + mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, +@@ -1559,16 +1572,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c + // Clean up. if (intfList != NULL) freeifaddrs(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(); @@ -48,12 +50,9 @@ index a63cd19..7aeee7b 100755 - { - PosixNetworkInterface *pi = *ri; - if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next; -- else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); } +- else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_free(pi); } - } + CleanRecentInterfaces(); return err; } --- -2.20.1 - diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch new file mode 100644 index 0000000000..4b0227f1dc --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch @@ -0,0 +1,30 @@ +From 14cc53bb09a3d8adf301f3842c765598467e63e1 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Thu, 1 Feb 2024 14:07:03 +0000 +Subject: [PATCH] Fix SIGSEGV during DumpStateLog() + +DumpStateLog() calls LogMsgWithLevelv() with category == NULL, avoid +crashing in this case. + +Upstream-Status: Inactive-Upstream [Upstream does not take patches] +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSShared/mDNSDebug.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mDNSShared/mDNSDebug.c b/mDNSShared/mDNSDebug.c +index 7a4ca19eff6d..d449dde320f6 100644 +--- a/mDNSShared/mDNSDebug.c ++++ b/mDNSShared/mDNSDebug.c +@@ -71,7 +71,7 @@ mDNSlocal void LogMsgWithLevelv(os_log_t category, os_log_type_t level, const ch + mDNSlocal void LogMsgWithLevelv(const char *category, mDNSLogLevel_t level, const char *format, va_list args) + { + // Do not print the logs if the log category is MDNS_LOG_CATEGORY_DISABLED. +- if (strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0) ++ if (category && strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0) + { + return; + } +-- +2.39.0 + diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch new file mode 100644 index 0000000000..7e76f07c0e --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch @@ -0,0 +1,38 @@ +From 1cc54320306e07c1fc0eed98e7fbcbb07a2f3b28 Mon Sep 17 00:00:00 2001 +From: Stefan Agner <stefan@agner.ch> +Date: Fri, 23 Jun 2023 10:10:00 +0200 +Subject: [PATCH] Handle interface without `ifa_addr` + +It seems that certain interface types may have `ifa_addr` set to null. +Handle this case gracefully. + +Upstream-Status: Submitted [https://github.com/apple-oss-distributions/mDNSResponder/pull/2/commits/11b410d4d683c90e693c40315997bb3e8ec90e9a] + +Signed-off-by: Stefan Agner <stefan@agner.ch> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSPosix/mDNSPosix.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1895,6 +1895,7 @@ mDNSlocal void InterfaceChangeCallback(i + continue; + + if ((ifa_loop4 == NULL) && ++ ((*ifi)->ifa_addr != NULL) && + ((*ifi)->ifa_addr->sa_family == AF_INET) && + ((*ifi)->ifa_flags & IFF_UP) && + ((*ifi)->ifa_flags & IFF_LOOPBACK)) +@@ -1903,7 +1904,8 @@ mDNSlocal void InterfaceChangeCallback(i + continue; + } + +- if ( (((*ifi)->ifa_addr->sa_family == AF_INET) ++ if ( ((*ifi)->ifa_addr != NULL) && ++ (((*ifi)->ifa_addr->sa_family == AF_INET) + #if HAVE_IPV6 + || ((*ifi)->ifa_addr->sa_family == AF_INET6) + #endif diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch new file mode 100644 index 0000000000..82825b294d --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch @@ -0,0 +1,27 @@ +From cea342c10731cb1c8c8b52f03d55f9d15fc3b091 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 4 Nov 2021 07:31:32 -0700 +Subject: [PATCH 1/6] dns-sd: Include missing headers + +Fixes build on Musl + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + mDNSPosix/nss_mdns.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: mDNSResponder/mDNSPosix/nss_mdns.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/nss_mdns.c ++++ mDNSResponder/mDNSPosix/nss_mdns.c +@@ -89,6 +89,9 @@ + + #include <dns_sd.h> + ++#if !defined(NETDB_INTERNAL) ++# define NETDB_INTERNAL (-1) ++#endif + + //---------- + // Public functions diff --git a/meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch b/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch index 21ba318499..867db88a50 100644 --- a/meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch @@ -1,22 +1,23 @@ -From a2148df99ddcd122247f95c4cbcce5c4118581a1 Mon Sep 17 00:00:00 2001 +From 40ef0241afbb49f84e76afd65eb3ee17466bb582 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 +Subject: [PATCH 2/8] 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> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.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) +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface gRecentInterfaces = intf; } @@ -36,7 +37,7 @@ index ffc9696..5e5b2cd 100644 // 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) +@@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS * while (m->HostInterfaces) { PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces); @@ -52,7 +53,4 @@ index ffc9696..5e5b2cd 100644 + assert(num_registered_interfaces == 0); } - // Sets up a send/receive socket. --- -2.17.1 - + mDNSlocal int SetupIPv6Socket(int fd) diff --git a/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch b/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch new file mode 100644 index 0000000000..03fb1bc0d7 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch @@ -0,0 +1,24 @@ +From a198bcd457abd04f2e22812ff3a37246aa564614 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Mon, 5 Dec 2022 15:14:12 +0000 +Subject: [PATCH 2/6] make: Set libdns_sd.so soname correctly + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSPosix/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mDNSResponder/mDNSPosix/Makefile +=================================================================== +--- mDNSResponder.orig/mDNSPosix/Makefile ++++ mDNSResponder/mDNSPosix/Makefile +@@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$ + CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o $(OBJDIR)/dnssd_errstring.c.so.o + + $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) +- $(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+ ++ $(LD) $(SOOPTS) $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+ + $(STRIP) $@ + + Clients: setup libdns_sd ../Clients/build/dns-sd diff --git a/meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch b/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch index 8c0e6bf397..f1cda2b895 100644 --- a/meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch @@ -1,23 +1,24 @@ -From 71a7c728ae0d8143b66aa40decca74ebaa9aa2ce Mon Sep 17 00:00:00 2001 +From deb3a2c51f32e0d2741be11a492e727129f770e2 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 +Subject: [PATCH 3/8] 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> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.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 +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *co // Set up the extra fields in PosixNetworkInterface. assert(intf->intfName != NULL); // intf->intfName already set up above intf->index = intfIndex; @@ -25,10 +26,10 @@ index 5e5b2cd..8fe22be 100644 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 +Index: mDNSResponder/mDNSPosix/mDNSPosix.h +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.h ++++ mDNSResponder/mDNSPosix/mDNSPosix.h @@ -19,6 +19,7 @@ #define __mDNSPlatformPosix_h @@ -38,13 +39,10 @@ index ca60d80..f77c185 100644 #ifdef __cplusplus @@ -40,6 +41,7 @@ struct PosixNetworkInterface - const char * intfName; + char * intfName; PosixNetworkInterface * aliasIntf; int index; + sa_family_t sa_family; int multicastSocket4; #if HAVE_IPV6 int multicastSocket6; --- -2.17.1 - diff --git a/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch b/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch new file mode 100644 index 0000000000..6bc36456f6 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch @@ -0,0 +1,55 @@ +From beab76b5708862f44d9acbe7a92db45e2f99259f 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 4/8] Indicate loopback interface to mDNS core + +Tells the mDNS core if an interface is a loopback interface, +similar to AddInterfaceToList() in the MacOS implementation. + +Upstream-Status: Submitted [dts@apple.com] + +Signed-off-by: Nate Karstens <nate.karstens@garmin.com> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSPosix/mDNSPosix.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1348,7 +1348,7 @@ mDNSlocal void CleanRecentInterfaces(voi + // 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 mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex) ++ const mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex, int intfFlags) + { + int err = 0; + PosixNetworkInterface *intf; +@@ -1411,6 +1411,7 @@ mDNSlocal int SetupOneInterface(mDNS *co + + intf->coreIntf.Advertise = m->AdvertiseLocalAddresses; + intf->coreIntf.McastTxRx = mDNStrue; ++ intf->coreIntf.Loopback = ((intfFlags & IFF_LOOPBACK) != 0) ? mDNStrue : mDNSfalse; + + // Set up the extra fields in PosixNetworkInterface. + assert(intf->intfName != NULL); // intf->intfName already set up above +@@ -1561,7 +1562,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c + } + #endif + if (SetupOneInterface(m, i->ifa_addr, i->ifa_netmask, +- hwaddr, hwaddr_len, i->ifa_name, ifIndex) == 0) ++ hwaddr, hwaddr_len, i->ifa_name, ifIndex, i->ifa_flags) == 0) + { + if (i->ifa_addr->sa_family == AF_INET) + foundav4 = mDNStrue; +@@ -1578,7 +1579,7 @@ mDNSlocal int SetupInterfaceList(mDNS *c + // if ((m->HostInterfaces == NULL) && (firstLoopback != NULL)) + if (!foundav4 && firstLoopback) + (void) SetupOneInterface(m, firstLoopback->ifa_addr, firstLoopback->ifa_netmask, +- NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex); ++ NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex, firstLoopback->ifa_flags); + } + + // Clean up. diff --git a/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch b/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch new file mode 100644 index 0000000000..837580ac36 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch @@ -0,0 +1,61 @@ +From 22316f200803225f2d375ae5c36ffead59e2f6b8 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Mon, 5 Dec 2022 15:14:26 +0000 +Subject: [PATCH 4/6] make: Separate TLS targets from libraries + +There are dependencies on TLSOBJS, which fails when `-lmbedtls` is +listed as a dependency, so separate it out. + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSPosix/Makefile | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +Index: mDNSResponder/mDNSPosix/Makefile +=================================================================== +--- mDNSResponder.orig/mDNSPosix/Makefile ++++ mDNSResponder/mDNSPosix/Makefile +@@ -112,9 +112,11 @@ ifeq ($(findstring linux,$(os)),linux) + ifeq ($(tls), no) + CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -ftabstop=4 -Wno-expansion-to-defined + TLSOBJS = ++TLSLIBS = + else + CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -DPOSIX_HAS_TLS -ftabstop=4 -Wno-expansion-to-defined +-TLSOBJS = $(OBJDIR)/mbedtls.c.o -lmbedtls -lmbedcrypto ++TLSOBJS = $(OBJDIR)/mbedtls.c.o ++TLSLIBS = -lmbedtls -lmbedcrypto + endif + LD = $(CC) + SOOPTS = -shared +@@ -266,7 +268,7 @@ Daemon: setup $(BUILDDIR)/mdnsd + @echo "Responder daemon done" + + $(BUILDDIR)/mdnsd: $(DAEMONOBJS) +- $(CC) -o $@ $+ $(LINKOPTS) ++ $(CC) -o $@ $+ $(LINKOPTS) $(TLSLIBS) + $(STRIP) $@ + + # libdns_sd target builds the client library +@@ -485,16 +487,16 @@ dnsextd: setup $(BUILDDIR)/dnsextd + @echo "dnsextd done" + + $(BUILDDIR)/mDNSClientPosix: $(APPOBJ) $(TLSOBJS) $(OBJDIR)/Client.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ $(LINKOPTS) $(TLSLIBS) + + $(BUILDDIR)/mDNSResponderPosix: $(COMMONOBJ) $(TLSOBJS) $(OBJDIR)/Responder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ $(LINKOPTS) $(TLSLIBS) + + $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ) $(TLSOBJS) $(OBJDIR)/ProxyResponder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ $(LINKOPTS) $(TLSLIBS) + + $(BUILDDIR)/mDNSNetMonitor: $(SPECIALOBJ) $(TLSOBJS) $(OBJDIR)/NetMonitor.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ $(LINKOPTS) $(TLSLIBS) + + $(OBJDIR)/NetMonitor.c.o: $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c + diff --git a/meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch b/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch index db3a63ea48..f00116c617 100644 --- a/meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch @@ -1,7 +1,7 @@ -From 798bfb5e984845a27874d1a244686db6e384d7b8 Mon Sep 17 00:00:00 2001 +From e79f81f5cd626ad77ec64de4325f6645cf253c5e 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 +Subject: [PATCH 5/8] 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 @@ -10,15 +10,16 @@ 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> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> --- - mDNSPosix/mDNSPosix.c | 67 +++++++++++++++++++++++++++++++++---------- - 1 file changed, 52 insertions(+), 15 deletions(-) + mDNSPosix/mDNSPosix.c | 58 ++++++++++++++++++++++++++++++++----------- + 1 file changed, 43 insertions(+), 15 deletions(-) -diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 195d04b..bb883c1 100755 ---- a/mDNSPosix/mDNSPosix.c -+++ b/mDNSPosix/mDNSPosix.c -@@ -67,6 +67,14 @@ struct IfChangeRec +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -74,6 +74,14 @@ struct IfChangeRec }; typedef struct IfChangeRec IfChangeRec; @@ -33,29 +34,20 @@ index 195d04b..bb883c1 100755 // Note that static data is initialized to zero in (modern) C. static PosixEventSource *gEventSources; // linked list of PosixEventSource's static sigset_t gEventSignalSet; // Signals which event loop listens for -@@ -1458,6 +1466,32 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) +@@ -1621,6 +1629,23 @@ mDNSlocal mStatus OpenIfNotifySocket(int 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); ++ item = mdns_malloc(sizeof *item); + if (item == NULL) return; + + item->if_index = if_index; @@ -66,7 +58,7 @@ index 195d04b..bb883c1 100755 #if MDNS_DEBUGMSGS mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) { -@@ -1485,14 +1519,13 @@ mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) +@@ -1648,14 +1673,13 @@ mDNSlocal void PrintNetLinkMsg(cons } #endif @@ -82,7 +74,7 @@ index 195d04b..bb883c1 100755 // 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 -@@ -1528,9 +1561,9 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1691,9 +1715,9 @@ mDNSlocal mDNSu32 ProcessRoutingNo // Process the NetLink message if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) @@ -94,7 +86,7 @@ index 195d04b..bb883c1 100755 // Advance pNLMsg to the next message in the buffer if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) -@@ -1541,8 +1574,6 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1704,8 +1728,6 @@ mDNSlocal mDNSu32 ProcessRoutingNo else break; // all done! } @@ -103,7 +95,7 @@ index 195d04b..bb883c1 100755 } #else // USES_NETLINK -@@ -1574,14 +1605,13 @@ mDNSlocal void PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg) +@@ -1737,14 +1759,13 @@ mDNSlocal void PrintRoutingSocketMs } #endif @@ -119,7 +111,7 @@ index 195d04b..bb883c1 100755 readCount = read(sd, buff, sizeof buff); if (readCount < (ssize_t) sizeof(struct ifa_msghdr)) -@@ -1596,12 +1626,10 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1759,12 +1780,10 @@ mDNSlocal mDNSu32 ProcessRoutingNo pRSMsg->ifam_type == RTM_IFINFO) { if (pRSMsg->ifam_type == RTM_IFINFO) @@ -134,7 +126,7 @@ index 195d04b..bb883c1 100755 } #endif // USES_NETLINK -@@ -1611,7 +1639,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) +@@ -1774,7 +1793,8 @@ mDNSlocal void InterfaceChangeCallback(i { IfChangeRec *pChgRec = (IfChangeRec*) context; fd_set readFDs; @@ -144,7 +136,7 @@ index 195d04b..bb883c1 100755 struct timeval zeroTimeout = { 0, 0 }; (void)fd; // Unused -@@ -1619,17 +1648,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) +@@ -1782,17 +1802,25 @@ mDNSlocal void InterfaceChangeCallback(i FD_ZERO(&readFDs); FD_SET(pChgRec->NotifySD, &readFDs); @@ -167,11 +159,8 @@ index 195d04b..bb883c1 100755 + while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL) + { + RemoveFromList(&changedInterfaces, changedInterface); -+ free(changedInterface); ++ mdns_free(changedInterface); + } } // Register with either a Routing Socket or RtNetLink to listen for interface changes. --- -2.20.1 - diff --git a/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch b/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch new file mode 100644 index 0000000000..fd2f2f1178 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch @@ -0,0 +1,25 @@ +From 764b6202402e9e5687ff873330e5ad6be6f69df7 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Mon, 5 Dec 2022 22:49:49 +0000 +Subject: [PATCH] mDNSCore: Fix broken debug parameter + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> + +--- + mDNSCore/mDNS.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mDNSResponder/mDNSCore/mDNS.c +=================================================================== +--- mDNSResponder.orig/mDNSCore/mDNS.c ++++ mDNSResponder/mDNSCore/mDNS.c +@@ -10231,7 +10231,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastA + #else + const DNSServRef dnsserv = qptr->qDNSServer; + #endif +- debugf("mDNSCoreReceiveNoUnicastAnswers making negative cache entry TTL %d for %##s (%s)", negttl, currentQName, DNSTypeName(q.qtype)); ++ debugf("mDNSCoreReceiveNoUnicastAnswers making negative cache entry TTL %d for %##s (%s)", negttl, currentQName->c, DNSTypeName(q.qtype)); + // Create a negative record for the current name in the CNAME chain. + MakeNegativeCacheRecord(m, &m->rec.r, currentQName, currentQNameHash, q.qtype, q.qclass, negttl, mDNSInterface_Any, + dnsserv, response->h.flags); diff --git a/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch b/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch new file mode 100644 index 0000000000..80cdbca500 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch @@ -0,0 +1,249 @@ +From bfa1d68bed863e22c40a6d9a19ffbcc8694bbff6 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 6/8] 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> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSPosix/mDNSPosix.c | 182 +++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 172 insertions(+), 10 deletions(-) + +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1788,14 +1788,43 @@ mDNSlocal void ProcessRoutingNo + + #endif // USES_NETLINK + ++// Test whether the given PosixNetworkInterface matches the given struct ifaddrs ++mDNSlocal mDNSBool InterfacesMatch(PosixNetworkInterface *intf, struct ifaddrs *ifi) ++{ ++ mDNSBool match = mDNSfalse; ++ mDNSAddr ip, mask; ++ unsigned int if_index; ++ ++ if_index = if_nametoindex(ifi->ifa_name); ++ if (if_index == 0) ++ return mDNSfalse; ++ ++ if((intf->index == if_index) && ++ (intf->sa_family == ifi->ifa_addr->sa_family) && ++ (strcmp(intf->coreIntf.ifname, ifi->ifa_name) == 0)) ++ { ++ SockAddrTomDNSAddr(ifi->ifa_addr, &ip, NULL); ++ SockAddrTomDNSAddr(ifi->ifa_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, void *context) + { + IfChangeRec *pChgRec = (IfChangeRec*) context; ++ mDNS *m = pChgRec->mDNS; + fd_set readFDs; + GenLinkedList changedInterfaces; + NetworkInterfaceIndex *changedInterface; + struct timeval zeroTimeout = { 0, 0 }; ++ struct ifaddrs *ifa_list, **ifi, *ifa_loop4 = NULL; ++ PosixNetworkInterface *intf, *intfNext; ++ mDNSBool found, foundav4; + + (void)fd; // Unused + +@@ -1810,12 +1839,149 @@ mDNSlocal void InterfaceChangeCallback(i + } + 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; ++ ++ if (getifaddrs(&ifa_list) < 0) goto cleanup; ++ ++ 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 = &ifa_list; *ifi != NULL; ifi = &(*ifi)->ifa_next) ++ { ++ if (InterfacesMatch(intf, *ifi)) ++ { ++ found = mDNStrue; ++ break; ++ } ++ } ++ ++ // Removes changed and old interfaces from m->HostInterfaces ++ if (!found) TearDownInterface(m, intf); ++ } ++ ++ // Add new and changed interfaces in ifa_list ++ // Save off loopback interface in case it is needed later ++ for (ifi = &ifa_list; *ifi != NULL; ifi = &(*ifi)->ifa_next) ++ { ++ found = mDNSfalse; ++ 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; ++ ++ if (InterfacesMatch(intf, *ifi)) ++ { ++ found = mDNStrue; ++ break; ++ } ++ ++ // Removes changed and old interfaces from m->HostInterfaces ++ } ++ if (found) ++ continue; ++ ++ if ((ifa_loop4 == NULL) && ++ ((*ifi)->ifa_addr->sa_family == AF_INET) && ++ ((*ifi)->ifa_flags & IFF_UP) && ++ ((*ifi)->ifa_flags & IFF_LOOPBACK)) ++ { ++ ifa_loop4 = *ifi; ++ continue; ++ } ++ ++ if ( (((*ifi)->ifa_addr->sa_family == AF_INET) ++#if HAVE_IPV6 ++ || ((*ifi)->ifa_addr->sa_family == AF_INET6) ++#endif ++ ) && ((*ifi)->ifa_flags & IFF_UP) ++ && !((*ifi)->ifa_flags & IFF_POINTOPOINT) ++ && !((*ifi)->ifa_flags & IFF_LOOPBACK)) ++ { ++ struct ifaddrs *i = *ifi; ++ ++#define ethernet_addr_len 6 ++ uint8_t hwaddr[ethernet_addr_len]; ++ int hwaddr_len = 0; ++ ++#if defined(TARGET_OS_LINUX) && TARGET_OS_LINUX ++ struct ifreq ifr; ++ int sockfd = socket(AF_INET6, SOCK_DGRAM, 0); ++ if (sockfd >= 0) ++ { ++ /* Add hardware address */ ++ memcpy(ifr.ifr_name, i->ifa_name, IFNAMSIZ); ++ if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) != -1) ++ { ++ if (ifr.ifr_hwaddr.sa_family == ARPHRD_ETHER) ++ { ++ memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ethernet_addr_len); ++ hwaddr_len = ethernet_addr_len; ++ } ++ } ++ close(sockfd); ++ } ++ else ++ { ++ memset(hwaddr, 0, sizeof(hwaddr)); ++ } ++#endif // TARGET_OS_LINUX ++ SetupOneInterface(m, i->ifa_addr, i->ifa_netmask, ++ hwaddr, hwaddr_len, i->ifa_name, if_nametoindex(i->ifa_name), i->ifa_flags); ++ } ++ } ++ ++ // 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 && (ifa_loop4 != NULL)) ++ { ++ SetupOneInterface(m, ifa_loop4->ifa_addr, ifa_loop4->ifa_netmask, ++ NULL, 0, ifa_loop4->ifa_name, if_nametoindex(ifa_loop4->ifa_name), ifa_loop4->ifa_flags); ++ } ++ } ++ ++ if (ifa_list != NULL) freeifaddrs(ifa_list); + ++cleanup: + while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL) + { + RemoveFromList(&changedInterfaces, changedInterface); +@@ -1947,15 +2113,11 @@ mDNSexport void mDNSPlatformClose(mDNS * + #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); diff --git a/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch b/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch new file mode 100644 index 0000000000..c12a02fcdd --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch @@ -0,0 +1,21 @@ +From fa9ef50ab4c4225cf3ade4bafc38ddf93e6fe127 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Tue, 6 Dec 2022 13:28:31 +0000 +Subject: [PATCH 6/6] make: Add top-level Makefile + +Simple top level Makefile that just delegates to mDNSPosix. + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + create mode 100644 Makefile + +Index: mDNSResponder/Makefile +=================================================================== +--- /dev/null ++++ mDNSResponder/Makefile +@@ -0,0 +1,2 @@ ++all clean: ++ cd mDNSPosix && $(MAKE) $@ diff --git a/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch b/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch index fdc5105cb9..dae1ac7ea0 100644 --- a/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch @@ -1,7 +1,7 @@ -From 0fcc0f210f3a9310a1963de640b384ce866410fd Mon Sep 17 00:00:00 2001 +From a8accffb95267490b50401c8b65ec18db57b5ef5 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 +Subject: [PATCH 7/8] 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- @@ -17,15 +17,16 @@ Testing and Verification Instructions: Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.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 +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1714,7 +1714,7 @@ mDNSlocal void ProcessRoutingNo #endif // Process the NetLink message @@ -34,6 +35,3 @@ index 798ab10..a8a57df 100644 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/meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch b/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch index b9b0157276..1789001e14 100644 --- a/meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch @@ -1,7 +1,7 @@ -From 382b3b924e43abd1bdc5792918161d0922666691 Mon Sep 17 00:00:00 2001 +From ed58146d3aeecdb9920fdc017f85c18b5b10f2db 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 +Subject: [PATCH 8/8] Handle errors from socket calls Adds handling for socket() or read() returning a negative value (indicating an error has occurred). @@ -9,15 +9,16 @@ negative value (indicating an error has occurred). Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.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 +Index: mDNSResponder/mDNSPosix/mDNSPosix.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mDNSPosix.c ++++ mDNSResponder/mDNSPosix/mDNSPosix.c +@@ -1677,7 +1677,7 @@ mDNSlocal void ProcessRoutingNo // 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. { @@ -26,7 +27,7 @@ index 3243ed4..84af26b 100644 char buff[4096]; struct nlmsghdr *pNLMsg = (struct nlmsghdr*) buff; -@@ -1138,7 +1138,10 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change +@@ -1686,7 +1686,10 @@ mDNSlocal void ProcessRoutingNo // enough to hold all pending data and so avoid message fragmentation. // (Note that FIONREAD is not supported on AF_NETLINK.) @@ -38,7 +39,7 @@ index 3243ed4..84af26b 100644 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 +@@ -1702,7 +1705,9 @@ mDNSlocal void ProcessRoutingNo pNLMsg = (struct nlmsghdr*) buff; // read more data @@ -49,7 +50,7 @@ index 3243ed4..84af26b 100644 continue; // spin around and revalidate with new readCount } else -@@ -1429,6 +1434,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void) +@@ -2017,6 +2022,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanR int err; int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); struct sockaddr_in s5353; @@ -57,6 +58,3 @@ index 3243ed4..84af26b 100644 s5353.sin_family = AF_INET; s5353.sin_port = MulticastDNSPort.NotAnInteger; s5353.sin_addr.s_addr = 0; --- -2.17.1 - diff --git a/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch b/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch new file mode 100644 index 0000000000..d443bc97b2 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch @@ -0,0 +1,31 @@ +From 1d7e71e72c597ffcc19c04373a477d1fbd3ad955 Mon Sep 17 00:00:00 2001 +From: Beniamin Sandu <beniaminsandu@gmail.com> +Date: Thu, 15 Jun 2023 17:02:58 +0000 +Subject: [PATCH] remove unneeded headers + +From a quick look, these seem to not be needed and having them +breaks the build with mbedtls 3.x. Without them it builds fine +on both 2.x and 3.x versions. + +Upstream-Status: Pending + +Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> +--- + mDNSPosix/mbedtls.c | 2 -- + 1 file changed, 2 deletions(-) + +Index: mDNSResponder/mDNSPosix/mbedtls.c +=================================================================== +--- mDNSResponder.orig/mDNSPosix/mbedtls.c ++++ mDNSResponder/mDNSPosix/mbedtls.c +@@ -38,10 +38,8 @@ + #include <mbedtls/sha256.h> + #include <mbedtls/base64.h> + +-#include <mbedtls/certs.h> + #include <mbedtls/x509.h> + #include <mbedtls/ssl.h> +-#include <mbedtls/config.h> + + // Posix TLS server context + struct TLSContext_struct { diff --git a/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch b/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch new file mode 100644 index 0000000000..511a6fdc18 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0015-Add-missing-limits.h.patch @@ -0,0 +1,23 @@ +From 9fc45a2cf3b78573a568abf538a6e6f4bd30b2d7 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Wed, 27 Sep 2023 11:45:26 +0100 +Subject: [PATCH] Add missing limits.h + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + mDNSShared/PlatformCommon.c | 1 + + 1 file changed, 1 insertion(+) + +Index: mDNSResponder/mDNSShared/PlatformCommon.c +=================================================================== +--- mDNSResponder.orig/mDNSShared/PlatformCommon.c ++++ mDNSResponder/mDNSShared/PlatformCommon.c +@@ -32,6 +32,7 @@ + #include <time.h> + #include <sys/time.h> // Needed for #include <sys/time.h>(). + #include <assert.h> ++#include <limits.h> + + + #include "mDNSEmbeddedAPI.h" // Defines the interface provided to the client layer above diff --git a/meta-networking/recipes-protocols/mdns/files/mdns.service b/meta-networking/recipes-protocols/mdns/mdns/mdns.service index 531d142dcd..531d142dcd 100644 --- a/meta-networking/recipes-protocols/mdns/files/mdns.service +++ b/meta-networking/recipes-protocols/mdns/mdns/mdns.service diff --git a/meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb b/meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb deleted file mode 100644 index 5c6d220200..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb +++ /dev/null @@ -1,115 +0,0 @@ -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 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" - -DEPENDS:append:libc-musl = " musl-nscd" - -RPROVIDES:${PN} += "libdns_sd.so" - -SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \ - file://mdns.service \ - file://0001-mdns-include-stddef.h-for-NULL.patch;patchdir=.. \ - file://0002-mdns-cross-compilation-fixes-for-bitbake.patch;patchdir=.. \ - 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://0006-Remove-unneeded-function.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=.. \ - file://0001-dns-sd-Include-missing-headers.patch;patchdir=.. \ - " -SRC_URI[sha256sum] = "040f6495c18b9f0557bcf9e00cbcfc82b03405f5ba6963dc147730ca0ca90d6f" - -CVE_PRODUCT = "apple:mdnsresponder" - -# 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/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb b/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb new file mode 100644 index 0000000000..183f05ebc3 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns_2200.100.94.0.2.bb @@ -0,0 +1,135 @@ +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 = "https://developer.apple.com/bonjour/" +LICENSE = "Apache-2.0 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" + +DEPENDS:append:libc-musl = " musl-nscd" + +SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=rel/mDNSResponder-2200 \ + file://0001-dns-sd-Include-missing-headers.patch \ + file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ + file://0004-make-Separate-TLS-targets-from-libraries.patch \ + file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ + file://0006-make-Add-top-level-Makefile.patch \ + file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch \ + file://0002-Create-subroutine-for-tearing-down-an-interface.patch \ + file://0003-Track-interface-socket-family.patch \ + file://0004-Indicate-loopback-interface-to-mDNS-core.patch \ + file://0005-Use-list-for-changed-interfaces.patch \ + file://0006-Handle-noisy-netlink-sockets.patch \ + file://0007-Mark-deleted-interfaces-as-being-changed.patch \ + file://0008-Handle-errors-from-socket-calls.patch \ + file://0009-remove-unneeded-headers.patch \ + file://mdns.service \ + file://0015-Add-missing-limits.h.patch \ + file://0001-Handle-interface-without-ifa_addr.patch \ + file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \ + " +SRCREV = "8f70f98fc1d0cf439ca3a6470be6ad8ac2bcc019" + +# We install a stub Makefile in the top directory so that the various checks +# in base.bbclass pass their tests for a Makefile, this ensures (that amongst +# other things) the sstate checks will clean the build directory when the +# task hashes changes. +# +# We can't use the approach of setting ${S} to mDNSPosix as we need +# DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. +S = "${WORKDIR}/git" + +inherit github-releases manpages systemd update-rc.d + +PACKAGECONFIG ?= "tls \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0" +PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0" +PACKAGECONFIG[manpages] = "" +PACKAGECONFIG[tls] = ",tls=no,mbedtls" + +CVE_PRODUCT = "apple:mdnsresponder" + +CVE_STATUS[CVE-2007-0613] = "not-applicable-platform: Issue 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" + +PARALLEL_MAKE = "" + +EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=: ${PACKAGECONFIG_CONFARGS}" + +# MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string, +# which are fixed anyway for build reproducibility. +TARGET_CPPFLAGS += "-DMDNS_VERSIONSTR_NODTS" + +TARGET_CC_ARCH += "${LDFLAGS}" + +MDNS_BUILDDIR = "build/${@bb.utils.contains('PACKAGECONFIG','debug','debug','prod', d)}" + +do_install () { + cd mDNSPosix + + install -d ${D}${sbindir} + install ${MDNS_BUILDDIR}/mdnsd ${D}${sbindir} + + install -d ${D}${libdir} + install -m 0644 ${MDNS_BUILDDIR}/libdns_sd.so ${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 ${MDNS_BUILDDIR} -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_system_unitdir} + install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_system_unitdir} + + install -d ${D}${INIT_D_DIR} + install mdnsd.sh ${D}${INIT_D_DIR}/mdns +} + +pkg_postinst:${PN} () { + if [ -r $D${sysconfdir}/nsswitch.conf ]; then + sed -e '/^hosts:/s/\s*\<mdns\>//' \ + -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf + fi +} + +pkg_prerm:${PN} () { + if [ -r $D${sysconfdir}/nsswitch.conf ]; then + sed -e '/^hosts:/s/\s*\<mdns\>//' \ + -e '/^hosts:/s/\s*mdns//' \ + -i $D${sysconfdir}/nsswitch.conf + fi +} + +SYSTEMD_SERVICE:${PN} = "mdns.service" +INITSCRIPT_NAME = "mdns" + +FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" +FILES:${PN} += "${libdir}/libnss_mdns-0.2.so" + +RPROVIDES:${PN} += "libdns_sd.so" diff --git a/meta-networking/recipes-protocols/net-snmp/files/init b/meta-networking/recipes-protocols/net-snmp/files/init index 47995466fb..47995466fb 100755..100644 --- a/meta-networking/recipes-protocols/net-snmp/files/init +++ b/meta-networking/recipes-protocols/net-snmp/files/init diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch new file mode 100644 index 0000000000..097d9f83cd --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch @@ -0,0 +1,83 @@ +From b4598662a39ff6974119c900ea56a4d020eac366 Mon Sep 17 00:00:00 2001 +From: Bart Van Assche <bvanassche@acm.org> +Date: Wed, 20 Dec 2023 13:08:06 -0800 +Subject: [PATCH] Android: Fix the build + +Include <sys/select.h> for the fd_set type. In the configure script, +check whether 'unsigned long' is the underlying type of fd_set. Use +u_long instead of ulong. + +Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/b4598662a39ff6974119c900ea56a4d020eac366] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + agent/mibgroup/ip-mib/data_access/ipaddress_linux.c | 4 ++-- + configure | 2 +- + configure.d/config_project_types | 2 +- + include/net-snmp/types.h | 3 +++ + 4 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +index b38beb57dd..232202d0f9 100644 +--- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c ++++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +@@ -50,7 +50,7 @@ int _load_v6(netsnmp_container *container, int idx_offset); + int + netsnmp_access_ipaddress_extra_prefix_info(int index, + u_long *preferedlt, +- ulong *validlt, ++ u_long *validlt, + char *addr); + #endif + +@@ -523,7 +523,7 @@ out: + + int + netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, +- ulong *validlt, char *addr) ++ u_long *validlt, char *addr) + { + + struct { +diff --git a/configure b/configure +index e7bf859bba..48abcbab11 100755 +--- a/configure ++++ b/configure +@@ -31577,7 +31577,7 @@ CFLAGS="$CFLAGS -Werror" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of fd_set::fds_bits" >&5 + printf %s "checking for the type of fd_set::fds_bits... " >&6; } +-for type in __fd_mask __int32_t long\ int unknown; do ++for type in __fd_mask __int32_t long 'unsigned long' unknown; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +diff --git a/configure.d/config_project_types b/configure.d/config_project_types +index a78e8ebb06..ac958d6712 100644 +--- a/configure.d/config_project_types ++++ b/configure.d/config_project_types +@@ -66,7 +66,7 @@ netsnmp_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" + + AC_MSG_CHECKING([for the type of fd_set::fds_bits]) +-for type in __fd_mask __int32_t long\ int unknown; do ++for type in __fd_mask __int32_t long 'unsigned long' unknown; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include <sys/select.h> + #include <stddef.h> +diff --git a/include/net-snmp/types.h b/include/net-snmp/types.h +index b78f53ffd7..6228170e5f 100644 +--- a/include/net-snmp/types.h ++++ b/include/net-snmp/types.h +@@ -23,6 +23,9 @@ + #endif + + #include <sys/types.h> ++#ifdef __ANDROID__ ++#include <sys/select.h> ++#endif + + #if defined(WIN32) && !defined(cygwin) + typedef HANDLE netsnmp_pid_t; +-- +2.44.0 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-add-knob-whether-nlist.h-are-checked.patch index f1ebe2bb61..ea9dccac28 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-add-knob-whether-nlist.h-are-checked.patch @@ -1,4 +1,4 @@ -From e507dcf8b29c55011f85d88bf05400d4717e4074 Mon Sep 17 00:00:00 2001 +From 787269b337e70f073e194c3b361eaf4d5f2291ce 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 @@ -6,16 +6,15 @@ 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 +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 76ef58a..f07d512 100644 +index 584064e..c0688f8 100644 --- a/configure.d/config_os_headers +++ b/configure.d/config_os_headers @@ -37,6 +37,7 @@ AC_CHECK_HEADERS([getopt.h pthread.h regex.h ] dnl @@ -34,3 +33,6 @@ index 76ef58a..f07d512 100644 # Library: AC_CHECK_HEADERS([crt_externs.h ] dnl +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmpd-always-exit-after-displaying-usage.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmpd-always-exit-after-displaying-usage.patch deleted file mode 100644 index 4fc9e54b49..0000000000 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmpd-always-exit-after-displaying-usage.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 94ca941e06bef157bf0e13251f8ca1471daa9393 Mon Sep 17 00:00:00 2001 -From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> -Date: Fri, 27 Aug 2021 14:21:45 +0300 -Subject: [PATCH] snmpd: always exit after displaying usage - -Currently, viewing the help text with -h results in snmpd being started -in the background, whereas this does not happen with --help. Similarly, -when an error is detected in command line syntax, the help text is -displayed but sometimes snmpd gets started anyway, depending on the -execution path. - -This patch makes snmpd consistently terminate whenever the usage -function gets called. It also removes the goto statements no longer -needed. - -Upstream-Status: Backport -[https://github.com/net-snmp/net-snmp/commit/94ca941e06bef157bf0e13251f8ca1471daa9393] - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - agent/snmpd.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agent/snmpd.c b/agent/snmpd.c -index f5aab0af8..90de12d99 100644 ---- a/agent/snmpd.c -+++ b/agent/snmpd.c -@@ -289,6 +289,8 @@ usage(char *prog) - " -S d|i|0-7\t\tuse -Ls <facility> instead\n" - "\n" - ); -+ SOCK_CLEANUP; -+ exit(1); - } - - static void -@@ -494,7 +496,6 @@ main(int argc, char *argv[]) - case '-': - if (strcasecmp(optarg, "help") == 0) { - usage(argv[0]); -- goto out; - } - if (strcasecmp(optarg, "version") == 0) { - version(); -@@ -783,7 +784,6 @@ main(int argc, char *argv[]) - fprintf(stderr, "%s: Illegal argument -X:" - "AgentX support not compiled in.\n", argv[0]); - usage(argv[0]); -- goto out; - #endif - break; - --- -2.25.1 - diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch deleted file mode 100644 index c973bde721..0000000000 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0a02ac779c51a2b4af3b58cb96967bf3eff80367 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] 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/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-net-snmp-fix-libtool-finish.patch index 26dd014ce4..e951537b04 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-net-snmp-fix-libtool-finish.patch @@ -1,4 +1,4 @@ -From 27444fbf8323679ea0551a3bd5f04c365143d8c0 Mon Sep 17 00:00:00 2001 +From 5f002c3cc46ecf4d4a29571309f2cc0d3d34330f 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" @@ -14,17 +14,16 @@ 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 6315401..fc0ee06 100644 +index d1b3923..53e0392 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 +@@ -89,7 +89,7 @@ LIBREVISION = 1 + LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o LIB_EXTENSION = la LIB_VERSION = -LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir) @@ -32,3 +31,6 @@ index 6315401..fc0ee06 100644 LINK = $(LIBTOOL) --mode=link $(LINKCC) # RANLIB = @RANLIB@ RANLIB = : +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0003-testing-add-the-output-format-for-ptest.patch index 807983f612..ab54492934 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0003-testing-add-the-output-format-for-ptest.patch @@ -1,4 +1,4 @@ -From 972df16e9599dffddf5d714a4cbf43008c771122 Mon Sep 17 00:00:00 2001 +From 2a1a2b58af09c6c03026474f1fd0db7d36e977c7 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 @@ -6,7 +6,6 @@ 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(+) @@ -33,3 +32,6 @@ index 6715831..a2b6fb8 100755 done if [ -f failed_tests ]; then +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-config_os_headers-Error-Fix.patch index 05a47f61ce..e2269bc3e8 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-config_os_headers-Error-Fix.patch @@ -1,4 +1,4 @@ -From 69d4c517c07f55c505090e48d96ace8cd599fb26 Mon Sep 17 00:00:00 2001 +From b1c941c20577578aa5ff3450d9d8d7a23c55d14a 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 @@ -10,16 +10,15 @@ conftest.c:168:17: fatal error: pkg.h: No such file or directory #include <pkg.h> ^ -Upstream-Status: pending +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 f07d512..2363b42 100644 +index c0688f8..f68713c 100644 --- a/configure.d/config_os_headers +++ b/configure.d/config_os_headers @@ -395,8 +395,8 @@ then @@ -33,3 +32,6 @@ index f07d512..2363b42 100644 AC_CHECK_HEADERS(pkg.h, NETSNMP_SEARCH_LIBS(pkg_init, pkg, AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng]))) +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch index 42352a6b00..7a6b35460e 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch @@ -1,23 +1,23 @@ -From f3ff99736b8cccbba77349b0d10a3cee366a4c87 Mon Sep 17 00:00:00 2001 +From c790411f9aa82064fea9bbf23b499fb6b7f22c4f 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 +Upstream-Status: Pending + Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> - --- snmplib/keytools.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/snmplib/keytools.c b/snmplib/keytools.c -index 129a7c0..2fc1efc 100644 +index 388e655..5a66898 100644 --- a/snmplib/keytools.c +++ b/snmplib/keytools.c @@ -183,10 +183,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, @@ -32,3 +32,6 @@ index 129a7c0..2fc1efc 100644 #endif if (!EVP_DigestInit(ctx, hashfn)) { rval = SNMPERR_GENERR; +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0006-get_pid_from_inode-Include-limit.h.patch index 22e591556a..6a0161ae27 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0006-get_pid_from_inode-Include-limit.h.patch @@ -1,4 +1,4 @@ -From 2bf1bbe1d428ed06d57aa76b03e394b72ff2216d Mon Sep 17 00:00:00 2001 +From 95868615a04b4a6f0dd5997c9726422828426116 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 @@ -8,13 +8,12 @@ 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 +index 5788e1d..ea380a6 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 @@ @@ -23,5 +22,8 @@ index aee907d..7abaec2 100644 #include <ctype.h> +#include <limits.h> #include <stdio.h> - #if HAVE_STDLIB_H + #ifdef HAVE_STDLIB_H #include <stdlib.h> +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0007-configure-fix-incorrect-variable.patch index bfddc63dd7..5d394eec14 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0007-configure-fix-incorrect-variable.patch @@ -1,4 +1,4 @@ -From 011bdcd07f2a289d0cfc1b411c03c0cc7c42dad1 Mon Sep 17 00:00:00 2001 +From 385fa343cf178ccfe2c9a9fd7795d0db3c959fdd 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] configure: fix incorrect variable @@ -8,16 +8,15 @@ 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 912f6b2..a53d1b2 100644 +index 1c1182e..f947b8c 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -174,7 +174,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt +@@ -173,7 +173,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt # # override LD_RUN_PATH to avoid dependencies on the build directory perlmodules: perlmakefiles subdirs @@ -26,3 +25,6 @@ index 912f6b2..a53d1b2 100644 if test $$? != 0 ; then \ exit 1 ; \ fi +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch index 022eb958f3..a57c4c8f14 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch @@ -1,4 +1,4 @@ -From 1e3178835217ba89aa355e2b6b88e490f17be16d Mon Sep 17 00:00:00 2001 +From b5cbe0953a7e7a3c77c7ec69dfe81254475f08c0 Mon Sep 17 00:00:00 2001 From: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Date: Wed, 9 Jun 2021 15:47:30 +0900 Subject: [PATCH] net snmp: fix engineBoots value on SIGHUP @@ -7,29 +7,29 @@ Upstream-Status: Pending Signed-off-by: Marian Florea <marian.florea@windriver.com> Signed-off-by: Li Zhou <li.zhou@windriver.com> - +Signed-off-by: Ovidiu Panait <ovidiu.panait@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 1af439f..355b510 100644 +index fe31c87..d9f68dd 100644 --- a/agent/snmpd.c +++ b/agent/snmpd.c -@@ -1208,6 +1208,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_SIGPROCMASK - ret = sigprocmask(SIG_UNBLOCK, &set, NULL); +@@ -1169,6 +1169,7 @@ snmpd_reconfig(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); + #ifdef HAVE_SIGPROCMASK + ret = sigprocmask(SIG_UNBLOCK, &set, NULL); diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c -index 29c2a0f..ada961c 100644 +index be9256f..d17d2e3 100644 --- a/snmplib/snmpv3.c +++ b/snmplib/snmpv3.c -@@ -1059,9 +1059,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg, +@@ -1071,9 +1071,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 */ diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0009-net-snmp-fix-for-disable-des.patch index 2941a36092..36a676fb02 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-fix-for-disable-des.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0009-net-snmp-fix-for-disable-des.patch @@ -1,4 +1,4 @@ -From 3ca4335ec1d6b7b384c134fc85d7a9e513c68376 Mon Sep 17 00:00:00 2001 +From aa1f157c675da248ed186e020d17cb2528d0be12 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 @@ -9,16 +9,15 @@ 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 00c9174..c6875e1 100644 +index ac77004..7545bfa 100644 --- a/snmplib/scapi.c +++ b/snmplib/scapi.c -@@ -85,7 +85,9 @@ netsnmp_feature_child_of(usm_scapi, usm_support); +@@ -86,7 +86,9 @@ netsnmp_feature_child_of(usm_scapi, usm_support); #include <openssl/hmac.h> #include <openssl/evp.h> #include <openssl/rand.h> @@ -28,3 +27,6 @@ index 00c9174..c6875e1 100644 #ifdef HAVE_AES #include <openssl/aes.h> #endif +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-have-printcap.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0010-net-snmp-Reproducibility-Don-t-check-build-host-for.patch index bf1e7bedf2..246ce2b8d9 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/reproducibility-have-printcap.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0010-net-snmp-Reproducibility-Don-t-check-build-host-for.patch @@ -1,4 +1,4 @@ -From 84e362fe97f50fbad69f083bc2d8fe18f83eb2f7 Mon Sep 17 00:00:00 2001 +From a96140995d10660046146d9fa75faa5f7faabab0 Mon Sep 17 00:00:00 2001 From: "douglas.royds" <douglas.royds@taitradio.com> Date: Wed, 21 Nov 2018 13:52:18 +1300 Subject: [PATCH] net-snmp: Reproducibility: Don't check build host for @@ -8,12 +8,13 @@ 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. +Upstream-Status: Pending --- configure.d/config_os_misc4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.d/config_os_misc4 b/configure.d/config_os_misc4 -index 6f23c8e..8cea75a 100644 +index 4c445d6..099257f 100644 --- a/configure.d/config_os_misc4 +++ b/configure.d/config_os_misc4 @@ -99,9 +99,9 @@ if test x$LPSTAT_PATH != x; then @@ -28,3 +29,6 @@ index 6f23c8e..8cea75a 100644 # Check ps args +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch index 4cd7290447..1e845c4e63 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch @@ -1,7 +1,8 @@ -From 6f8ea2e841ad45eed193310b599d3f3b410ae91d Mon Sep 17 00:00:00 2001 +From 85a6c5017a2cd18a5a66afcb3f6a02276c101ad0 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Fri, 29 Jan 2021 08:49:15 +0000 -Subject: [PATCH] ac_add_search_path.m4: keep consistent between 32bit and 64bit +Subject: [PATCH] ac_add_search_path.m4: keep consistent between 32bit and + 64bit With configure option "--with-openssl=${STAGING_EXECPREFIXDIR}", it behaves differently between 32bit and 64bit system as the openssl lib resides under @@ -20,7 +21,7 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/ac_add_search_path.m4 b/m4/ac_add_search_path.m4 -index 8e0a819..961f587 100644 +index 8e0a819..e9585bc 100644 --- a/m4/ac_add_search_path.m4 +++ b/m4/ac_add_search_path.m4 @@ -3,8 +3,8 @@ dnl Add a search path to the LIBS and CPPFLAGS variables @@ -35,5 +36,5 @@ index 8e0a819..961f587 100644 if test -d $1/include; then CPPFLAGS="-I$1/include $CPPFLAGS" -- -2.29.2 +2.25.1 diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch new file mode 100644 index 0000000000..9d4b769930 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch @@ -0,0 +1,43 @@ +From 21ea0b9ce5cc9445f7ffd7a9020b816681e16284 Mon Sep 17 00:00:00 2001 +From: Adam Gajda <adgajda@users.noreply.github.com> +Date: Mon, 2 Oct 2023 16:40:31 +0200 +Subject: [PATCH] Fix configuration of NETSNMP_FD_MASK_TYPE + +Upstream-Status: Backport +[https://github.com/net-snmp/net-snmp/commit/af1b7f77975bbb2fcbdb3f005f8cb010d1d33cd3] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + configure | 2 +- + configure.d/config_project_types | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 907d441..f4468c6 100755 +--- a/configure ++++ b/configure +@@ -31638,7 +31638,7 @@ CFLAGS="$CFLAGS -Werror" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of fd_set::fds_bits" >&5 + printf %s "checking for the type of fd_set::fds_bits... " >&6; } +-for type in __fd_mask __int32_t unknown; do ++for type in __fd_mask __int32_t long\ int unknown; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +diff --git a/configure.d/config_project_types b/configure.d/config_project_types +index 1b4c66b..a78e8eb 100644 +--- a/configure.d/config_project_types ++++ b/configure.d/config_project_types +@@ -66,7 +66,7 @@ netsnmp_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" + + AC_MSG_CHECKING([for the type of fd_set::fds_bits]) +-for type in __fd_mask __int32_t unknown; do ++for type in __fd_mask __int32_t long\ int unknown; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include <sys/select.h> + #include <stddef.h> +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest index 76514c202e..76514c202e 100755..100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb index e5a28de40d..395b02df00 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb @@ -1,7 +1,7 @@ SUMMARY = "Various tools relating to the Simple Network Management Protocol" HOMEPAGE = "http://www.net-snmp.org/" SECTION = "net" -LICENSE = "BSD & MIT" +LICENSE = "BSD-3-Clause & MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687" @@ -14,22 +14,22 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ 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://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \ - file://0001-snmpd-always-exit-after-displaying-usage.patch \ - " -SRC_URI[sha256sum] = "eb7fd4a44de6cddbffd9a92a85ad1309e5c1054fb9d5a7dd93079c8953f48c3f" + file://0001-net-snmp-add-knob-whether-nlist.h-are-checked.patch \ + file://0002-net-snmp-fix-libtool-finish.patch \ + file://0003-testing-add-the-output-format-for-ptest.patch \ + file://0004-config_os_headers-Error-Fix.patch \ + file://0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \ + file://0006-get_pid_from_inode-Include-limit.h.patch \ + file://0007-configure-fix-incorrect-variable.patch \ + file://0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch \ + file://0009-net-snmp-fix-for-disable-des.patch \ + file://0010-net-snmp-Reproducibility-Don-t-check-build-host-for.patch \ + file://0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch \ + file://0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch \ + file://0001-Android-Fix-the-build.patch \ + " +SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" @@ -40,6 +40,7 @@ EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${B PARALLEL_MAKE = "" CCACHE = "" +CLEANBROKEN = "1" TARGET_CC_ARCH += "${LDFLAGS}" @@ -71,6 +72,7 @@ CACHED_CONFIGUREVARS = " \ ac_cv_ETC_MNTTAB=/etc/mtab \ lt_cv_shlibpath_overrides_runpath=yes \ ac_cv_path_UNAMEPROG=${base_bindir}/uname \ + ac_cv_path_PSPROG=${base_bindir}/ps \ ac_cv_file__etc_printcap=no \ NETSNMP_CONFIGURE_OPTIONS= \ " @@ -150,6 +152,8 @@ do_install:append() { -e "s@^NSC_LDFLAGS=\"-L.* @NSC_LDFLAGS=\"-L\$\{libdir\} @g" \ -i ${D}${bindir}/net-snmp-config + sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${bindir}/net-snmp-create-v3-user + oe_multilib_header net-snmp/net-snmp-config.h if [ "${HAS_PERL}" = "1" ]; then @@ -176,7 +180,7 @@ do_install_ptest() { } SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess" -SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" +SNMP_DBGDIR = "${TARGET_DBGSRC_DIR}" net_snmp_sysroot_preprocess () { if [ -e ${D}${bindir}/net-snmp-config ]; then diff --git a/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb b/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb index 8c57d29492..816e513a15 100644 --- a/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb +++ b/meta-networking/recipes-protocols/nopoll/nopoll_0.4.6.b400.bb @@ -7,7 +7,7 @@ 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" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=f0504124678c1b3158146e0630229298 \ " DEPENDS = "openssl" diff --git a/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch b/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch new file mode 100644 index 0000000000..b93e311054 --- /dev/null +++ b/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch @@ -0,0 +1,24 @@ +From a490e82dca5a669b0af27a13d74759d8f77e2333 Mon Sep 17 00:00:00 2001 +From: Vyacheslav Yurkov <v.yurkov@precitec.de> +Date: Mon, 3 Oct 2022 18:25:15 +0200 +Subject: [PATCH] fix(build): do not install git files + +Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> +--- +Upstream-Status: Backport [https://github.com/open62541/open62541/commit/a0328d4cb527f9778a262fc4a6b42bfbdffc38e9] + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1934374e..bc5c8bad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1703,6 +1703,7 @@ install(DIRECTORY ${UA_install_tools_dirs} + FILES_MATCHING + PATTERN "*" + PATTERN "*.pyc" EXCLUDE ++ PATTERN ".git*" EXCLUDE + ) + + install(FILES ${UA_install_tools_files} DESTINATION ${open62541_install_tools_dir}) diff --git a/meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb b/meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb new file mode 100644 index 0000000000..19a50aee3a --- /dev/null +++ b/meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb @@ -0,0 +1,53 @@ +DESCRIPTION = "open62541 is an implementation of OPC UA (OPC Unified Architecture)" +HOMEPAGE = "https://github.com/open62541/open62541.git" +LICENSE = "MPL-2.0 & BSD-3-Clause & MIT" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad \ + file://deps/mdnsd/LICENSE;md5=3bb4047dc4095cd7336de3e2a9be94f0 \ + file://deps/mqtt-c/LICENSE;md5=9226377baf0b79174c89a1ab55592456 \ +" + +SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" +SRCREV_opcua = "086b1557d6f49e8a82c999054a7da77d080cd54e" +SRCREV_mdnsd = "3151afe5899dba5125dffa9f4cf3ae1fe2edc0f0" +SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" +SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" + +SRC_URI = " \ + git://github.com/open62541/open62541.git;name=opcua;branch=1.3;protocol=https \ + git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=git/deps/mdnsd \ + git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=v1.04;destsuffix=git/deps/ua-nodeset \ + git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=git/deps/mqtt-c \ + file://0001-fix-build-do-not-install-git-files.patch \ +" + +S = "${WORKDIR}/git" + +inherit cmake python3native + +EXTRA_OECMAKE += "\ + -DBUILD_SHARED_LIBS=ON \ + -DUA_NAMESPACE_ZERO=FULL \ + -DUA_LOGLEVEL=600 \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ +" + +PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events" +PACKAGECONFIG[amalgamation] = "-DUA_ENABLE_AMALGAMATION=ON, -DUA_ENABLE_AMALGAMATION=OFF" +PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" +PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" +PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" +PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" +PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" +PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" +PACKAGECONFIG[subscriptions-events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON, -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=OFF" +PACKAGECONFIG[werror] = "-DUA_FORCE_WERROR=ON, -DUA_FORCE_WERROR=OFF" + +do_configure:prepend:toolchain-clang:riscv64() { + sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt +} + +do_configure:prepend:toolchain-clang:riscv32() { + sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt +} + diff --git a/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-networking/recipes-protocols/openflow/openflow.inc deleted file mode 100644 index 7968a44382..0000000000 --- a/meta-networking/recipes-protocols/openflow/openflow.inc +++ /dev/null @@ -1,55 +0,0 @@ -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;branch=master" - -DEPENDS = "virtual/libc" - -PACKAGECONFIG ??= "" -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 - - # /var/log/openflow needs to be created in runtime. Use rmdir to catch if - # upstream stops creating /var/log/openflow, or adds something else in - # /var/log. - rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log - rmdir --ignore-fail-on-non-empty ${D}${localstatedir} - - # Create /var/log/openflow in runtime. - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then - install -d ${D}${nonarch_libdir}/tmpfiles.d - echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf - fi - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} - fi -} - -FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" diff --git a/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch b/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch index 952274bb97..2175a20b90 100644 --- a/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch +++ b/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch @@ -9,6 +9,8 @@ failures. Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + configure.ac | 2 +- lib/util.c | 2 ++ lib/util.h | 1 + diff --git a/meta-networking/recipes-protocols/openflow/openflow/0001-Makefile.am-Specify-export-dynamic-directly-to-linke.patch b/meta-networking/recipes-protocols/openflow/openflow/0001-Makefile.am-Specify-export-dynamic-directly-to-linke.patch new file mode 100644 index 0000000000..27fc05f09d --- /dev/null +++ b/meta-networking/recipes-protocols/openflow/openflow/0001-Makefile.am-Specify-export-dynamic-directly-to-linke.patch @@ -0,0 +1,30 @@ +From 12bba388719c425d9b5cd970d4fabf01edf56aa4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 7 Feb 2024 22:33:12 -0800 +Subject: [PATCH] Makefile.am: Specify export-dynamic directly to linker + +Fixes build with clang-18+ +| riscv64-yoe-linux-clang: error: unknown argument: '-export-dynamic' + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 97ac1f0..e557fe7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -23,7 +23,7 @@ if NDEBUG + AM_CPPFLAGS += -DNDEBUG + AM_CFLAGS += -fomit-frame-pointer + else +-AM_LDFLAGS = -export-dynamic ++AM_LDFLAGS = -Wl,--export-dynamic + endif + + CLEANFILES = +-- +2.43.0 + diff --git a/meta-networking/recipes-protocols/openflow/openflow/0001-socket-util-Include-sys-stat.h-for-fchmod.patch b/meta-networking/recipes-protocols/openflow/openflow/0001-socket-util-Include-sys-stat.h-for-fchmod.patch new file mode 100644 index 0000000000..97e3422166 --- /dev/null +++ b/meta-networking/recipes-protocols/openflow/openflow/0001-socket-util-Include-sys-stat.h-for-fchmod.patch @@ -0,0 +1,23 @@ +From b875c6e264eaf7350ad4e4ebf427692d8fd3cd72 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 12:58:53 -0700 +Subject: [PATCH] socket-util: Include sys/stat.h for fchmod + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/socket-util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/socket-util.c b/lib/socket-util.c +index c7b5d6d..5b3d602 100644 +--- a/lib/socket-util.c ++++ b/lib/socket-util.c +@@ -42,6 +42,7 @@ + #include <stdio.h> + #include <string.h> + #include <sys/resource.h> ++#include <sys/stat.h> + #include <sys/un.h> + #include <unistd.h> + #include "fatal-signal.h" diff --git a/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch b/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch index 75180fe32f..9a49f4ef39 100644 --- a/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch +++ b/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch @@ -10,6 +10,8 @@ about double definition in libc headers Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + lib/netdev.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/meta-networking/recipes-protocols/openflow/openflow_1.0.bb b/meta-networking/recipes-protocols/openflow/openflow_1.0.bb deleted file mode 100644 index a7e254dd85..0000000000 --- a/meta-networking/recipes-protocols/openflow/openflow_1.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -include ${BPN}.inc - -SRCREV = "5ccca75a69f99791659bcfbcf35353ab1921320a" -PV = "1.0" diff --git a/meta-networking/recipes-protocols/openflow/openflow_git.bb b/meta-networking/recipes-protocols/openflow/openflow_git.bb index b6cef0730a..41bedcd0cf 100644 --- a/meta-networking/recipes-protocols/openflow/openflow_git.bb +++ b/meta-networking/recipes-protocols/openflow/openflow_git.bb @@ -1,10 +1,70 @@ -include ${BPN}.inc +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" -SRCREV = "c84f33f09d5dbcfc9b489f64cb30475bf36f653a" -PV = "1.0+git${SRCPV}" +SECTION = "net" +LICENSE = "GPL-2.0-only" -SRC_URI += "\ +LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2" + +SRCREV = "82ad07d997b0b2ee70e1b2c7e82fcc6d0ccf23ea" + +PV = "1.0+git" + +SRC_URI = "git://github.com/mininet/openflow;protocol=https;branch=master \ 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 \ - " + file://0001-socket-util-Include-sys-stat.h-for-fchmod.patch \ + file://0001-Makefile.am-Specify-export-dynamic-directly-to-linke.patch \ +" +CVE_STATUS[CVE-2015-1611] = "not-applicable-config: Not referred to our implementation of openflow" +CVE_STATUS[CVE-2015-1612] = "not-applicable-config: Not referred to our implementation of openflow" +CVE_STATUS[CVE-2018-1078] = "cpe-incorrect: This CVE is not for this product but cve-check assumes it is \ +because two CPE collides when checking the NVD database" + +PACKAGECONFIG ??= "" +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)} \ + " + +DEPENDS:append:libc-musl = " libexecinfo" +LDFLAGS:append:libc-musl = " -lexecinfo" + +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 + + # /var/log/openflow needs to be created in runtime. Use rmdir to catch if + # upstream stops creating /var/log/openflow, or adds something else in + # /var/log. + rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log + rmdir --ignore-fail-on-non-empty ${D}${localstatedir} + + # Create /var/log/openflow in runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf + fi + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi +} + +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch index d1ee3c5916..8314b5d964 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-Use-1-instead-of-WAIT_ANY.patch @@ -8,6 +8,8 @@ e.g. musl do not define this. Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + usl/usl_pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch index c50f68e65d..4bdbf458cd 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api-Included-needed-headers.patch @@ -7,6 +7,8 @@ These are flagged by musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + l2tp_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_rpc_server.c-Add-missing-prototype-for-l2tp_api.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_rpc_server.c-Add-missing-prototype-for-l2tp_api.patch new file mode 100644 index 0000000000..d9aed8804a --- /dev/null +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_rpc_server.c-Add-missing-prototype-for-l2tp_api.patch @@ -0,0 +1,28 @@ +From ded84ed583e9b0617bc35ab1798032d18b873144 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 23:30:02 -0700 +Subject: [PATCH] l2tp_rpc_server.c: Add missing prototype for + l2tp_api_rpc_check_request + +Upstream-Status: Inappropriate [no upstream] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 0815b31..2fa5b2f 100644 +--- a/Makefile ++++ b/Makefile +@@ -236,6 +236,7 @@ endif + -$(RM) $@ $@.tmp + $(RPCGEN) $(RPCGENFLAGS) -m -o $@.tmp $< + cat $@.tmp | sed -e 's/switch (rqstp->rq_proc) {/if (l2tp_api_rpc_check_request(transp) < 0) return; switch (rqstp->rq_proc) {/' > $@ ++ sed -i '21i int l2tp_api_rpc_check_request(SVCXPRT *xprt);' $@ + + %_client.c: %.x + -$(RM) $@ +-- +2.37.2 + diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-lex-yacc-Add-missing-function-prototypes.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-lex-yacc-Add-missing-function-prototypes.patch new file mode 100644 index 0000000000..8c21a742e0 --- /dev/null +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-lex-yacc-Add-missing-function-prototypes.patch @@ -0,0 +1,45 @@ +From 2bfdd02d288de92ff118bf41b54c135a6a318c19 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 23:42:11 -0700 +Subject: [PATCH] lex/yacc: Add missing function prototypes + +Fixes build with clang15 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + l2tp_config_parse.y | 3 +++ + l2tp_config_token.l | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/l2tp_config_parse.y b/l2tp_config_parse.y +index 4baf1e0..15392d0 100644 +--- a/l2tp_config_parse.y ++++ b/l2tp_config_parse.y +@@ -29,6 +29,9 @@ static struct l2tp_api_session_msg_data session; + + extern void l2tp_log(int level, char *fmt, ...); + extern void yyfatal(const char *s); ++extern const char *l2tp_strerror(int error); ++extern int yylex (void); ++extern void yyerror(const char *s); + + %} + +diff --git a/l2tp_config_token.l b/l2tp_config_token.l +index 9016af6..43b8f0a 100644 +--- a/l2tp_config_token.l ++++ b/l2tp_config_token.l +@@ -15,6 +15,9 @@ + #include "l2tp_config_types.h" + #include "l2tp_config_parse.h" + ++extern void l2tp_log(int level, char *fmt, ...); ++extern const char *l2tp_strerror(int error); ++ + void yyfatal(const char *s); + void yyerror(const char *s); + +-- +2.37.2 + diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch index 1f576fa710..42d6f58007 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch @@ -9,6 +9,8 @@ declaration Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + test/pppd_dummy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch index 9df32658a0..bad1007e04 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-cli-include-fcntl.h-for-O_CREAT-define.patch @@ -5,6 +5,8 @@ Subject: [PATCH 2/4] cli: include fcntl.h for O_CREAT define Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + cli/cli_readline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch index bd9bcb8f27..6574ba22f0 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch @@ -8,6 +8,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Update for ipv6 address compare Signed-off-by: Changqing Li <changqing.li@windriver.com> --- +Upstream-Status: Pending + l2tp_api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch index e05be1bbb4..5d0c29cb42 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch @@ -5,6 +5,8 @@ Subject: [PATCH 3/4] cli: Define _GNU_SOURCE for getting sighandler_t Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + cli/cli_readline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch index 96dbc7551d..8e9bd1e9ee 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/Makefile-modify-CFLAGS-to-aviod-build-error.patch @@ -3,7 +3,7 @@ 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 +Upstream-Status: Pending Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> --- diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch index c11a127b81..2a7435963e 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tp-simplify-gcc-warning-hack.patch @@ -10,7 +10,7 @@ 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 +Upstream-Status: Pending Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> --- diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch index 0bece2f4d7..ad60083d1c 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + commit 3e96a6c41bdd26417265a45ed685138d8eed564e Author: Aws Ismail <aws.ismail@windriver.com> Date: Fri Sep 14 02:32:53 2012 -0400 diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch index 3119425e69..c094e3859b 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch @@ -2,17 +2,17 @@ commit 6ea3125e2bec15004f312814022335d94cdf7e94 Author: Aws Ismail <aws.ismail@windriver.com> Date: Wed Sep 19 11:34:48 2012 -0400 - Fix openl2tp config script location +Fix openl2tp config script location - Correct the location of the sysconfig - script. Use /etc/default/ instead of - /etc/sysconfig/ +Correct the location of the sysconfig +script. Use /etc/default/ instead of +/etc/sysconfig/ - Signed-off-by: Aws Ismail <aws.ismail@windriver.com> +Signed-off-by: Aws Ismail <aws.ismail@windriver.com> - Upstream-Status: Inappropriate [configuration] +Upstream-Status: Inappropriate [configuration] - Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +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 diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch index 9ecd4b072f..51bddb8942 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch @@ -2,16 +2,16 @@ 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> +Fix openl2tpd initscript - Upstream-Status: Inappropriate [OE specific] +- Correct the location of the retval statement. +- use start-stop-daemon instead of daemon. - Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +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 diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index 6ce15a282b..183c0066df 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb @@ -9,7 +9,7 @@ HOMEPAGE = "http://www.openl2tp.org/" SECTION = "net" # cli and usl use license LGPL-2.1 -LICENSE = "GPL-2.0 & LGPL-2.1" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \ file://LICENSE;md5=f8970abd5ea9be701a0deedf5afd77a5 \ file://cli/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \ @@ -35,6 +35,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \ file://run-ptest \ file://fix_linux_4.15_compile.patch \ file://0002-user-ipv6-structures.patch \ + file://0001-l2tp_rpc_server.c-Add-missing-prototype-for-l2tp_api.patch \ + file://0001-lex-yacc-Add-missing-function-prototypes.patch \ " SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" diff --git a/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch b/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch index 40b082e77a..04ceb6b572 100644 --- a/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch +++ b/meta-networking/recipes-protocols/openlldp/files/0001-Fix-musl-libc-build-issue.patch @@ -9,6 +9,8 @@ to compile when using musl libc. Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com> --- +Upstream-Status: Pending + include/clif.h | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch b/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch index b58fc104d2..f1a3ac3ad2 100644 --- a/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch +++ b/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-include-path-to-generated-version.h.patch @@ -10,6 +10,8 @@ dir. Include the path to it in AM_CPPFLAGS. Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com> --- +Upstream-Status: Pending + Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch b/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch index a26a5299ab..b1d746f8bc 100644 --- a/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch +++ b/meta-networking/recipes-protocols/openlldp/files/0001-autotools-Add-option-to-disable-installation-of-syst.patch @@ -1,4 +1,4 @@ -From dc3f2250908587710f109c80ddf8a94f0bc40b82 Mon Sep 17 00:00:00 2001 +From 7147add9fedfb28909639ae419f995041d086266 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 @@ -16,15 +16,17 @@ to a hard coded path that couldn't be changed. Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com> --- +Upstream-Status: Pending + 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 +index 86174e9..e90e966 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -138,8 +138,9 @@ install-data-hook: installdirs-local +@@ -141,8 +141,9 @@ install-data-hook: installdirs-local pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = lldpad.pc liblldp_clif.pc @@ -36,10 +38,10 @@ index 292c0fd..0fb9bb0 100644 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 +index fa2f3a0..1a038cd 100644 --- a/configure.ac +++ b/configure.ac -@@ -95,6 +95,15 @@ AC_TYPE_UINT16_T +@@ -132,6 +132,15 @@ AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T diff --git a/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch b/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch deleted file mode 100644 index 680f6b67d7..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 090854e09fe18ebf1ba428864895a690086f78ee Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 19 Aug 2019 11:41:13 -0400 -Subject: [PATCH 1/9] cmds: fix enum conversion - -Multiple modules use implicit conversion between enum types, but -this triggers warnings with some compilers. ex: - - qbg/vdp_cmds.c:110:39: error: implicit conversion from enumeration type - 'lldp_cmd' to different enumeration type 'cmd_status' - [-Werror,-Wenum-conversion] - cmd_status good_cmd = vdp_cmdok(cmd, cmd_gettlv); - -Reported-at: https://github.com/intel/openlldp/issues/53 -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - lldp_evb22_cmds.c | 2 +- - lldp_evb_cmds.c | 2 +- - qbg/vdp22_cmds.c | 2 +- - qbg/vdp_cmds.c | 2 +- - vdptool.c | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/lldp_evb22_cmds.c b/lldp_evb22_cmds.c -index cebfeb2..51810bc 100644 ---- a/lldp_evb22_cmds.c -+++ b/lldp_evb22_cmds.c -@@ -225,7 +225,7 @@ int evb22_conf_enabletx(char *ifname, enum agent_type type) - TLVID(OUI_IEEE_8021Qbg22, LLDP_EVB22_SUBTYPE)); - } - --static int evb22_cmdok(struct cmd *cmd, cmd_status expected) -+static int evb22_cmdok(struct cmd *cmd, int expected) - { - if (cmd->cmd != expected) - return cmd_invalid; -diff --git a/lldp_evb_cmds.c b/lldp_evb_cmds.c -index eec4f33..e6af03b 100644 ---- a/lldp_evb_cmds.c -+++ b/lldp_evb_cmds.c -@@ -163,7 +163,7 @@ int evb_conf_enabletx(char *ifname, enum agent_type type) - return is_tlv_txenabled(ifname, type, TLVID_8021Qbg(LLDP_EVB_SUBTYPE)); - } - --static int evb_cmdok(struct cmd *cmd, cmd_status expected) -+static int evb_cmdok(struct cmd *cmd, int expected) - { - if (cmd->cmd != expected) - return cmd_invalid; -diff --git a/qbg/vdp22_cmds.c b/qbg/vdp22_cmds.c -index 479b1b0..2e1bbbd 100644 ---- a/qbg/vdp22_cmds.c -+++ b/qbg/vdp22_cmds.c -@@ -296,7 +296,7 @@ int vdp22_sendevent(struct vdpnl_vsi *p) - return 0; - } - --static int vdp22_cmdok(struct cmd *cmd, cmd_status expected) -+static int vdp22_cmdok(struct cmd *cmd, int expected) - { - if (cmd->cmd != expected) - return cmd_invalid; -diff --git a/qbg/vdp_cmds.c b/qbg/vdp_cmds.c -index 95bcfb1..50f2781 100644 ---- a/qbg/vdp_cmds.c -+++ b/qbg/vdp_cmds.c -@@ -85,7 +85,7 @@ static char *print_mode(char *s, size_t length, struct vsi_profile *p) - return s; - } - --static int vdp_cmdok(struct cmd *cmd, cmd_status expected) -+static int vdp_cmdok(struct cmd *cmd, int expected) - { - if (cmd->cmd != expected) - return cmd_invalid; -diff --git a/vdptool.c b/vdptool.c -index 9872348..8f36277 100644 ---- a/vdptool.c -+++ b/vdptool.c -@@ -141,7 +141,7 @@ static char *print_status(cmd_status status) - str = "TLV does not support agent type"; - break; - default: -- str = print_vdp_status(status); -+ str = print_vdp_status((enum vdp22_cmd_status)status); - break; - } - return str; --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch b/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch deleted file mode 100644 index 8f65b799f0..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch +++ /dev/null @@ -1,500 +0,0 @@ -From 07a83c583b9d508c7040dc6254a6a7113b2ce55f Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:05:42 -0400 -Subject: [PATCH 2/9] lldp_head: rename and make extern - -Try to resolve this silly mod issue - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - config.c | 4 ++-- - event_iface.c | 4 ++-- - include/lldp_mod.h | 2 +- - lldp/agent.c | 2 +- - lldp/rx.c | 4 ++-- - lldp/tx.c | 4 ++-- - lldp_dcbx.c | 8 ++++---- - lldp_mand_cmds.c | 8 ++++---- - lldpad.c | 12 +++++++----- - lldptool.c | 14 ++++++++------ - lldptool_cmds.c | 2 +- - qbg/ecp22.c | 8 ++++---- - qbg/vdp.c | 4 ++-- - qbg/vdp22.c | 6 +++--- - qbg/vdp22_cmds.c | 2 +- - vdptool.c | 16 +++++++++------- - 16 files changed, 53 insertions(+), 47 deletions(-) - -diff --git a/config.c b/config.c -index be458fd..bc3fbae 100644 ---- a/config.c -+++ b/config.c -@@ -185,7 +185,7 @@ void scan_port(UNUSED void *eloop_data, UNUSED void *user_ctx) - LIST_FOREACH(agent, &port->agent_head, entry) { - LLDPAD_DBG("%s: calling ifdown for agent %p.\n", - __func__, agent); -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - ops = np->ops; - if (ops->lldp_mod_ifdown) - ops->lldp_mod_ifdown(ifname, agent); -@@ -394,7 +394,7 @@ void init_ports(void) - LIST_FOREACH(agent, &port->agent_head, entry) { - LLDPAD_DBG("%s: calling ifup for agent %p.\n", - __func__, agent); -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (np->ops->lldp_mod_ifup) - np->ops->lldp_mod_ifup(p->if_name, agent); - } -diff --git a/event_iface.c b/event_iface.c -index 43a95c7..1be2963 100644 ---- a/event_iface.c -+++ b/event_iface.c -@@ -216,7 +216,7 @@ int oper_add_device(char *device_name) - LIST_FOREACH(agent, &port->agent_head, entry) { - LLDPAD_DBG("%s: calling ifup for agent %p.\n", - __func__, agent); -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (np->ops->lldp_mod_ifup) - np->ops->lldp_mod_ifup(device_name, agent); - } -@@ -283,7 +283,7 @@ static void event_if_decode_nlmsg(int route_type, void *data, int len) - LIST_FOREACH(agent, &port->agent_head, entry) { - LLDPAD_DBG("%s: calling ifdown for agent %p.\n", - __func__, agent); -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - ops = np->ops; - if (ops->lldp_mod_ifdown) - ops->lldp_mod_ifdown(device_name, -diff --git a/include/lldp_mod.h b/include/lldp_mod.h -index 49a50e4..9733595 100644 ---- a/include/lldp_mod.h -+++ b/include/lldp_mod.h -@@ -96,7 +96,7 @@ struct lldp_module { - }; - - LIST_HEAD(lldp_head, lldp_module); --struct lldp_head lldp_head; -+extern struct lldp_head lldp_mod_head; - - static inline struct lldp_module *find_module_by_id(struct lldp_head *head, int id) - { -diff --git a/lldp/agent.c b/lldp/agent.c -index 333929a..aa4a8d1 100644 ---- a/lldp/agent.c -+++ b/lldp/agent.c -@@ -163,7 +163,7 @@ static void timer(UNUSED void *eloop_data, UNUSED void *user_ctx) - run_rx_sm(port, agent); - update_rx_timers(agent); - -- LIST_FOREACH(n, &lldp_head, lldp) { -+ LIST_FOREACH(n, &lldp_mod_head, lldp) { - if (n->ops && n->ops->timer) - n->ops->timer(port, agent); - } -diff --git a/lldp/rx.c b/lldp/rx.c -index 12d07bc..43aeeba 100644 ---- a/lldp/rx.c -+++ b/lldp/rx.c -@@ -359,7 +359,7 @@ void rxProcessFrame(struct port *port, struct lldp_agent *agent) - } - - /* rx per lldp module */ -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops || !np->ops->lldp_mod_rchange) - continue; - -@@ -402,7 +402,7 @@ u8 mibDeleteObjects(struct port *port, struct lldp_agent *agent) - { - struct lldp_module *np; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops || !np->ops->lldp_mod_mibdelete) - continue; - np->ops->lldp_mod_mibdelete(port, agent); -diff --git a/lldp/tx.c b/lldp/tx.c -index c3a5c62..0746e34 100644 ---- a/lldp/tx.c -+++ b/lldp/tx.c -@@ -71,7 +71,7 @@ bool mibConstrInfoLLDPDU(struct port *port, struct lldp_agent *agent) - fb_offset += sizeof(struct l2_ethhdr); - - /* Generic TLV Pack */ -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops || !np->ops->lldp_mod_gettlv) - continue; - -@@ -206,7 +206,7 @@ bool mibConstrShutdownLLDPDU(struct port *port, struct lldp_agent *agent) - memcpy(agent->tx.frameout, (void *)ð, sizeof(struct l2_ethhdr)); - fb_offset += sizeof(struct l2_ethhdr); - -- np = find_module_by_id(&lldp_head, LLDP_MOD_MAND); -+ np = find_module_by_id(&lldp_mod_head, LLDP_MOD_MAND); - if (!np) - goto error; - if (!np->ops || !np->ops->lldp_mod_gettlv) -diff --git a/lldp_dcbx.c b/lldp_dcbx.c -index 7e53c0f..809086f 100644 ---- a/lldp_dcbx.c -+++ b/lldp_dcbx.c -@@ -129,7 +129,7 @@ struct dcbx_tlvs *dcbx_data(const char *ifname) - struct dcbd_user_data *dud; - struct dcbx_tlvs *tlv = NULL; - -- dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); -+ dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); - if (dud) { - LIST_FOREACH(tlv, &dud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -@@ -148,7 +148,7 @@ int dcbx_tlvs_rxed(const char *ifname, struct lldp_agent *agent) - if (agent->type != NEAREST_BRIDGE) - return 0; - -- dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); -+ dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); - if (dud) { - LIST_FOREACH(tlv, &dud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -@@ -172,7 +172,7 @@ int dcbx_check_active(const char *ifname) - struct dcbd_user_data *dud; - struct dcbx_tlvs *tlv = NULL; - -- dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); -+ dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); - if (dud) { - LIST_FOREACH(tlv, &dud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -@@ -507,7 +507,7 @@ void dcbx_ifup(char *ifname, struct lldp_agent *agent) - ifindex = get_ifidx(ifname); - port = port_find_by_ifindex(ifindex); - -- dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); -+ dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); - tlvs = dcbx_data(ifname); - - if (!port) -diff --git a/lldp_mand_cmds.c b/lldp_mand_cmds.c -index 8a88177..1c43bf4 100644 ---- a/lldp_mand_cmds.c -+++ b/lldp_mand_cmds.c -@@ -466,7 +466,7 @@ int handle_get_args(struct cmd *cmd, UNUSED char *arg, char *argvalue, - nbuf = obuf; - nbuf_len = obuf_len; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops->get_arg_handler) - continue; - if (!(ah = np->ops->get_arg_handler())) -@@ -496,7 +496,7 @@ int handle_get_arg(struct cmd *cmd, char *arg, char *argvalue, - struct arg_handlers *ah; - int rval, status = cmd_not_applicable; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops->get_arg_handler) - continue; - if (!(ah = np->ops->get_arg_handler())) -@@ -593,7 +593,7 @@ int handle_test_arg(struct cmd *cmd, char *arg, char *argvalue, - struct arg_handlers *ah; - int rval, status = cmd_not_applicable; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops->get_arg_handler) - continue; - if (!(ah = np->ops->get_arg_handler())) -@@ -626,7 +626,7 @@ int handle_set_arg(struct cmd *cmd, char *arg, char *argvalue, - struct arg_handlers *ah; - int rval, status = cmd_not_applicable; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (!np->ops->get_arg_handler) - continue; - if (!(ah = np->ops->get_arg_handler())) -diff --git a/lldpad.c b/lldpad.c -index 01fb588..65e92c7 100644 ---- a/lldpad.c -+++ b/lldpad.c -@@ -80,6 +80,8 @@ struct lldp_module *(*register_tlv_table[])(void) = { - NULL, - }; - -+struct lldp_head lldp_mod_head; -+ - char *cfg_file_name = NULL; - bool daemonize = 0; - int loglvl = LOG_WARNING; -@@ -98,7 +100,7 @@ static void init_modules(void) - struct lldp_module *premod = NULL; - int i = 0; - -- LIST_INIT(&lldp_head); -+ LIST_INIT(&lldp_mod_head); - for (i = 0; register_tlv_table[i]; i++) { - module = register_tlv_table[i](); - if (!module) -@@ -106,7 +108,7 @@ static void init_modules(void) - if (premod) - LIST_INSERT_AFTER(premod, module, lldp); - else -- LIST_INSERT_HEAD(&lldp_head, module, lldp); -+ LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); - premod = module; - } - } -@@ -115,9 +117,9 @@ void deinit_modules(void) - { - struct lldp_module *module; - -- while (lldp_head.lh_first != NULL) { -- module = lldp_head.lh_first; -- LIST_REMOVE(lldp_head.lh_first, lldp); -+ while (lldp_mod_head.lh_first != NULL) { -+ module = lldp_mod_head.lh_first; -+ LIST_REMOVE(lldp_mod_head.lh_first, lldp); - module->ops->lldp_mod_unregister(module); - } - } -diff --git a/lldptool.c b/lldptool.c -index 2b14f61..664a248 100644 ---- a/lldptool.c -+++ b/lldptool.c -@@ -64,6 +64,8 @@ - #include "lldp_util.h" - #include "lldpad_status.h" - -+struct lldp_head lldp_mod_head; -+ - static int show_raw; - - static const char *cli_version = -@@ -199,7 +201,7 @@ static void init_modules(void) - if (premod) - LIST_INSERT_AFTER(premod, module, lldp); - else -- LIST_INSERT_HEAD(&lldp_head, module, lldp); -+ LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); - premod = module; - } - } -@@ -208,9 +210,9 @@ void deinit_modules(void) - { - struct lldp_module *module; - -- while (lldp_head.lh_first != NULL) { -- module = lldp_head.lh_first; -- LIST_REMOVE(lldp_head.lh_first, lldp); -+ while (lldp_mod_head.lh_first != NULL) { -+ module = lldp_mod_head.lh_first; -+ LIST_REMOVE(lldp_mod_head.lh_first, lldp); - module->ops->lldp_mod_unregister(module); - } - } -@@ -346,7 +348,7 @@ cli_cmd_help(UNUSED struct clif *clif, UNUSED int argc, UNUSED char *argv[], - printf("%s\n%s\n%s", commands_usage, commands_options, commands_help); - - printf("\nTLV identifiers:\n"); -- LIST_FOREACH(np, &lldp_head, lldp) -+ LIST_FOREACH(np, &lldp_mod_head, lldp) - if (np->ops->print_help) - np->ops->print_help(); - return 0; -@@ -406,7 +408,7 @@ u32 lookup_tlvid(char *tlvid_str) - struct lldp_module *np; - u32 tlvid = INVALID_TLVID; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (np->ops->lookup_tlv_name) { - tlvid = np->ops->lookup_tlv_name(tlvid_str); - if (tlvid != INVALID_TLVID) -diff --git a/lldptool_cmds.c b/lldptool_cmds.c -index daef8c8..70b7b0d 100644 ---- a/lldptool_cmds.c -+++ b/lldptool_cmds.c -@@ -464,7 +464,7 @@ static void print_tlvs(struct cmd *cmd, char *ibuf) - offset += 8; - - printed = 0; -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (np->ops->print_tlv(tlvid, tlv_len, ibuf+offset)) { - printed = 1; - break; -diff --git a/qbg/ecp22.c b/qbg/ecp22.c -index 6561d14..825392b 100644 ---- a/qbg/ecp22.c -+++ b/qbg/ecp22.c -@@ -774,7 +774,7 @@ void ecp22_start(char *ifname) - struct ecp22 *ecp; - - LLDPAD_DBG("%s:%s start ecp\n", __func__, ifname); -- eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); -+ eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); - if (!eud) { - LLDPAD_DBG("%s:%s no ECP module\n", __func__, ifname); - return; -@@ -837,7 +837,7 @@ void ecp22_stop(char *ifname) - struct ecp22 *ecp; - - LLDPAD_DBG("%s:%s stop ecp\n", __func__, ifname); -- eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); -+ eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); - ecp = find_ecpdata(ifname, eud); - if (ecp) - ecp22_remove(ecp); -@@ -852,7 +852,7 @@ static int ecp22_data_from_evb(char *ifname, struct evb22_to_ecp22 *ptr) - struct ecp22_user_data *eud; - struct ecp22 *ecp; - -- eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); -+ eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); - ecp = find_ecpdata(ifname, eud); - if (ecp) { - ecp->max_rte = ptr->max_rte; -@@ -930,7 +930,7 @@ static int ecp22_req2send(char *ifname, unsigned short subtype, - - LLDPAD_DBG("%s:%s subtype:%d\n", __func__, ifname, subtype); - -- eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); -+ eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); - ecp = find_ecpdata(ifname, eud); - if (!ecp) { - rc = -ENODEV; -diff --git a/qbg/vdp.c b/qbg/vdp.c -index d131560..c26bbd6 100644 ---- a/qbg/vdp.c -+++ b/qbg/vdp.c -@@ -188,7 +188,7 @@ struct vdp_data *vdp_data(char *ifname) - struct vdp_user_data *ud; - struct vdp_data *vd = NULL; - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP02); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP02); - if (ud) { - LIST_FOREACH(vd, &ud->head, entry) { - if (!strncmp(ifname, vd->ifname, IFNAMSIZ)) -@@ -1624,7 +1624,7 @@ void vdp_ifup(char *ifname, struct lldp_agent *agent) - - LIST_INIT(&vd->profile_head); - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP02); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP02); - LIST_INSERT_HEAD(&ud->head, vd, entry); - - out_start_again: -diff --git a/qbg/vdp22.c b/qbg/vdp22.c -index cf02310..81ea3a8 100644 ---- a/qbg/vdp22.c -+++ b/qbg/vdp22.c -@@ -694,7 +694,7 @@ static struct vdp22 *vdp22_findif(const char *ifname, - struct vdp22 *vdp = 0; - - if (!ud) { -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); - if (!ud) - LLDPAD_DBG("%s:%s no VDP22 module\n", __func__, - ifname); -@@ -794,7 +794,7 @@ void vdp22_stop(char *ifname) - struct vsi22 *vsi; - - LLDPAD_DBG("%s:%s stop vdp\n", __func__, ifname); -- vud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); -+ vud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); - if (!vud) { - LLDPAD_ERR("%s:%s no VDP22 module\n", __func__, ifname); - return; -@@ -874,7 +874,7 @@ void vdp22_start(const char *ifname, int role) - struct vsi22 *vsi; - - LLDPAD_DBG("%s:%s start vdp\n", __func__, ifname); -- vud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); -+ vud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); - if (!vud) { - LLDPAD_ERR("%s:%s no VDP22 module\n", __func__, ifname); - return; -diff --git a/qbg/vdp22_cmds.c b/qbg/vdp22_cmds.c -index 2e1bbbd..a8025ee 100644 ---- a/qbg/vdp22_cmds.c -+++ b/qbg/vdp22_cmds.c -@@ -57,7 +57,7 @@ static struct lldp_module *get_my_module(int thisid) - { - struct lldp_module *np = NULL; - -- LIST_FOREACH(np, &lldp_head, lldp) -+ LIST_FOREACH(np, &lldp_mod_head, lldp) - if (thisid == np->id) - break; - return np; -diff --git a/vdptool.c b/vdptool.c -index 8f36277..f1d946c 100644 ---- a/vdptool.c -+++ b/vdptool.c -@@ -61,6 +61,8 @@ - #define OUI_ENCODE_HNDLR(name) name##_oui_encode_hndlr - #define OUI_PRNT_DECODE_HNDLR(name) name##_oui_print_decode_hndlr - -+struct lldp_head lldp_mod_head; -+ - #define EXTERN_OUI_FN(name) \ - extern bool name##_oui_encode_hndlr(char *, char *, size_t); \ - extern void name##_oui_print_decode_hndlr(char *) -@@ -796,13 +798,13 @@ static void init_modules(void) - struct lldp_module *premod = NULL; - int i = 0; - -- LIST_INIT(&lldp_head); -+ LIST_INIT(&lldp_mod_head); - for (i = 0; register_tlv_table[i]; i++) { - module = register_tlv_table[i](); - if (premod) - LIST_INSERT_AFTER(premod, module, lldp); - else -- LIST_INSERT_HEAD(&lldp_head, module, lldp); -+ LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); - premod = module; - } - } -@@ -811,9 +813,9 @@ void deinit_modules(void) - { - struct lldp_module *module; - -- while (lldp_head.lh_first != NULL) { -- module = lldp_head.lh_first; -- LIST_REMOVE(lldp_head.lh_first, lldp); -+ while (lldp_mod_head.lh_first != NULL) { -+ module = lldp_mod_head.lh_first; -+ LIST_REMOVE(lldp_mod_head.lh_first, lldp); - module->ops->lldp_mod_unregister(module); - } - } -@@ -953,7 +955,7 @@ cli_cmd_help(UNUSED struct clif *clif, UNUSED int argc, UNUSED char *argv[], - printf("%s\n%s\n%s", commands_usage, commands_options, commands_help); - - printf("\nTLV identifiers:\n"); -- LIST_FOREACH(np, &lldp_head, lldp) -+ LIST_FOREACH(np, &lldp_mod_head, lldp) - if (np->ops->print_help) - np->ops->print_help(); - return 0; -@@ -1006,7 +1008,7 @@ u32 lookup_tlvid(char *tlvid_str) - struct lldp_module *np; - u32 tlvid = INVALID_TLVID; - -- LIST_FOREACH(np, &lldp_head, lldp) { -+ LIST_FOREACH(np, &lldp_mod_head, lldp) { - if (np->ops->lookup_tlv_name) { - tlvid = np->ops->lookup_tlv_name(tlvid_str); - if (tlvid != INVALID_TLVID) --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch b/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch deleted file mode 100644 index 4d0594cb6c..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 702dd20f43d9ca7e0bcb917e8acfec3f1acdcb5c Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:14:50 -0400 -Subject: [PATCH 3/9] lldp: add packed struct definition - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - include/lldp.h | 6 ++++++ - lldp/l2_packet.h | 5 ++--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/include/lldp.h b/include/lldp.h -index fb5ee93..de6a4ad 100644 ---- a/include/lldp.h -+++ b/include/lldp.h -@@ -255,5 +255,11 @@ enum { - #define LLDP_EVB_DEFAULT_RTE 15 - #define LLDP_EVB_DEFAULT_MAX_RTE 31 - -+#ifndef _MSC_VER -+#define STRUCT_PACKED(STRUCT) STRUCT __attribute__((__packed__)) -+#else -+#define STRUCT_PACKED(STRUCT) __pragma(pack(push, 1)) STRUCT __pragma(pack(pop)) -+#endif -+ - void somethingChangedLocal(const char *ifname, int type); - #endif /* _LLDP_H */ -diff --git a/lldp/l2_packet.h b/lldp/l2_packet.h -index 607b8a3..831958c 100644 ---- a/lldp/l2_packet.h -+++ b/lldp/l2_packet.h -@@ -58,12 +58,11 @@ - */ - struct l2_packet_data; - -- --struct l2_ethhdr { -+STRUCT_PACKED(struct l2_ethhdr { - u8 h_dest[ETH_ALEN]; - u8 h_source[ETH_ALEN]; - u16 h_proto; --} STRUCT_PACKED; -+}); - - /** - * l2_packet_init - Initialize l2_packet interface --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch b/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch new file mode 100644 index 0000000000..b6d9cf7707 --- /dev/null +++ b/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch @@ -0,0 +1,23 @@ +From d88aae2230683517b6d5b62cced51da81317a722 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 22:37:14 -0700 +Subject: [PATCH] clif: Include string.h for mem* function prototypes + +Upstream-Status: Submitted [https://github.com/intel/openlldp/pull/86] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + clif.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/clif.c b/clif.c +index cad6f75..0758a7e 100644 +--- a/clif.c ++++ b/clif.c +@@ -32,6 +32,7 @@ + + #include <stdlib.h> + #include <stdio.h> ++#include <string.h> + #include <unistd.h> + #include <sys/types.h> + #include <sys/socket.h> diff --git a/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch b/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch deleted file mode 100644 index 16b7def684..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8229f4fb700ba4fcb2ec3e9956491bf5ee8c0ae2 Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:17:31 -0400 -Subject: [PATCH 4/9] lldptool: make extern - -This should only exist per final linked object. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - include/lldptool.h | 2 +- - lldptool.c | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/include/lldptool.h b/include/lldptool.h -index c919873..a190009 100644 ---- a/include/lldptool.h -+++ b/include/lldptool.h -@@ -29,7 +29,7 @@ - - #include "clif.h" - --struct lldp_head lldp_cli_head; -+extern struct lldp_head lldp_cli_head; - - int clif_command(struct clif *clif, char *cmd, int raw); - void print_raw_message(char *msg, int print); -diff --git a/lldptool.c b/lldptool.c -index 664a248..d76cc48 100644 ---- a/lldptool.c -+++ b/lldptool.c -@@ -64,6 +64,7 @@ - #include "lldp_util.h" - #include "lldpad_status.h" - -+struct lldp_head lldp_cli_head; - struct lldp_head lldp_mod_head; - - static int show_raw; --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch b/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch deleted file mode 100644 index 4bdc5f2f62..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9203dec731e53fb72e1c0d62639e6e54378f66cc Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:20:59 -0400 -Subject: [PATCH 5/9] cisco_oui: match encode handler prototypes - -The EXTERN_FN prototype generated requires size_t be the third parameter. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - vdptool_cisco_oui.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdptool_cisco_oui.c b/vdptool_cisco_oui.c -index 7003521..3f88c76 100644 ---- a/vdptool_cisco_oui.c -+++ b/vdptool_cisco_oui.c -@@ -28,7 +28,7 @@ - #include "lldp_util.h" - #include "vdp_cisco.h" - --bool cisco_oui_encode_hndlr(char *dst, char *src, int len) -+bool cisco_oui_encode_hndlr(char *dst, char *src, size_t len) - { - char *src_temp = strdup(src); - char *key, *data; --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch b/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch deleted file mode 100644 index 2b0289df28..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2723219c08726efa08a6bad04ffb775f850a96bc Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:23:28 -0400 -Subject: [PATCH 6/9] ecp22: make enum a type rather than instance - -The enum defined in the qbg header is setup as a discreet instance -rather than a type. Fix this. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - include/qbg_ecp22.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/qbg_ecp22.h b/include/qbg_ecp22.h -index 567f6df..fe66bb3 100644 ---- a/include/qbg_ecp22.h -+++ b/include/qbg_ecp22.h -@@ -49,10 +49,10 @@ enum { /* ECP Transmit states */ - ECP22_TX_ERROR - }; - --enum { -+enum ecp22_mode { - ECP22_REQUEST = 0, - ECP22_ACK --} ecp22_mode; -+}; - - struct ecp22_hdr { /* ECP22 header */ - u16 ver_op_sub; /* ECP22 version, operation, subtype */ --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch b/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch deleted file mode 100644 index 36b575c566..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 275fe9da663193a843de450f03e810daedc06955 Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:25:38 -0400 -Subject: [PATCH 7/9] lldp_8021qaz: extern config object - -The config object only exists as part of the config translation unit -so remove the extra config object in the 8021qaz module. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - lldp_8021qaz.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c -index a42fd11..673d758 100644 ---- a/lldp_8021qaz.c -+++ b/lldp_8021qaz.c -@@ -49,7 +49,7 @@ - - - struct lldp_head lldp_head; --struct config_t lldpad_cfg; -+extern config_t lldpad_cfg; - extern bool read_only_8021qaz; - - static int ieee8021qaz_check_pending(struct port *port, struct lldp_agent *); --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch b/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch deleted file mode 100644 index 501b66699c..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 61291de03cb6dd1aea2a633eb72951f3fe453e7f Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Mon, 3 Aug 2020 15:33:08 -0400 -Subject: [PATCH 8/9] stringops: fix some string copy errors - -Reported when using gcc-10. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - dcb_protocol.c | 13 ++++--------- - lldp/ports.c | 2 +- - 2 files changed, 5 insertions(+), 10 deletions(-) - -diff --git a/dcb_protocol.c b/dcb_protocol.c -index 75ca139..930251b 100644 ---- a/dcb_protocol.c -+++ b/dcb_protocol.c -@@ -2257,13 +2257,8 @@ cmd_status get_bwg_descrpt(char *device_name, u8 bwgid, char **name) - - if ((it != NULL) && - (bwgid < it->second->max_pgid_desc)) { -- size = (int)strlen(it->second->pgid_desc[bwgid]) + -- sizeof(char); /* Localization OK */ -- *name = (char*)malloc(size); -- if (*name != NULL) { -- strncpy(*name, it->second->pgid_desc[bwgid], -- size); /* Localization OK */ -- } else { -+ *name = strdup(it->second->pgid_desc[bwgid]); -+ if (*name == NULL) { - goto Error; - } - } else { -@@ -2272,9 +2267,9 @@ cmd_status get_bwg_descrpt(char *device_name, u8 bwgid, char **name) - size = (int)strlen( - attribs.descript.pgid_desc[bwgid]) + - sizeof(char); -- *name = (char*)malloc(size); -+ *name = (char*)calloc(size, sizeof(char)); - if (*name != NULL) { -- memcpy(*name, attribs.descript.pgid_desc[bwgid], size); /* Localization OK */ -+ memcpy(*name, attribs.descript.pgid_desc[bwgid], size - 1); /* Localization OK */ - } else { - goto Error; - } -diff --git a/lldp/ports.c b/lldp/ports.c -index 6384f14..9b681f7 100644 ---- a/lldp/ports.c -+++ b/lldp/ports.c -@@ -264,7 +264,7 @@ struct port *add_port(int ifindex, const char *ifname) - memset(newport, 0, sizeof(*newport)); - newport->ifindex = ifindex; - newport->next = NULL; -- strncpy(newport->ifname, ifname, IFNAMSIZ); -+ strncpy(newport->ifname, ifname, IFNAMSIZ - 1); - - newport->bond_master = is_bond(ifname); - /* Initialize relevant port variables */ --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch b/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch deleted file mode 100644 index 0f84426f9b..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7ae79b0dff53a23fa0a964f77b9e3bb387a293c4 Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Tue, 4 Aug 2020 09:17:50 -0400 -Subject: [PATCH 9/9] 8021qaz: mark prio map functions static - -Inline is not the correct way to mark a function for inclusion -in a single translation unit. Use 'static' to restrict export -of these functions. - -Signed-off-by: Aaron Conole <aconole@redhat.com> ---- - lldp_8021qaz.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c -index 673d758..16ae167 100644 ---- a/lldp_8021qaz.c -+++ b/lldp_8021qaz.c -@@ -397,7 +397,7 @@ static int read_cfg_file(char *ifname, struct lldp_agent *agent, - return 0; - } - --inline int get_prio_map(u32 prio_map, int prio) -+static int get_prio_map(u32 prio_map, int prio) - { - if (prio > 7) - return 0; -@@ -405,7 +405,7 @@ inline int get_prio_map(u32 prio_map, int prio) - return (prio_map >> (4 * (7-prio))) & 0xF; - } - --inline void set_prio_map(u32 *prio_map, u8 prio, int tc) -+static void set_prio_map(u32 *prio_map, u8 prio, int tc) - { - u32 mask = ~(0xffffffff & (0xF << (4 * (7-prio)))); - *prio_map &= mask; --- -2.28.0 - diff --git a/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch b/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch deleted file mode 100644 index bb3400cfa6..0000000000 --- a/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch +++ /dev/null @@ -1,331 +0,0 @@ -From ed6a8e5a75f56b7034a46294a0bf2a9a7fd14fbc Mon Sep 17 00:00:00 2001 -From: Aaron Conole <aconole@redhat.com> -Date: Fri, 23 Oct 2020 14:40:32 -0400 -Subject: [PATCH] lldp_head: remove all references - -There were a number of references missed during the module cleanup. This hits the remaining -ones. - -Fixes: 07a83c583b9d ("lldp_head: rename and make extern") -Signed-off-by: Aaron Conole <aconole@redhat.com> - -Reference to upstream patch: -https://github.com/intel/openlldp/commit/ed6a8e5a75f56b7034a46294a0bf2a9a7fd14fbc - -Signed-off-by: Li Wang <li.wang@windriver.com> ---- - ctrl_iface.c | 4 +--- - lldp_8021qaz.c | 11 +++++------ - lldp_8023.c | 6 ++---- - lldp_basman.c | 6 ++---- - lldp_evb.c | 6 ++---- - lldp_evb22.c | 6 ++---- - lldp_mand.c | 10 ++++------ - lldp_med.c | 6 ++---- - qbg_utils.c | 3 +-- - 9 files changed, 21 insertions(+), 37 deletions(-) - -diff --git a/ctrl_iface.c b/ctrl_iface.c -index 1734f49..666f7c8 100644 ---- a/ctrl_iface.c -+++ b/ctrl_iface.c -@@ -53,8 +53,6 @@ - #include "lldp_util.h" - #include "messages.h" - --extern struct lldp_head lldp_head; -- - struct ctrl_dst { - struct ctrl_dst *next; - struct sockaddr_un addr; -@@ -116,7 +114,7 @@ int clif_iface_module(struct clif_data *clifd, - return cmd_invalid; - } - -- mod = find_module_by_id(&lldp_head, module_id); -+ mod = find_module_by_id(&lldp_mod_head, module_id); - if (mod && mod->ops && mod->ops->client_cmd) - return (mod->ops->client_cmd)(clifd, from, fromlen, - cmd_start, cmd_len, rbuf+strlen(rbuf), rlen); -diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c -index 16ae167..e747710 100644 ---- a/lldp_8021qaz.c -+++ b/lldp_8021qaz.c -@@ -48,7 +48,6 @@ - #include "lldp_dcbx.h" - - --struct lldp_head lldp_head; - extern config_t lldpad_cfg; - extern bool read_only_8021qaz; - -@@ -84,7 +83,7 @@ static int ieee8021qaz_check_pending(struct port *port, - if (!port->portEnabled) - return 0; - -- iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); -+ iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); - if (iud) { - LIST_FOREACH(tlv, &iud->head, entry) { - if (!strncmp(port->ifname, tlv->ifname, IFNAMSIZ)) { -@@ -143,7 +142,7 @@ struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *ifname) - struct ieee8021qaz_user_data *iud; - struct ieee8021qaz_tlvs *tlv = NULL; - -- iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); -+ iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); - if (iud) { - LIST_FOREACH(tlv, &iud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -@@ -629,7 +628,7 @@ void ieee8021qaz_ifup(char *ifname, struct lldp_agent *agent) - LIST_INIT(&tlvs->app_head); - read_cfg_file(port->ifname, agent, tlvs); - -- iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); -+ iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); - LIST_INSERT_HEAD(&iud->head, tlvs, entry); - - initialized: -@@ -2179,7 +2178,7 @@ int ieee8021qaz_tlvs_rxed(const char *ifname) - struct ieee8021qaz_user_data *iud; - struct ieee8021qaz_tlvs *tlv = NULL; - -- iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); -+ iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); - if (iud) { - LIST_FOREACH(tlv, &iud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -@@ -2198,7 +2197,7 @@ int ieee8021qaz_check_active(const char *ifname) - struct ieee8021qaz_user_data *iud; - struct ieee8021qaz_tlvs *tlv = NULL; - -- iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); -+ iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); - if (iud) { - LIST_FOREACH(tlv, &iud->head, entry) { - if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) -diff --git a/lldp_8023.c b/lldp_8023.c -index 422026e..8a03211 100644 ---- a/lldp_8023.c -+++ b/lldp_8023.c -@@ -39,8 +39,6 @@ - #include "lldp_8023_clif.h" - #include "lldp_8023_cmds.h" - --extern struct lldp_head lldp_head; -- - struct tlv_info_8023_maccfg { - u8 oui[3]; - u8 sub; -@@ -84,7 +82,7 @@ static struct ieee8023_data *ieee8023_data(const char *ifname, enum agent_type t - struct ieee8023_user_data *ud; - struct ieee8023_data *bd = NULL; - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8023); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8023); - if (ud) { - LIST_FOREACH(bd, &ud->head, entry) { - if (!strncmp(ifname, bd->ifname, IFNAMSIZ) && -@@ -456,7 +454,7 @@ void ieee8023_ifup(char *ifname, struct lldp_agent *agent) - goto out_err; - } - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8023); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8023); - LIST_INSERT_HEAD(&ud->head, bd, entry); - LLDPAD_INFO("%s:port %s added\n", __func__, ifname); - return; -diff --git a/lldp_basman.c b/lldp_basman.c -index a4f69c1..614e2a2 100644 ---- a/lldp_basman.c -+++ b/lldp_basman.c -@@ -75,8 +75,6 @@ struct tlv_info_manaddr { - struct tlv_info_maoid o; - } __attribute__ ((__packed__)); - --extern struct lldp_head lldp_head; -- - static const struct lldp_mod_ops basman_ops = { - .lldp_mod_register = basman_register, - .lldp_mod_unregister = basman_unregister, -@@ -91,7 +89,7 @@ static struct basman_data *basman_data(const char *ifname, enum agent_type type) - struct basman_user_data *bud; - struct basman_data *bd = NULL; - -- bud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_BASIC); -+ bud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_BASIC); - if (bud) { - LIST_FOREACH(bd, &bud->head, entry) { - if (!strncmp(ifname, bd->ifname, IFNAMSIZ) && -@@ -688,7 +686,7 @@ void basman_ifup(char *ifname, struct lldp_agent *agent) - goto out_err; - } - -- bud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_BASIC); -+ bud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_BASIC); - LIST_INSERT_HEAD(&bud->head, bd, entry); - LLDPAD_DBG("%s:port %s added\n", __func__, ifname); - return; -diff --git a/lldp_evb.c b/lldp_evb.c -index dcdcc7e..a8f3965 100644 ---- a/lldp_evb.c -+++ b/lldp_evb.c -@@ -36,14 +36,12 @@ - #include "messages.h" - #include "config.h" - --extern struct lldp_head lldp_head; -- - struct evb_data *evb_data(char *ifname, enum agent_type type) - { - struct evb_user_data *ud; - struct evb_data *ed = NULL; - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB); - if (ud) { - LIST_FOREACH(ed, &ud->head, entry) { - if (!strncmp(ifname, ed->ifname, IFNAMSIZ) && -@@ -347,7 +345,7 @@ static void evb_ifup(char *ifname, struct lldp_agent *agent) - - evb_init_tlv(ed, agent); - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB); - LIST_INSERT_HEAD(&ud->head, ed, entry); - LLDPAD_DBG("%s:%s agent %d added\n", __func__, ifname, agent->type); - } -diff --git a/lldp_evb22.c b/lldp_evb22.c -index 76ba883..6e92d9d 100644 ---- a/lldp_evb22.c -+++ b/lldp_evb22.c -@@ -37,14 +37,12 @@ - #include "messages.h" - #include "config.h" - --extern struct lldp_head lldp_head; -- - struct evb22_data *evb22_data(char *ifname, enum agent_type type) - { - struct evb22_user_data *ud; - struct evb22_data *ed = NULL; - -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB22); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB22); - if (ud) { - LIST_FOREACH(ed, &ud->head, entry) { - if (!strncmp(ifname, ed->ifname, IFNAMSIZ) && -@@ -453,7 +451,7 @@ static void evb22_ifup(char *ifname, struct lldp_agent *agent) - STRNCPY_TERMINATED(ed->ifname, ifname, IFNAMSIZ); - ed->agenttype = agent->type; - evb22_init_tlv(ed, agent); -- ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB22); -+ ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB22); - LIST_INSERT_HEAD(&ud->head, ed, entry); - LLDPAD_DBG("%s:%s agent %d added\n", __func__, ifname, agent->type); - } -diff --git a/lldp_mand.c b/lldp_mand.c -index 0db63cb..b857a88 100644 ---- a/lldp_mand.c -+++ b/lldp_mand.c -@@ -42,8 +42,6 @@ - #include "lldp/l2_packet.h" - #include "lldp_tlv.h" - --extern struct lldp_head lldp_head; -- - static const struct lldp_mod_ops mand_ops = { - .lldp_mod_register = mand_register, - .lldp_mod_unregister = mand_unregister, -@@ -59,7 +57,7 @@ struct mand_data *mand_data(const char *ifname, enum agent_type type) - struct mand_user_data *mud; - struct mand_data *md = NULL; - -- mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MAND); -+ mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MAND); - if (mud) { - LIST_FOREACH(md, &mud->head, entry) { - if (!strncmp(ifname, md->ifname, IFNAMSIZ) && -@@ -608,7 +606,7 @@ void mand_ifup(char *ifname, struct lldp_agent *agent) - STRNCPY_TERMINATED(md->ifname, ifname, IFNAMSIZ); - md->agenttype = agent->type; - -- mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MAND); -+ mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MAND); - LIST_INSERT_HEAD(&mud->head, md, entry); - } - -@@ -636,7 +634,7 @@ struct lldp_module *mand_register(void) - LLDPAD_ERR("failed to malloc LLDP Mandatory module data\n"); - goto out_err; - } -- mud = malloc(sizeof(struct mand_user_data)); -+ mud = malloc(sizeof(struct mand_user_data)); - if (!mud) { - free(mod); - LLDPAD_ERR("failed to malloc LLDP Mandatory module user data\n"); -@@ -644,8 +642,8 @@ struct lldp_module *mand_register(void) - } - LIST_INIT(&mud->head); - mod->id = LLDP_MOD_MAND; -+ mod->data = mud; - mod->ops = &mand_ops; -- mod->data = mud; - LLDPAD_INFO("%s:done\n", __func__); - return mod; - out_err: -diff --git a/lldp_med.c b/lldp_med.c -index f6c373e..7b6996e 100644 ---- a/lldp_med.c -+++ b/lldp_med.c -@@ -40,8 +40,6 @@ - #include "lldp_mand_clif.h" - #include "lldp_med_cmds.h" - --extern struct lldp_head lldp_head; -- - struct tlv_info_medcaps { - u8 oui[OUI_SIZE]; - u8 subtype; -@@ -95,7 +93,7 @@ static struct med_data *med_data(const char *ifname, enum agent_type type) - struct med_user_data *mud; - struct med_data *md = NULL; - -- mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MED); -+ mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MED); - if (mud) { - LIST_FOREACH(md, &mud->head, entry) { - if (!strncmp(ifname, md->ifname, IFNAMSIZ) && -@@ -914,7 +912,7 @@ void med_ifup(char *ifname, struct lldp_agent *agent) - free(md); - goto out_err; - } -- mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MED); -+ mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MED); - LIST_INSERT_HEAD(&mud->head, md, entry); - LLDPAD_INFO("%s:port %s added\n", __func__, ifname); - return; -diff --git a/qbg_utils.c b/qbg_utils.c -index 9daeade..0d40c5b 100644 ---- a/qbg_utils.c -+++ b/qbg_utils.c -@@ -36,7 +36,6 @@ - #include "qbg_utils.h" - - extern int loglvl; /* Global lldpad log level */ --extern struct lldp_head lldp_head; - - /* - * hexdump_frame - print raw evb/ecp/vdp frame -@@ -73,7 +72,7 @@ void hexdump_frame(const char *ifname, char *txt, const unsigned char *buf, - */ - int modules_notify(int id, int sender_id, char *ifname, void *data) - { -- struct lldp_module *mp = find_module_by_id(&lldp_head, id); -+ struct lldp_module *mp = find_module_by_id(&lldp_mod_head, id); - int rc = 0; - - if (mp && mp->ops->lldp_mod_notify) --- -2.18.1 - diff --git a/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb index abfa713dc8..010cd5af84 100644 --- a/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb +++ b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb @@ -2,7 +2,7 @@ SUMMARY = "Open-LLDP" DESCRIPTION = "Link Layer Discovery Protocol for Linux that includes support for DCBX" HOMEPAGE = "http://open-lldp.org/start" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162" S = "${WORKDIR}/git" @@ -12,27 +12,15 @@ inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} DEPENDS = "libnl libconfig readline" -SRCREV = "b71bfb87fefb31c4b1a6a7ae351791c90966c3a8" -PV .= "+git${SRCPV}" -SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=master \ +SRCREV = "f1dd9eb961fab06723d2bedb2f7e2b81e45ee9ab" +PV .= "+git" +SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=branch-1.1 \ 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 \ - file://0001-cmds-fix-enum-conversion.patch \ - file://0002-lldp_head-rename-and-make-extern.patch \ - file://0003-lldp-add-packed-struct-definition.patch \ - file://0004-lldptool-make-extern.patch \ - file://0005-cisco_oui-match-encode-handler-prototypes.patch \ - file://0006-ecp22-make-enum-a-type-rather-than-instance.patch \ - file://0007-lldp_8021qaz-extern-config-object.patch \ - file://0008-stringops-fix-some-string-copy-errors.patch \ - file://0009-8021qaz-mark-prio-map-functions-static.patch \ - file://lldp_head-remove-all-references.patch \ + file://0004-clif-Include-string.h-for-mem-function-prototypes.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)}" diff --git a/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb b/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb index 71046ce24c..0d26c338b9 100644 --- a/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb +++ b/meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb @@ -6,7 +6,7 @@ DESCRIPTION = "PPTP Client is a Linux, FreeBSD, NetBSD \ cable and ADSL internet service providers." HOMEPAGE = "http://pptpclient.sourceforge.net" SECTION = "net" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" inherit perlnative diff --git a/meta-networking/recipes-protocols/quagga/files/bgpd.service b/meta-networking/recipes-protocols/quagga/files/bgpd.service deleted file mode 100644 index 818b59cb27..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/bgpd.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=BGP routing daemon -BindTo=zebra.service -After=zebra.service -ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf - -[Service] -Type=forking -EnvironmentFile=-@SYSCONFDIR@/default/quagga -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/meta-networking/recipes-protocols/quagga/files/isisd.service b/meta-networking/recipes-protocols/quagga/files/isisd.service deleted file mode 100644 index 9bfe7b65ef..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/isisd.service +++ /dev/null @@ -1,14 +0,0 @@ -[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/meta-networking/recipes-protocols/quagga/files/ospf6d.service b/meta-networking/recipes-protocols/quagga/files/ospf6d.service deleted file mode 100644 index 50645fe2a9..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/ospf6d.service +++ /dev/null @@ -1,15 +0,0 @@ -[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 -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/meta-networking/recipes-protocols/quagga/files/ospfd.service b/meta-networking/recipes-protocols/quagga/files/ospfd.service deleted file mode 100644 index 2cab1cd147..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/ospfd.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=OSPF routing daemon -BindTo=zebra.service -After=zebra.service -ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf - -[Service] -Type=forking -EnvironmentFile=-@SYSCONFDIR@/default/quagga -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/meta-networking/recipes-protocols/quagga/files/quagga.default b/meta-networking/recipes-protocols/quagga/files/quagga.default deleted file mode 100644 index 4c4bc23071..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/quagga.default +++ /dev/null @@ -1,12 +0,0 @@ -# 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/meta-networking/recipes-protocols/quagga/files/quagga.init b/meta-networking/recipes-protocols/quagga/files/quagga.init deleted file mode 100644 index df1beb7123..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/quagga.init +++ /dev/null @@ -1,200 +0,0 @@ -#!/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/meta-networking/recipes-protocols/quagga/files/ripd.service b/meta-networking/recipes-protocols/quagga/files/ripd.service deleted file mode 100644 index 2c824318a1..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/ripd.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=RIP routing daemon -BindTo=zebra.service -After=zebra.service -ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf - -[Service] -Type=forking -EnvironmentFile=-@SYSCONFDIR@/default/quagga -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/meta-networking/recipes-protocols/quagga/files/ripngd.service b/meta-networking/recipes-protocols/quagga/files/ripngd.service deleted file mode 100644 index c3555b345b..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/ripngd.service +++ /dev/null @@ -1,15 +0,0 @@ -[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 -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/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga b/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga deleted file mode 100644 index 1f28c0b24d..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga +++ /dev/null @@ -1,3 +0,0 @@ -# <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/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/meta-networking/recipes-protocols/quagga/files/watchquagga.default deleted file mode 100644 index 2d601ec97d..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/watchquagga.default +++ /dev/null @@ -1,12 +0,0 @@ -# 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/meta-networking/recipes-protocols/quagga/files/watchquagga.init b/meta-networking/recipes-protocols/quagga/files/watchquagga.init deleted file mode 100644 index 5ddd94a3d6..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/watchquagga.init +++ /dev/null @@ -1,64 +0,0 @@ -#!/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/meta-networking/recipes-protocols/quagga/files/zebra.service b/meta-networking/recipes-protocols/quagga/files/zebra.service deleted file mode 100644 index 9186041ae6..0000000000 --- a/meta-networking/recipes-protocols/quagga/files/zebra.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=GNU Zebra routing manager -Wants=network.target -Before=network.target -ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf - -[Service] -Type=forking -EnvironmentFile=-@SYSCONFDIR@/default/quagga -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/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc deleted file mode 100644 index b3574a7ff6..0000000000 --- a/meta-networking/recipes-protocols/quagga/quagga.inc +++ /dev/null @@ -1,243 +0,0 @@ -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 = "https://github.com/Quagga/quagga/releases/download/quagga-${PV}/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 update-alternatives - -CFLAGS += "-fcommon" - -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/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/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 -} - -ALTERNATIVE:${PN} = "pimd" -ALTERNATIVE_LINK_NAME[pimd] = "${sbindir}/pimd" - diff --git a/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb b/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb deleted file mode 100644 index a7697a1ae9..0000000000 --- a/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb +++ /dev/null @@ -1,4 +0,0 @@ -require quagga.inc - -SRC_URI[md5sum] = "eced21b054d71c9e1b7c6ac43286a166" -SRC_URI[sha256sum] = "e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3" diff --git a/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch b/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch index ecc2d74e74..fd9961b9e8 100644 --- a/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch +++ b/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng/Modify-configure.in-and-etc-Makefile.am.patch @@ -6,7 +6,7 @@ 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 +Upstream-Status: Pending Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> --- diff --git a/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb b/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb index 4696c3baeb..6baa83e83e 100644 --- a/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb +++ b/meta-networking/recipes-protocols/radiusclient-ng/radiusclient-ng_0.5.6.bb @@ -5,11 +5,10 @@ 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 \ +SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/universe/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" diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch index 7601f0d325..572886a26c 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0001-ppoe-Dont-include-linux-if_ether.h.patch @@ -8,6 +8,8 @@ Fixes build with musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/pppoe.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch index 2103b38888..cd9e40d5eb 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/0002-Enable-support-for-the-kernel-module.patch @@ -6,6 +6,8 @@ Subject: [PATCH] Enable support for the kernel module Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch deleted file mode 100644 index bbd516fde9..0000000000 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.in-Error-fix.patch +++ /dev/null @@ -1,57 +0,0 @@ -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/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch index be892803e6..c486716b97 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure.patch @@ -3,6 +3,8 @@ From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Fri, 18 Jul 2014 08:25:16 +0000 --- +Upstream-Status: Pending + configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch index 3b945934f6..6e859a354c 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/configure_in_cross.patch @@ -8,13 +8,12 @@ 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(-) + src/configure.in | 62 ++++++++++-------------------------------------- + 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/src/configure.in b/src/configure.in -index 90a07df..1d30243 100644 +index 4add50c..9dff457 100644 --- a/src/configure.in +++ b/src/configure.in @@ -5,6 +5,13 @@ AC_INIT(pppoe.c) @@ -67,13 +66,15 @@ index 90a07df..1d30243 100644 fi AC_SUBST(LINUX_KERNELMODE_PLUGIN) -@@ -142,15 +149,8 @@ AC_CHECK_SIZEOF(unsigned short) +@@ -142,17 +149,8 @@ AC_CHECK_SIZEOF(unsigned short) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) +-dnl Check for location of ip +-AC_PATH_PROG(IP, ip, NOTFOUND, $PATH:/bin:/sbin:/usr/bin:/usr/sbin) +- -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) @@ -84,7 +85,7 @@ index 90a07df..1d30243 100644 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 +@@ -195,42 +193,6 @@ if test "$GCC" = yes; then CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes" fi @@ -124,30 +125,9 @@ index 90a07df..1d30243 100644 - ;; -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` + # Sigh... got to fix this up for tcl + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. +-- +2.34.1 + diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch index 9801f6e277..57301f430d 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/discard-use-of-dnl-in-Makefile.am.patch @@ -9,6 +9,8 @@ not introduce a comment. Signed-off-by: Ting Liu <b28495@freescale.com> --- +Upstream-Status: Pending + Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch deleted file mode 100644 index 8a857888b3..0000000000 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe/dont-swallow-errors.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.13.bb b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb index 363eeeb56e..4dfdb8fc21 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.13.bb +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb @@ -1,33 +1,32 @@ SUMMARY = "A user-mode PPPoE client and server suite for Linux" HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe" SECTION = "net" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" 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 \ +SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/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" +SRC_URI[sha256sum] = "b1f318bc7e4e5b0fd8a8e23e8803f5e6e43165245a5a10a7162a92a6cf17829a" inherit autotools-brokensep update-rc.d systemd CACHED_CONFIGUREVARS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', 'rpppoe_cv_pack_bitfields=normal', 'rpppoe_cv_pack_bitfields=rev', d)}" +# Needed for strlcpy() +CFLAGS += "-D_GNU_SOURCE" + do_install:append() { install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system diff --git a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb index 09699f3329..8099fa5c6e 100644 --- a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb +++ b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb @@ -6,7 +6,7 @@ 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" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" SRC_URI = "http://downloads.sourceforge.net/tsocks/tsocks-${PV}.tar.gz \ diff --git a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb index 4f8e4d4282..4c18c6aff9 100644 --- a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb +++ b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb @@ -2,7 +2,7 @@ DESCRIPTION = "This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ffcf846341f3856d79a483eafa18e2a5" -SRCREV = "a10cd498d964508c0e6ec6bd2be9dd4afcbb4d86" +SRCREV = "848eca82f92273af9a79687a90343a2ebcf3481d" SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \ " @@ -23,3 +23,5 @@ PACKAGECONFIG[inet] = "--enable-inet,--disable-inet," PACKAGECONFIG[inet6] = "--enable-inet6,--disable-inet6," EXTRA_OECONF += "--disable-debug" + +CVE_VERSION = "0.9.5.0" diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Fix-pkgconfig-dir-for-multilib.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Fix-pkgconfig-dir-for-multilib.patch new file mode 100644 index 0000000000..0ddcb642bc --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Fix-pkgconfig-dir-for-multilib.patch @@ -0,0 +1,28 @@ +From 2f931baf290477b586309189445bf87e3bc5d5ba Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 2 Mar 2022 14:51:13 +0800 +Subject: [PATCH] Fix pkgconfig dir for multilib + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ab399a69..beae6eaf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -637,7 +637,7 @@ endif() + # create pkg-config file + if(NOT WIN32) + configure_file(${VSOMEIP_NAME}.pc.in ${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}.pc @ONLY) +- install(FILES ${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}.pc DESTINATION lib/pkgconfig) ++ install(FILES ${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}.pc DESTINATION ${INSTALL_LIB_DIR}/pkgconfig) + endif() + + ############################################################################## +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-Install-example-configuration-files-to-etc-vsomeip.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-Install-example-configuration-files-to-etc-vsomeip.patch new file mode 100644 index 0000000000..bdaf343606 --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-Install-example-configuration-files-to-etc-vsomeip.patch @@ -0,0 +1,28 @@ +From ebaa3206ee125741314272cddafa04fa71bd2d1e Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 9 Mar 2022 11:48:44 +0800 +Subject: [PATCH] Install example configuration files to /etc/vsomeip + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index beae6eaf..d791c12e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -536,7 +536,7 @@ install(FILES ${PROJECT_BINARY_DIR}/vsomeip.pc DESTINATION lib/pkgconfig) + endif () + + install ( +- FILES ${EXAMPLE_CONFIG_FILES} DESTINATION etc/vsomeip COMPONENT config ++ FILES ${EXAMPLE_CONFIG_FILES} DESTINATION ${DEFAULT_CONFIGURATION_FOLDER} COMPONENT config + ) + + # Add all targets to the build-tree export set +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0003-Do-not-build-external-gtest.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0003-Do-not-build-external-gtest.patch new file mode 100644 index 0000000000..09dab9a8b0 --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip/0003-Do-not-build-external-gtest.patch @@ -0,0 +1,187 @@ +From b1bf398015bc090020459954e5cd1ec3b51b8ac3 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Tue, 11 Jul 2023 16:53:46 +0800 +Subject: [PATCH] Do not build external gtest + +We don't need to build external gtest since we already depend on +googletest. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + CMakeLists.txt | 11 ---- + test/CMakeLists.txt | 22 +------ + test/network_tests/CMakeLists.txt | 99 ------------------------------- + 3 files changed, 3 insertions(+), 129 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d791c12e..f1bcba27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,17 +18,6 @@ set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP + set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentation/doxygen.in + set (CMAKE_VERBOSE_MAKEFILE off) + +-if (NOT GTEST_ROOT) +- if (DEFINED ENV{GTEST_ROOT}) +- set(GTEST_ROOT $ENV{GTEST_ROOT}) +- else() +- include(FetchContent) +- FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0) +- FetchContent_Populate(googletest) +- set(GTEST_ROOT ${googletest_SOURCE_DIR}) +- endif() +-endif() +- + ################################################################################################### + # see http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file + ################################################################################################### +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index f66ac5d3..6f09bf40 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -17,27 +17,11 @@ find_package(benchmark) + # remove export symbols from the cxx flags + string(REPLACE "${EXPORTSYMBOLS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + +-# check for set environment variable +-if(${GTEST_ROOT} STREQUAL "n/a") +- message(STATUS "GTEST_ROOT is not defined. For building the tests the variable +- GTEST_ROOT has to be defined. Tests can not be built.") +- # early exit +- return() # test can not be build -> make commands build_tests and check are not available +-else() +- message(STATUS "GTEST_ROOT is set. gtest root path set to ${GTEST_ROOT}") ++find_package(GTest) ++if (NOT GTest_FOUND) ++ message(WARNING "GTest is not found. Tests can not be built.") + endif() + +-# build google test as static library (always) -> therefore deactivate BUILD_SHARED_LIBS in case it is active +-set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0) +-if ("${BUILD_SHARED_LIBS}" STREQUAL "ON") +- set(BUILD_SHARED_LIBS OFF) +- set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 1) +-endif() +-add_subdirectory(${GTEST_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/gtest EXCLUDE_FROM_ALL) +-if ("${BUILD_SHARED_LIBS_AUTOMATIC_OFF}" STREQUAL "1") +- set(BUILD_SHARED_LIBS ON) +- set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0) +-endif() + + ############################################################################## + # build tests +diff --git a/test/network_tests/CMakeLists.txt b/test/network_tests/CMakeLists.txt +index 883cc5cf..9a2a4f5e 100644 +--- a/test/network_tests/CMakeLists.txt ++++ b/test/network_tests/CMakeLists.txt +@@ -4116,105 +4116,6 @@ if(NOT ${TESTS_BAT}) + + endif() + +-############################################################################## +-# Add for every test a dependency to gtest +-############################################################################## +- +-if(NOT ${TESTS_BAT}) +- add_dependencies(${TEST_CONFIGURATION} gtest) +- add_dependencies(${TEST_APPLICATION} gtest) +- add_dependencies(${TEST_APPLICATION_SINGLE_PROCESS_NAME} gtest) +- add_dependencies(${TEST_APPLICATION_AVAILABILITY_NAME} gtest) +- add_dependencies(${TEST_MAGIC_COOKIES_CLIENT} gtest) +- add_dependencies(${TEST_MAGIC_COOKIES_SERVICE} gtest) +- add_dependencies(${TEST_HEADER_FACTORY} gtest) +- add_dependencies(${TEST_HEADER_FACTORY_CLIENT} gtest) +- add_dependencies(${TEST_HEADER_FACTORY_SERVICE} gtest) +- add_dependencies(${TEST_LOCAL_ROUTING_SERVICE} gtest) +- add_dependencies(${TEST_LOCAL_ROUTING_CLIENT} gtest) +- add_dependencies(${TEST_EXTERNAL_LOCAL_ROUTING_SERVICE} gtest) +- add_dependencies(${TEST_PAYLOAD_SERVICE} gtest) +- add_dependencies(${TEST_PAYLOAD_CLIENT} gtest) +- add_dependencies(${TEST_BIG_PAYLOAD_SERVICE} gtest) +- add_dependencies(${TEST_BIG_PAYLOAD_CLIENT} gtest) +- add_dependencies(${TEST_CLIENT_ID_SERVICE} gtest) +- add_dependencies(${TEST_CLIENT_ID_UTILITY} gtest) +- add_dependencies(${TEST_DEBOUNCE_CLIENT} gtest) +- add_dependencies(${TEST_DEBOUNCE_SERVICE} gtest) +- add_dependencies(${TEST_DEBOUNCE_FILTER_CLIENT} gtest) +- add_dependencies(${TEST_DEBOUNCE_FILTER_SERVICE} gtest) +- add_dependencies(${TEST_DEBOUNCE_CALLBACK_CLIENT} gtest) +- add_dependencies(${TEST_DEBOUNCE_CALLBACK_SERVICE} gtest) +- add_dependencies(${TEST_DEBOUNCE_FREQUENCY_CLIENT} gtest) +- add_dependencies(${TEST_DEBOUNCE_FREQUENCY_SERVICE} gtest) +- add_dependencies(${TEST_SUBSCRIBE_NOTIFY_SERVICE} gtest) +- add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_EVENT_TWO_EVENTGROUPS_SERVICE} gtest) +- add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_EVENT_TWO_EVENTGROUPS_CLIENT} gtest) +- add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_SERVICE} gtest) +- add_dependencies(${TEST_CPU_LOAD_SERVICE} gtest) +- add_dependencies(${TEST_CPU_LOAD_CLIENT} gtest) +- add_dependencies(${TEST_INITIAL_EVENT_SERVICE} gtest) +- add_dependencies(${TEST_INITIAL_EVENT_CLIENT} gtest) +- add_dependencies(${TEST_INITIAL_EVENT_AVAILABILITY_CHECKER} gtest) +- add_dependencies(${TEST_INITIAL_EVENT_STOP_SERVICE} gtest) +- add_dependencies(${TEST_OFFER_SERVICE} gtest) +- add_dependencies(${TEST_OFFER_CLIENT} gtest) +- add_dependencies(${TEST_OFFER_SERVICE_EXTERNAL} gtest) +- add_dependencies(${TEST_OFFER_EXTERNAL_SD_MESSAGE_SENDER} gtest) +- add_dependencies(${TEST_OFFERED_SERVICES_INFO_CLIENT} gtest) +- add_dependencies(${TEST_OFFERED_SERVICES_INFO_SERVICE} gtest) +- add_dependencies(${TEST_PENDING_SUBSCRIPTION_SERVICE} gtest) +- add_dependencies(${TEST_PENDING_SUBSCRIPTION_CLIENT} gtest) +- add_dependencies(${TEST_MALICIOUS_DATA_SERVICE} gtest) +- add_dependencies(${TEST_MALICIOUS_DATA_CLIENT} gtest) +- if (${TEST_SECURITY}) +- add_dependencies(${TEST_SECURITY_SERVICE} gtest) +- add_dependencies(${TEST_SECURITY_CLIENT} gtest) +- endif() +- add_dependencies(${TEST_E2E_SERVICE} gtest) +- add_dependencies(${TEST_E2E_CLIENT} gtest) +- if (${TEST_E2E_PROFILE_04}) +- add_dependencies(${TEST_E2E_PROFILE_04_SERVICE} gtest) +- add_dependencies(${TEST_E2E_PROFILE_04_CLIENT} gtest) +- endif() +- if (${TEST_E2E_PROFILE_07}) +- add_dependencies(${TEST_E2E_PROFILE_07_SERVICE} gtest) +- add_dependencies(${TEST_E2E_PROFILE_07_CLIENT} gtest) +- endif() +- add_dependencies(${TEST_EVENT_SERVICE} gtest) +- add_dependencies(${TEST_EVENT_CLIENT} gtest) +- if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "QNX") +- add_dependencies(${TEST_NPDU_SERVICE_ONE} gtest) +- add_dependencies(${TEST_NPDU_SERVICE_TWO} gtest) +- add_dependencies(${TEST_NPDU_SERVICE_THREE} gtest) +- add_dependencies(${TEST_NPDU_SERVICE_FOUR} gtest) +- add_dependencies(${TEST_NPDU_CLIENT_ONE} gtest) +- add_dependencies(${TEST_NPDU_CLIENT_TWO} gtest) +- add_dependencies(${TEST_NPDU_CLIENT_THREE} gtest) +- add_dependencies(${TEST_NPDU_CLIENT_FOUR} gtest) +- add_dependencies(${TEST_NPDU_DAEMON_CLIENT} gtest) +- add_dependencies(${TEST_NPDU_DAEMON_SERVICE} gtest) +- endif() +- add_dependencies(${TEST_SOMEIPTP_CLIENT} gtest) +- add_dependencies(${TEST_SOMEIPTP_SERVICE} gtest) +- if(${TEST_SECOND_ADDRESS}) +- add_dependencies(${TEST_SECOND_ADDRESS_CLIENT} gtest) +- add_dependencies(${TEST_SECOND_ADDRESS_SERVICE} gtest) +- endif() +- add_dependencies(${TEST_SUSPEND_RESUME_CLIENT} gtest) +- add_dependencies(${TEST_SUSPEND_RESUME_SERVICE} gtest) +-else() +- add_dependencies(${TEST_APPLICATION} gtest) +- add_dependencies(${TEST_HEADER_FACTORY} gtest) +- add_dependencies(${TEST_HEADER_FACTORY_CLIENT} gtest) +- add_dependencies(${TEST_HEADER_FACTORY_SERVICE} gtest) +- add_dependencies(${TEST_PAYLOAD_SERVICE} gtest) +- add_dependencies(${TEST_PAYLOAD_CLIENT} gtest) +- add_dependencies(${TEST_BIG_PAYLOAD_SERVICE} gtest) +- add_dependencies(${TEST_BIG_PAYLOAD_CLIENT} gtest) +- add_dependencies(${TEST_LOCAL_ROUTING_SERVICE} gtest) +- add_dependencies(${TEST_LOCAL_ROUTING_CLIENT} gtest) +-endif() + + ############################################################################## + # Add tests to the target build_network_tests +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0004-Do-not-specify-PIE-flag-explicitly.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0004-Do-not-specify-PIE-flag-explicitly.patch new file mode 100644 index 0000000000..4bb2318555 --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip/0004-Do-not-specify-PIE-flag-explicitly.patch @@ -0,0 +1,47 @@ +From ec2d36466c9050ee282ea1c3bb1b5f1f61c96ecb Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Mon, 17 Jul 2023 14:33:32 +0800 +Subject: [PATCH] Do not specify PIE flag explicitly + +For nodistro distro, packages are built without PIE because +security_flags.inc is not included by default. But in vsomeip, the PIE +flag is explicitly specified in CMAKE_CXX_FLAGS, which will cause +building with PIE even in nodistro, causing an error when linking the +googletest static library: + +TOPDIR/tmp-glibc/work/cortexa53-oe-linux/vsomeip/3.1.20.3-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../libexec/aarch64-oe-linux/gcc/aarch64-oe-linux/12.2.0/ld: +TOPDIR/tmp-glibc/work/cortexa53-oe-linux/vsomeip/3.1.20.3-r0/recipe-sysroot/usr/lib/libgtest.a(gtest-all.cc.o)(.text+0x4a90): +unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `_ZSt4cerr@@GLIBCXX_3.4' + +Remove PIE flag from CMAKE_CXX_FLAGS and only enable PIE flag by +including security_flags.inc. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1bcba27..2653a4df 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,12 +60,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # This is only relevant for GCC and causes warnings on Clang + set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc") +- set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -pie -Wno-tsan -Wl,-z,relro,-z,now") ++ set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -Wno-tsan -Wl,-z,relro,-z,now") + endif() + + set(NO_DEPRECATED "") + set(OPTIMIZE "") +- set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector-strong -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wpedantic -Werror -fPIE") ++ set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector-strong -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wpedantic") + + # force all use of std::mutex and std::recursive_mutex to use runtime init + # instead of static initialization so mutexes can be hooked to enable PI as needed +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch new file mode 100644 index 0000000000..25d66514f8 --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip/0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch @@ -0,0 +1,41 @@ +From 8676ef287bb25b49668be4336387bdf83a0cae5c Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Mon, 1 Jan 2024 17:02:41 +0800 +Subject: [PATCH] test/common/CMakeLists.txt: add missing link with dlt + +The libvsomeip_utilities library uses functions e.g. +dlt_check_library_version/dlt_register_app/dlt_unregister_app which are +provided by dlt therefore add it to linker flags. + +Fixes: +x86_64-poky-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: dlt_check_library_version +>>> referenced by test/common/libvsomeip_utilities.so + +x86_64-poky-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: dlt_register_app +>>> referenced by test/common/libvsomeip_utilities.so + +x86_64-poky-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: dlt_unregister_app +>>> referenced by test/common/libvsomeip_utilities.so + +Upstream-Status: Submitted [https://github.com/COVESA/vsomeip/pull/602] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + test/common/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/common/CMakeLists.txt b/test/common/CMakeLists.txt +index d4d14534..afc8c2d6 100644 +--- a/test/common/CMakeLists.txt ++++ b/test/common/CMakeLists.txt +@@ -27,6 +27,7 @@ TARGET_LINK_LIBRARIES ( + ${Boost_LIBRARIES} + ${DL_LIBRARY} + ${TEST_LINK_LIBRARIES} ++ ${DLT_LIBRARIES} + ) + + # ---------------------------------------------------------------------------- +-- +2.25.1 + diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb b/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb new file mode 100644 index 0000000000..4c38970205 --- /dev/null +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb @@ -0,0 +1,75 @@ +SUMMARY = "The implementation of SOME/IP" +DESCRIPTION = "The vsomeip stack implements the http://some-ip.com/ \ +(Scalable service-Oriented MiddlewarE over IP (SOME/IP)) protocol." +HOMEPAGE = "https://github.com/COVESA/vsomeip" +SECTION = "net" + +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" + +SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=master;protocol=https;name=vsomeip \ + file://0001-Fix-pkgconfig-dir-for-multilib.patch \ + file://0002-Install-example-configuration-files-to-etc-vsomeip.patch \ + file://0003-Do-not-build-external-gtest.patch \ + file://0004-Do-not-specify-PIE-flag-explicitly.patch \ + file://0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch \ + " + +SRCREV = "02c199dff8aba814beebe3ca417fd991058fe90c" + +COMPATIBLE_HOST:mips = "null" +COMPATIBLE_HOST:mips64 = "null" +COMPATIBLE_HOST:powerpc = "null" +COMPATIBLE_HOST:libc-musl = 'null' + +DEPENDS = "boost dlt-daemon googletest" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = "-DINSTALL_LIB_DIR:PATH=${baselib} \ + -DINSTALL_CMAKE_DIR:PATH=${baselib}/cmake/vsomeip3 \ + " + +# For vsomeip-test +EXTRA_OECMAKE += "-DTEST_IP_MASTER=10.0.3.1 \ + -DTEST_IP_SLAVE=10.0.3.2 \ + -DTEST_IP_SLAVE_SECOND=10.0.3.3 \ + -DTEST_UID=1000 -DTEST_GID=1000 \ + " + +RDEPENDS:${PN}-test = "bash lsof" + +do_compile:append() { + cmake_runcmake_build --target examples + cmake_runcmake_build --target build_tests +} + +do_install:append() { + install -d ${D}/opt/${PN}-test/examples + install -m 0755 ${B}/examples/*-sample ${D}/opt/${PN}-test/examples + install -d ${D}/opt/${PN}-test/examples/routingmanagerd + install -m 0755 ${B}/examples/routingmanagerd/routingmanagerd \ + ${D}/opt/${PN}-test/examples/routingmanagerd + + install -d ${D}/opt/${PN}-test/test/test/common + cp -rf ${S}/test/common/examples_policies \ + ${D}/opt/${PN}-test/test/test/common/ + install -m 0755 ${B}/test/common/libvsomeip_utilities.so \ + ${D}/opt/${PN}-test/test/test/common/ + + for d in unit_tests network_tests; do + install -d ${D}/opt/${PN}-test/test/$d + cp -f ${B}/test/$d/*test* ${D}/opt/${PN}-test/test/$d + done +} + +PACKAGES += "${PN}-test" + +FILES:${PN}-dbg += " \ + /opt/${PN}-test/.debug/* \ + " +FILES:${PN}-test = " \ + /opt/${PN}-test \ + " diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb index 21f97eba24..08bab4a338 100644 --- a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb @@ -5,11 +5,13 @@ DEPENDS = "ppp virtual/kernel" PACKAGE_ARCH = "${MACHINE_ARCH}" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https" -SRCREV = "ba619c79c4790c78c033df0abde4a9a5de744a08" +SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" + +UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases" S = "${WORKDIR}/git" diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch b/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch index b4d6d94b06..92b581416f 100644 --- a/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch +++ b/meta-networking/recipes-protocols/zeroconf/zeroconf/0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch @@ -12,6 +12,8 @@ and causes the conflict Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + zeroconf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb b/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb index 753d832982..61f6b79dd7 100644 --- a/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb +++ b/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb @@ -7,14 +7,12 @@ 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+" +LICENSE = "GPL-2.0-or-later" 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 \ @@ -27,6 +25,8 @@ SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${BPN}-${PV}.tar.g SRC_URI[md5sum] = "bdafb16b008ebb5633e4e581f77821d2" SRC_URI[sha256sum] = "a8c74df127753e2310fa1e072f3c9ca44a404bb0bbce9cfec7a84c6dff8bec7b" +EXTRA_OEMAKE += "CPPFLAGS='${CFLAGS}'" + do_install () { install -d ${D}${sbindir} install -d ${D}${sysconfdir}/network/if-up.d |