diff options
Diffstat (limited to 'meta-networking/recipes-protocols')
42 files changed, 450 insertions, 1098 deletions
diff --git a/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb b/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb index a799ad197e..cc69f1448a 100644 --- a/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb +++ b/meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb | |||
@@ -17,7 +17,6 @@ SRCREV = "3d61ea1e843e2c5f9706c74d1adad4e1d24d44b9" | |||
17 | 17 | ||
18 | UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)" | 18 | UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)" |
19 | 19 | ||
20 | S = "${WORKDIR}/git" | ||
21 | 20 | ||
22 | EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" | 21 | EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" |
23 | 22 | ||
diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch b/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch new file mode 100644 index 0000000000..98ba4d5283 --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From fa6227d92725af5ae17b8435c0d50d92ff7a575c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 14 Aug 2024 19:32:25 -0700 | ||
4 | Subject: [PATCH] bison/flex: Add flags for carrying user specified parameters | ||
5 | |||
6 | This helps in passing cmdline to flex and bison e.g. to remove lines | ||
7 | from generated output to avoid absolute paths | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | cmake/Modules/CMakeUserUseBison.cmake | 1 + | ||
13 | cmake/Modules/CMakeUserUseFlex.cmake | 1 + | ||
14 | 2 files changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/cmake/Modules/CMakeUserUseBison.cmake b/cmake/Modules/CMakeUserUseBison.cmake | ||
17 | index 9257545..b61bd0e 100644 | ||
18 | --- a/cmake/Modules/CMakeUserUseBison.cmake | ||
19 | +++ b/cmake/Modules/CMakeUserUseBison.cmake | ||
20 | @@ -52,6 +52,7 @@ IF(BISON_EXECUTABLE) | ||
21 | OUTPUT "${OUTFILE}" "${HEADER}" | ||
22 | COMMAND "${BISON_EXECUTABLE}" | ||
23 | ARGS "--name-prefix=${PREFIX}" | ||
24 | + "${BISON_TARGET_ARG_COMPILE_FLAGS}" | ||
25 | "--defines" | ||
26 | "--output-file=${OUTFILE}" | ||
27 | "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" | ||
28 | diff --git a/cmake/Modules/CMakeUserUseFlex.cmake b/cmake/Modules/CMakeUserUseFlex.cmake | ||
29 | index 7d0394f..1221dca 100644 | ||
30 | --- a/cmake/Modules/CMakeUserUseFlex.cmake | ||
31 | +++ b/cmake/Modules/CMakeUserUseFlex.cmake | ||
32 | @@ -39,6 +39,7 @@ IF(FLEX_EXECUTABLE) | ||
33 | OUTPUT "${OUTFILE}" | ||
34 | COMMAND "${FLEX_EXECUTABLE}" | ||
35 | ARGS "-P${PREFIX}" | ||
36 | + "${FLEX_TARGET_ARG_COMPILE_FLAGS}" | ||
37 | "-o${OUTFILE}" | ||
38 | "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" | ||
39 | DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}") | ||
diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch b/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch new file mode 100644 index 0000000000..41aeec4ee0 --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From a54f10082f819dadfa6931166e71edffadb565dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Seva <vseva@debian.org> | ||
3 | Date: Sun, 23 Feb 2025 13:38:48 +0100 | ||
4 | Subject: [PATCH] fixes for gcc-15 | ||
5 | |||
6 | fixes #72 | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/freeDiameter/freeDiameter/commit/a54f10082f819dadfa6931166e71edffadb565dd] | ||
9 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
10 | --- | ||
11 | libfdcore/sctp.c | 22 +++++++++++----------- | ||
12 | 1 file changed, 11 insertions(+), 11 deletions(-) | ||
13 | |||
14 | diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c | ||
15 | index 95e822e..a4a7f40 100644 | ||
16 | --- a/libfdcore/sctp.c | ||
17 | +++ b/libfdcore/sctp.c | ||
18 | @@ -532,29 +532,29 @@ static int fd_setsockopt_prebind(int sk) | ||
19 | /* SCTP_EXPLICIT_EOR: we assume implicit EOR in freeDiameter, so let's ensure this is known by the stack */ | ||
20 | #ifdef SCTP_EXPLICIT_EOR | ||
21 | { | ||
22 | - int bool; | ||
23 | + int _bool; | ||
24 | |||
25 | if (TRACE_BOOL(ANNOYING)) { | ||
26 | sz = sizeof(bool); | ||
27 | /* Read socket defaults */ | ||
28 | - CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); | ||
29 | - if (sz != sizeof(bool)) | ||
30 | + CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) ); | ||
31 | + if (sz != sizeof(_bool)) | ||
32 | { | ||
33 | - TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(bool)); | ||
34 | + TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(_bool)); | ||
35 | return ENOTSUP; | ||
36 | } | ||
37 | - fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); | ||
38 | + fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false"); | ||
39 | } | ||
40 | |||
41 | - bool = 0; | ||
42 | + _bool = 0; | ||
43 | |||
44 | /* Set the option to the socket */ | ||
45 | - CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, sizeof(bool)) ); | ||
46 | + CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, sizeof(_bool)) ); | ||
47 | |||
48 | if (TRACE_BOOL(ANNOYING)) { | ||
49 | /* Check new values */ | ||
50 | - CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); | ||
51 | - fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); | ||
52 | + CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) ); | ||
53 | + fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false"); | ||
54 | } | ||
55 | } | ||
56 | #else /* SCTP_EXPLICIT_EOR */ | ||
57 | @@ -619,10 +619,10 @@ static int fd_setsockopt_prebind(int sk) | ||
58 | |||
59 | #ifdef SCTP_RECVRCVINFO /* Replaces SCTP_SNDRCV */ | ||
60 | { | ||
61 | - int bool = 1; | ||
62 | + int _bool = 1; | ||
63 | |||
64 | /* Set the option to the socket */ | ||
65 | - CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &bool, sizeof(bool)) ); | ||
66 | + CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &_bool, sizeof(_bool)) ); | ||
67 | |||
68 | } | ||
69 | #else /* SCTP_RECVRCVINFO */ | ||
diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb index c7c329a5d4..89b2572c04 100644 --- a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb +++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb | |||
@@ -7,7 +7,7 @@ Accounting needs." | |||
7 | 7 | ||
8 | HOMEPAGE = "http://www.freediameter.net" | 8 | HOMEPAGE = "http://www.freediameter.net" |
9 | 9 | ||
10 | DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native" | 10 | DEPENDS = "flex-native bison-native cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native" |
11 | 11 | ||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 12 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
13 | 13 | ||
@@ -23,9 +23,10 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast | |||
23 | file://freeDiameter.conf \ | 23 | file://freeDiameter.conf \ |
24 | file://install_test.patch \ | 24 | file://install_test.patch \ |
25 | file://0001-tests-use-EXTENSIONS_DIR.patch \ | 25 | file://0001-tests-use-EXTENSIONS_DIR.patch \ |
26 | file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \ | ||
27 | file://0001-fixes-for-gcc-15.patch \ | ||
26 | " | 28 | " |
27 | 29 | ||
28 | S = "${WORKDIR}/git" | ||
29 | 30 | ||
30 | LICENSE = "BSD-3-Clause" | 31 | LICENSE = "BSD-3-Clause" |
31 | LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" | 32 | LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" |
@@ -49,6 +50,8 @@ EXTRA_OECMAKE = " \ | |||
49 | -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ | 50 | -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ |
50 | -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ | 51 | -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ |
51 | -DCMAKE_SKIP_RPATH:BOOL=ON \ | 52 | -DCMAKE_SKIP_RPATH:BOOL=ON \ |
53 | -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \ | ||
54 | -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \ | ||
52 | " | 55 | " |
53 | # INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX | 56 | # INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX |
54 | # specify it on cmd line will fix the SET bug in CMakeList.txt | 57 | # specify it on cmd line will fix the SET bug in CMakeList.txt |
@@ -62,7 +65,7 @@ EXTRA_OECMAKE = " \ | |||
62 | 65 | ||
63 | # -DALL_EXTENSIONS=ON will enable all | 66 | # -DALL_EXTENSIONS=ON will enable all |
64 | 67 | ||
65 | FD_KEY ?="${BPN}.key" | 68 | FD_KEY ?= "${BPN}.key" |
66 | FD_PEM ?= "${BPN}.pem" | 69 | FD_PEM ?= "${BPN}.pem" |
67 | FD_CA ?= "${BPN}.pem" | 70 | FD_CA ?= "${BPN}.pem" |
68 | FD_DH_PEM ?= "${BPN}-dh.pem" | 71 | FD_DH_PEM ?= "${BPN}-dh.pem" |
@@ -107,15 +110,13 @@ EOF | |||
107 | # create self cert | 110 | # create self cert |
108 | 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}' | 111 | 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}' |
109 | openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024 | 112 | openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024 |
110 | |||
111 | find ${B} \( -name "*.c" -o -name "*.h" \) -exec sed -i -e 's#${UNPACKDIR}##g' {} \; | ||
112 | } | 113 | } |
113 | 114 | ||
114 | do_install_ptest() { | 115 | do_install_ptest() { |
115 | mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/ | 116 | mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/ |
116 | rmdir ${D}${PTEST_PATH}-tests | 117 | rmdir ${D}${PTEST_PATH}-tests |
117 | install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/ | 118 | install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/ |
118 | sed -i -e 's#${UNPACKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake | 119 | sed -i -e 's#${WORKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake |
119 | sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake | 120 | sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake |
120 | } | 121 | } |
121 | 122 | ||
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 deleted file mode 100644 index 8c83d5c8eb..0000000000 --- a/meta-networking/recipes-protocols/frr/frr/0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 49aeccbec4bf620bb594999bbd4a9de669a3984c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 15 Mar 2024 14:34:06 -0700 | ||
4 | Subject: [PATCH] zebra: Mimic GNU basename() API for non-glibc library e.g. | ||
5 | musl musl only provides POSIX version of basename and it has also removed | ||
6 | providing it via string.h header [1] which now results in compile errors with | ||
7 | newer compilers e.g. clang-18 | ||
8 | |||
9 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561/] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | zebra/zebra_netns_notify.c | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c | ||
18 | index 1bb1292e34..d55df2f62d 100644 | ||
19 | --- a/zebra/zebra_netns_notify.c | ||
20 | +++ b/zebra/zebra_netns_notify.c | ||
21 | @@ -41,6 +41,10 @@ | ||
22 | #define ZEBRA_NS_POLLING_INTERVAL_MSEC 1000 | ||
23 | #define ZEBRA_NS_POLLING_MAX_RETRIES 200 | ||
24 | |||
25 | +#if !defined(__GLIBC__) | ||
26 | +#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) | ||
27 | +#endif | ||
28 | + | ||
29 | DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo"); | ||
30 | static struct event *zebra_netns_notify_current; | ||
31 | |||
32 | -- | ||
33 | 2.44.0 | ||
34 | |||
diff --git a/meta-networking/recipes-protocols/frr/frr_10.0.bb b/meta-networking/recipes-protocols/frr/frr_10.3.bb index afd2c95a0e..f0f3f34ab3 100644 --- a/meta-networking/recipes-protocols/frr/frr_10.0.bb +++ b/meta-networking/recipes-protocols/frr/frr_10.3.bb | |||
@@ -10,18 +10,16 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a | |||
10 | file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" | 10 | file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c" |
11 | 11 | ||
12 | 12 | ||
13 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.0 \ | 13 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.3 \ |
14 | file://frr.pam \ | 14 | file://frr.pam \ |
15 | file://0001-zebra-Mimic-GNU-basename-API-for-non-glibc-library-e.patch \ | ||
16 | " | 15 | " |
17 | 16 | ||
18 | SRCREV = "03a143cd49ed1b190cb38f48a31ef4d71fa01a02" | 17 | SRCREV = "85cf1ed576deed121751e16a64970f8a652a9e1e" |
19 | 18 | ||
20 | UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$" | 19 | UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$" |
21 | 20 | ||
22 | CVE_PRODUCT = "frrouting" | 21 | CVE_PRODUCT = "frrouting" |
23 | 22 | ||
24 | S = "${WORKDIR}/git" | ||
25 | 23 | ||
26 | inherit autotools-brokensep python3native pkgconfig useradd systemd | 24 | inherit autotools-brokensep python3native pkgconfig useradd systemd |
27 | 25 | ||
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch deleted file mode 100644 index 68a395d69e..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 1fefe289d0c907392382eb2fa2f1f0ecac02f85d Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Wed, 28 Jun 2017 17:30:00 -0500 | ||
4 | Subject: [PATCH] Create subroutine for cleaning recent interfaces | ||
5 | |||
6 | Moves functionality for cleaning the list of recent | ||
7 | interfaces into its own subroutine. | ||
8 | |||
9 | Upstream-Status: Submitted [dts@apple.com] | ||
10 | |||
11 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
12 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
13 | --- | ||
14 | mDNSPosix/mDNSPosix.c | 24 ++++++++++++++---------- | ||
15 | 1 file changed, 14 insertions(+), 10 deletions(-) | ||
16 | |||
17 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
18 | index 3b761d04e3c4..5aa220cf694e 100644 | ||
19 | --- a/mDNSPosix/mDNSPosix.c | ||
20 | +++ b/mDNSPosix/mDNSPosix.c | ||
21 | @@ -1322,6 +1322,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf | ||
22 | return err; | ||
23 | } | ||
24 | |||
25 | +// Clean up any interfaces that have been hanging around on the RecentInterfaces list for more than a minute | ||
26 | +mDNSlocal void CleanRecentInterfaces(void) | ||
27 | +{ | ||
28 | + PosixNetworkInterface **ri = &gRecentInterfaces; | ||
29 | + const mDNSs32 utc = mDNSPlatformUTC(); | ||
30 | + while (*ri) | ||
31 | + { | ||
32 | + PosixNetworkInterface *pi = *ri; | ||
33 | + if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next; | ||
34 | + else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_free(pi); } | ||
35 | + } | ||
36 | +} | ||
37 | + | ||
38 | // Creates a PosixNetworkInterface for the interface whose IP address is | ||
39 | // intfAddr and whose name is intfName and registers it with mDNS core. | ||
40 | mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, | ||
41 | @@ -1559,16 +1572,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) | ||
42 | |||
43 | // Clean up. | ||
44 | if (intfList != NULL) freeifaddrs(intfList); | ||
45 | - | ||
46 | - // Clean up any interfaces that have been hanging around on the RecentInterfaces list for more than a minute | ||
47 | - PosixNetworkInterface **ri = &gRecentInterfaces; | ||
48 | - const mDNSs32 utc = mDNSPlatformUTC(); | ||
49 | - while (*ri) | ||
50 | - { | ||
51 | - PosixNetworkInterface *pi = *ri; | ||
52 | - if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next; | ||
53 | - else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_free(pi); } | ||
54 | - } | ||
55 | + CleanRecentInterfaces(); | ||
56 | |||
57 | return err; | ||
58 | } | ||
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 deleted file mode 100644 index abf82b1e02..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 2db1f5bc941e4b4cd1721e361a47cfe288b07a76 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
3 | Date: Thu, 1 Feb 2024 14:07:03 +0000 | ||
4 | Subject: [PATCH] Fix SIGSEGV during DumpStateLog() | ||
5 | |||
6 | DumpStateLog() calls LogMsgWithLevelv() with category == NULL, avoid | ||
7 | crashing in this case. | ||
8 | |||
9 | Upstream-Status: Inactive-Upstream [Upstream does not take patches] | ||
10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
11 | --- | ||
12 | mDNSShared/mDNSDebug.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/mDNSShared/mDNSDebug.c b/mDNSShared/mDNSDebug.c | ||
16 | index 7a4ca19eff6d..d449dde320f6 100644 | ||
17 | --- a/mDNSShared/mDNSDebug.c | ||
18 | +++ b/mDNSShared/mDNSDebug.c | ||
19 | @@ -71,7 +71,7 @@ mDNSlocal void LogMsgWithLevelv(os_log_t category, os_log_type_t level, const ch | ||
20 | mDNSlocal void LogMsgWithLevelv(const char *category, mDNSLogLevel_t level, const char *format, va_list args) | ||
21 | { | ||
22 | // Do not print the logs if the log category is MDNS_LOG_CATEGORY_DISABLED. | ||
23 | - if (strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0) | ||
24 | + if (category && strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0) | ||
25 | { | ||
26 | return; | ||
27 | } | ||
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..af33d5444c --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From c84f185f29d0839b97177aecb0a78b9717947973 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nguyen Dat Tho <tho3.nguyen@lge.com> | ||
3 | Date: Wed, 9 Apr 2025 13:05:24 +0900 | ||
4 | Subject: [PATCH] Fix build with gcc-15 | ||
5 | |||
6 | To fix error: | ||
7 | In file included from ../mDNSCore/mDNS.c:76: | ||
8 | ../mDNSShared/CommonServices.h:856:13: error: 'bool' cannot be defined via 'typedef' | ||
9 | 856 | typedef int bool; | ||
10 | | ^~~~ | ||
11 | ../mDNSShared/CommonServices.h:856:13: note: 'bool' is a keyword with '-std=c23' onwards | ||
12 | ../mDNSShared/CommonServices.h:856:1: warning: useless type name in empty declaration | ||
13 | |||
14 | Upstream-Status: Pending (An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository.) | ||
15 | |||
16 | Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com> | ||
17 | --- | ||
18 | mDNSShared/CommonServices.h | 3 +++ | ||
19 | 1 file changed, 3 insertions(+) | ||
20 | |||
21 | diff --git a/mDNSShared/CommonServices.h b/mDNSShared/CommonServices.h | ||
22 | index 7efb077f3b04..f0f3a8b3157e 100644 | ||
23 | --- a/mDNSShared/CommonServices.h | ||
24 | +++ b/mDNSShared/CommonServices.h | ||
25 | @@ -192,6 +192,9 @@ extern "C" { | ||
26 | |||
27 | #include <stdint.h> | ||
28 | #include <arpa/inet.h> | ||
29 | +#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L | ||
30 | + #include <stdbool.h> | ||
31 | +#endif | ||
32 | |||
33 | #elif ( TARGET_OS_SOLARIS ) | ||
34 | |||
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 deleted file mode 100644 index 7ec5996013..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From c67102307f25c5f4d238c736e90519e56a76ae79 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Agner <stefan@agner.ch> | ||
3 | Date: Fri, 23 Jun 2023 10:10:00 +0200 | ||
4 | Subject: [PATCH] Handle interface without `ifa_addr` | ||
5 | |||
6 | It seems that certain interface types may have `ifa_addr` set to null. | ||
7 | Handle this case gracefully. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/apple-oss-distributions/mDNSResponder/pull/2/commits/11b410d4d683c90e693c40315997bb3e8ec90e9a] | ||
10 | |||
11 | Signed-off-by: Stefan Agner <stefan@agner.ch> | ||
12 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
13 | --- | ||
14 | mDNSPosix/mDNSPosix.c | 4 +++- | ||
15 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
18 | index 0c9dd2582660..c3ead26799e6 100644 | ||
19 | --- a/mDNSPosix/mDNSPosix.c | ||
20 | +++ b/mDNSPosix/mDNSPosix.c | ||
21 | @@ -1895,6 +1895,7 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
22 | continue; | ||
23 | |||
24 | if ((ifa_loop4 == NULL) && | ||
25 | + ((*ifi)->ifa_addr != NULL) && | ||
26 | ((*ifi)->ifa_addr->sa_family == AF_INET) && | ||
27 | ((*ifi)->ifa_flags & IFF_UP) && | ||
28 | ((*ifi)->ifa_flags & IFF_LOOPBACK)) | ||
29 | @@ -1903,7 +1904,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
30 | continue; | ||
31 | } | ||
32 | |||
33 | - if ( (((*ifi)->ifa_addr->sa_family == AF_INET) | ||
34 | + if ( ((*ifi)->ifa_addr != NULL) && | ||
35 | + (((*ifi)->ifa_addr->sa_family == AF_INET) | ||
36 | #if HAVE_IPV6 | ||
37 | || ((*ifi)->ifa_addr->sa_family == AF_INET6) | ||
38 | #endif | ||
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Use-secure_getenv-on-Linux.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Use-secure_getenv-on-Linux.patch new file mode 100644 index 0000000000..242aa7f7d8 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Use-secure_getenv-on-Linux.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 1bf3be6cd775635aed95689f97a13fa6a037c741 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
3 | Date: Tue, 27 May 2025 13:33:30 +0100 | ||
4 | Subject: [PATCH] Use secure_getenv on Linux | ||
5 | |||
6 | Upstream-Status: Inactive-Upstream [Upstream does not take patches] | ||
7 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
8 | --- | ||
9 | mDNSShared/dnssd_clientstub.c | 4 ++++ | ||
10 | 1 file changed, 4 insertions(+) | ||
11 | |||
12 | diff --git a/mDNSShared/dnssd_clientstub.c b/mDNSShared/dnssd_clientstub.c | ||
13 | index 6667276ee33a..e7b51813664e 100644 | ||
14 | --- a/mDNSShared/dnssd_clientstub.c | ||
15 | +++ b/mDNSShared/dnssd_clientstub.c | ||
16 | @@ -801,10 +801,14 @@ static DNSServiceErrorType ConnectToServer(DNSServiceRef *ref, DNSServiceFlags f | ||
17 | #endif | ||
18 | #ifndef USE_TCP_LOOPBACK | ||
19 | char* uds_serverpath = NULL; | ||
20 | +#ifdef TARGET_OS_LINUX | ||
21 | + uds_serverpath = secure_getenv(MDNS_UDS_SERVERPATH_ENVVAR); | ||
22 | +#else | ||
23 | if (!issetugid()) | ||
24 | { | ||
25 | uds_serverpath = getenv(MDNS_UDS_SERVERPATH_ENVVAR); | ||
26 | } | ||
27 | +#endif | ||
28 | if (uds_serverpath == NULL) | ||
29 | uds_serverpath = MDNS_UDS_SERVERPATH; | ||
30 | else if (strlen(uds_serverpath) >= MAX_CTLPATH) | ||
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 index 0dc36ae1d4..651879ea86 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From a5fe20fa00088683136a09a4da3c36d9b20fe1b9 Mon Sep 17 00:00:00 2001 | 1 | From cdbc28c668dd627906f833f9a8e32ac53b0b0139 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 4 Nov 2021 07:31:32 -0700 | 3 | Date: Thu, 4 Nov 2021 07:31:32 -0700 |
4 | Subject: [PATCH] dns-sd: Include missing headers | 4 | Subject: [PATCH] dns-sd: Include missing headers |
diff --git a/meta-networking/recipes-protocols/mdns/mdns/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 deleted file mode 100644 index 5ce7eb1015..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From d265ac9346d3dcbcf1187134318baafcfa75c054 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Wed, 28 Jun 2017 17:30:00 -0500 | ||
4 | Subject: [PATCH] Create subroutine for tearing down an interface | ||
5 | |||
6 | Creates a subroutine for tearing down an interface. | ||
7 | |||
8 | Upstream-Status: Submitted [dts@apple.com] | ||
9 | |||
10 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
12 | --- | ||
13 | mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------ | ||
14 | 1 file changed, 16 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
17 | index 5aa220cf694e..a6041b04a21e 100644 | ||
18 | --- a/mDNSPosix/mDNSPosix.c | ||
19 | +++ b/mDNSPosix/mDNSPosix.c | ||
20 | @@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf) | ||
21 | gRecentInterfaces = intf; | ||
22 | } | ||
23 | |||
24 | +mDNSlocal void TearDownInterface(mDNS *const m, PosixNetworkInterface *intf) | ||
25 | +{ | ||
26 | + mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation); | ||
27 | + if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName); | ||
28 | + FreePosixNetworkInterface(intf); | ||
29 | + | ||
30 | + num_registered_interfaces--; | ||
31 | + if (num_registered_interfaces == 0) { | ||
32 | + num_pkts_accepted = 0; | ||
33 | + num_pkts_rejected = 0; | ||
34 | + } | ||
35 | +} | ||
36 | + | ||
37 | // Grab the first interface, deregister it, free it, and repeat until done. | ||
38 | mDNSlocal void ClearInterfaceList(mDNS *const m) | ||
39 | { | ||
40 | @@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m) | ||
41 | while (m->HostInterfaces) | ||
42 | { | ||
43 | PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces); | ||
44 | - mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation); | ||
45 | - if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName); | ||
46 | - FreePosixNetworkInterface(intf); | ||
47 | + TearDownInterface(m, intf); | ||
48 | } | ||
49 | - num_registered_interfaces = 0; | ||
50 | - num_pkts_accepted = 0; | ||
51 | - num_pkts_rejected = 0; | ||
52 | + | ||
53 | + assert(num_registered_interfaces == 0); | ||
54 | } | ||
55 | |||
56 | 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 index 86b659f8a1..abe8178f63 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From dfa9e2c494d1a834f5bdfe4dc24e8329dd8720eb Mon Sep 17 00:00:00 2001 | 1 | From dcc1f39a0918cdebf53ac7c105b3d33df960ed14 Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Mon, 5 Dec 2022 15:14:12 +0000 | 3 | Date: Mon, 5 Dec 2022 15:14:12 +0000 |
4 | Subject: [PATCH] make: Set libdns_sd.so soname correctly | 4 | Subject: [PATCH] make: Set libdns_sd.so soname correctly |
@@ -10,7 +10,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
11 | 11 | ||
12 | diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile | 12 | diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile |
13 | index 041706523139..c877c8bb19e6 100755 | 13 | index e05ba10b4340..7c510317f1b6 100755 |
14 | --- a/mDNSPosix/Makefile | 14 | --- a/mDNSPosix/Makefile |
15 | +++ b/mDNSPosix/Makefile | 15 | +++ b/mDNSPosix/Makefile |
16 | @@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) | 16 | @@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) |
@@ -21,4 +21,4 @@ index 041706523139..c877c8bb19e6 100755 | |||
21 | + $(LD) $(SOOPTS) $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+ | 21 | + $(LD) $(SOOPTS) $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+ |
22 | $(STRIP) $@ | 22 | $(STRIP) $@ |
23 | 23 | ||
24 | Clients: setup libdns_sd ../Clients/build/dns-sd | 24 | Clients: setup ../Clients/build/dns-sd |
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch b/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch deleted file mode 100644 index 59871eb66a..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 5f58e5671cd6dbd4cb49bd30fb606d430b626361 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Wed, 28 Jun 2017 17:30:00 -0500 | ||
4 | Subject: [PATCH] Track interface socket family | ||
5 | |||
6 | Tracks the socket family associated with the interface. | ||
7 | |||
8 | Upstream-Status: Submitted [dts@apple.com] | ||
9 | |||
10 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
12 | --- | ||
13 | mDNSPosix/mDNSPosix.c | 1 + | ||
14 | mDNSPosix/mDNSPosix.h | 2 ++ | ||
15 | 2 files changed, 3 insertions(+) | ||
16 | |||
17 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
18 | index a6041b04a21e..15bbecee04a4 100644 | ||
19 | --- a/mDNSPosix/mDNSPosix.c | ||
20 | +++ b/mDNSPosix/mDNSPosix.c | ||
21 | @@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct | ||
22 | // Set up the extra fields in PosixNetworkInterface. | ||
23 | assert(intf->intfName != NULL); // intf->intfName already set up above | ||
24 | intf->index = intfIndex; | ||
25 | + intf->sa_family = intfAddr->sa_family; | ||
26 | intf->multicastSocket4 = -1; | ||
27 | #if HAVE_IPV6 | ||
28 | intf->multicastSocket6 = -1; | ||
29 | diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h | ||
30 | index 9675591b0434..dd7864cd0d5e 100644 | ||
31 | --- a/mDNSPosix/mDNSPosix.h | ||
32 | +++ b/mDNSPosix/mDNSPosix.h | ||
33 | @@ -19,6 +19,7 @@ | ||
34 | #define __mDNSPlatformPosix_h | ||
35 | |||
36 | #include <signal.h> | ||
37 | +#include <sys/socket.h> | ||
38 | #include <sys/time.h> | ||
39 | |||
40 | #ifdef __cplusplus | ||
41 | @@ -40,6 +41,7 @@ struct PosixNetworkInterface | ||
42 | char * intfName; | ||
43 | PosixNetworkInterface * aliasIntf; | ||
44 | int index; | ||
45 | + sa_family_t sa_family; | ||
46 | int multicastSocket4; | ||
47 | #if HAVE_IPV6 | ||
48 | int multicastSocket6; | ||
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 deleted file mode 100644 index bf2b85c2ab..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 935033dd40772240c9bcc6b9610d78eb3753bfaf Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Tue, 1 Aug 2017 17:06:01 -0500 | ||
4 | Subject: [PATCH] Indicate loopback interface to mDNS core | ||
5 | |||
6 | Tells the mDNS core if an interface is a loopback interface, | ||
7 | similar to AddInterfaceToList() in the MacOS implementation. | ||
8 | |||
9 | Upstream-Status: Submitted [dts@apple.com] | ||
10 | |||
11 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
12 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
13 | --- | ||
14 | mDNSPosix/mDNSPosix.c | 7 ++++--- | ||
15 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
18 | index 15bbecee04a4..f4c31a07d587 100644 | ||
19 | --- a/mDNSPosix/mDNSPosix.c | ||
20 | +++ b/mDNSPosix/mDNSPosix.c | ||
21 | @@ -1348,7 +1348,7 @@ mDNSlocal void CleanRecentInterfaces(void) | ||
22 | // Creates a PosixNetworkInterface for the interface whose IP address is | ||
23 | // intfAddr and whose name is intfName and registers it with mDNS core. | ||
24 | mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, | ||
25 | - const mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex) | ||
26 | + const mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex, int intfFlags) | ||
27 | { | ||
28 | int err = 0; | ||
29 | PosixNetworkInterface *intf; | ||
30 | @@ -1411,6 +1411,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct | ||
31 | |||
32 | intf->coreIntf.Advertise = m->AdvertiseLocalAddresses; | ||
33 | intf->coreIntf.McastTxRx = mDNStrue; | ||
34 | + intf->coreIntf.Loopback = ((intfFlags & IFF_LOOPBACK) != 0) ? mDNStrue : mDNSfalse; | ||
35 | |||
36 | // Set up the extra fields in PosixNetworkInterface. | ||
37 | assert(intf->intfName != NULL); // intf->intfName already set up above | ||
38 | @@ -1561,7 +1562,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) | ||
39 | } | ||
40 | #endif | ||
41 | if (SetupOneInterface(m, i->ifa_addr, i->ifa_netmask, | ||
42 | - hwaddr, hwaddr_len, i->ifa_name, ifIndex) == 0) | ||
43 | + hwaddr, hwaddr_len, i->ifa_name, ifIndex, i->ifa_flags) == 0) | ||
44 | { | ||
45 | if (i->ifa_addr->sa_family == AF_INET) | ||
46 | foundav4 = mDNStrue; | ||
47 | @@ -1578,7 +1579,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) | ||
48 | // if ((m->HostInterfaces == NULL) && (firstLoopback != NULL)) | ||
49 | if (!foundav4 && firstLoopback) | ||
50 | (void) SetupOneInterface(m, firstLoopback->ifa_addr, firstLoopback->ifa_netmask, | ||
51 | - NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex); | ||
52 | + NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex, firstLoopback->ifa_flags); | ||
53 | } | ||
54 | |||
55 | // 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 index 8d1915de8c..af27a89f4c 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From f871ac42165c29f763785aa0199dfc76f1731f4d Mon Sep 17 00:00:00 2001 | 1 | From f7ee12c1f8e85b9d2fe4023b6539c8051dc710c3 Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Mon, 5 Dec 2022 15:14:26 +0000 | 3 | Date: Mon, 5 Dec 2022 15:14:26 +0000 |
4 | Subject: [PATCH] make: Separate TLS targets from libraries | 4 | Subject: [PATCH] make: Separate TLS targets from libraries |
@@ -13,7 +13,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
13 | 1 file changed, 8 insertions(+), 6 deletions(-) | 13 | 1 file changed, 8 insertions(+), 6 deletions(-) |
14 | 14 | ||
15 | diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile | 15 | diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile |
16 | index c877c8bb19e6..3a5897c4dbee 100755 | 16 | index 7c510317f1b6..8dd5984020ee 100755 |
17 | --- a/mDNSPosix/Makefile | 17 | --- a/mDNSPosix/Makefile |
18 | +++ b/mDNSPosix/Makefile | 18 | +++ b/mDNSPosix/Makefile |
19 | @@ -112,9 +112,11 @@ ifeq ($(findstring linux,$(os)),linux) | 19 | @@ -112,9 +112,11 @@ ifeq ($(findstring linux,$(os)),linux) |
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch b/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch deleted file mode 100644 index ebdfe8c783..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | From 47118760466b74939cec9f5233062236a12bb3f4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Thu, 13 Jul 2017 09:00:00 -0500 | ||
4 | Subject: [PATCH] Use list for changed interfaces | ||
5 | |||
6 | Uses a linked list to store the index of changed network interfaces | ||
7 | instead of a bitfield. This allows for network interfaces with an | ||
8 | index greater than 31 (an index of 36 was seen on Android). | ||
9 | |||
10 | Upstream-Status: Submitted [dts@apple.com] | ||
11 | |||
12 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
13 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
14 | --- | ||
15 | mDNSPosix/mDNSPosix.c | 58 ++++++++++++++++++++++++++++++++----------- | ||
16 | 1 file changed, 43 insertions(+), 15 deletions(-) | ||
17 | |||
18 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
19 | index f4c31a07d587..6b2fe76d4b66 100644 | ||
20 | --- a/mDNSPosix/mDNSPosix.c | ||
21 | +++ b/mDNSPosix/mDNSPosix.c | ||
22 | @@ -74,6 +74,14 @@ struct IfChangeRec | ||
23 | }; | ||
24 | typedef struct IfChangeRec IfChangeRec; | ||
25 | |||
26 | +// Used to build a list of network interface indices | ||
27 | +struct NetworkInterfaceIndex | ||
28 | +{ | ||
29 | + int if_index; | ||
30 | + struct NetworkInterfaceIndex *Next; | ||
31 | +}; | ||
32 | +typedef struct NetworkInterfaceIndex NetworkInterfaceIndex; | ||
33 | + | ||
34 | // Note that static data is initialized to zero in (modern) C. | ||
35 | static PosixEventSource *gEventSources; // linked list of PosixEventSource's | ||
36 | static sigset_t gEventSignalSet; // Signals which event loop listens for | ||
37 | @@ -1621,6 +1629,23 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) | ||
38 | return err; | ||
39 | } | ||
40 | |||
41 | +mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index) | ||
42 | +{ | ||
43 | + NetworkInterfaceIndex *item; | ||
44 | + | ||
45 | + for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next) | ||
46 | + { | ||
47 | + if (if_index == item->if_index) return; | ||
48 | + } | ||
49 | + | ||
50 | + item = mdns_malloc(sizeof *item); | ||
51 | + if (item == NULL) return; | ||
52 | + | ||
53 | + item->if_index = if_index; | ||
54 | + item->Next = NULL; | ||
55 | + AddToTail(list, item); | ||
56 | +} | ||
57 | + | ||
58 | #if MDNS_DEBUGMSGS | ||
59 | mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) | ||
60 | { | ||
61 | @@ -1648,14 +1673,13 @@ mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) | ||
62 | } | ||
63 | #endif | ||
64 | |||
65 | -mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) | ||
66 | +mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *changedInterfaces) | ||
67 | // Read through the messages on sd and if any indicate that any interface records should | ||
68 | // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0. | ||
69 | { | ||
70 | ssize_t readCount; | ||
71 | char buff[4096]; | ||
72 | struct nlmsghdr *pNLMsg = (struct nlmsghdr*) buff; | ||
73 | - mDNSu32 result = 0; | ||
74 | |||
75 | // The structure here is more complex than it really ought to be because, | ||
76 | // unfortunately, there's no good way to size a buffer in advance large | ||
77 | @@ -1691,9 +1715,9 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) | ||
78 | |||
79 | // Process the NetLink message | ||
80 | if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) | ||
81 | - result |= 1 << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index; | ||
82 | + AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index); | ||
83 | else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR) | ||
84 | - result |= 1 << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index; | ||
85 | + AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index); | ||
86 | |||
87 | // Advance pNLMsg to the next message in the buffer | ||
88 | if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) | ||
89 | @@ -1704,8 +1728,6 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) | ||
90 | else | ||
91 | break; // all done! | ||
92 | } | ||
93 | - | ||
94 | - return result; | ||
95 | } | ||
96 | |||
97 | #else // USES_NETLINK | ||
98 | @@ -1737,14 +1759,13 @@ mDNSlocal void PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg) | ||
99 | } | ||
100 | #endif | ||
101 | |||
102 | -mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) | ||
103 | +mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *changedInterfaces) | ||
104 | // Read through the messages on sd and if any indicate that any interface records should | ||
105 | // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0. | ||
106 | { | ||
107 | ssize_t readCount; | ||
108 | char buff[4096]; | ||
109 | struct ifa_msghdr *pRSMsg = (struct ifa_msghdr*) buff; | ||
110 | - mDNSu32 result = 0; | ||
111 | |||
112 | readCount = read(sd, buff, sizeof buff); | ||
113 | if (readCount < (ssize_t) sizeof(struct ifa_msghdr)) | ||
114 | @@ -1759,12 +1780,10 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) | ||
115 | pRSMsg->ifam_type == RTM_IFINFO) | ||
116 | { | ||
117 | if (pRSMsg->ifam_type == RTM_IFINFO) | ||
118 | - result |= 1 << ((struct if_msghdr*) pRSMsg)->ifm_index; | ||
119 | + AddInterfaceIndexToList(changedInterfaces, ((struct if_msghdr*) pRSMsg)->ifm_index); | ||
120 | else | ||
121 | - result |= 1 << pRSMsg->ifam_index; | ||
122 | + AddInterfaceIndexToList(changedInterfaces, pRSMsg->ifam_index); | ||
123 | } | ||
124 | - | ||
125 | - return result; | ||
126 | } | ||
127 | |||
128 | #endif // USES_NETLINK | ||
129 | @@ -1774,7 +1793,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
130 | { | ||
131 | IfChangeRec *pChgRec = (IfChangeRec*) context; | ||
132 | fd_set readFDs; | ||
133 | - mDNSu32 changedInterfaces = 0; | ||
134 | + GenLinkedList changedInterfaces; | ||
135 | + NetworkInterfaceIndex *changedInterface; | ||
136 | struct timeval zeroTimeout = { 0, 0 }; | ||
137 | |||
138 | (void)fd; // Unused | ||
139 | @@ -1782,17 +1802,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
140 | FD_ZERO(&readFDs); | ||
141 | FD_SET(pChgRec->NotifySD, &readFDs); | ||
142 | |||
143 | + InitLinkedList(&changedInterfaces, offsetof(NetworkInterfaceIndex, Next)); | ||
144 | + | ||
145 | do | ||
146 | { | ||
147 | - changedInterfaces |= ProcessRoutingNotification(pChgRec->NotifySD); | ||
148 | + ProcessRoutingNotification(pChgRec->NotifySD, &changedInterfaces); | ||
149 | } | ||
150 | while (0 < select(pChgRec->NotifySD + 1, &readFDs, (fd_set*) NULL, (fd_set*) NULL, &zeroTimeout)); | ||
151 | |||
152 | // Currently we rebuild the entire interface list whenever any interface change is | ||
153 | // detected. If this ever proves to be a performance issue in a multi-homed | ||
154 | // configuration, more care should be paid to changedInterfaces. | ||
155 | - if (changedInterfaces) | ||
156 | + if (changedInterfaces.Head != NULL) | ||
157 | mDNSPlatformPosixRefreshInterfaceList(pChgRec->mDNS); | ||
158 | + | ||
159 | + while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL) | ||
160 | + { | ||
161 | + RemoveFromList(&changedInterfaces, changedInterface); | ||
162 | + mdns_free(changedInterface); | ||
163 | + } | ||
164 | } | ||
165 | |||
166 | // Register with either a Routing Socket or RtNetLink to listen for interface changes. | ||
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 index 3c46d599c1..7d8f04c902 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0b3953dfdeef8dc9b8a23820659feee9e15b5bad Mon Sep 17 00:00:00 2001 | 1 | From e79f75487e32f87677519ec40c021b1623395bde Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Mon, 5 Dec 2022 22:49:49 +0000 | 3 | Date: Mon, 5 Dec 2022 22:49:49 +0000 |
4 | Subject: [PATCH] mDNSCore: Fix broken debug parameter | 4 | Subject: [PATCH] mDNSCore: Fix broken debug parameter |
@@ -10,10 +10,10 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
11 | 11 | ||
12 | diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c | 12 | diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c |
13 | index d4519a7f62aa..3090edb2ac5d 100644 | 13 | index ad9eaa37a82a..fc51e1ad9bd4 100644 |
14 | --- a/mDNSCore/mDNS.c | 14 | --- a/mDNSCore/mDNS.c |
15 | +++ b/mDNSCore/mDNS.c | 15 | +++ b/mDNSCore/mDNS.c |
16 | @@ -10253,7 +10253,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastAnswers(mDNS *const m, const DNSMessage * | 16 | @@ -11046,7 +11046,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastAnswers(mDNS *const m, const DNSMessage * |
17 | #else | 17 | #else |
18 | const DNSServRef dnsserv = qptr->qDNSServer; | 18 | const DNSServRef dnsserv = qptr->qDNSServer; |
19 | #endif | 19 | #endif |
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 deleted file mode 100644 index be63471e64..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch +++ /dev/null | |||
@@ -1,249 +0,0 @@ | |||
1 | From 105514b75df6d7abd052ec64d8106f5c07cc4782 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Mon, 24 Jul 2017 09:38:55 -0500 | ||
4 | Subject: [PATCH] Handle noisy netlink sockets | ||
5 | |||
6 | The POSIX implementation currently clears all network interfaces | ||
7 | when netlink indicates that there has been a change. This causes | ||
8 | the following problems: | ||
9 | |||
10 | 1) Applications are informed that all of the services they are | ||
11 | tracking have been removed. | ||
12 | 2) Increases network load because the client must re-query for | ||
13 | all records it is interested in. | ||
14 | |||
15 | This changes netlink notification handling by: | ||
16 | |||
17 | 1) Always comparing with the latest interface list returned | ||
18 | by the OS. | ||
19 | 2) Confirming that the interface has been changed in a way | ||
20 | that we care about. | ||
21 | |||
22 | Upstream-Status: Submitted [dts@apple.com] | ||
23 | |||
24 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
25 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
26 | --- | ||
27 | mDNSPosix/mDNSPosix.c | 182 +++++++++++++++++++++++++++++++++++++++--- | ||
28 | 1 file changed, 172 insertions(+), 10 deletions(-) | ||
29 | |||
30 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
31 | index 6b2fe76d4b66..ecd5741d038d 100644 | ||
32 | --- a/mDNSPosix/mDNSPosix.c | ||
33 | +++ b/mDNSPosix/mDNSPosix.c | ||
34 | @@ -1788,14 +1788,43 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
35 | |||
36 | #endif // USES_NETLINK | ||
37 | |||
38 | +// Test whether the given PosixNetworkInterface matches the given struct ifaddrs | ||
39 | +mDNSlocal mDNSBool InterfacesMatch(PosixNetworkInterface *intf, struct ifaddrs *ifi) | ||
40 | +{ | ||
41 | + mDNSBool match = mDNSfalse; | ||
42 | + mDNSAddr ip, mask; | ||
43 | + unsigned int if_index; | ||
44 | + | ||
45 | + if_index = if_nametoindex(ifi->ifa_name); | ||
46 | + if (if_index == 0) | ||
47 | + return mDNSfalse; | ||
48 | + | ||
49 | + if((intf->index == if_index) && | ||
50 | + (intf->sa_family == ifi->ifa_addr->sa_family) && | ||
51 | + (strcmp(intf->coreIntf.ifname, ifi->ifa_name) == 0)) | ||
52 | + { | ||
53 | + SockAddrTomDNSAddr(ifi->ifa_addr, &ip, NULL); | ||
54 | + SockAddrTomDNSAddr(ifi->ifa_netmask, &mask, NULL); | ||
55 | + | ||
56 | + match = mDNSSameAddress(&intf->coreIntf.ip, &ip) && | ||
57 | + mDNSSameAddress(&intf->coreIntf.mask, &mask); | ||
58 | + } | ||
59 | + | ||
60 | + return match; | ||
61 | +} | ||
62 | + | ||
63 | // Called when data appears on interface change notification socket | ||
64 | mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
65 | { | ||
66 | IfChangeRec *pChgRec = (IfChangeRec*) context; | ||
67 | + mDNS *m = pChgRec->mDNS; | ||
68 | fd_set readFDs; | ||
69 | GenLinkedList changedInterfaces; | ||
70 | NetworkInterfaceIndex *changedInterface; | ||
71 | struct timeval zeroTimeout = { 0, 0 }; | ||
72 | + struct ifaddrs *ifa_list, **ifi, *ifa_loop4 = NULL; | ||
73 | + PosixNetworkInterface *intf, *intfNext; | ||
74 | + mDNSBool found, foundav4; | ||
75 | |||
76 | (void)fd; // Unused | ||
77 | |||
78 | @@ -1810,12 +1839,149 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) | ||
79 | } | ||
80 | while (0 < select(pChgRec->NotifySD + 1, &readFDs, (fd_set*) NULL, (fd_set*) NULL, &zeroTimeout)); | ||
81 | |||
82 | - // Currently we rebuild the entire interface list whenever any interface change is | ||
83 | - // detected. If this ever proves to be a performance issue in a multi-homed | ||
84 | - // configuration, more care should be paid to changedInterfaces. | ||
85 | - if (changedInterfaces.Head != NULL) | ||
86 | - mDNSPlatformPosixRefreshInterfaceList(pChgRec->mDNS); | ||
87 | + CleanRecentInterfaces(); | ||
88 | + | ||
89 | + if (changedInterfaces.Head == NULL) goto cleanup; | ||
90 | + | ||
91 | + if (getifaddrs(&ifa_list) < 0) goto cleanup; | ||
92 | + | ||
93 | + for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = intfNext) | ||
94 | + { | ||
95 | + intfNext = (PosixNetworkInterface*)(intf->coreIntf.next); | ||
96 | + | ||
97 | + // Loopback interface(s) are handled later | ||
98 | + if (intf->coreIntf.Loopback) continue; | ||
99 | + | ||
100 | + found = mDNSfalse; | ||
101 | + for (ifi = &ifa_list; *ifi != NULL; ifi = &(*ifi)->ifa_next) | ||
102 | + { | ||
103 | + if (InterfacesMatch(intf, *ifi)) | ||
104 | + { | ||
105 | + found = mDNStrue; | ||
106 | + break; | ||
107 | + } | ||
108 | + } | ||
109 | + | ||
110 | + // Removes changed and old interfaces from m->HostInterfaces | ||
111 | + if (!found) TearDownInterface(m, intf); | ||
112 | + } | ||
113 | + | ||
114 | + // Add new and changed interfaces in ifa_list | ||
115 | + // Save off loopback interface in case it is needed later | ||
116 | + for (ifi = &ifa_list; *ifi != NULL; ifi = &(*ifi)->ifa_next) | ||
117 | + { | ||
118 | + found = mDNSfalse; | ||
119 | + for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = intfNext) | ||
120 | + { | ||
121 | + intfNext = (PosixNetworkInterface*)(intf->coreIntf.next); | ||
122 | + | ||
123 | + // Loopback interface(s) are handled later | ||
124 | + if (intf->coreIntf.Loopback) continue; | ||
125 | + | ||
126 | + if (InterfacesMatch(intf, *ifi)) | ||
127 | + { | ||
128 | + found = mDNStrue; | ||
129 | + break; | ||
130 | + } | ||
131 | + | ||
132 | + // Removes changed and old interfaces from m->HostInterfaces | ||
133 | + } | ||
134 | + if (found) | ||
135 | + continue; | ||
136 | + | ||
137 | + if ((ifa_loop4 == NULL) && | ||
138 | + ((*ifi)->ifa_addr->sa_family == AF_INET) && | ||
139 | + ((*ifi)->ifa_flags & IFF_UP) && | ||
140 | + ((*ifi)->ifa_flags & IFF_LOOPBACK)) | ||
141 | + { | ||
142 | + ifa_loop4 = *ifi; | ||
143 | + continue; | ||
144 | + } | ||
145 | + | ||
146 | + if ( (((*ifi)->ifa_addr->sa_family == AF_INET) | ||
147 | +#if HAVE_IPV6 | ||
148 | + || ((*ifi)->ifa_addr->sa_family == AF_INET6) | ||
149 | +#endif | ||
150 | + ) && ((*ifi)->ifa_flags & IFF_UP) | ||
151 | + && !((*ifi)->ifa_flags & IFF_POINTOPOINT) | ||
152 | + && !((*ifi)->ifa_flags & IFF_LOOPBACK)) | ||
153 | + { | ||
154 | + struct ifaddrs *i = *ifi; | ||
155 | + | ||
156 | +#define ethernet_addr_len 6 | ||
157 | + uint8_t hwaddr[ethernet_addr_len]; | ||
158 | + int hwaddr_len = 0; | ||
159 | + | ||
160 | +#if defined(TARGET_OS_LINUX) && TARGET_OS_LINUX | ||
161 | + struct ifreq ifr; | ||
162 | + int sockfd = socket(AF_INET6, SOCK_DGRAM, 0); | ||
163 | + if (sockfd >= 0) | ||
164 | + { | ||
165 | + /* Add hardware address */ | ||
166 | + memcpy(ifr.ifr_name, i->ifa_name, IFNAMSIZ); | ||
167 | + if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) != -1) | ||
168 | + { | ||
169 | + if (ifr.ifr_hwaddr.sa_family == ARPHRD_ETHER) | ||
170 | + { | ||
171 | + memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ethernet_addr_len); | ||
172 | + hwaddr_len = ethernet_addr_len; | ||
173 | + } | ||
174 | + } | ||
175 | + close(sockfd); | ||
176 | + } | ||
177 | + else | ||
178 | + { | ||
179 | + memset(hwaddr, 0, sizeof(hwaddr)); | ||
180 | + } | ||
181 | +#endif // TARGET_OS_LINUX | ||
182 | + SetupOneInterface(m, i->ifa_addr, i->ifa_netmask, | ||
183 | + hwaddr, hwaddr_len, i->ifa_name, if_nametoindex(i->ifa_name), i->ifa_flags); | ||
184 | + } | ||
185 | + } | ||
186 | + | ||
187 | + // Determine if there is at least one non-loopback IPv4 interface. This is to work around issues | ||
188 | + // with multicast loopback on IPv6 interfaces -- see corresponding logic in SetupInterfaceList(). | ||
189 | + foundav4 = mDNSfalse; | ||
190 | + for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = (PosixNetworkInterface*)(intf->coreIntf.next)) | ||
191 | + { | ||
192 | + if (intf->sa_family == AF_INET && !intf->coreIntf.Loopback) | ||
193 | + { | ||
194 | + foundav4 = mDNStrue; | ||
195 | + break; | ||
196 | + } | ||
197 | + } | ||
198 | + | ||
199 | + if (foundav4) | ||
200 | + { | ||
201 | + for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = intfNext) | ||
202 | + { | ||
203 | + intfNext = (PosixNetworkInterface*)(intf->coreIntf.next); | ||
204 | + if (intf->coreIntf.Loopback) TearDownInterface(m, intf); | ||
205 | + } | ||
206 | + } | ||
207 | + else | ||
208 | + { | ||
209 | + found = mDNSfalse; | ||
210 | + | ||
211 | + for (intf = (PosixNetworkInterface*)(m->HostInterfaces); intf != NULL; intf = (PosixNetworkInterface*)(intf->coreIntf.next)) | ||
212 | + { | ||
213 | + if (intf->coreIntf.Loopback) | ||
214 | + { | ||
215 | + found = mDNStrue; | ||
216 | + break; | ||
217 | + } | ||
218 | + } | ||
219 | + | ||
220 | + if (!found && (ifa_loop4 != NULL)) | ||
221 | + { | ||
222 | + SetupOneInterface(m, ifa_loop4->ifa_addr, ifa_loop4->ifa_netmask, | ||
223 | + NULL, 0, ifa_loop4->ifa_name, if_nametoindex(ifa_loop4->ifa_name), ifa_loop4->ifa_flags); | ||
224 | + } | ||
225 | + } | ||
226 | + | ||
227 | + if (ifa_list != NULL) freeifaddrs(ifa_list); | ||
228 | |||
229 | +cleanup: | ||
230 | while ((changedInterface = (NetworkInterfaceIndex*)changedInterfaces.Head) != NULL) | ||
231 | { | ||
232 | RemoveFromList(&changedInterfaces, changedInterface); | ||
233 | @@ -1947,15 +2113,11 @@ mDNSexport void mDNSPlatformClose(mDNS *const m) | ||
234 | #endif | ||
235 | } | ||
236 | |||
237 | -// This is used internally by InterfaceChangeCallback. | ||
238 | -// It's also exported so that the Standalone Responder (mDNSResponderPosix) | ||
239 | +// This is exported so that the Standalone Responder (mDNSResponderPosix) | ||
240 | // can call it in response to a SIGHUP (mainly for debugging purposes). | ||
241 | mDNSexport mStatus mDNSPlatformPosixRefreshInterfaceList(mDNS *const m) | ||
242 | { | ||
243 | int err; | ||
244 | - // This is a pretty heavyweight way to process interface changes -- | ||
245 | - // destroying the entire interface list and then making fresh one from scratch. | ||
246 | - // We should make it like the OS X version, which leaves unchanged interfaces alone. | ||
247 | ClearInterfaceList(m); | ||
248 | err = SetupInterfaceList(m); | ||
249 | 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 index ffa3fa3827..5f8f428302 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 626ccae85aab5b0902a8e3c05d9f0e3fbbe4fcd2 Mon Sep 17 00:00:00 2001 | 1 | From a1c982808ebfb71ba7e0f16040013b7127a6e2ab Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Tue, 6 Dec 2022 13:28:31 +0000 | 3 | Date: Tue, 6 Dec 2022 13:28:31 +0000 |
4 | Subject: [PATCH] make: Add top-level Makefile | 4 | Subject: [PATCH] make: Add top-level Makefile |
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch b/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch deleted file mode 100644 index 276f879df2..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 3715b3f4a0ba2d2cb05e5ba617b523c759c88d4b Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Wed, 9 Aug 2017 09:16:58 -0500 | ||
4 | Subject: [PATCH] Mark deleted interfaces as being changed | ||
5 | |||
6 | Netlink notification handling ignores messages for deleted links, | ||
7 | RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu- | ||
8 | mentation (http://www.infradead.org/~tgr/libnl/doc/route.html) | ||
9 | RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot. | ||
10 | There was likely a mixup in the original implementation, so this | ||
11 | change replaces handling for RTM_GETLINK with RTM_DELLINK. | ||
12 | |||
13 | Testing and Verification Instructions: | ||
14 | 1. Use ip-link to add and remove a VLAN interface and verify | ||
15 | that mDNSResponder handles the deleted link. | ||
16 | |||
17 | Upstream-Status: Submitted [dts@apple.com] | ||
18 | |||
19 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
20 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
21 | --- | ||
22 | mDNSPosix/mDNSPosix.c | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
26 | index ecd5741d038d..776531dbc8e8 100644 | ||
27 | --- a/mDNSPosix/mDNSPosix.c | ||
28 | +++ b/mDNSPosix/mDNSPosix.c | ||
29 | @@ -1714,7 +1714,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
30 | #endif | ||
31 | |||
32 | // Process the NetLink message | ||
33 | - if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) | ||
34 | + if (pNLMsg->nlmsg_type == RTM_DELLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) | ||
35 | AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index); | ||
36 | else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR) | ||
37 | AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index); | ||
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch b/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch deleted file mode 100644 index f3c7f62d3f..0000000000 --- a/meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 4e6621eee389e1cbb558fe268e02d5153a1d8f2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Thu, 10 Aug 2017 08:27:32 -0500 | ||
4 | Subject: [PATCH] Handle errors from socket calls | ||
5 | |||
6 | Adds handling for socket() or read() returning a | ||
7 | negative value (indicating an error has occurred). | ||
8 | |||
9 | Upstream-Status: Submitted [dts@apple.com] | ||
10 | |||
11 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
12 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
13 | --- | ||
14 | mDNSPosix/mDNSPosix.c | 12 +++++++++--- | ||
15 | 1 file changed, 9 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
18 | index 776531dbc8e8..0c9dd2582660 100644 | ||
19 | --- a/mDNSPosix/mDNSPosix.c | ||
20 | +++ b/mDNSPosix/mDNSPosix.c | ||
21 | @@ -1677,7 +1677,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
22 | // Read through the messages on sd and if any indicate that any interface records should | ||
23 | // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0. | ||
24 | { | ||
25 | - ssize_t readCount; | ||
26 | + ssize_t readVal, readCount; | ||
27 | char buff[4096]; | ||
28 | struct nlmsghdr *pNLMsg = (struct nlmsghdr*) buff; | ||
29 | |||
30 | @@ -1686,7 +1686,10 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
31 | // enough to hold all pending data and so avoid message fragmentation. | ||
32 | // (Note that FIONREAD is not supported on AF_NETLINK.) | ||
33 | |||
34 | - readCount = read(sd, buff, sizeof buff); | ||
35 | + readVal = read(sd, buff, sizeof buff); | ||
36 | + if (readVal < 0) return; | ||
37 | + readCount = readVal; | ||
38 | + | ||
39 | while (1) | ||
40 | { | ||
41 | // Make sure we've got an entire nlmsghdr in the buffer, and payload, too. | ||
42 | @@ -1702,7 +1705,9 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
43 | pNLMsg = (struct nlmsghdr*) buff; | ||
44 | |||
45 | // read more data | ||
46 | - readCount += read(sd, buff + readCount, sizeof buff - readCount); | ||
47 | + readVal = read(sd, buff + readCount, sizeof buff - readCount); | ||
48 | + if (readVal < 0) return; | ||
49 | + readCount += readVal; | ||
50 | continue; // spin around and revalidate with new readCount | ||
51 | } | ||
52 | else | ||
53 | @@ -2017,6 +2022,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void) | ||
54 | int err; | ||
55 | int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); | ||
56 | struct sockaddr_in s5353; | ||
57 | + if (s < 0) return mDNSfalse; | ||
58 | s5353.sin_family = AF_INET; | ||
59 | s5353.sin_port = MulticastDNSPort.NotAnInteger; | ||
60 | s5353.sin_addr.s_addr = 0; | ||
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 index 818017037c..e8785b1aa7 100644 --- a/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch +++ b/meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 05cb409ce213f35798c02faf2032d4846a84b48e Mon Sep 17 00:00:00 2001 | 1 | From 8e32fb0876a073c23ab73047a2e0f6d011b3660c Mon Sep 17 00:00:00 2001 |
2 | From: Beniamin Sandu <beniaminsandu@gmail.com> | 2 | From: Beniamin Sandu <beniaminsandu@gmail.com> |
3 | Date: Thu, 15 Jun 2023 17:02:58 +0000 | 3 | Date: Thu, 15 Jun 2023 17:02:58 +0000 |
4 | Subject: [PATCH] remove unneeded headers | 4 | Subject: [PATCH] remove unneeded headers |
@@ -7,8 +7,7 @@ From a quick look, these seem to not be needed and having them | |||
7 | breaks the build with mbedtls 3.x. Without them it builds fine | 7 | breaks the build with mbedtls 3.x. Without them it builds fine |
8 | on both 2.x and 3.x versions. | 8 | on both 2.x and 3.x versions. |
9 | 9 | ||
10 | Upstream-Status: Pending | 10 | Upstream-Status: Inactive-Upstream [Upstream does not take patches] |
11 | |||
12 | Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> | 11 | Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> |
13 | --- | 12 | --- |
14 | mDNSPosix/mbedtls.c | 2 -- | 13 | mDNSPosix/mbedtls.c | 2 -- |
diff --git a/meta-networking/recipes-protocols/mdns/mdns_2200.120.24.bb b/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb index 9aeda92a4b..f7c8f17800 100644 --- a/meta-networking/recipes-protocols/mdns/mdns_2200.120.24.bb +++ b/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb | |||
@@ -6,26 +6,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" | |||
6 | 6 | ||
7 | DEPENDS:append:libc-musl = " musl-nscd" | 7 | DEPENDS:append:libc-musl = " musl-nscd" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=rel/mDNSResponder-2200 \ | 9 | SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=${BRANCH};tag=mDNSResponder-${PV} \ |
10 | file://0001-dns-sd-Include-missing-headers.patch \ | 10 | file://0001-dns-sd-Include-missing-headers.patch \ |
11 | file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ | 11 | file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ |
12 | file://0004-make-Separate-TLS-targets-from-libraries.patch \ | 12 | file://0004-make-Separate-TLS-targets-from-libraries.patch \ |
13 | file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ | 13 | file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ |
14 | file://0006-make-Add-top-level-Makefile.patch \ | 14 | file://0006-make-Add-top-level-Makefile.patch \ |
15 | file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch \ | ||
16 | file://0002-Create-subroutine-for-tearing-down-an-interface.patch \ | ||
17 | file://0003-Track-interface-socket-family.patch \ | ||
18 | file://0004-Indicate-loopback-interface-to-mDNS-core.patch \ | ||
19 | file://0005-Use-list-for-changed-interfaces.patch \ | ||
20 | file://0006-Handle-noisy-netlink-sockets.patch \ | ||
21 | file://0007-Mark-deleted-interfaces-as-being-changed.patch \ | ||
22 | file://0008-Handle-errors-from-socket-calls.patch \ | ||
23 | file://0009-remove-unneeded-headers.patch \ | 15 | file://0009-remove-unneeded-headers.patch \ |
16 | file://0001-Fix-build-with-gcc-15.patch \ | ||
17 | file://0001-Use-secure_getenv-on-Linux.patch \ | ||
24 | file://mdns.service \ | 18 | file://mdns.service \ |
25 | file://0001-Handle-interface-without-ifa_addr.patch \ | ||
26 | file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \ | ||
27 | " | 19 | " |
28 | SRCREV = "51a7148a21362285f8013648c4bfa91247ff598a" | 20 | BRANCH = "rel/mDNSResponder-2600" |
21 | SRCREV = "3a0deda2995d98243dae379bcec10e57928c15e8" | ||
29 | 22 | ||
30 | # We install a stub Makefile in the top directory so that the various checks | 23 | # We install a stub Makefile in the top directory so that the various checks |
31 | # in base.bbclass pass their tests for a Makefile, this ensures (that amongst | 24 | # in base.bbclass pass their tests for a Makefile, this ensures (that amongst |
@@ -34,7 +27,6 @@ SRCREV = "51a7148a21362285f8013648c4bfa91247ff598a" | |||
34 | # | 27 | # |
35 | # We can't use the approach of setting ${S} to mDNSPosix as we need | 28 | # We can't use the approach of setting ${S} to mDNSPosix as we need |
36 | # DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. | 29 | # DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. |
37 | S = "${WORKDIR}/git" | ||
38 | 30 | ||
39 | inherit github-releases manpages systemd update-rc.d | 31 | inherit github-releases manpages systemd update-rc.d |
40 | 32 | ||
@@ -109,7 +101,7 @@ do_install () { | |||
109 | install mdnsd.sh ${D}${INIT_D_DIR}/mdns | 101 | install mdnsd.sh ${D}${INIT_D_DIR}/mdns |
110 | } | 102 | } |
111 | 103 | ||
112 | pkg_postinst:${PN} () { | 104 | pkg_postinst:${PN}-libnss-mdns () { |
113 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | 105 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then |
114 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | 106 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ |
115 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ | 107 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ |
@@ -117,7 +109,7 @@ pkg_postinst:${PN} () { | |||
117 | fi | 109 | fi |
118 | } | 110 | } |
119 | 111 | ||
120 | pkg_prerm:${PN} () { | 112 | pkg_prerm:${PN}-libnss-mdns () { |
121 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | 113 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then |
122 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | 114 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ |
123 | -e '/^hosts:/s/\s*mdns//' \ | 115 | -e '/^hosts:/s/\s*mdns//' \ |
@@ -128,7 +120,12 @@ pkg_prerm:${PN} () { | |||
128 | SYSTEMD_SERVICE:${PN} = "mdns.service" | 120 | SYSTEMD_SERVICE:${PN} = "mdns.service" |
129 | INITSCRIPT_NAME = "mdns" | 121 | INITSCRIPT_NAME = "mdns" |
130 | 122 | ||
123 | PACKAGE_BEFORE_PN = "${PN}-libnss-mdns" | ||
124 | |||
125 | RRECOMMENDS:${PN}:append:libc-glibc = " ${PN}-libnss-mdns" | ||
126 | |||
131 | FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" | 127 | FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" |
132 | FILES:${PN} += "${libdir}/libnss_mdns-0.2.so" | 128 | FILES:${PN}-libnss-mdns = "${sysconfdir}/nss_mdns.conf ${libdir}/libnss_mdns*.so*" |
129 | RPROVIDES:${PN}-libnss-mdns = "libnss-mdns" | ||
133 | 130 | ||
134 | RPROVIDES:${PN} += "libdns_sd.so" | 131 | RPROVIDES:${PN} += "libdns-sd" |
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch new file mode 100644 index 0000000000..3f978d5f80 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch | |||
@@ -0,0 +1,123 @@ | |||
1 | From f5ae6baf0018abda9dedc368fe6d52c0d7a8ab8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Philippe Troin <phil+github-commits@fifi.org> | ||
3 | Date: Sat, 3 Feb 2024 10:30:30 -0800 | ||
4 | Subject: [PATCH] Add Linux 6.7 compatibility parsing /proc/net/snmp | ||
5 | |||
6 | Linux 6.7 adds a new OutTransmits field to Ip in /proc/net/snmp. | ||
7 | This breaks the hard-coded assumptions about the Ip line length. | ||
8 | Add compatibility to parse Linux 6.7 Ip header while keep support | ||
9 | for previous versions. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | .../ip-mib/data_access/systemstats_linux.c | 46 +++++++++++++++---- | ||
15 | 1 file changed, 37 insertions(+), 9 deletions(-) | ||
16 | |||
17 | diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c | ||
18 | index 49e0a34d5c..f04e828a94 100644 | ||
19 | --- a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c | ||
20 | +++ b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c | ||
21 | @@ -36,7 +36,7 @@ netsnmp_access_systemstats_arch_init(void) | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | - /proc/net/snmp | ||
26 | + /proc/net/snmp - Linux 6.6 and lower | ||
27 | |||
28 | Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates | ||
29 | Ip: 2 64 7083534 0 0 0 0 0 6860233 6548963 0 0 1 286623 63322 1 259920 0 0 | ||
30 | @@ -49,6 +49,26 @@ netsnmp_access_systemstats_arch_init(void) | ||
31 | |||
32 | Udp: InDatagrams NoPorts InErrors OutDatagrams | ||
33 | Udp: 1491094 122 0 1466178 | ||
34 | +* | ||
35 | + /proc/net/snmp - Linux 6.7 and higher | ||
36 | + | ||
37 | + Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates OutTransmits | ||
38 | + Ip: 1 64 50859058 496 0 37470604 0 0 20472980 7515791 1756 0 0 7264 3632 0 3548 0 7096 44961424 | ||
39 | + | ||
40 | + Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutRateLimitGlobal OutRateLimitHost OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps | ||
41 | + Icmp: 114447 2655 0 17589 0 0 0 0 66905 29953 0 0 0 0 143956 0 0 572 16610 484 0 0 0 59957 66905 0 0 0 0 | ||
42 | + | ||
43 | + IcmpMsg: InType0 InType3 InType8 OutType0 OutType3 OutType8 OutType11 | ||
44 | + IcmpMsg: 29953 17589 66905 66905 16610 59957 484 | ||
45 | + | ||
46 | + Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors | ||
47 | + Tcp: 1 200 120000 -1 17744 13525 307 3783 6 18093137 9277788 3499 8 7442 0 | ||
48 | + | ||
49 | + Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors | ||
50 | + Udp: 2257832 1422 0 2252835 0 0 0 84 0 | ||
51 | + | ||
52 | + UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors | ||
53 | + UdpLite: 0 0 0 0 0 0 0 0 0 | ||
54 | */ | ||
55 | |||
56 | |||
57 | @@ -101,10 +121,10 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) | ||
58 | FILE *devin; | ||
59 | char line[1024]; | ||
60 | netsnmp_systemstats_entry *entry = NULL; | ||
61 | - int scan_count; | ||
62 | + int scan_count, expected_scan_count; | ||
63 | char *stats, *start = line; | ||
64 | int len; | ||
65 | - unsigned long long scan_vals[19]; | ||
66 | + unsigned long long scan_vals[20]; | ||
67 | |||
68 | DEBUGMSGTL(("access:systemstats:container:arch", "load v4 (flags %x)\n", | ||
69 | load_flags)); | ||
70 | @@ -126,10 +146,17 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) | ||
71 | */ | ||
72 | NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin)); | ||
73 | len = strlen(line); | ||
74 | - if (224 != len) { | ||
75 | + switch (len) { | ||
76 | + case 224: | ||
77 | + expected_scan_count = 19; | ||
78 | + break; | ||
79 | + case 237: | ||
80 | + expected_scan_count = 20; | ||
81 | + break; | ||
82 | + default: | ||
83 | fclose(devin); | ||
84 | snmp_log(LOG_ERR, "systemstats_linux: unexpected header length in /proc/net/snmp." | ||
85 | - " %d != 224\n", len); | ||
86 | + " %d not in { 224, 237 } \n", len); | ||
87 | return -4; | ||
88 | } | ||
89 | |||
90 | @@ -178,20 +205,20 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) | ||
91 | memset(scan_vals, 0x0, sizeof(scan_vals)); | ||
92 | scan_count = sscanf(stats, | ||
93 | "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu" | ||
94 | - "%llu %llu %llu %llu %llu %llu %llu %llu %llu", | ||
95 | + "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu", | ||
96 | &scan_vals[0],&scan_vals[1],&scan_vals[2], | ||
97 | &scan_vals[3],&scan_vals[4],&scan_vals[5], | ||
98 | &scan_vals[6],&scan_vals[7],&scan_vals[8], | ||
99 | &scan_vals[9],&scan_vals[10],&scan_vals[11], | ||
100 | &scan_vals[12],&scan_vals[13],&scan_vals[14], | ||
101 | &scan_vals[15],&scan_vals[16],&scan_vals[17], | ||
102 | - &scan_vals[18]); | ||
103 | + &scan_vals[18],&scan_vals[19]); | ||
104 | DEBUGMSGTL(("access:systemstats", " read %d values\n", scan_count)); | ||
105 | |||
106 | - if(scan_count != 19) { | ||
107 | + if(scan_count != expected_scan_count) { | ||
108 | snmp_log(LOG_ERR, | ||
109 | "error scanning systemstats data (expected %d, got %d)\n", | ||
110 | - 19, scan_count); | ||
111 | + expected_scan_count, scan_count); | ||
112 | netsnmp_access_systemstats_entry_free(entry); | ||
113 | return -4; | ||
114 | } | ||
115 | @@ -223,6 +250,7 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) | ||
116 | entry->stats.HCOutFragFails.high = scan_vals[17] >> 32; | ||
117 | entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff; | ||
118 | entry->stats.HCOutFragCreates.high = scan_vals[18] >> 32; | ||
119 | + /* entry->stats. = scan_vals[19]; / * OutTransmits */ | ||
120 | |||
121 | entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1; | ||
122 | entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1; | ||
123 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/netsnmp-swinst-crash.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/netsnmp-swinst-crash.patch new file mode 100644 index 0000000000..109a0600a6 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/netsnmp-swinst-crash.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Fix crash in swinst | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | --- a/agent/mibgroup/host/data_access/swinst_pkginfo.c | ||
6 | +++ b/agent/mibgroup/host/data_access/swinst_pkginfo.c | ||
7 | @@ -210,7 +210,9 @@ netsnmp_swinst_arch_load( netsnmp_contai | ||
8 | memcpy( entry->swDate, cp, date_len ); | ||
9 | entry->swDate_len = date_len; | ||
10 | } | ||
11 | - closedir( d ); | ||
12 | + if (d != NULL) | ||
13 | + closedir( d ); | ||
14 | + | ||
15 | #ifdef HAVE_LIBPKG | ||
16 | } | ||
17 | #endif | ||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb index 75b3d9e8c6..6a62304a1c 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb | |||
@@ -28,12 +28,16 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ | |||
28 | file://0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch \ | 28 | file://0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch \ |
29 | file://0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch \ | 29 | file://0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch \ |
30 | file://0001-Android-Fix-the-build.patch \ | 30 | file://0001-Android-Fix-the-build.patch \ |
31 | file://netsnmp-swinst-crash.patch \ | ||
32 | file://net-snmp-5.9.4-kernel-6.7.patch \ | ||
31 | " | 33 | " |
32 | SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" | 34 | SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" |
33 | 35 | ||
34 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" | 36 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" |
35 | UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" | 37 | UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" |
36 | 38 | ||
39 | CVE_PRODUCT = "net-snmp:net-snmp" | ||
40 | |||
37 | inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header | 41 | inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header |
38 | 42 | ||
39 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" | 43 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" |
@@ -53,6 +57,8 @@ PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable | |||
53 | PACKAGECONFIG[smux] = "" | 57 | PACKAGECONFIG[smux] = "" |
54 | PACKAGECONFIG[systemd] = "--with-systemd, --without-systemd" | 58 | PACKAGECONFIG[systemd] = "--with-systemd, --without-systemd" |
55 | 59 | ||
60 | SYSCONTACT_DISTRO ?= "no-contact-set@example.com" | ||
61 | |||
56 | EXTRA_OECONF = " \ | 62 | EXTRA_OECONF = " \ |
57 | --enable-shared \ | 63 | --enable-shared \ |
58 | --disable-manuals \ | 64 | --disable-manuals \ |
@@ -61,6 +67,7 @@ EXTRA_OECONF = " \ | |||
61 | --with-persistent-directory=${localstatedir}/lib/net-snmp \ | 67 | --with-persistent-directory=${localstatedir}/lib/net-snmp \ |
62 | --with-endianness=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ | 68 | --with-endianness=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ |
63 | --with-mib-modules='${MIB_MODULES}' \ | 69 | --with-mib-modules='${MIB_MODULES}' \ |
70 | --with-sys-contact='${SYSCONTACT_DISTRO}' \ | ||
64 | " | 71 | " |
65 | 72 | ||
66 | MIB_MODULES = "" | 73 | MIB_MODULES = "" |
@@ -73,6 +80,7 @@ CACHED_CONFIGUREVARS = " \ | |||
73 | lt_cv_shlibpath_overrides_runpath=yes \ | 80 | lt_cv_shlibpath_overrides_runpath=yes \ |
74 | ac_cv_path_UNAMEPROG=${base_bindir}/uname \ | 81 | ac_cv_path_UNAMEPROG=${base_bindir}/uname \ |
75 | ac_cv_path_PSPROG=${base_bindir}/ps \ | 82 | ac_cv_path_PSPROG=${base_bindir}/ps \ |
83 | ac_cv_ps_flags="-e" \ | ||
76 | ac_cv_file__etc_printcap=no \ | 84 | ac_cv_file__etc_printcap=no \ |
77 | NETSNMP_CONFIGURE_OPTIONS= \ | 85 | NETSNMP_CONFIGURE_OPTIONS= \ |
78 | " | 86 | " |
@@ -265,12 +273,12 @@ RDEPENDS:${PN}-server-snmpd += "net-snmp-mibs" | |||
265 | RDEPENDS:${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd" | 273 | RDEPENDS:${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd" |
266 | RDEPENDS:${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" | 274 | RDEPENDS:${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" |
267 | RDEPENDS:${PN}-client += "net-snmp-mibs net-snmp-libs" | 275 | RDEPENDS:${PN}-client += "net-snmp-mibs net-snmp-libs" |
268 | RDEPENDS:${PN}-libs += "libpci \ | 276 | RDEPENDS:${PN}-libs += "${PN}-lib-netsnmp \ |
269 | ${PN}-lib-netsnmp \ | ||
270 | ${PN}-lib-agent \ | 277 | ${PN}-lib-agent \ |
271 | ${PN}-lib-helpers \ | 278 | ${PN}-lib-helpers \ |
272 | ${PN}-lib-mibs \ | 279 | ${PN}-lib-mibs \ |
273 | " | 280 | " |
281 | RDEPENDS:${PN}-libs:append:class-target = " libpci" | ||
274 | RDEPENDS:${PN}-ptest += "perl \ | 282 | RDEPENDS:${PN}-ptest += "perl \ |
275 | perl-module-test \ | 283 | perl-module-test \ |
276 | perl-module-file-basename \ | 284 | perl-module-file-basename \ |
diff --git a/meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb b/meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb index 19a50aee3a..b7f5112197 100644 --- a/meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb +++ b/meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb | |||
@@ -8,35 +8,40 @@ LIC_FILES_CHKSUM = "\ | |||
8 | " | 8 | " |
9 | 9 | ||
10 | SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" | 10 | SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" |
11 | SRCREV_opcua = "086b1557d6f49e8a82c999054a7da77d080cd54e" | 11 | SRCREV_opcua = "3eed1a6d5c5b207c531b2d35ed88aa0a4a4541e5" |
12 | SRCREV_mdnsd = "3151afe5899dba5125dffa9f4cf3ae1fe2edc0f0" | 12 | SRCREV_mdnsd = "488d24fb9d427aec77df180268f0291eeee7fb8b" |
13 | SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" | 13 | SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" |
14 | SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" | 14 | SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" |
15 | 15 | ||
16 | SRC_URI = " \ | 16 | SRC_URI = " \ |
17 | git://github.com/open62541/open62541.git;name=opcua;branch=1.3;protocol=https \ | 17 | git://github.com/open62541/open62541.git;name=opcua;branch=1.3;protocol=https \ |
18 | git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=git/deps/mdnsd \ | 18 | git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mdnsd \ |
19 | git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=v1.04;destsuffix=git/deps/ua-nodeset \ | 19 | git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=v1.04;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/ua-nodeset \ |
20 | git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=git/deps/mqtt-c \ | 20 | git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mqtt-c \ |
21 | file://0001-fix-build-do-not-install-git-files.patch \ | 21 | file://0001-fix-build-do-not-install-git-files.patch \ |
22 | " | 22 | " |
23 | 23 | ||
24 | S = "${WORKDIR}/git" | ||
25 | 24 | ||
26 | inherit cmake python3native | 25 | inherit cmake python3native |
27 | 26 | ||
28 | EXTRA_OECMAKE += "\ | 27 | EXTRA_OECMAKE += "\ |
29 | -DBUILD_SHARED_LIBS=ON \ | 28 | -DBUILD_SHARED_LIBS=ON \ |
30 | -DUA_NAMESPACE_ZERO=FULL \ | ||
31 | -DUA_LOGLEVEL=600 \ | 29 | -DUA_LOGLEVEL=600 \ |
32 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | 30 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
33 | " | 31 | " |
34 | 32 | ||
35 | PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events" | 33 | FILES:${PN} = "${libdir}/lib*${SOLIBS}" |
36 | PACKAGECONFIG[amalgamation] = "-DUA_ENABLE_AMALGAMATION=ON, -DUA_ENABLE_AMALGAMATION=OFF" | 34 | |
35 | # The tools package contains scripts to generate certificates and OPC UA schema definitions + nodeset descriptions. | ||
36 | PACKAGES += "${PN}-tools" | ||
37 | FILES:${PN}-tools = "${datadir}/${BPN}/tools/*" | ||
38 | |||
39 | PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events namespace-full" | ||
37 | PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" | 40 | PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" |
38 | PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" | 41 | PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" |
39 | PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" | 42 | PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" |
43 | PACKAGECONFIG[namespace-full] = "-DUA_NAMESPACE_ZERO=FULL, , , , , namespace-reduced" | ||
44 | PACKAGECONFIG[namespace-reduced] = "-DUA_NAMESPACE_ZERO=REDUCED, , , , , namespace-full" | ||
40 | PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" | 45 | PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" |
41 | PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" | 46 | PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" |
42 | PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" | 47 | PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" |
@@ -51,3 +56,6 @@ do_configure:prepend:toolchain-clang:riscv32() { | |||
51 | sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt | 56 | sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt |
52 | } | 57 | } |
53 | 58 | ||
59 | do_install:append(){ | ||
60 | sed -i 's|${RECIPE_SYSROOT}|\$\{CMAKE_SYSROOT\}|g' ${D}${libdir}/cmake/open62541/open62541Targets.cmake | ||
61 | } | ||
diff --git a/meta-networking/recipes-protocols/openflow/openflow_git.bb b/meta-networking/recipes-protocols/openflow/openflow_git.bb index aad044a043..1588245f8a 100644 --- a/meta-networking/recipes-protocols/openflow/openflow_git.bb +++ b/meta-networking/recipes-protocols/openflow/openflow_git.bb | |||
@@ -37,7 +37,6 @@ EXTRA_OECONF += " \ | |||
37 | " | 37 | " |
38 | DEPENDS:append:libc-musl = " libexecinfo" | 38 | DEPENDS:append:libc-musl = " libexecinfo" |
39 | 39 | ||
40 | S = "${WORKDIR}/git" | ||
41 | 40 | ||
42 | inherit autotools-brokensep pkgconfig | 41 | inherit autotools-brokensep pkgconfig |
43 | 42 | ||
@@ -67,3 +66,8 @@ do_install:append() { | |||
67 | } | 66 | } |
68 | 67 | ||
69 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" | 68 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |
69 | |||
70 | # http://errors.yoctoproject.org/Errors/Details/766898/ | ||
71 | # lib/flow.c:213:48: error: initialization of 'const struct arp_eth_header *' from incompatible pointer type 'struct arp_header *' [-Wincompatible-pointer-types] | ||
72 | # lib/backtrace.c:126:32: error: passing argument 1 of 'backtrace' from incompatible pointer type [-Wincompatible-pointer-types] | ||
73 | CFLAGS += "-Wno-error=incompatible-pointer-types" | ||
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest index 01c9c7b447..a40b6c4228 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest | |||
@@ -30,13 +30,11 @@ else | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | #read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST | 32 | #read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST |
33 | echo "Please input the network interface you use to test(such as eth0, em1 etc):" | 33 | ETH_TEST=`ip route get 8.8.8.8 | awk -- '{print $5}'` |
34 | read ETH_TEST > /dev/null | ||
35 | |||
36 | if [ x"$ETH_TEST" = x ]; then | 34 | if [ x"$ETH_TEST" = x ]; then |
37 | exit_cus "The network interface cannot be null" 1 | 35 | exit_cus "The network interface cannot be null" 1 |
38 | fi | 36 | fi |
39 | ifconfig | grep $ETH_TEST > /dev/null || exit_cus "The network interface you provide is invalid" 1 | 37 | ip a | grep $ETH_TEST > /dev/null || exit_cus "The network interface you provide is invalid" 1 |
40 | 38 | ||
41 | # check openl2tp related kernel config | 39 | # check openl2tp related kernel config |
42 | zcat /proc/config.gz | grep CONFIG_L2TP=y > /dev/null || exit_cus "Failed to check CONFIG_L2TP=y, skip the tests." 1 | 40 | zcat /proc/config.gz | grep CONFIG_L2TP=y > /dev/null || exit_cus "Failed to check CONFIG_L2TP=y, skip the tests." 1 |
@@ -63,8 +61,7 @@ if [ x"$ETH_TEST" = x ]; then | |||
63 | fi | 61 | fi |
64 | 62 | ||
65 | sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl | 63 | sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl |
66 | test_ip="`ifconfig $ETH_TEST | grep 'inet ' | sed 's/^.*inet addr://g' | \ | 64 | test_ip="`ip addr show $ETH_TEST | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d '/' -f1`" |
67 | sed 's/ *Mask.*$//g'|sed 's/ *Bcast.*$//g'`" | ||
68 | sed -i 's/192.168.0.1/'"$test_ip"'/g' ${OPENL2TP_DIR}/ptest/tunnel.test | 65 | sed -i 's/192.168.0.1/'"$test_ip"'/g' ${OPENL2TP_DIR}/ptest/tunnel.test |
69 | 66 | ||
70 | # load module l2tp_ppp | 67 | # load module l2tp_ppp |
@@ -73,7 +70,7 @@ lsmod | grep l2tp_ppp > /dev/null || exit_cus "FAIL: Load module l2tp_ppp" 2 | |||
73 | 70 | ||
74 | # start openl2tpd | 71 | # start openl2tpd |
75 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null | 72 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null |
76 | ppp_path=`rpm -ql openl2tp | grep ppp_null.so` | 73 | ppp_path=`find / -name ppp_null.so` |
77 | echo "test it here" | 74 | echo "test it here" |
78 | /usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} & > /dev/null | 75 | /usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} & > /dev/null |
79 | 76 | ||
@@ -95,3 +92,4 @@ else | |||
95 | fi | 92 | fi |
96 | 93 | ||
97 | restore_file | 94 | restore_file |
95 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null | ||
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index f64c7340d1..4e5b45891d 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | |||
@@ -41,14 +41,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \ | |||
41 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" | 41 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" |
42 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" | 42 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" |
43 | 43 | ||
44 | inherit autotools-brokensep pkgconfig systemd ptest | 44 | inherit pkgconfig systemd ptest |
45 | 45 | ||
46 | SYSTEMD_SERVICE:${PN} = "openl2tpd.service" | 46 | SYSTEMD_SERVICE:${PN} = "openl2tpd.service" |
47 | SYSTEMD_AUTO_ENABLE = "disable" | 47 | SYSTEMD_AUTO_ENABLE = "disable" |
48 | 48 | ||
49 | DEPENDS += "libtirpc" | 49 | DEPENDS += "libtirpc" |
50 | CPPFLAGS += "-I${STAGING_INCDIR}/tirpc" | 50 | CPPFLAGS += "-I${STAGING_INCDIR}/tirpc" |
51 | CFLAGS += "-I${STAGING_INCDIR}/tirpc" | 51 | CFLAGS += "-I${STAGING_INCDIR}/tirpc -std=gnu17" |
52 | LDFLAGS += "-ltirpc" | 52 | LDFLAGS += "-ltirpc" |
53 | 53 | ||
54 | PARALLEL_MAKE = "" | 54 | PARALLEL_MAKE = "" |
@@ -67,7 +67,9 @@ do_compile:prepend() { | |||
67 | ${S}/Makefile | 67 | ${S}/Makefile |
68 | } | 68 | } |
69 | 69 | ||
70 | do_install:append () { | 70 | do_install () { |
71 | oe_runmake 'DESTDIR=${D}' install | ||
72 | |||
71 | install -d ${D}${sysconfdir}/init.d | 73 | install -d ${D}${sysconfdir}/init.d |
72 | install -d ${D}${sysconfdir}/default | 74 | install -d ${D}${sysconfdir}/default |
73 | install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd | 75 | install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd |
@@ -94,3 +96,4 @@ do_install_ptest () { | |||
94 | } | 96 | } |
95 | 97 | ||
96 | RDEPENDS:${PN} = "ppp ppp-l2tp bash" | 98 | RDEPENDS:${PN} = "ppp ppp-l2tp bash" |
99 | RDEPENDS:${PN}-ptest += "rpcbind kernel-module-l2tp-ppp procps-ps tcl" | ||
diff --git a/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb index 010cd5af84..ad72b5cdde 100644 --- a/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb +++ b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb | |||
@@ -5,7 +5,6 @@ HOMEPAGE = "http://open-lldp.org/start" | |||
5 | LICENSE = "GPL-2.0-only" | 5 | LICENSE = "GPL-2.0-only" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162" |
7 | 7 | ||
8 | S = "${WORKDIR}/git" | ||
9 | 8 | ||
10 | inherit pkgconfig autotools | 9 | inherit pkgconfig autotools |
11 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} | 10 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', 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 cabe18ef8a..a19b313cc3 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 | |||
@@ -18,7 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/sourceforge/pptpclient/pptp-${PV}.tar.gz \ | |||
18 | SRC_URI[md5sum] = "8d25341352fdae5ad5b36b9f18254908" | 18 | SRC_URI[md5sum] = "8d25341352fdae5ad5b36b9f18254908" |
19 | SRC_URI[sha256sum] = "82492db8e487ce73b182ee7f444251d20c44f5c26d6e96c553ec7093aefb5af4" | 19 | SRC_URI[sha256sum] = "82492db8e487ce73b182ee7f444251d20c44f5c26d6e96c553ec7093aefb5af4" |
20 | 20 | ||
21 | S = "${WORKDIR}/pptp-${PV}" | 21 | S = "${UNPACKDIR}/pptp-${PV}" |
22 | 22 | ||
23 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | 23 | EXTRA_OEMAKE = "-e MAKEFLAGS=" |
24 | 24 | ||
diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb index c8e1767114..42e9c4260f 100644 --- a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb | |||
@@ -5,7 +5,7 @@ LICENSE = "GPL-2.0-only" | |||
5 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581" | 5 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581" |
6 | 6 | ||
7 | 7 | ||
8 | SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/rp-pppoe-${PV}.tar.gz \ | 8 | SRC_URI = "https://downloads.uls.co.za/rp-pppoe/rp-pppoe-${PV}.tar.gz \ |
9 | file://top-autoconf.patch \ | 9 | file://top-autoconf.patch \ |
10 | file://configure_in_cross.patch \ | 10 | file://configure_in_cross.patch \ |
11 | file://update-config.patch \ | 11 | file://update-config.patch \ |
diff --git a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb index 8099fa5c6e..2cbb025049 100644 --- a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb +++ b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb | |||
@@ -21,7 +21,7 @@ inherit autotools-brokensep | |||
21 | LIBS:append:libc-musl = " -lssp_nonshared" | 21 | LIBS:append:libc-musl = " -lssp_nonshared" |
22 | LIBS:append:libc-glibc = " -lc_nonshared" | 22 | LIBS:append:libc-glibc = " -lc_nonshared" |
23 | 23 | ||
24 | S = "${WORKDIR}/tsocks-1.8" | 24 | S = "${UNPACKDIR}/tsocks-1.8" |
25 | 25 | ||
26 | FILES:${PN} = "${libdir}/* ${bindir}/tsocks" | 26 | FILES:${PN} = "${libdir}/* ${bindir}/tsocks" |
27 | FILES:${PN}-dev = "" | 27 | FILES:${PN}-dev = "" |
diff --git a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb index 4c18c6aff9..8f21620584 100644 --- a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb +++ b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb | |||
@@ -6,7 +6,6 @@ SRCREV = "848eca82f92273af9a79687a90343a2ebcf3481d" | |||
6 | SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \ | 6 | SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \ |
7 | " | 7 | " |
8 | 8 | ||
9 | S = "${WORKDIR}/git" | ||
10 | 9 | ||
11 | UPSTREAM_CHECK_COMMITS = "1" | 10 | UPSTREAM_CHECK_COMMITS = "1" |
12 | 11 | ||
@@ -25,3 +24,4 @@ PACKAGECONFIG[inet6] = "--enable-inet6,--disable-inet6," | |||
25 | EXTRA_OECONF += "--disable-debug" | 24 | EXTRA_OECONF += "--disable-debug" |
26 | 25 | ||
27 | CVE_VERSION = "0.9.5.0" | 26 | CVE_VERSION = "0.9.5.0" |
27 | CVE_STATUS[CVE-2019-20503] = "cpe-incorrect: The current version (0.9.5.0) is not affected by the CVE which affects versions at least earlier than 0.9.4.0" | ||
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 deleted file mode 100644 index 09dab9a8b0..0000000000 --- a/meta-networking/recipes-protocols/vsomeip/vsomeip/0003-Do-not-build-external-gtest.patch +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | From b1bf398015bc090020459954e5cd1ec3b51b8ac3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 11 Jul 2023 16:53:46 +0800 | ||
4 | Subject: [PATCH] Do not build external gtest | ||
5 | |||
6 | We don't need to build external gtest since we already depend on | ||
7 | googletest. | ||
8 | |||
9 | Upstream-Status: Inappropriate [embedded specific] | ||
10 | |||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | ||
13 | CMakeLists.txt | 11 ---- | ||
14 | test/CMakeLists.txt | 22 +------ | ||
15 | test/network_tests/CMakeLists.txt | 99 ------------------------------- | ||
16 | 3 files changed, 3 insertions(+), 129 deletions(-) | ||
17 | |||
18 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
19 | index d791c12e..f1bcba27 100644 | ||
20 | --- a/CMakeLists.txt | ||
21 | +++ b/CMakeLists.txt | ||
22 | @@ -18,17 +18,6 @@ set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP | ||
23 | set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentation/doxygen.in | ||
24 | set (CMAKE_VERBOSE_MAKEFILE off) | ||
25 | |||
26 | -if (NOT GTEST_ROOT) | ||
27 | - if (DEFINED ENV{GTEST_ROOT}) | ||
28 | - set(GTEST_ROOT $ENV{GTEST_ROOT}) | ||
29 | - else() | ||
30 | - include(FetchContent) | ||
31 | - FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0) | ||
32 | - FetchContent_Populate(googletest) | ||
33 | - set(GTEST_ROOT ${googletest_SOURCE_DIR}) | ||
34 | - endif() | ||
35 | -endif() | ||
36 | - | ||
37 | ################################################################################################### | ||
38 | # see http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file | ||
39 | ################################################################################################### | ||
40 | diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt | ||
41 | index f66ac5d3..6f09bf40 100644 | ||
42 | --- a/test/CMakeLists.txt | ||
43 | +++ b/test/CMakeLists.txt | ||
44 | @@ -17,27 +17,11 @@ find_package(benchmark) | ||
45 | # remove export symbols from the cxx flags | ||
46 | string(REPLACE "${EXPORTSYMBOLS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
47 | |||
48 | -# check for set environment variable | ||
49 | -if(${GTEST_ROOT} STREQUAL "n/a") | ||
50 | - message(STATUS "GTEST_ROOT is not defined. For building the tests the variable | ||
51 | - GTEST_ROOT has to be defined. Tests can not be built.") | ||
52 | - # early exit | ||
53 | - return() # test can not be build -> make commands build_tests and check are not available | ||
54 | -else() | ||
55 | - message(STATUS "GTEST_ROOT is set. gtest root path set to ${GTEST_ROOT}") | ||
56 | +find_package(GTest) | ||
57 | +if (NOT GTest_FOUND) | ||
58 | + message(WARNING "GTest is not found. Tests can not be built.") | ||
59 | endif() | ||
60 | |||
61 | -# build google test as static library (always) -> therefore deactivate BUILD_SHARED_LIBS in case it is active | ||
62 | -set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0) | ||
63 | -if ("${BUILD_SHARED_LIBS}" STREQUAL "ON") | ||
64 | - set(BUILD_SHARED_LIBS OFF) | ||
65 | - set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 1) | ||
66 | -endif() | ||
67 | -add_subdirectory(${GTEST_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/gtest EXCLUDE_FROM_ALL) | ||
68 | -if ("${BUILD_SHARED_LIBS_AUTOMATIC_OFF}" STREQUAL "1") | ||
69 | - set(BUILD_SHARED_LIBS ON) | ||
70 | - set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0) | ||
71 | -endif() | ||
72 | |||
73 | ############################################################################## | ||
74 | # build tests | ||
75 | diff --git a/test/network_tests/CMakeLists.txt b/test/network_tests/CMakeLists.txt | ||
76 | index 883cc5cf..9a2a4f5e 100644 | ||
77 | --- a/test/network_tests/CMakeLists.txt | ||
78 | +++ b/test/network_tests/CMakeLists.txt | ||
79 | @@ -4116,105 +4116,6 @@ if(NOT ${TESTS_BAT}) | ||
80 | |||
81 | endif() | ||
82 | |||
83 | -############################################################################## | ||
84 | -# Add for every test a dependency to gtest | ||
85 | -############################################################################## | ||
86 | - | ||
87 | -if(NOT ${TESTS_BAT}) | ||
88 | - add_dependencies(${TEST_CONFIGURATION} gtest) | ||
89 | - add_dependencies(${TEST_APPLICATION} gtest) | ||
90 | - add_dependencies(${TEST_APPLICATION_SINGLE_PROCESS_NAME} gtest) | ||
91 | - add_dependencies(${TEST_APPLICATION_AVAILABILITY_NAME} gtest) | ||
92 | - add_dependencies(${TEST_MAGIC_COOKIES_CLIENT} gtest) | ||
93 | - add_dependencies(${TEST_MAGIC_COOKIES_SERVICE} gtest) | ||
94 | - add_dependencies(${TEST_HEADER_FACTORY} gtest) | ||
95 | - add_dependencies(${TEST_HEADER_FACTORY_CLIENT} gtest) | ||
96 | - add_dependencies(${TEST_HEADER_FACTORY_SERVICE} gtest) | ||
97 | - add_dependencies(${TEST_LOCAL_ROUTING_SERVICE} gtest) | ||
98 | - add_dependencies(${TEST_LOCAL_ROUTING_CLIENT} gtest) | ||
99 | - add_dependencies(${TEST_EXTERNAL_LOCAL_ROUTING_SERVICE} gtest) | ||
100 | - add_dependencies(${TEST_PAYLOAD_SERVICE} gtest) | ||
101 | - add_dependencies(${TEST_PAYLOAD_CLIENT} gtest) | ||
102 | - add_dependencies(${TEST_BIG_PAYLOAD_SERVICE} gtest) | ||
103 | - add_dependencies(${TEST_BIG_PAYLOAD_CLIENT} gtest) | ||
104 | - add_dependencies(${TEST_CLIENT_ID_SERVICE} gtest) | ||
105 | - add_dependencies(${TEST_CLIENT_ID_UTILITY} gtest) | ||
106 | - add_dependencies(${TEST_DEBOUNCE_CLIENT} gtest) | ||
107 | - add_dependencies(${TEST_DEBOUNCE_SERVICE} gtest) | ||
108 | - add_dependencies(${TEST_DEBOUNCE_FILTER_CLIENT} gtest) | ||
109 | - add_dependencies(${TEST_DEBOUNCE_FILTER_SERVICE} gtest) | ||
110 | - add_dependencies(${TEST_DEBOUNCE_CALLBACK_CLIENT} gtest) | ||
111 | - add_dependencies(${TEST_DEBOUNCE_CALLBACK_SERVICE} gtest) | ||
112 | - add_dependencies(${TEST_DEBOUNCE_FREQUENCY_CLIENT} gtest) | ||
113 | - add_dependencies(${TEST_DEBOUNCE_FREQUENCY_SERVICE} gtest) | ||
114 | - add_dependencies(${TEST_SUBSCRIBE_NOTIFY_SERVICE} gtest) | ||
115 | - add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_EVENT_TWO_EVENTGROUPS_SERVICE} gtest) | ||
116 | - add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_EVENT_TWO_EVENTGROUPS_CLIENT} gtest) | ||
117 | - add_dependencies(${TEST_SUBSCRIBE_NOTIFY_ONE_SERVICE} gtest) | ||
118 | - add_dependencies(${TEST_CPU_LOAD_SERVICE} gtest) | ||
119 | - add_dependencies(${TEST_CPU_LOAD_CLIENT} gtest) | ||
120 | - add_dependencies(${TEST_INITIAL_EVENT_SERVICE} gtest) | ||
121 | - add_dependencies(${TEST_INITIAL_EVENT_CLIENT} gtest) | ||
122 | - add_dependencies(${TEST_INITIAL_EVENT_AVAILABILITY_CHECKER} gtest) | ||
123 | - add_dependencies(${TEST_INITIAL_EVENT_STOP_SERVICE} gtest) | ||
124 | - add_dependencies(${TEST_OFFER_SERVICE} gtest) | ||
125 | - add_dependencies(${TEST_OFFER_CLIENT} gtest) | ||
126 | - add_dependencies(${TEST_OFFER_SERVICE_EXTERNAL} gtest) | ||
127 | - add_dependencies(${TEST_OFFER_EXTERNAL_SD_MESSAGE_SENDER} gtest) | ||
128 | - add_dependencies(${TEST_OFFERED_SERVICES_INFO_CLIENT} gtest) | ||
129 | - add_dependencies(${TEST_OFFERED_SERVICES_INFO_SERVICE} gtest) | ||
130 | - add_dependencies(${TEST_PENDING_SUBSCRIPTION_SERVICE} gtest) | ||
131 | - add_dependencies(${TEST_PENDING_SUBSCRIPTION_CLIENT} gtest) | ||
132 | - add_dependencies(${TEST_MALICIOUS_DATA_SERVICE} gtest) | ||
133 | - add_dependencies(${TEST_MALICIOUS_DATA_CLIENT} gtest) | ||
134 | - if (${TEST_SECURITY}) | ||
135 | - add_dependencies(${TEST_SECURITY_SERVICE} gtest) | ||
136 | - add_dependencies(${TEST_SECURITY_CLIENT} gtest) | ||
137 | - endif() | ||
138 | - add_dependencies(${TEST_E2E_SERVICE} gtest) | ||
139 | - add_dependencies(${TEST_E2E_CLIENT} gtest) | ||
140 | - if (${TEST_E2E_PROFILE_04}) | ||
141 | - add_dependencies(${TEST_E2E_PROFILE_04_SERVICE} gtest) | ||
142 | - add_dependencies(${TEST_E2E_PROFILE_04_CLIENT} gtest) | ||
143 | - endif() | ||
144 | - if (${TEST_E2E_PROFILE_07}) | ||
145 | - add_dependencies(${TEST_E2E_PROFILE_07_SERVICE} gtest) | ||
146 | - add_dependencies(${TEST_E2E_PROFILE_07_CLIENT} gtest) | ||
147 | - endif() | ||
148 | - add_dependencies(${TEST_EVENT_SERVICE} gtest) | ||
149 | - add_dependencies(${TEST_EVENT_CLIENT} gtest) | ||
150 | - if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "QNX") | ||
151 | - add_dependencies(${TEST_NPDU_SERVICE_ONE} gtest) | ||
152 | - add_dependencies(${TEST_NPDU_SERVICE_TWO} gtest) | ||
153 | - add_dependencies(${TEST_NPDU_SERVICE_THREE} gtest) | ||
154 | - add_dependencies(${TEST_NPDU_SERVICE_FOUR} gtest) | ||
155 | - add_dependencies(${TEST_NPDU_CLIENT_ONE} gtest) | ||
156 | - add_dependencies(${TEST_NPDU_CLIENT_TWO} gtest) | ||
157 | - add_dependencies(${TEST_NPDU_CLIENT_THREE} gtest) | ||
158 | - add_dependencies(${TEST_NPDU_CLIENT_FOUR} gtest) | ||
159 | - add_dependencies(${TEST_NPDU_DAEMON_CLIENT} gtest) | ||
160 | - add_dependencies(${TEST_NPDU_DAEMON_SERVICE} gtest) | ||
161 | - endif() | ||
162 | - add_dependencies(${TEST_SOMEIPTP_CLIENT} gtest) | ||
163 | - add_dependencies(${TEST_SOMEIPTP_SERVICE} gtest) | ||
164 | - if(${TEST_SECOND_ADDRESS}) | ||
165 | - add_dependencies(${TEST_SECOND_ADDRESS_CLIENT} gtest) | ||
166 | - add_dependencies(${TEST_SECOND_ADDRESS_SERVICE} gtest) | ||
167 | - endif() | ||
168 | - add_dependencies(${TEST_SUSPEND_RESUME_CLIENT} gtest) | ||
169 | - add_dependencies(${TEST_SUSPEND_RESUME_SERVICE} gtest) | ||
170 | -else() | ||
171 | - add_dependencies(${TEST_APPLICATION} gtest) | ||
172 | - add_dependencies(${TEST_HEADER_FACTORY} gtest) | ||
173 | - add_dependencies(${TEST_HEADER_FACTORY_CLIENT} gtest) | ||
174 | - add_dependencies(${TEST_HEADER_FACTORY_SERVICE} gtest) | ||
175 | - add_dependencies(${TEST_PAYLOAD_SERVICE} gtest) | ||
176 | - add_dependencies(${TEST_PAYLOAD_CLIENT} gtest) | ||
177 | - add_dependencies(${TEST_BIG_PAYLOAD_SERVICE} gtest) | ||
178 | - add_dependencies(${TEST_BIG_PAYLOAD_CLIENT} gtest) | ||
179 | - add_dependencies(${TEST_LOCAL_ROUTING_SERVICE} gtest) | ||
180 | - add_dependencies(${TEST_LOCAL_ROUTING_CLIENT} gtest) | ||
181 | -endif() | ||
182 | |||
183 | ############################################################################## | ||
184 | # Add tests to the target build_network_tests | ||
185 | -- | ||
186 | 2.25.1 | ||
187 | |||
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 index 4bb2318555..2d789627a3 100644 --- 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 | |||
@@ -23,11 +23,9 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
23 | CMakeLists.txt | 4 ++-- | 23 | CMakeLists.txt | 4 ++-- |
24 | 1 file changed, 2 insertions(+), 2 deletions(-) | 24 | 1 file changed, 2 insertions(+), 2 deletions(-) |
25 | 25 | ||
26 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
27 | index f1bcba27..2653a4df 100644 | ||
28 | --- a/CMakeLists.txt | 26 | --- a/CMakeLists.txt |
29 | +++ b/CMakeLists.txt | 27 | +++ b/CMakeLists.txt |
30 | @@ -60,12 +60,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | 28 | @@ -70,7 +70,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" |
31 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 29 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
32 | # This is only relevant for GCC and causes warnings on Clang | 30 | # This is only relevant for GCC and causes warnings on Clang |
33 | set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc") | 31 | set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc") |
@@ -36,12 +34,12 @@ index f1bcba27..2653a4df 100644 | |||
36 | endif() | 34 | endif() |
37 | 35 | ||
38 | set(NO_DEPRECATED "") | 36 | set(NO_DEPRECATED "") |
39 | set(OPTIMIZE "") | 37 | @@ -78,7 +78,7 @@ endif() |
40 | - 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") | 38 | if(NOT DEFINED _FORTIFY_SOURCE) |
41 | + 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") | 39 | set(_FORTIFY_SOURCE 2) |
40 | endif() | ||
41 | - 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=${_FORTIFY_SOURCE} -Wformat -Wformat-security -Wpedantic -Werror -fPIE") | ||
42 | + 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=${_FORTIFY_SOURCE} -Wformat -Wformat-security -Wpedantic") | ||
42 | 43 | ||
43 | # force all use of std::mutex and std::recursive_mutex to use runtime init | 44 | # force all use of std::mutex and std::recursive_mutex to use runtime init |
44 | # instead of static initialization so mutexes can be hooked to enable PI as needed | 45 | # instead of static initialization so mutexes can be hooked to enable PI as needed |
45 | -- | ||
46 | 2.25.1 | ||
47 | |||
diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb b/meta-networking/recipes-protocols/vsomeip/vsomeip_3.5.3.bb index 4c38970205..f854078004 100644 --- a/meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb +++ b/meta-networking/recipes-protocols/vsomeip/vsomeip_3.5.3.bb | |||
@@ -7,15 +7,17 @@ SECTION = "net" | |||
7 | LICENSE = "MPL-2.0" | 7 | LICENSE = "MPL-2.0" |
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
9 | 9 | ||
10 | GTEST_VER = "1.15.2" | ||
10 | SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=master;protocol=https;name=vsomeip \ | 11 | SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=master;protocol=https;name=vsomeip \ |
12 | https://github.com/google/googletest/releases/download/v${GTEST_VER}/googletest-${GTEST_VER}.tar.gz;name=gtest;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/ \ | ||
11 | file://0001-Fix-pkgconfig-dir-for-multilib.patch \ | 13 | file://0001-Fix-pkgconfig-dir-for-multilib.patch \ |
12 | file://0002-Install-example-configuration-files-to-etc-vsomeip.patch \ | 14 | file://0002-Install-example-configuration-files-to-etc-vsomeip.patch \ |
13 | file://0003-Do-not-build-external-gtest.patch \ | ||
14 | file://0004-Do-not-specify-PIE-flag-explicitly.patch \ | 15 | file://0004-Do-not-specify-PIE-flag-explicitly.patch \ |
15 | file://0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch \ | 16 | file://0005-test-common-CMakeLists.txt-add-missing-link-with-dlt.patch \ |
16 | " | 17 | " |
17 | 18 | ||
18 | SRCREV = "02c199dff8aba814beebe3ca417fd991058fe90c" | 19 | SRCREV = "6461369b3874c844642c9adaac9d1b7406794ab8" |
20 | SRC_URI[gtest.sha256sum] = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926" | ||
19 | 21 | ||
20 | COMPATIBLE_HOST:mips = "null" | 22 | COMPATIBLE_HOST:mips = "null" |
21 | COMPATIBLE_HOST:mips64 = "null" | 23 | COMPATIBLE_HOST:mips64 = "null" |
@@ -24,12 +26,12 @@ COMPATIBLE_HOST:libc-musl = 'null' | |||
24 | 26 | ||
25 | DEPENDS = "boost dlt-daemon googletest" | 27 | DEPENDS = "boost dlt-daemon googletest" |
26 | 28 | ||
27 | S = "${WORKDIR}/git" | ||
28 | 29 | ||
29 | inherit cmake pkgconfig | 30 | inherit cmake pkgconfig |
30 | 31 | ||
31 | EXTRA_OECMAKE = "-DINSTALL_LIB_DIR:PATH=${baselib} \ | 32 | EXTRA_OECMAKE = "-DINSTALL_LIB_DIR:PATH=${baselib} \ |
32 | -DINSTALL_CMAKE_DIR:PATH=${baselib}/cmake/vsomeip3 \ | 33 | -DINSTALL_CMAKE_DIR:PATH=${baselib}/cmake/vsomeip3 \ |
34 | -DGTEST_ROOT=${S}/googletest-${GTEST_VER} \ | ||
33 | " | 35 | " |
34 | 36 | ||
35 | # For vsomeip-test | 37 | # For vsomeip-test |
@@ -61,7 +63,7 @@ do_install:append() { | |||
61 | 63 | ||
62 | for d in unit_tests network_tests; do | 64 | for d in unit_tests network_tests; do |
63 | install -d ${D}/opt/${PN}-test/test/$d | 65 | install -d ${D}/opt/${PN}-test/test/$d |
64 | cp -f ${B}/test/$d/*test* ${D}/opt/${PN}-test/test/$d | 66 | cp -rf ${B}/test/$d/*_tests ${D}/opt/${PN}-test/test/$d |
65 | done | 67 | done |
66 | } | 68 | } |
67 | 69 | ||
@@ -73,3 +75,4 @@ FILES:${PN}-dbg += " \ | |||
73 | FILES:${PN}-test = " \ | 75 | FILES:${PN}-test = " \ |
74 | /opt/${PN}-test \ | 76 | /opt/${PN}-test \ |
75 | " | 77 | " |
78 | SKIP_RECIPE[vsomeip] ?= "Does not work with boost >= 1.87" | ||
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch new file mode 100644 index 0000000000..2ba927bf0e --- /dev/null +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 754b0ca247b2d789f9f613f8757b9732494e9489 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yaakov Selkowitz <yselkowi@redhat.com> | ||
3 | Date: Thu, 6 Mar 2025 21:03:28 -0500 | ||
4 | Subject: [PATCH] Fix build with GCC 15 | ||
5 | |||
6 | GCC 15 defaults to C23, in which the interpretation of function | ||
7 | declarations without parameters changed from unspecified to `void`. This | ||
8 | results in `control_handle_lac_status` not being compatible with the | ||
9 | expected callback function type. Adding the expected type parameters, | ||
10 | albeit unused, fixes the compatibility. | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/xelerance/xl2tpd/pull/272] | ||
13 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
14 | --- | ||
15 | xl2tpd.c | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/xl2tpd.c b/xl2tpd.c | ||
19 | index 3195988..0d148e9 100644 | ||
20 | --- a/xl2tpd.c | ||
21 | +++ b/xl2tpd.c | ||
22 | @@ -74,7 +74,7 @@ static int control_handle_lac_hangup(FILE* resf, char* bufp); | ||
23 | static int control_handle_lac_disconnect(FILE* resf, char* bufp); | ||
24 | static int control_handle_lac_add_modify(FILE* resf, char* bufp); | ||
25 | static int control_handle_lac_remove(FILE* resf, char* bufp); | ||
26 | -static int control_handle_lac_status(); | ||
27 | +static int control_handle_lac_status(FILE*, char*); | ||
28 | static int control_handle_lns_remove(FILE* resf, char* bufp); | ||
29 | |||
30 | static struct control_requests_handler control_handlers[] = { | ||
31 | @@ -1541,7 +1541,7 @@ static int control_handle_lac_remove(FILE* resf, char* bufp){ | ||
32 | return 1; | ||
33 | } | ||
34 | |||
35 | -static int control_handle_lac_status(){ | ||
36 | +static int control_handle_lac_status(FILE*, char*){ | ||
37 | show_status (); | ||
38 | return 1; | ||
39 | } | ||
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb index 08bab4a338..e1638bfa19 100644 --- a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb | |||
@@ -8,12 +8,13 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
8 | LICENSE = "GPL-2.0-only" | 8 | LICENSE = "GPL-2.0-only" |
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https" | 11 | SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https \ |
12 | file://0001-Fix-build-with-GCC-15.patch \ | ||
13 | " | ||
12 | SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" | 14 | SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" |
13 | 15 | ||
14 | UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases" | 16 | UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases" |
15 | 17 | ||
16 | S = "${WORKDIR}/git" | ||
17 | 18 | ||
18 | inherit update-rc.d | 19 | inherit update-rc.d |
19 | 20 | ||