summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/babeld/babeld_1.13.1.bb1
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch69
-rw-r--r--meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb4
-rw-r--r--meta-networking/recipes-protocols/frr/frr_10.3.bb (renamed from meta-networking/recipes-protocols/frr/frr_10.1.1.bb)5
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch58
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch27
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch34
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Handle-interface-without-ifa_addr.patch38
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Use-secure_getenv-on-Linux.patch30
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch2
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch56
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch6
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch48
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch55
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch4
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch166
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch6
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch249
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch2
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch37
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch60
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0009-remove-unneeded-headers.patch5
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb (renamed from meta-networking/recipes-protocols/mdns/mdns_2200.140.11.bb)31
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch123
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/netsnmp-swinst-crash.patch17
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb11
-rw-r--r--meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb (renamed from meta-networking/recipes-protocols/opcua/open62541_1.3.8.bb)26
-rw-r--r--meta-networking/recipes-protocols/openflow/openflow_git.bb1
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest12
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb9
-rw-r--r--meta-networking/recipes-protocols/openlldp/openlldp_1.1.1.bb1
-rw-r--r--meta-networking/recipes-protocols/pptp-linux/pptp-linux_1.10.0.bb2
-rw-r--r--meta-networking/recipes-protocols/rp-pppoe/rp-pppoe_3.15.bb2
-rw-r--r--meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb2
-rw-r--r--meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb1
-rw-r--r--meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch969
-rw-r--r--meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch324
-rw-r--r--meta-networking/recipes-protocols/vsomeip/vsomeip/0003-Do-not-build-external-gtest.patch187
-rw-r--r--meta-networking/recipes-protocols/vsomeip/vsomeip/0004-Do-not-specify-PIE-flag-explicitly.patch16
-rw-r--r--meta-networking/recipes-protocols/vsomeip/vsomeip_3.5.3.bb (renamed from meta-networking/recipes-protocols/vsomeip/vsomeip_3.4.10.bb)13
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch39
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb5
42 files changed, 399 insertions, 2354 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
18UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)" 18UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)"
19 19
20S = "${WORKDIR}/git"
21 20
22EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" 21EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'"
23 22
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 @@
1From a54f10082f819dadfa6931166e71edffadb565dd Mon Sep 17 00:00:00 2001
2From: Victor Seva <vseva@debian.org>
3Date: Sun, 23 Feb 2025 13:38:48 +0100
4Subject: [PATCH] fixes for gcc-15
5
6fixes #72
7
8Upstream-Status: Backport [https://github.com/freeDiameter/freeDiameter/commit/a54f10082f819dadfa6931166e71edffadb565dd]
9Signed-off-by: mark.yang <mark.yang@lge.com>
10---
11 libfdcore/sctp.c | 22 +++++++++++-----------
12 1 file changed, 11 insertions(+), 11 deletions(-)
13
14diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c
15index 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 cf50a92afb..89b2572c04 100644
--- a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
+++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
@@ -24,9 +24,9 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast
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 \ 26 file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \
27 file://0001-fixes-for-gcc-15.patch \
27 " 28 "
28 29
29S = "${WORKDIR}/git"
30 30
31LICENSE = "BSD-3-Clause" 31LICENSE = "BSD-3-Clause"
32LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" 32LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f"
@@ -65,7 +65,7 @@ EXTRA_OECMAKE = " \
65 65
66# -DALL_EXTENSIONS=ON will enable all 66# -DALL_EXTENSIONS=ON will enable all
67 67
68FD_KEY ?="${BPN}.key" 68FD_KEY ?= "${BPN}.key"
69FD_PEM ?= "${BPN}.pem" 69FD_PEM ?= "${BPN}.pem"
70FD_CA ?= "${BPN}.pem" 70FD_CA ?= "${BPN}.pem"
71FD_DH_PEM ?= "${BPN}-dh.pem" 71FD_DH_PEM ?= "${BPN}-dh.pem"
diff --git a/meta-networking/recipes-protocols/frr/frr_10.1.1.bb b/meta-networking/recipes-protocols/frr/frr_10.3.bb
index 237b52592b..f0f3f34ab3 100644
--- a/meta-networking/recipes-protocols/frr/frr_10.1.1.bb
+++ b/meta-networking/recipes-protocols/frr/frr_10.3.bb
@@ -10,17 +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
13SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.1 \ 13SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.3 \
14 file://frr.pam \ 14 file://frr.pam \
15 " 15 "
16 16
17SRCREV = "dbf8dac1cea2b1235746e2d966a8ded9cffd5dc3" 17SRCREV = "85cf1ed576deed121751e16a64970f8a652a9e1e"
18 18
19UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$" 19UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$"
20 20
21CVE_PRODUCT = "frrouting" 21CVE_PRODUCT = "frrouting"
22 22
23S = "${WORKDIR}/git"
24 23
25inherit autotools-brokensep python3native pkgconfig useradd systemd 24inherit autotools-brokensep python3native pkgconfig useradd systemd
26 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 @@
1From 1fefe289d0c907392382eb2fa2f1f0ecac02f85d Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Wed, 28 Jun 2017 17:30:00 -0500
4Subject: [PATCH] Create subroutine for cleaning recent interfaces
5
6Moves functionality for cleaning the list of recent
7interfaces into its own subroutine.
8
9Upstream-Status: Submitted [dts@apple.com]
10
11Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
12Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
13---
14 mDNSPosix/mDNSPosix.c | 24 ++++++++++++++----------
15 1 file changed, 14 insertions(+), 10 deletions(-)
16
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 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 @@
1From 2db1f5bc941e4b4cd1721e361a47cfe288b07a76 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Thu, 1 Feb 2024 14:07:03 +0000
4Subject: [PATCH] Fix SIGSEGV during DumpStateLog()
5
6DumpStateLog() calls LogMsgWithLevelv() with category == NULL, avoid
7crashing in this case.
8
9Upstream-Status: Inactive-Upstream [Upstream does not take patches]
10Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
11---
12 mDNSShared/mDNSDebug.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/mDNSShared/mDNSDebug.c b/mDNSShared/mDNSDebug.c
16index 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 @@
1From c84f185f29d0839b97177aecb0a78b9717947973 Mon Sep 17 00:00:00 2001
2From: Nguyen Dat Tho <tho3.nguyen@lge.com>
3Date: Wed, 9 Apr 2025 13:05:24 +0900
4Subject: [PATCH] Fix build with gcc-15
5
6To fix error:
7In 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
14Upstream-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
16Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com>
17---
18 mDNSShared/CommonServices.h | 3 +++
19 1 file changed, 3 insertions(+)
20
21diff --git a/mDNSShared/CommonServices.h b/mDNSShared/CommonServices.h
22index 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 @@
1From c67102307f25c5f4d238c736e90519e56a76ae79 Mon Sep 17 00:00:00 2001
2From: Stefan Agner <stefan@agner.ch>
3Date: Fri, 23 Jun 2023 10:10:00 +0200
4Subject: [PATCH] Handle interface without `ifa_addr`
5
6It seems that certain interface types may have `ifa_addr` set to null.
7Handle this case gracefully.
8
9Upstream-Status: Submitted [https://github.com/apple-oss-distributions/mDNSResponder/pull/2/commits/11b410d4d683c90e693c40315997bb3e8ec90e9a]
10
11Signed-off-by: Stefan Agner <stefan@agner.ch>
12Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
13---
14 mDNSPosix/mDNSPosix.c | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 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 @@
1From 1bf3be6cd775635aed95689f97a13fa6a037c741 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Tue, 27 May 2025 13:33:30 +0100
4Subject: [PATCH] Use secure_getenv on Linux
5
6Upstream-Status: Inactive-Upstream [Upstream does not take patches]
7Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
8---
9 mDNSShared/dnssd_clientstub.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12diff --git a/mDNSShared/dnssd_clientstub.c b/mDNSShared/dnssd_clientstub.c
13index 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 @@
1From a5fe20fa00088683136a09a4da3c36d9b20fe1b9 Mon Sep 17 00:00:00 2001 1From cdbc28c668dd627906f833f9a8e32ac53b0b0139 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 4 Nov 2021 07:31:32 -0700 3Date: Thu, 4 Nov 2021 07:31:32 -0700
4Subject: [PATCH] dns-sd: Include missing headers 4Subject: [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 @@
1From d265ac9346d3dcbcf1187134318baafcfa75c054 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Wed, 28 Jun 2017 17:30:00 -0500
4Subject: [PATCH] Create subroutine for tearing down an interface
5
6Creates a subroutine for tearing down an interface.
7
8Upstream-Status: Submitted [dts@apple.com]
9
10Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
11Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
12---
13 mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------
14 1 file changed, 16 insertions(+), 6 deletions(-)
15
16diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
17index 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 @@
1From dfa9e2c494d1a834f5bdfe4dc24e8329dd8720eb Mon Sep 17 00:00:00 2001 1From dcc1f39a0918cdebf53ac7c105b3d33df960ed14 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com> 2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Mon, 5 Dec 2022 15:14:12 +0000 3Date: Mon, 5 Dec 2022 15:14:12 +0000
4Subject: [PATCH] make: Set libdns_sd.so soname correctly 4Subject: [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
12diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile 12diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
13index 041706523139..c877c8bb19e6 100755 13index 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 @@
1From 5f58e5671cd6dbd4cb49bd30fb606d430b626361 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Wed, 28 Jun 2017 17:30:00 -0500
4Subject: [PATCH] Track interface socket family
5
6Tracks the socket family associated with the interface.
7
8Upstream-Status: Submitted [dts@apple.com]
9
10Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
11Signed-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
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 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;
29diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h
30index 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 @@
1From 935033dd40772240c9bcc6b9610d78eb3753bfaf Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Tue, 1 Aug 2017 17:06:01 -0500
4Subject: [PATCH] Indicate loopback interface to mDNS core
5
6Tells the mDNS core if an interface is a loopback interface,
7similar to AddInterfaceToList() in the MacOS implementation.
8
9Upstream-Status: Submitted [dts@apple.com]
10
11Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
12Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
13---
14 mDNSPosix/mDNSPosix.c | 7 ++++---
15 1 file changed, 4 insertions(+), 3 deletions(-)
16
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 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 @@
1From f871ac42165c29f763785aa0199dfc76f1731f4d Mon Sep 17 00:00:00 2001 1From f7ee12c1f8e85b9d2fe4023b6539c8051dc710c3 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com> 2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Mon, 5 Dec 2022 15:14:26 +0000 3Date: Mon, 5 Dec 2022 15:14:26 +0000
4Subject: [PATCH] make: Separate TLS targets from libraries 4Subject: [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
15diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile 15diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
16index c877c8bb19e6..3a5897c4dbee 100755 16index 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 @@
1From 47118760466b74939cec9f5233062236a12bb3f4 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Thu, 13 Jul 2017 09:00:00 -0500
4Subject: [PATCH] Use list for changed interfaces
5
6Uses a linked list to store the index of changed network interfaces
7instead of a bitfield. This allows for network interfaces with an
8index greater than 31 (an index of 36 was seen on Android).
9
10Upstream-Status: Submitted [dts@apple.com]
11
12Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
13Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
14---
15 mDNSPosix/mDNSPosix.c | 58 ++++++++++++++++++++++++++++++++-----------
16 1 file changed, 43 insertions(+), 15 deletions(-)
17
18diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
19index 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 @@
1From 0b3953dfdeef8dc9b8a23820659feee9e15b5bad Mon Sep 17 00:00:00 2001 1From e79f75487e32f87677519ec40c021b1623395bde Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com> 2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Mon, 5 Dec 2022 22:49:49 +0000 3Date: Mon, 5 Dec 2022 22:49:49 +0000
4Subject: [PATCH] mDNSCore: Fix broken debug parameter 4Subject: [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
12diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c 12diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c
13index d4519a7f62aa..3090edb2ac5d 100644 13index 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 @@
1From 105514b75df6d7abd052ec64d8106f5c07cc4782 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Mon, 24 Jul 2017 09:38:55 -0500
4Subject: [PATCH] Handle noisy netlink sockets
5
6The POSIX implementation currently clears all network interfaces
7when netlink indicates that there has been a change. This causes
8the 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
15This 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
22Upstream-Status: Submitted [dts@apple.com]
23
24Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
25Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
26---
27 mDNSPosix/mDNSPosix.c | 182 +++++++++++++++++++++++++++++++++++++++---
28 1 file changed, 172 insertions(+), 10 deletions(-)
29
30diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
31index 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 @@
1From 626ccae85aab5b0902a8e3c05d9f0e3fbbe4fcd2 Mon Sep 17 00:00:00 2001 1From a1c982808ebfb71ba7e0f16040013b7127a6e2ab Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com> 2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Tue, 6 Dec 2022 13:28:31 +0000 3Date: Tue, 6 Dec 2022 13:28:31 +0000
4Subject: [PATCH] make: Add top-level Makefile 4Subject: [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 @@
1From 3715b3f4a0ba2d2cb05e5ba617b523c759c88d4b Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Wed, 9 Aug 2017 09:16:58 -0500
4Subject: [PATCH] Mark deleted interfaces as being changed
5
6Netlink notification handling ignores messages for deleted links,
7RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu-
8mentation (http://www.infradead.org/~tgr/libnl/doc/route.html)
9RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot.
10There was likely a mixup in the original implementation, so this
11change replaces handling for RTM_GETLINK with RTM_DELLINK.
12
13Testing 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
17Upstream-Status: Submitted [dts@apple.com]
18
19Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
20Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
21---
22 mDNSPosix/mDNSPosix.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
26index 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 @@
1From 4e6621eee389e1cbb558fe268e02d5153a1d8f2d Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Thu, 10 Aug 2017 08:27:32 -0500
4Subject: [PATCH] Handle errors from socket calls
5
6Adds handling for socket() or read() returning a
7negative value (indicating an error has occurred).
8
9Upstream-Status: Submitted [dts@apple.com]
10
11Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
12Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
13---
14 mDNSPosix/mDNSPosix.c | 12 +++++++++---
15 1 file changed, 9 insertions(+), 3 deletions(-)
16
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 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 @@
1From 05cb409ce213f35798c02faf2032d4846a84b48e Mon Sep 17 00:00:00 2001 1From 8e32fb0876a073c23ab73047a2e0f6d011b3660c Mon Sep 17 00:00:00 2001
2From: Beniamin Sandu <beniaminsandu@gmail.com> 2From: Beniamin Sandu <beniaminsandu@gmail.com>
3Date: Thu, 15 Jun 2023 17:02:58 +0000 3Date: Thu, 15 Jun 2023 17:02:58 +0000
4Subject: [PATCH] remove unneeded headers 4Subject: [PATCH] remove unneeded headers
@@ -7,8 +7,7 @@ From a quick look, these seem to not be needed and having them
7breaks the build with mbedtls 3.x. Without them it builds fine 7breaks the build with mbedtls 3.x. Without them it builds fine
8on both 2.x and 3.x versions. 8on both 2.x and 3.x versions.
9 9
10Upstream-Status: Pending 10Upstream-Status: Inactive-Upstream [Upstream does not take patches]
11
12Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> 11Signed-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.140.11.bb b/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb
index e6ea707197..f7c8f17800 100644
--- a/meta-networking/recipes-protocols/mdns/mdns_2200.140.11.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
7DEPENDS:append:libc-musl = " musl-nscd" 7DEPENDS:append:libc-musl = " musl-nscd"
8 8
9SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=rel/mDNSResponder-2200 \ 9SRC_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 "
28SRCREV = "12e84b9089e577e0c0a9f48c4b922d7349fcc5a4" 20BRANCH = "rel/mDNSResponder-2600"
21SRCREV = "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 = "12e84b9089e577e0c0a9f48c4b922d7349fcc5a4"
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.
37S = "${WORKDIR}/git"
38 30
39inherit github-releases manpages systemd update-rc.d 31inherit 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
112pkg_postinst:${PN} () { 104pkg_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
120pkg_prerm:${PN} () { 112pkg_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} () {
128SYSTEMD_SERVICE:${PN} = "mdns.service" 120SYSTEMD_SERVICE:${PN} = "mdns.service"
129INITSCRIPT_NAME = "mdns" 121INITSCRIPT_NAME = "mdns"
130 122
123PACKAGE_BEFORE_PN = "${PN}-libnss-mdns"
124
125RRECOMMENDS:${PN}:append:libc-glibc = " ${PN}-libnss-mdns"
126
131FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" 127FILES_SOLIBSDEV = "${libdir}/libdns_sd.so"
132FILES:${PN} += "${libdir}/libnss_mdns-0.2.so" 128FILES:${PN}-libnss-mdns = "${sysconfdir}/nss_mdns.conf ${libdir}/libnss_mdns*.so*"
129RPROVIDES:${PN}-libnss-mdns = "libnss-mdns"
133 130
134RPROVIDES:${PN} += "libdns_sd.so" 131RPROVIDES:${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 @@
1From f5ae6baf0018abda9dedc368fe6d52c0d7a8ab8f Mon Sep 17 00:00:00 2001
2From: Philippe Troin <phil+github-commits@fifi.org>
3Date: Sat, 3 Feb 2024 10:30:30 -0800
4Subject: [PATCH] Add Linux 6.7 compatibility parsing /proc/net/snmp
5
6Linux 6.7 adds a new OutTransmits field to Ip in /proc/net/snmp.
7This breaks the hard-coded assumptions about the Ip line length.
8Add compatibility to parse Linux 6.7 Ip header while keep support
9for previous versions.
10
11Upstream-Status: Pending
12Signed-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
17diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
18index 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 @@
1Fix crash in swinst
2
3Upstream-Status: Pending
4Signed-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 989ec54132..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 "
32SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" 34SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544"
33 35
34UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" 36UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/"
35UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" 37UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/"
36 38
39CVE_PRODUCT = "net-snmp:net-snmp"
40
37inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header 41inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header
38 42
39EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" 43EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'"
@@ -53,6 +57,8 @@ PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable
53PACKAGECONFIG[smux] = "" 57PACKAGECONFIG[smux] = ""
54PACKAGECONFIG[systemd] = "--with-systemd, --without-systemd" 58PACKAGECONFIG[systemd] = "--with-systemd, --without-systemd"
55 59
60SYSCONTACT_DISTRO ?= "no-contact-set@example.com"
61
56EXTRA_OECONF = " \ 62EXTRA_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
66MIB_MODULES = "" 73MIB_MODULES = ""
@@ -266,12 +273,12 @@ RDEPENDS:${PN}-server-snmpd += "net-snmp-mibs"
266RDEPENDS:${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd" 273RDEPENDS:${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd"
267RDEPENDS:${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" 274RDEPENDS:${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
268RDEPENDS:${PN}-client += "net-snmp-mibs net-snmp-libs" 275RDEPENDS:${PN}-client += "net-snmp-mibs net-snmp-libs"
269RDEPENDS:${PN}-libs += "libpci \ 276RDEPENDS:${PN}-libs += "${PN}-lib-netsnmp \
270 ${PN}-lib-netsnmp \
271 ${PN}-lib-agent \ 277 ${PN}-lib-agent \
272 ${PN}-lib-helpers \ 278 ${PN}-lib-helpers \
273 ${PN}-lib-mibs \ 279 ${PN}-lib-mibs \
274" 280"
281RDEPENDS:${PN}-libs:append:class-target = " libpci"
275RDEPENDS:${PN}-ptest += "perl \ 282RDEPENDS:${PN}-ptest += "perl \
276 perl-module-test \ 283 perl-module-test \
277 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
10SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" 10SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c"
11SRCREV_opcua = "086b1557d6f49e8a82c999054a7da77d080cd54e" 11SRCREV_opcua = "3eed1a6d5c5b207c531b2d35ed88aa0a4a4541e5"
12SRCREV_mdnsd = "3151afe5899dba5125dffa9f4cf3ae1fe2edc0f0" 12SRCREV_mdnsd = "488d24fb9d427aec77df180268f0291eeee7fb8b"
13SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" 13SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb"
14SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" 14SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d"
15 15
16SRC_URI = " \ 16SRC_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
24S = "${WORKDIR}/git"
25 24
26inherit cmake python3native 25inherit cmake python3native
27 26
28EXTRA_OECMAKE += "\ 27EXTRA_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
35PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events" 33FILES:${PN} = "${libdir}/lib*${SOLIBS}"
36PACKAGECONFIG[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.
36PACKAGES += "${PN}-tools"
37FILES:${PN}-tools = "${datadir}/${BPN}/tools/*"
38
39PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events namespace-full"
37PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" 40PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl"
38PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" 41PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls"
39PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" 42PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0"
43PACKAGECONFIG[namespace-full] = "-DUA_NAMESPACE_ZERO=FULL, , , , , namespace-reduced"
44PACKAGECONFIG[namespace-reduced] = "-DUA_NAMESPACE_ZERO=REDUCED, , , , , namespace-full"
40PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" 45PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF"
41PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" 46PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF"
42PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" 47PACKAGECONFIG[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
59do_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 0061565f90..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 "
38DEPENDS:append:libc-musl = " libexecinfo" 38DEPENDS:append:libc-musl = " libexecinfo"
39 39
40S = "${WORKDIR}/git"
41 40
42inherit autotools-brokensep pkgconfig 41inherit autotools-brokensep pkgconfig
43 42
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
30fi 30fi
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
33echo "Please input the network interface you use to test(such as eth0, em1 etc):" 33ETH_TEST=`ip route get 8.8.8.8 | awk -- '{print $5}'`
34read ETH_TEST > /dev/null
35
36if [ x"$ETH_TEST" = x ]; then 34if [ 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
38fi 36fi
39ifconfig | grep $ETH_TEST > /dev/null || exit_cus "The network interface you provide is invalid" 1 37ip 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
42zcat /proc/config.gz | grep CONFIG_L2TP=y > /dev/null || exit_cus "Failed to check CONFIG_L2TP=y, skip the tests." 1 40zcat /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
63fi 61fi
64 62
65sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl 63sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl
66test_ip="`ifconfig $ETH_TEST | grep 'inet ' | sed 's/^.*inet addr://g' | \ 64test_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'`"
68sed -i 's/192.168.0.1/'"$test_ip"'/g' ${OPENL2TP_DIR}/ptest/tunnel.test 65sed -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
75ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null 72ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null
76ppp_path=`rpm -ql openl2tp | grep ppp_null.so` 73ppp_path=`find / -name ppp_null.so`
77echo "test it here" 74echo "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
95fi 92fi
96 93
97restore_file 94restore_file
95ps 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 \
41SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" 41SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
42SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" 42SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
43 43
44inherit autotools-brokensep pkgconfig systemd ptest 44inherit pkgconfig systemd ptest
45 45
46SYSTEMD_SERVICE:${PN} = "openl2tpd.service" 46SYSTEMD_SERVICE:${PN} = "openl2tpd.service"
47SYSTEMD_AUTO_ENABLE = "disable" 47SYSTEMD_AUTO_ENABLE = "disable"
48 48
49DEPENDS += "libtirpc" 49DEPENDS += "libtirpc"
50CPPFLAGS += "-I${STAGING_INCDIR}/tirpc" 50CPPFLAGS += "-I${STAGING_INCDIR}/tirpc"
51CFLAGS += "-I${STAGING_INCDIR}/tirpc" 51CFLAGS += "-I${STAGING_INCDIR}/tirpc -std=gnu17"
52LDFLAGS += "-ltirpc" 52LDFLAGS += "-ltirpc"
53 53
54PARALLEL_MAKE = "" 54PARALLEL_MAKE = ""
@@ -67,7 +67,9 @@ do_compile:prepend() {
67 ${S}/Makefile 67 ${S}/Makefile
68} 68}
69 69
70do_install:append () { 70do_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
96RDEPENDS:${PN} = "ppp ppp-l2tp bash" 98RDEPENDS:${PN} = "ppp ppp-l2tp bash"
99RDEPENDS:${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"
5LICENSE = "GPL-2.0-only" 5LICENSE = "GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162" 6LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"
7 7
8S = "${WORKDIR}/git"
9 8
10inherit pkgconfig autotools 9inherit pkgconfig autotools
11inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} 10inherit ${@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 \
18SRC_URI[md5sum] = "8d25341352fdae5ad5b36b9f18254908" 18SRC_URI[md5sum] = "8d25341352fdae5ad5b36b9f18254908"
19SRC_URI[sha256sum] = "82492db8e487ce73b182ee7f444251d20c44f5c26d6e96c553ec7093aefb5af4" 19SRC_URI[sha256sum] = "82492db8e487ce73b182ee7f444251d20c44f5c26d6e96c553ec7093aefb5af4"
20 20
21S = "${WORKDIR}/pptp-${PV}" 21S = "${UNPACKDIR}/pptp-${PV}"
22 22
23EXTRA_OEMAKE = "-e MAKEFLAGS=" 23EXTRA_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"
5LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581" 5LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581"
6 6
7 7
8SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/rp-pppoe-${PV}.tar.gz \ 8SRC_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
21LIBS:append:libc-musl = " -lssp_nonshared" 21LIBS:append:libc-musl = " -lssp_nonshared"
22LIBS:append:libc-glibc = " -lc_nonshared" 22LIBS:append:libc-glibc = " -lc_nonshared"
23 23
24S = "${WORKDIR}/tsocks-1.8" 24S = "${UNPACKDIR}/tsocks-1.8"
25 25
26FILES:${PN} = "${libdir}/* ${bindir}/tsocks" 26FILES:${PN} = "${libdir}/* ${bindir}/tsocks"
27FILES:${PN}-dev = "" 27FILES:${PN}-dev = ""
diff --git a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
index 3769d5cab0..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"
6SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \ 6SRC_URI = "git://github.com/sctplab/usrsctp;protocol=https;branch=master \
7 " 7 "
8 8
9S = "${WORKDIR}/git"
10 9
11UPSTREAM_CHECK_COMMITS = "1" 10UPSTREAM_CHECK_COMMITS = "1"
12 11
diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch
deleted file mode 100644
index c69a395f10..0000000000
--- a/meta-networking/recipes-protocols/vsomeip/vsomeip/0001-Update-to-C-17-560.patch
+++ /dev/null
@@ -1,969 +0,0 @@
1From 7acb528db20c08d90f72fa317b8e1ccf4d270cdc Mon Sep 17 00:00:00 2001
2From: Matthew Russell <matthew.g.russell@gmail.com>
3Date: Wed, 10 Apr 2024 06:23:27 -0400
4Subject: [PATCH 1/2] Update to C++17 (#560)
5
6* Upgrading to C++17
7
8* Code Quality: Address compiler warnings
9
10- Fixing narrowing issues
11- Removing useless copies
12- Removing unused lines
13- unused-lambda-capture
14- Removes unused variables
15- Fix some casts (modernize c-style, or simply remove useless casts)
16- Explicitly deleting unused endpoint_impl copy and move constructors
17- Removing redundant std::bind
18- Improving const correctness
19- Moving thread init to constructor body
20- Moved check_routing_credentials_ inside vsomeip security section where it's used
21- Using =default destructor instead of empty destructor
22
23Thread init:
24Moving the initialization of these threads into the constructor body to
25ensure that they do not start with an incomplete "this". As they
26capture this, it is possible that if the new thread begins before the
27object is fully constructed, the new thread might operate on
28uninitialized members of "this".
29
30* Attempting to fix syntax error on MSVC
31
32* Adjusting PR to conform to Covesa style
33
34* Using curly brace initialization
35
36* Using static_cast to narrow its_device.size() to a socklen_t
37
38* Avoided double integer promotion
39
40Upstream-Status: Backport [https://github.com/COVESA/vsomeip/pull/560]
41Signed-off-by: Khem Raj <raj.khem@gmail.com>
42---
43 Android.bp | 2 +-
44 CMakeLists.txt | 11 ++-
45 examples/hello_world/hello_world_service.hpp | 12 +--
46 .../configuration/include/internal.hpp.in | 6 +-
47 .../include/internal_android.hpp | 10 +--
48 .../configuration/src/configuration_impl.cpp | 13 ++--
49 .../endpoints/include/endpoint_impl.hpp | 3 +
50 .../local_server_endpoint_impl_receive_op.hpp | 4 +-
51 .../local_uds_client_endpoint_impl.hpp | 2 +-
52 .../local_uds_server_endpoint_impl.hpp | 2 +-
53 .../udp_server_endpoint_impl_receive_op.hpp | 2 +-
54 .../endpoints/src/endpoint_manager_base.cpp | 2 +-
55 .../src/local_uds_client_endpoint_impl.cpp | 5 --
56 .../src/local_uds_server_endpoint_impl.cpp | 6 --
57 .../src/tcp_client_endpoint_impl.cpp | 2 +-
58 .../src/tcp_server_endpoint_impl.cpp | 14 ++--
59 .../src/udp_client_endpoint_impl.cpp | 2 +-
60 .../src/udp_server_endpoint_impl.cpp | 4 +-
61 .../message/include/message_base_impl.hpp | 2 -
62 implementation/message/src/deserializer.cpp | 4 +-
63 .../plugin/src/plugin_manager_impl.cpp | 2 +-
64 .../routing/src/routing_manager_base.cpp | 10 +--
65 .../runtime/include/application_impl.hpp | 4 +-
66 .../runtime/src/application_impl.cpp | 7 +-
67 implementation/security/src/policy.cpp | 4 +-
68 implementation/security/src/security.cpp | 1 +
69 .../src/service_discovery_impl.cpp | 34 +++++----
70 interface/vsomeip/constants.hpp | 74 +++++++++----------
71 .../application_tests/application_test.cpp | 1 +
72 tools/vsomeip_ctrl.cpp | 9 ++-
73 30 files changed, 129 insertions(+), 125 deletions(-)
74
75diff --git a/Android.bp b/Android.bp
76index c6caa4de..f314f22b 100644
77--- a/Android.bp
78+++ b/Android.bp
79@@ -30,9 +30,9 @@ libvsomeip_sd_srcs = [
80
81 cc_defaults {
82 name: "vsomeip_defaults",
83+ cpp_std: "c++17",
84
85 cppflags: [
86- "-std=c++14",
87 "-fexceptions",
88 "-Wno-non-virtual-dtor",
89 "-Wno-unused-const-variable",
90diff --git a/CMakeLists.txt b/CMakeLists.txt
91index ab399a69..3d947055 100644
92--- a/CMakeLists.txt
93+++ b/CMakeLists.txt
94@@ -64,6 +64,8 @@ if(NOT CMAKE_BUILD_TYPE)
95 set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
96 endif()
97
98+set(CMAKE_CXX_STANDARD 17)
99+
100 # OS
101 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
102 set(DL_LIBRARY "dl")
103@@ -248,13 +250,13 @@ if (MSVC)
104 # add_definitions(-DVSOMEIP_DLL_COMPILATION) now it is controlled per target
105 SET(BOOST_WINDOWS_VERSION "0x600" CACHE STRING "Set the same Version as the Version with which Boost was built, otherwise there will be errors. (normaly 0x600 is for Windows 7 and 0x501 is for Windows XP)")
106 # Disable warning C4250 since it warns that the compiler is correctly following the C++ Standard. It's a "We-Are-Doing-Things-By-The-Book" notice, not a real warning.
107- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_ASIO_DISABLE_IOCP /EHsc /std:c++14 /wd4250")
108+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_ASIO_DISABLE_IOCP /EHsc /wd4250")
109 set(USE_RT "")
110 link_directories(${Boost_LIBRARY_DIR_DEBUG})
111 elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
112 set(USE_RT "")
113 else()
114- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} -std=c++14 ${NO_DEPRECATED} ${EXPORTSYMBOLS}")
115+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} ${NO_DEPRECATED} ${EXPORTSYMBOLS}")
116 set(USE_RT "rt")
117 endif()
118
119@@ -268,6 +270,7 @@ list(SORT ${VSOMEIP_NAME}-cfg_SRC)
120 if (VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 0)
121 add_library(${VSOMEIP_NAME}-cfg SHARED ${${VSOMEIP_NAME}-cfg_SRC})
122 set_target_properties (${VSOMEIP_NAME}-cfg PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION})
123+ target_compile_features(${VSOMEIP_NAME}-cfg PRIVATE cxx_std_17)
124 if (MSVC)
125 set_target_properties(${VSOMEIP_NAME}-cfg PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN")
126 endif()
127@@ -302,6 +305,7 @@ list(SORT ${VSOMEIP_NAME}_SRC)
128
129 add_library(${VSOMEIP_NAME} SHARED ${${VSOMEIP_NAME}_SRC})
130 set_target_properties (${VSOMEIP_NAME} PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION})
131+target_compile_features(${VSOMEIP_NAME} PRIVATE cxx_std_17)
132 if (MSVC)
133 set_target_properties(${VSOMEIP_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION")
134 else ()
135@@ -331,6 +335,7 @@ file(GLOB ${VSOMEIP_NAME}-sd_SRC
136 list(SORT ${VSOMEIP_NAME}-sd_SRC)
137
138 add_library(${VSOMEIP_NAME}-sd SHARED ${${VSOMEIP_NAME}-sd_SRC})
139+target_compile_features(${VSOMEIP_NAME}-sd PRIVATE cxx_std_17)
140 set_target_properties (${VSOMEIP_NAME}-sd PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION})
141 if (MSVC)
142 set_target_properties(${VSOMEIP_NAME}-sd PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN")
143@@ -348,6 +353,7 @@ file(GLOB_RECURSE ${VSOMEIP_NAME}-e2e_SRC
144 list(SORT ${VSOMEIP_NAME}-e2e_SRC)
145
146 add_library(${VSOMEIP_NAME}-e2e SHARED ${${VSOMEIP_NAME}-e2e_SRC})
147+target_compile_features(${VSOMEIP_NAME}-e2e PRIVATE cxx_std_17)
148 set_target_properties (${VSOMEIP_NAME}-e2e PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION})
149 if (MSVC)
150 set_target_properties(${VSOMEIP_NAME}-e2e PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN")
151@@ -375,6 +381,7 @@ file(GLOB_RECURSE ${VSOMEIP_COMPAT_NAME}_SRC
152 list(SORT ${VSOMEIP_COMPAT_NAME}_SRC)
153
154 add_library(${VSOMEIP_COMPAT_NAME} SHARED ${${VSOMEIP_COMPAT_NAME}_SRC})
155+target_compile_features(${VSOMEIP_COMPAT_NAME} PRIVATE cxx_std_17)
156 set_target_properties (${VSOMEIP_COMPAT_NAME} PROPERTIES VERSION ${VSOMEIP_COMPAT_VERSION} SOVERSION ${VSOMEIP_COMPAT_MAJOR_VERSION})
157 if (MSVC)
158 set_target_properties(${VSOMEIP_COMPAT_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN")
159diff --git a/examples/hello_world/hello_world_service.hpp b/examples/hello_world/hello_world_service.hpp
160index 7ac3b1e7..b04cacea 100644
161--- a/examples/hello_world/hello_world_service.hpp
162+++ b/examples/hello_world/hello_world_service.hpp
163@@ -11,12 +11,12 @@
164 #if defined ANDROID || defined __ANDROID__
165 #include "android/log.h"
166 #define LOG_TAG "hello_world_service"
167-#define LOG_INF(...) fprintf(stdout, __VA_ARGS__), fprintf(stdout, "\n"), (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, ##__VA_ARGS__)
168-#define LOG_ERR(...) fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n"), (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, ##__VA_ARGS__)
169+#define LOG_INF(...) std::fprintf(stdout, __VA_ARGS__), std::fprintf(stdout, "\n"), (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, ##__VA_ARGS__)
170+#define LOG_ERR(...) std::fprintf(stderr, __VA_ARGS__), std::fprintf(stderr, "\n"), (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, ##__VA_ARGS__)
171 #else
172 #include <cstdio>
173-#define LOG_INF(...) fprintf(stdout, __VA_ARGS__), fprintf(stdout, "\n")
174-#define LOG_ERR(...) fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n")
175+#define LOG_INF(...) std::fprintf(stdout, __VA_ARGS__), std::fprintf(stdout, "\n")
176+#define LOG_ERR(...) std::fprintf(stderr, __VA_ARGS__), std::fprintf(stderr, "\n")
177 #endif
178
179 static vsomeip::service_t service_id = 0x1111;
180@@ -32,9 +32,9 @@ public:
181 hello_world_service() :
182 rtm_(vsomeip::runtime::get()),
183 app_(rtm_->create_application()),
184- stop_(false),
185- stop_thread_(std::bind(&hello_world_service::stop, this))
186+ stop_(false)
187 {
188+ stop_thread_ = std::thread{&hello_world_service::stop, this};
189 }
190
191 ~hello_world_service()
192diff --git a/implementation/configuration/include/internal.hpp.in b/implementation/configuration/include/internal.hpp.in
193index 72c8d503..eff4efad 100644
194--- a/implementation/configuration/include/internal.hpp.in
195+++ b/implementation/configuration/include/internal.hpp.in
196@@ -141,14 +141,14 @@ typedef enum {
197 IS_SUBSCRIBING
198 } subscription_state_e;
199
200-const std::uint32_t MESSAGE_SIZE_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
201+inline constexpr std::uint32_t MESSAGE_SIZE_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
202
203-const std::uint32_t QUEUE_SIZE_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
204+inline constexpr std::uint32_t QUEUE_SIZE_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
205
206 #define VSOMEIP_DEFAULT_NPDU_DEBOUNCING_NANO 2 * 1000 * 1000
207 #define VSOMEIP_DEFAULT_NPDU_MAXIMUM_RETENTION_NANO 5 * 1000 * 1000
208
209-const std::uint32_t MAX_RECONNECTS_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
210+inline constexpr std::uint32_t MAX_RECONNECTS_UNLIMITED = (std::numeric_limits<std::uint32_t>::max)();
211
212 const std::uint32_t ANY_UID = 0xFFFFFFFF;
213 const std::uint32_t ANY_GID = 0xFFFFFFFF;
214diff --git a/implementation/configuration/include/internal_android.hpp b/implementation/configuration/include/internal_android.hpp
215index f5425722..8757a85a 100644
216--- a/implementation/configuration/include/internal_android.hpp
217+++ b/implementation/configuration/include/internal_android.hpp
218@@ -128,17 +128,17 @@ typedef enum {
219 IS_SUBSCRIBING
220 } subscription_state_e;
221
222-const std::uint32_t MESSAGE_SIZE_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
223+inline constexpr std::uint32_t MESSAGE_SIZE_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
224
225-const std::uint32_t QUEUE_SIZE_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
226+inline constexpr std::uint32_t QUEUE_SIZE_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
227
228 #define VSOMEIP_DEFAULT_NPDU_DEBOUNCING_NANO 2 * 1000 * 1000
229 #define VSOMEIP_DEFAULT_NPDU_MAXIMUM_RETENTION_NANO 5 * 1000 * 1000
230
231-const std::uint32_t MAX_RECONNECTS_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
232+inline constexpr std::uint32_t MAX_RECONNECTS_UNLIMITED = std::numeric_limits<std::uint32_t>::max();
233
234-const std::uint32_t ANY_UID = 0xFFFFFFFF;
235-const std::uint32_t ANY_GID = 0xFFFFFFFF;
236+inline constexpr std::uint32_t ANY_UID = 0xFFFFFFFF;
237+inline constexpr std::uint32_t ANY_GID = 0xFFFFFFFF;
238
239 enum class port_type_e {
240 PT_OPTIONAL,
241diff --git a/implementation/configuration/src/configuration_impl.cpp b/implementation/configuration/src/configuration_impl.cpp
242index ca1bd1dc..380b2906 100644
243--- a/implementation/configuration/src/configuration_impl.cpp
244+++ b/implementation/configuration/src/configuration_impl.cpp
245@@ -333,7 +333,7 @@ bool configuration_impl::load(const std::string &_name) {
246
247 // Tell, if reading of configuration file(s) failed.
248 // (This may file if the logger configuration is incomplete/missing).
249- for (auto f : its_failed)
250+ for (const auto& f : its_failed)
251 VSOMEIP_WARNING << "Reading of configuration file \""
252 << f << "\" failed. Configuration may be incomplete.";
253
254@@ -342,7 +342,7 @@ bool configuration_impl::load(const std::string &_name) {
255
256 std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
257
258- for (auto i : its_input) {
259+ for (const auto& i : its_input) {
260 if (utility::is_file(i))
261 VSOMEIP_INFO << "Using configuration file: \"" << i << "\".";
262
263@@ -561,7 +561,7 @@ bool configuration_impl::load_data(const std::vector<configuration_element> &_el
264
265 if (is_logging_loaded_) {
266 logger::logger_impl::init(shared_from_this());
267- for (auto w : its_warnings)
268+ for (const auto& w : its_warnings)
269 VSOMEIP_WARNING << w;
270 }
271 }
272@@ -3255,7 +3255,7 @@ void configuration_impl::trim(std::string &_s) {
273 std::find_if(
274 _s.begin(),
275 _s.end(),
276- [](unsigned char ch) { return !std::isspace(ch); }
277+ [](const auto ch) { return !std::isspace(ch); }
278 )
279 );
280
281@@ -3263,8 +3263,9 @@ void configuration_impl::trim(std::string &_s) {
282 std::find_if(
283 _s.rbegin(),
284 _s.rend(),
285- [](unsigned char ch) { return !std::isspace(ch); }).base(),
286- _s.end()
287+ [](const auto ch) { return !std::isspace(ch); }
288+ ).base(),
289+ _s.end()
290 );
291 }
292
293diff --git a/implementation/endpoints/include/endpoint_impl.hpp b/implementation/endpoints/include/endpoint_impl.hpp
294index 9d2b303c..685eba4e 100644
295--- a/implementation/endpoints/include/endpoint_impl.hpp
296+++ b/implementation/endpoints/include/endpoint_impl.hpp
297@@ -34,6 +34,9 @@ public:
298 std::uint32_t _max_message_size,
299 configuration::endpoint_queue_limit_t _queue_limit,
300 const std::shared_ptr<configuration>& _configuration);
301+ endpoint_impl(endpoint_impl<Protocol> const&) = delete;
302+ endpoint_impl(endpoint_impl<Protocol> const&&) = delete;
303+
304 virtual ~endpoint_impl();
305
306 void enable_magic_cookies();
307diff --git a/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp b/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp
308index 53f4769a..b1d8991d 100644
309--- a/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp
310+++ b/implementation/endpoints/include/local_server_endpoint_impl_receive_op.hpp
311@@ -25,8 +25,8 @@ struct storage :
312 {
313 socket_type_t &socket_;
314 receive_handler_t handler_;
315- byte_t *buffer_;
316- std::size_t length_;
317+ byte_t *buffer_ = nullptr;
318+ size_t length_;
319 uid_t uid_;
320 gid_t gid_;
321 size_t bytes_;
322diff --git a/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp b/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp
323index d7eede3f..e1e1aaa2 100644
324--- a/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp
325+++ b/implementation/endpoints/include/local_uds_client_endpoint_impl.hpp
326@@ -25,7 +25,7 @@ public:
327 const endpoint_type& _remote,
328 boost::asio::io_context &_io,
329 const std::shared_ptr<configuration>& _configuration);
330- virtual ~local_uds_client_endpoint_impl();
331+ virtual ~local_uds_client_endpoint_impl() = default;
332
333 void start();
334 void stop();
335diff --git a/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp b/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp
336index 1e78822d..a4ed2eb5 100644
337--- a/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp
338+++ b/implementation/endpoints/include/local_uds_server_endpoint_impl.hpp
339@@ -50,7 +50,7 @@ public:
340 const std::shared_ptr<configuration>& _configuration,
341 bool _is_routing_endpoint);
342
343- virtual ~local_uds_server_endpoint_impl();
344+ virtual ~local_uds_server_endpoint_impl() = default;
345
346 void start();
347 void stop();
348diff --git a/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp b/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp
349index 1e4f0fe0..35638cd7 100644
350--- a/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp
351+++ b/implementation/endpoints/include/udp_server_endpoint_impl_receive_op.hpp
352@@ -35,7 +35,7 @@ struct storage :
353 socket_type_t &socket_;
354 endpoint_type_t &sender_;
355 receive_handler_t handler_;
356- byte_t *buffer_;
357+ byte_t *buffer_ = nullptr;
358 size_t length_;
359 std::uint8_t multicast_id_;
360 bool is_v4_;
361diff --git a/implementation/endpoints/src/endpoint_manager_base.cpp b/implementation/endpoints/src/endpoint_manager_base.cpp
362index 9dff9785..4e484454 100644
363--- a/implementation/endpoints/src/endpoint_manager_base.cpp
364+++ b/implementation/endpoints/src/endpoint_manager_base.cpp
365@@ -38,7 +38,7 @@ std::shared_ptr<endpoint> endpoint_manager_base::create_local(client_t _client)
366 return create_local_unlocked(_client);
367 }
368
369-void endpoint_manager_base::remove_local(client_t _client) {
370+void endpoint_manager_base::remove_local(const client_t _client) {
371 std::shared_ptr<endpoint> its_endpoint(find_local(_client));
372 if (its_endpoint) {
373 its_endpoint->register_error_handler(nullptr);
374diff --git a/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp b/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp
375index 0b7e261c..56c621db 100644
376--- a/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp
377+++ b/implementation/endpoints/src/local_uds_client_endpoint_impl.cpp
378@@ -40,12 +40,7 @@ local_uds_client_endpoint_impl::local_uds_client_endpoint_impl(
379 is_supporting_magic_cookies_ = false;
380 }
381
382-local_uds_client_endpoint_impl::~local_uds_client_endpoint_impl() {
383-
384-}
385-
386 bool local_uds_client_endpoint_impl::is_local() const {
387-
388 return true;
389 }
390
391diff --git a/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp b/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp
392index 948fe925..33876c56 100644
393--- a/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp
394+++ b/implementation/endpoints/src/local_uds_server_endpoint_impl.cpp
395@@ -104,17 +104,11 @@ local_uds_server_endpoint_impl::local_uds_server_endpoint_impl(
396 #endif
397 }
398
399-local_uds_server_endpoint_impl::~local_uds_server_endpoint_impl() {
400-
401-}
402-
403 bool local_uds_server_endpoint_impl::is_local() const {
404-
405 return true;
406 }
407
408 void local_uds_server_endpoint_impl::start() {
409-
410 std::lock_guard<std::mutex> its_lock(acceptor_mutex_);
411 if (acceptor_.is_open()) {
412 connection::ptr new_connection = connection::create(
413diff --git a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
414index f42d93d4..e6755157 100644
415--- a/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
416+++ b/implementation/endpoints/src/tcp_client_endpoint_impl.cpp
417@@ -178,7 +178,7 @@ void tcp_client_endpoint_impl::connect() {
418 std::string its_device(configuration_->get_device());
419 if (its_device != "") {
420 if (setsockopt(socket_->native_handle(),
421- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) {
422+ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast<socklen_t>(its_device.size())) == -1) {
423 VSOMEIP_WARNING << "TCP Client: Could not bind to device \"" << its_device << "\"";
424 }
425 }
426diff --git a/implementation/endpoints/src/tcp_server_endpoint_impl.cpp b/implementation/endpoints/src/tcp_server_endpoint_impl.cpp
427index f83252ae..5aef72be 100644
428--- a/implementation/endpoints/src/tcp_server_endpoint_impl.cpp
429+++ b/implementation/endpoints/src/tcp_server_endpoint_impl.cpp
430@@ -55,7 +55,7 @@ tcp_server_endpoint_impl::tcp_server_endpoint_impl(
431 std::string its_device(configuration_->get_device());
432 if (its_device != "") {
433 if (setsockopt(acceptor_.native_handle(),
434- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) {
435+ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast<socklen_t>(its_device.size())) == -1) {
436 VSOMEIP_WARNING << "TCP Server: Could not bind to device \"" << its_device << "\"";
437 }
438 }
439@@ -295,8 +295,8 @@ void tcp_server_endpoint_impl::accept_cbk(const connection::ptr& _connection,
440 auto its_ep = std::dynamic_pointer_cast<tcp_server_endpoint_impl>(
441 shared_from_this());
442 its_timer->async_wait([its_timer, its_ep]
443- (const boost::system::error_code& _error) {
444- if (!_error) {
445+ (const boost::system::error_code& _error_inner) {
446+ if (!_error_inner) {
447 its_ep->start();
448 }
449 });
450@@ -853,12 +853,12 @@ void tcp_server_endpoint_impl::connection::handle_recv_buffer_exception(
451 << std::setfill('0') << std::hex;
452
453 for (std::size_t i = 0; i < recv_buffer_size_ && i < 16; i++) {
454- its_message << std::setw(2) << (int) (recv_buffer_[i]) << " ";
455+ its_message << std::setw(2) << static_cast<int>(recv_buffer_[i]) << " ";
456 }
457
458 its_message << " Last 16 Bytes captured: ";
459 for (int i = 15; recv_buffer_size_ > 15 && i >= 0; i--) {
460- its_message << std::setw(2) << (int) (recv_buffer_[static_cast<size_t>(i)]) << " ";
461+ its_message << std::setw(2) << static_cast<int>(recv_buffer_[static_cast<size_t>(i)]) << " ";
462 }
463 VSOMEIP_ERROR << its_message.str();
464 recv_buffer_.clear();
465@@ -954,7 +954,7 @@ void tcp_server_endpoint_impl::print_status() {
466 std::lock_guard<std::mutex> its_lock(mutex_);
467 connections_t its_connections;
468 {
469- std::lock_guard<std::mutex> its_lock(connections_mutex_);
470+ std::lock_guard<std::mutex> its_lock_inner(connections_mutex_);
471 its_connections = connections_;
472 }
473
474@@ -1027,7 +1027,7 @@ void tcp_server_endpoint_impl::connection::wait_until_sent(const boost::system::
475 }
476 }
477 {
478- std::lock_guard<std::mutex> its_lock(its_server->connections_mutex_);
479+ std::lock_guard<std::mutex> its_lock_inner(its_server->connections_mutex_);
480 stop();
481 }
482 its_server->remove_connection(this);
483diff --git a/implementation/endpoints/src/udp_client_endpoint_impl.cpp b/implementation/endpoints/src/udp_client_endpoint_impl.cpp
484index d6952228..f52b2354 100644
485--- a/implementation/endpoints/src/udp_client_endpoint_impl.cpp
486+++ b/implementation/endpoints/src/udp_client_endpoint_impl.cpp
487@@ -67,7 +67,7 @@ void udp_client_endpoint_impl::connect() {
488 << get_address_port_remote();
489 }
490 socket_->set_option(boost::asio::socket_base::receive_buffer_size(
491- udp_receive_buffer_size_), its_error);
492+ static_cast<int>(udp_receive_buffer_size_)), its_error);
493 if (its_error) {
494 VSOMEIP_WARNING << "udp_client_endpoint_impl::connect: couldn't set "
495 << "SO_RCVBUF: " << its_error.message()
496diff --git a/implementation/endpoints/src/udp_server_endpoint_impl.cpp b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
497index 48e35c5d..587fb94c 100644
498--- a/implementation/endpoints/src/udp_server_endpoint_impl.cpp
499+++ b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
500@@ -72,7 +72,7 @@ udp_server_endpoint_impl::udp_server_endpoint_impl(
501 std::string its_device(configuration_->get_device());
502 if (its_device != "") {
503 if (setsockopt(unicast_socket_.native_handle(),
504- SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), (socklen_t)its_device.size()) == -1) {
505+ SOL_SOCKET, SO_BINDTODEVICE, its_device.c_str(), static_cast<socklen_t>(its_device.size())) == -1) {
506 VSOMEIP_WARNING << "UDP Server: Could not bind to device \"" << its_device << "\"";
507 }
508 }
509@@ -108,7 +108,7 @@ udp_server_endpoint_impl::udp_server_endpoint_impl(
510 const int its_udp_recv_buffer_size =
511 configuration_->get_udp_receive_buffer_size();
512 unicast_socket_.set_option(boost::asio::socket_base::receive_buffer_size(
513- its_udp_recv_buffer_size), ec);
514+ static_cast<int>(its_udp_recv_buffer_size)), ec);
515
516 if (ec) {
517 VSOMEIP_WARNING << "udp_server_endpoint_impl: couldn't set "
518diff --git a/implementation/message/include/message_base_impl.hpp b/implementation/message/include/message_base_impl.hpp
519index acad2e89..2c953e98 100644
520--- a/implementation/message/include/message_base_impl.hpp
521+++ b/implementation/message/include/message_base_impl.hpp
522@@ -6,8 +6,6 @@
523 #ifndef VSOMEIP_V3_MESSAGE_BASE_IMPL_HPP
524 #define VSOMEIP_V3_MESSAGE_BASE_IMPL_HPP
525
526-#include <boost/thread.hpp>
527-
528 #include <vsomeip/export.hpp>
529 #include <vsomeip/message.hpp>
530
531diff --git a/implementation/message/src/deserializer.cpp b/implementation/message/src/deserializer.cpp
532index 3c4eddfa..bfa723d3 100644
533--- a/implementation/message/src/deserializer.cpp
534+++ b/implementation/message/src/deserializer.cpp
535@@ -115,8 +115,8 @@ bool deserializer::deserialize(std::string &_target, std::size_t _length) {
536 if (_length > remaining_ || _length > _target.capacity()) {
537 return false;
538 }
539- _target.assign(position_, position_ + long(_length));
540- position_ += long(_length);
541+ _target.assign(position_, position_ + static_cast<std::vector<byte_t>::difference_type>(_length));
542+ position_ += static_cast<std::vector<byte_t>::difference_type>(_length);
543 remaining_ -= _length;
544
545 return true;
546diff --git a/implementation/plugin/src/plugin_manager_impl.cpp b/implementation/plugin/src/plugin_manager_impl.cpp
547index bea96d01..23b7b892 100644
548--- a/implementation/plugin/src/plugin_manager_impl.cpp
549+++ b/implementation/plugin/src/plugin_manager_impl.cpp
550@@ -164,7 +164,7 @@ bool plugin_manager_impl::unload_plugin(plugin_type_e _type) {
551 }
552 } else {
553 VSOMEIP_ERROR << "plugin_manager_impl::unload_plugin didn't find plugin"
554- << " type:" << (int)_type;
555+ << " type:" << static_cast<int>(_type);
556 return false;
557 }
558 return plugins_.erase(_type);
559diff --git a/implementation/routing/src/routing_manager_base.cpp b/implementation/routing/src/routing_manager_base.cpp
560index dde6b260..047e6566 100644
561--- a/implementation/routing/src/routing_manager_base.cpp
562+++ b/implementation/routing/src/routing_manager_base.cpp
563@@ -1184,8 +1184,8 @@ void routing_manager_base::remove_local(client_t _client,
564 std::lock_guard<std::mutex> its_lock(local_services_mutex_);
565 // Finally remove all services that are implemented by the client.
566 std::set<std::pair<service_t, instance_t>> its_services;
567- for (auto& s : local_services_) {
568- for (auto& i : s.second) {
569+ for (const auto& s : local_services_) {
570+ for (const auto& i : s.second) {
571 if (std::get<2>(i.second) == _client) {
572 its_services.insert({ s.first, i.first });
573 host_->on_availability(s.first, i.first, availability_state_e::AS_UNAVAILABLE,
574@@ -1202,9 +1202,9 @@ void routing_manager_base::remove_local(client_t _client,
575
576 // remove disconnected client from offer service history
577 std::set<std::tuple<service_t, instance_t, client_t>> its_clients;
578- for (auto& s : local_services_history_) {
579- for (auto& i : s.second) {
580- for (auto& c : i.second) {
581+ for (const auto& s : local_services_history_) {
582+ for (const auto& i : s.second) {
583+ for (const auto& c : i.second) {
584 if (c == _client) {
585 its_clients.insert(std::make_tuple(s.first, i.first, c));
586 }
587diff --git a/implementation/runtime/include/application_impl.hpp b/implementation/runtime/include/application_impl.hpp
588index 67187a87..c647b531 100644
589--- a/implementation/runtime/include/application_impl.hpp
590+++ b/implementation/runtime/include/application_impl.hpp
591@@ -309,7 +309,7 @@ private:
592 std::shared_ptr<sync_handler> get_next_handler();
593 void reschedule_availability_handler(const std::shared_ptr<sync_handler> &_handler);
594 bool has_active_dispatcher();
595- bool is_active_dispatcher(const std::thread::id &_id);
596+ bool is_active_dispatcher(const std::thread::id &_id) const;
597 void remove_elapsed_dispatchers();
598
599 void shutdown();
600@@ -436,7 +436,7 @@ private:
601 // Dispatcher threads that are running
602 std::set<std::thread::id> running_dispatchers_;
603 // Mutex to protect access to dispatchers_ & elapsed_dispatchers_
604- std::mutex dispatcher_mutex_;
605+ mutable std::mutex dispatcher_mutex_;
606
607 // Condition to wakeup the dispatcher thread
608 mutable std::condition_variable dispatcher_condition_;
609diff --git a/implementation/runtime/src/application_impl.cpp b/implementation/runtime/src/application_impl.cpp
610index aba906b7..db880b42 100644
611--- a/implementation/runtime/src/application_impl.cpp
612+++ b/implementation/runtime/src/application_impl.cpp
613@@ -426,7 +426,8 @@ void application_impl::start() {
614 std::lock_guard<std::mutex> its_lock(dispatcher_mutex_);
615 is_dispatching_ = true;
616 auto its_main_dispatcher = std::make_shared<std::thread>(
617- std::bind(&application_impl::main_dispatch, shared_from_this()));
618+ &application_impl::main_dispatch, shared_from_this()
619+ );
620 dispatchers_[its_main_dispatcher->get_id()] = its_main_dispatcher;
621 }
622
623@@ -1792,7 +1793,7 @@ void application_impl::main_dispatch() {
624 }
625 } else {
626 std::shared_ptr<sync_handler> its_handler;
627- while (is_dispatching_ && is_active_dispatcher(its_id)
628+ while (is_dispatching_ && is_active_dispatcher(its_id)
629 && (its_handler = get_next_handler())) {
630 its_lock.unlock();
631 invoke_handler(its_handler);
632@@ -2048,7 +2049,7 @@ bool application_impl::has_active_dispatcher() {
633 return false;
634 }
635
636-bool application_impl::is_active_dispatcher(const std::thread::id &_id) {
637+bool application_impl::is_active_dispatcher(const std::thread::id &_id) const {
638 while (is_dispatching_) {
639 if (dispatcher_mutex_.try_lock()) {
640 for (const auto &d : dispatchers_) {
641diff --git a/implementation/security/src/policy.cpp b/implementation/security/src/policy.cpp
642index 36341223..da0bbd86 100644
643--- a/implementation/security/src/policy.cpp
644+++ b/implementation/security/src/policy.cpp
645@@ -175,7 +175,7 @@ policy::deserialize_ids(const byte_t * &_data, uint32_t &_size,
646 if (its_result == false)
647 return false;
648
649- for (const auto i : its_instances)
650+ for (const auto& i : its_instances)
651 its_ids += std::make_pair(i, its_methods);
652
653 its_array_length -= (its_current_size - _size);
654@@ -379,7 +379,7 @@ policy::serialize_interval_set(
655 uint32_t its_interval_set_size(0);
656 serialize_u32(its_interval_set_size, _data);
657
658- for (const auto i : _intervals)
659+ for (const auto& i : _intervals)
660 serialize_interval(i, _data);
661
662 its_interval_set_size = static_cast<uint32_t>(_data.size()
663diff --git a/implementation/security/src/security.cpp b/implementation/security/src/security.cpp
664index a3b6ab3f..19ff73da 100644
665--- a/implementation/security/src/security.cpp
666+++ b/implementation/security/src/security.cpp
667@@ -14,6 +14,7 @@
668 #include "../../plugin/include/plugin_manager.hpp"
669
670 #include <array>
671+#include <iomanip>
672 #include <tuple>
673
674 #ifndef _WIN32
675diff --git a/implementation/service_discovery/src/service_discovery_impl.cpp b/implementation/service_discovery/src/service_discovery_impl.cpp
676index de6e8467..c3880457 100644
677--- a/implementation/service_discovery/src/service_discovery_impl.cpp
678+++ b/implementation/service_discovery/src/service_discovery_impl.cpp
679@@ -5,8 +5,10 @@
680
681 #include <vsomeip/constants.hpp>
682
683-#include <random>
684+#include <chrono>
685+#include <iomanip>
686 #include <forward_list>
687+#include <random>
688 #include <thread>
689
690 #include <vsomeip/internal/logger.hpp>
691@@ -869,7 +871,7 @@ service_discovery_impl::create_eventgroup_entry(
692 << std::setw(4) << _service << "."
693 << std::setw(4) << _instance << "."
694 << std::setw(4) << _eventgroup << "] "
695- << (uint16_t) _reliability_type;
696+ << static_cast<uint16_t>(_reliability_type);
697 return its_data;
698 }
699 std::shared_ptr<eventgroupentry_impl> its_entry, its_other;
700@@ -1074,7 +1076,7 @@ service_discovery_impl::insert_subscription_ack(
701 // Selective
702 if (_clients.size() > 1 || (*(_clients.begin())) != 0) {
703 auto its_selective_option = std::make_shared<selective_option_impl>();
704- (void)its_selective_option->set_clients(_clients);
705+ static_cast<void>(its_selective_option->set_clients(_clients));
706
707 its_data.options_.push_back(its_selective_option);
708 }
709@@ -1136,7 +1138,7 @@ service_discovery_impl::on_message(
710 static bool must_start_last_msg_received_timer(true);
711 boost::system::error_code ec;
712
713- std::lock_guard<std::mutex> its_lock(last_msg_received_timer_mutex_);
714+ std::lock_guard<std::mutex> its_lock_inner(last_msg_received_timer_mutex_);
715 if (0 < last_msg_received_timer_.cancel(ec) || must_start_last_msg_received_timer) {
716 must_start_last_msg_received_timer = false;
717 last_msg_received_timer_.expires_from_now(
718@@ -1272,7 +1274,7 @@ service_discovery_impl::on_message(
719 }
720
721 {
722- std::unique_lock<std::recursive_mutex> its_lock(its_acknowledgement->get_lock());
723+ std::unique_lock<std::recursive_mutex> its_lock_inner(its_acknowledgement->get_lock());
724 its_acknowledgement->complete();
725 // TODO: Check the following logic...
726 if (its_acknowledgement->has_subscription()) {
727@@ -1543,7 +1545,7 @@ service_discovery_impl::process_offerservice_serviceentry(
728 << std::setw(4) << _instance << "."
729 << std::setw(4) << eg << "]"
730 << " using reliability type: "
731- << std::setw(4) << (uint16_t) offer_type;
732+ << std::setw(4) << static_cast<uint16_t>(offer_type);
733 its_info->set_reliability(offer_type);
734 }
735 }
736@@ -1947,7 +1949,7 @@ service_discovery_impl::process_eventgroupentry(
737 << ": SOME/IP length field in SubscribeEventGroup message header: ["
738 << std::dec << _entry->get_owning_message()->get_someip_length()
739 << "] bytes, is shorter than length of deserialized message: ["
740- << (uint32_t) _entry->get_owning_message()->get_length() << "] bytes. "
741+ << static_cast<uint32_t>(_entry->get_owning_message()->get_length()) << "] bytes. "
742 << its_sender.to_string(ec) << " session: "
743 << std::hex << std::setw(4) << std::setfill('0') << its_session;
744 return;
745@@ -2238,7 +2240,7 @@ service_discovery_impl::process_eventgroupentry(
746 boost::system::error_code ec;
747 VSOMEIP_WARNING << __func__
748 << ": Unsupported eventgroup option ["
749- << std::hex << (int)its_option->get_type() << "] "
750+ << std::hex << static_cast<int>(its_option->get_type()) << "] "
751 << its_sender.to_string(ec) << " session: "
752 << std::hex << std::setw(4) << std::setfill('0') << its_session;
753 if (its_ttl > 0) {
754@@ -2332,7 +2334,7 @@ service_discovery_impl::handle_eventgroup_subscription(
755 << std::setw(4) << _instance << "."
756 << std::setw(4) << _eventgroup << "]"
757 << " not valid: Event configuration ("
758- << (std::uint32_t)_info->get_reliability()
759+ << static_cast<std::uint32_t>(_info->get_reliability())
760 << ") does not match the provided endpoint options: "
761 << _first_address.to_string(ec) << ":" << std::dec << _first_port << " "
762 << _second_address.to_string(ec) << ":" << _second_port;
763@@ -2355,14 +2357,14 @@ service_discovery_impl::handle_eventgroup_subscription(
764 boost::system::error_code ec;
765 // TODO: Add session id
766 VSOMEIP_ERROR << __func__
767- << ": Requested major version:[" << (uint32_t) _major
768+ << ": Requested major version:[" << static_cast<uint32_t>(_major)
769 << "] in subscription to service: ["
770 << std::hex << std::setfill('0')
771 << std::setw(4) << _service << "."
772 << std::setw(4) << _instance << "."
773 << std::setw(4) << _eventgroup << "]"
774 << " does not match with services major version:["
775- << (uint32_t) _info->get_major() << "] subscriber: "
776+ << static_cast<uint32_t>(_info->get_major()) << "] subscriber: "
777 << _first_address.to_string(ec) << ":" << std::dec << _first_port;
778 if (_ttl > 0) {
779 insert_subscription_ack(_acknowledgement, its_info, 0, nullptr, _clients);
780@@ -3107,8 +3109,8 @@ service_discovery_impl::move_offers_into_main_phase(
781 const auto its_timer = repetition_phase_timers_.find(_timer);
782 if (its_timer != repetition_phase_timers_.end()) {
783 for (const auto& its_service : its_timer->second) {
784- for (const auto& instance : its_service.second) {
785- instance.second->set_is_in_mainphase(true);
786+ for (const auto& its_instance : its_service.second) {
787+ its_instance.second->set_is_in_mainphase(true);
788 }
789 }
790 repetition_phase_timers_.erase(_timer);
791@@ -3125,7 +3127,7 @@ service_discovery_impl::stop_offer_service(
792 bool stop_offer_required(false);
793 // Delete from initial phase offers
794 {
795- std::lock_guard<std::mutex> its_lock(collected_offers_mutex_);
796+ std::lock_guard<std::mutex> its_lock_inner(collected_offers_mutex_);
797 if (collected_offers_.size()) {
798 auto its_service_it = collected_offers_.find(its_service);
799 if (its_service_it != collected_offers_.end()) {
800@@ -3147,7 +3149,7 @@ service_discovery_impl::stop_offer_service(
801
802 // Delete from repetition phase offers
803 {
804- std::lock_guard<std::mutex> its_lock(repetition_phase_timers_mutex_);
805+ std::lock_guard<std::mutex> its_lock_inner(repetition_phase_timers_mutex_);
806 for (auto rpt = repetition_phase_timers_.begin();
807 rpt != repetition_phase_timers_.end();) {
808 auto its_service_it = rpt->second.find(its_service);
809@@ -3866,7 +3868,7 @@ reliability_type_e service_discovery_impl::get_eventgroup_reliability(
810 << std::setw(4) << _instance << "."
811 << std::setw(4) << _eventgroup << "]"
812 << " using reliability type: "
813- << std::setw(4) << (uint16_t) its_reliability;
814+ << std::setw(4) << static_cast<uint16_t>(its_reliability);
815 its_info->set_reliability(its_reliability);
816 }
817 } else {
818diff --git a/interface/vsomeip/constants.hpp b/interface/vsomeip/constants.hpp
819index 2b040c5e..2519b57f 100644
820--- a/interface/vsomeip/constants.hpp
821+++ b/interface/vsomeip/constants.hpp
822@@ -13,54 +13,54 @@
823
824 namespace vsomeip_v3 {
825
826-const major_version_t DEFAULT_MAJOR = 0x00;
827-const minor_version_t DEFAULT_MINOR = 0x00000000;
828-const ttl_t DEFAULT_TTL = 0xFFFFFF; // "until next reboot"
829+inline constexpr major_version_t DEFAULT_MAJOR = 0x00;
830+inline constexpr minor_version_t DEFAULT_MINOR = 0x00000000;
831+inline constexpr ttl_t DEFAULT_TTL = 0xFFFFFF; // "until next reboot"
832
833 const std::string DEFAULT_MULTICAST = "224.0.0.0";
834-const uint16_t DEFAULT_PORT = 30500;
835-const uint16_t ILLEGAL_PORT = 0xFFFF;
836-const uint16_t ANY_PORT = 0;
837-
838-const uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000;
839-
840-const service_t ANY_SERVICE = 0xFFFF;
841-const instance_t ANY_INSTANCE = 0xFFFF;
842-const eventgroup_t ANY_EVENTGROUP = 0xFFFF;
843-const method_t ANY_METHOD = 0xFFFF;
844-const major_version_t ANY_MAJOR = 0xFF;
845-const minor_version_t ANY_MINOR = 0xFFFFFFFF;
846-
847-const eventgroup_t DEFAULT_EVENTGROUP = 0x0001;
848-
849-const client_t ILLEGAL_CLIENT = 0x0000;
850-const method_t INVALID_METHOD = 0x0000;
851-
852-const byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00;
853-const byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80;
854-const length_t MAGIC_COOKIE_SIZE = 0x00000008;
855-const request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF;
856-const client_t MAGIC_COOKIE_CLIENT = 0xDEAD;
857-const protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01;
858-const interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01;
859-const message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE =
860+inline constexpr uint16_t DEFAULT_PORT = 30500;
861+inline constexpr uint16_t ILLEGAL_PORT = 0xFFFF;
862+inline constexpr uint16_t ANY_PORT = 0;
863+
864+inline constexpr uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000;
865+
866+inline constexpr service_t ANY_SERVICE = 0xFFFF;
867+inline constexpr instance_t ANY_INSTANCE = 0xFFFF;
868+inline constexpr eventgroup_t ANY_EVENTGROUP = 0xFFFF;
869+inline constexpr method_t ANY_METHOD = 0xFFFF;
870+inline constexpr major_version_t ANY_MAJOR = 0xFF;
871+inline constexpr minor_version_t ANY_MINOR = 0xFFFFFFFF;
872+
873+inline constexpr eventgroup_t DEFAULT_EVENTGROUP = 0x0001;
874+
875+inline constexpr client_t ILLEGAL_CLIENT = 0x0000;
876+inline constexpr method_t INVALID_METHOD = 0x0000;
877+
878+inline constexpr byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00;
879+inline constexpr byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80;
880+inline constexpr length_t MAGIC_COOKIE_SIZE = 0x00000008;
881+inline constexpr request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF;
882+inline constexpr client_t MAGIC_COOKIE_CLIENT = 0xDEAD;
883+inline constexpr protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01;
884+inline constexpr interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01;
885+inline constexpr message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE =
886 message_type_e::MT_REQUEST_NO_RETURN;
887-const message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE =
888+inline constexpr message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE =
889 message_type_e::MT_NOTIFICATION;
890-const return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK;
891+inline constexpr return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK;
892
893-const byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
894+inline constexpr byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
895 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x01, 0x00 };
896
897-const byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00,
898+inline constexpr byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00,
899 0x08, 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x02, 0x00 };
900
901-const event_t ANY_EVENT = 0xFFFF;
902-const client_t ANY_CLIENT = 0xFFFF;
903+inline constexpr event_t ANY_EVENT = 0xFFFF;
904+inline constexpr client_t ANY_CLIENT = 0xFFFF;
905
906-const int VSOMEIP_ALL = -1;
907+inline constexpr int VSOMEIP_ALL = -1;
908
909-const pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0;
910+inline constexpr pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0;
911
912 } // namespace vsomeip_v3
913
914diff --git a/test/network_tests/application_tests/application_test.cpp b/test/network_tests/application_tests/application_test.cpp
915index a4a1923d..c70b6cd5 100644
916--- a/test/network_tests/application_tests/application_test.cpp
917+++ b/test/network_tests/application_tests/application_test.cpp
918@@ -3,6 +3,7 @@
919 // License, v. 2.0. If a copy of the MPL was not distributed with this
920 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
921
922+#include <atomic>
923 #include <thread>
924 #include <mutex>
925 #include <condition_variable>
926diff --git a/tools/vsomeip_ctrl.cpp b/tools/vsomeip_ctrl.cpp
927index 74510427..3e74a832 100644
928--- a/tools/vsomeip_ctrl.cpp
929+++ b/tools/vsomeip_ctrl.cpp
930@@ -29,7 +29,6 @@ public:
931 instance_(_instance),
932 app_(vsomeip::runtime::get()->create_application("vsomeip_ctrl")),
933 wait_service_available_(true),
934- send_thread_(std::bind(&vsomeip_sender::send, this)),
935 service_id_(0x0),
936 method_id_(0x0),
937 length_(0),
938@@ -39,6 +38,8 @@ public:
939 return_code_(vsomeip::return_code_e::E_UNKNOWN),
940 wait_for_answer_(true)
941 {
942+ send_thread_ = std::thread{&vsomeip_sender::send, this};
943+
944 if (user_message_.size() < VSOMEIP_PAYLOAD_POS) {
945 VSOMEIP_ERROR << "Provided message is to short, min. length "
946 "is 16 Bytes, exiting.";
947@@ -117,11 +118,11 @@ public:
948 << std::setw(4) << _response->get_instance() << "]:";
949 VSOMEIP_INFO << "########## begin message";
950 VSOMEIP_INFO << std::hex << std::setw(4) << std::setfill('0')
951- << _response->get_service()
952+ << _response->get_service()
953 << std::hex << std::setw(4) << std::setfill('0')
954 << _response->get_method()
955 << " # service id / instance id";
956- VSOMEIP_INFO << std::hex << std::setw(8) << std::setfill('0')
957+ VSOMEIP_INFO << std::hex << std::setw(8) << std::setfill('0')
958 << _response->get_length() << " # length";
959 VSOMEIP_INFO << std::hex << std::setw(4) << std::setfill('0')
960 << _response->get_client()
961@@ -243,7 +244,7 @@ private:
962 }
963
964 if (use_tcp_ && user_message_.size() > VSOMEIP_MAX_TCP_MESSAGE_SIZE) {
965- VSOMEIP_WARNING << "Max allowed message size for TCP is "
966+ VSOMEIP_WARNING << "Max allowed message size for TCP is "
967 << std::dec << VSOMEIP_MAX_TCP_MESSAGE_SIZE
968 << ". Provided message size is: " << user_message_.size();
969 }
diff --git a/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch b/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch
deleted file mode 100644
index b15c8029ec..0000000000
--- a/meta-networking/recipes-protocols/vsomeip/vsomeip/0002-network_tests-Include-iomanip-system-header.patch
+++ /dev/null
@@ -1,324 +0,0 @@
1From 9b806483d804ab335f7161fdd6248ae3e7ae3bde Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 9 Aug 2024 13:50:05 -0700
4Subject: [PATCH 2/2] network_tests: Include iomanip system header
5
6Latest gcc-14/clang-18 needs this header for setfill and setw
7
8Upstream-Status: Submitted [https://github.com/COVESA/vsomeip/pull/751]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 .../network_tests/big_payload_tests/big_payload_test_service.hpp | 1 +
12 test/network_tests/cpu_load_tests/cpu_load_test_service.cpp | 1 +
13 test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp | 1 +
14 test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp | 1 +
15 test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp | 1 +
16 test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp | 1 +
17 test/network_tests/e2e_tests/e2e_test_client.hpp | 1 +
18 test/network_tests/e2e_tests/e2e_test_service.hpp | 1 +
19 test/network_tests/event_tests/event_test_service.cpp | 1 +
20 .../header_factory_tests/header_factory_test_client.hpp | 1 +
21 .../header_factory_tests/header_factory_test_service.hpp | 1 +
22 test/network_tests/npdu_tests/npdu_test_client.hpp | 1 +
23 test/network_tests/npdu_tests/npdu_test_service.hpp | 1 +
24 test/network_tests/payload_tests/payload_test_client.hpp | 1 +
25 test/network_tests/payload_tests/payload_test_service.hpp | 1 +
26 .../restart_routing_tests/restart_routing_test_client.hpp | 1 +
27 .../restart_routing_tests/restart_routing_test_service.hpp | 1 +
28 .../routing_tests/external_local_routing_test_service.hpp | 1 +
29 test/network_tests/routing_tests/local_routing_test_client.hpp | 1 +
30 test/network_tests/routing_tests/local_routing_test_service.hpp | 1 +
31 .../second_address_tests/second_address_test_service.cpp | 1 +
32 test/network_tests/security_tests/security_test_client.hpp | 1 +
33 test/network_tests/security_tests/security_test_service.hpp | 1 +
34 .../suspend_resume_tests/suspend_resume_test_service.cpp | 1 +
35 24 files changed, 24 insertions(+)
36
37diff --git a/test/network_tests/big_payload_tests/big_payload_test_service.hpp b/test/network_tests/big_payload_tests/big_payload_test_service.hpp
38index 44af28a9..101b6758 100644
39--- a/test/network_tests/big_payload_tests/big_payload_test_service.hpp
40+++ b/test/network_tests/big_payload_tests/big_payload_test_service.hpp
41@@ -14,6 +14,7 @@
42 #include <condition_variable>
43 #include <functional>
44 #include <queue>
45+#include <iomanip>
46
47 #include "big_payload_test_globals.hpp"
48 #include <vsomeip/internal/logger.hpp>
49diff --git a/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp b/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp
50index 3d935e39..a98f3edf 100644
51--- a/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp
52+++ b/test/network_tests/cpu_load_tests/cpu_load_test_service.cpp
53@@ -13,6 +13,7 @@
54 #include <functional>
55 #include <numeric>
56 #include <cmath> // for isfinite
57+#include <iomanip>
58
59 #include "cpu_load_test_globals.hpp"
60 #include <vsomeip/internal/logger.hpp>
61diff --git a/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp b/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp
62index ad002913..82d5e7e2 100644
63--- a/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp
64+++ b/test/network_tests/e2e_tests/e2e_profile_04_test_client.hpp
65@@ -14,6 +14,7 @@
66 #include <mutex>
67 #include <condition_variable>
68 #include <atomic>
69+#include <iomanip>
70
71 class e2e_profile_04_test_client {
72 public:
73diff --git a/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp b/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp
74index 25617917..17852b85 100644
75--- a/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp
76+++ b/test/network_tests/e2e_tests/e2e_profile_04_test_service.hpp
77@@ -17,6 +17,7 @@
78 #include <condition_variable>
79 #include <mutex>
80 #include <thread>
81+#include <iomanip>
82
83 class e2e_profile_04_test_service {
84 public:
85diff --git a/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp b/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp
86index 9b10a589..30d889b5 100644
87--- a/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp
88+++ b/test/network_tests/e2e_tests/e2e_profile_07_test_client.hpp
89@@ -14,6 +14,7 @@
90 #include <mutex>
91 #include <condition_variable>
92 #include <atomic>
93+#include <iomanip>
94
95 class e2e_profile_07_test_client {
96 public:
97diff --git a/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp b/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp
98index ad6488a5..ea1cc05c 100644
99--- a/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp
100+++ b/test/network_tests/e2e_tests/e2e_profile_07_test_service.hpp
101@@ -17,6 +17,7 @@
102 #include <condition_variable>
103 #include <mutex>
104 #include <thread>
105+#include <iomanip>
106
107 class e2e_profile_07_test_service {
108 public:
109diff --git a/test/network_tests/e2e_tests/e2e_test_client.hpp b/test/network_tests/e2e_tests/e2e_test_client.hpp
110index 10f49784..c253f101 100644
111--- a/test/network_tests/e2e_tests/e2e_test_client.hpp
112+++ b/test/network_tests/e2e_tests/e2e_test_client.hpp
113@@ -18,6 +18,7 @@
114 #include <mutex>
115 #include <condition_variable>
116 #include <atomic>
117+#include <iomanip>
118
119 class e2e_test_client {
120 public:
121diff --git a/test/network_tests/e2e_tests/e2e_test_service.hpp b/test/network_tests/e2e_tests/e2e_test_service.hpp
122index 7fd1c5a9..e839aacb 100644
123--- a/test/network_tests/e2e_tests/e2e_test_service.hpp
124+++ b/test/network_tests/e2e_tests/e2e_test_service.hpp
125@@ -16,6 +16,7 @@
126 #include <thread>
127 #include <mutex>
128 #include <condition_variable>
129+#include <iomanip>
130
131 class e2e_test_service {
132 public:
133diff --git a/test/network_tests/event_tests/event_test_service.cpp b/test/network_tests/event_tests/event_test_service.cpp
134index 3728a827..d1f117e2 100644
135--- a/test/network_tests/event_tests/event_test_service.cpp
136+++ b/test/network_tests/event_tests/event_test_service.cpp
137@@ -10,6 +10,7 @@
138 #include <thread>
139 #include <map>
140 #include <atomic>
141+#include <iomanip>
142
143 #include <gtest/gtest.h>
144
145diff --git a/test/network_tests/header_factory_tests/header_factory_test_client.hpp b/test/network_tests/header_factory_tests/header_factory_test_client.hpp
146index 79461b69..b72bbdca 100644
147--- a/test/network_tests/header_factory_tests/header_factory_test_client.hpp
148+++ b/test/network_tests/header_factory_tests/header_factory_test_client.hpp
149@@ -14,6 +14,7 @@
150 #include <mutex>
151 #include <condition_variable>
152 #include <functional>
153+#include <iomanip>
154
155 #include "../someip_test_globals.hpp"
156 #include <common/vsomeip_app_utilities.hpp>
157diff --git a/test/network_tests/header_factory_tests/header_factory_test_service.hpp b/test/network_tests/header_factory_tests/header_factory_test_service.hpp
158index 7879946a..a553adde 100644
159--- a/test/network_tests/header_factory_tests/header_factory_test_service.hpp
160+++ b/test/network_tests/header_factory_tests/header_factory_test_service.hpp
161@@ -13,6 +13,7 @@
162 #include <mutex>
163 #include <condition_variable>
164 #include <functional>
165+#include <iomanip>
166
167 #include "../someip_test_globals.hpp"
168 #include <common/vsomeip_app_utilities.hpp>
169diff --git a/test/network_tests/npdu_tests/npdu_test_client.hpp b/test/network_tests/npdu_tests/npdu_test_client.hpp
170index 2f469d40..7f615f14 100644
171--- a/test/network_tests/npdu_tests/npdu_test_client.hpp
172+++ b/test/network_tests/npdu_tests/npdu_test_client.hpp
173@@ -15,6 +15,7 @@
174 #include <condition_variable>
175 #include <functional>
176 #include <map>
177+#include <iomanip>
178
179 #include "../npdu_tests/npdu_test_globals.hpp"
180 #include "../someip_test_globals.hpp"
181diff --git a/test/network_tests/npdu_tests/npdu_test_service.hpp b/test/network_tests/npdu_tests/npdu_test_service.hpp
182index bef06806..1caae785 100644
183--- a/test/network_tests/npdu_tests/npdu_test_service.hpp
184+++ b/test/network_tests/npdu_tests/npdu_test_service.hpp
185@@ -15,6 +15,7 @@
186 #include <functional>
187 #include <chrono>
188 #include <deque>
189+#include <iomanip>
190
191 class npdu_test_service
192 {
193diff --git a/test/network_tests/payload_tests/payload_test_client.hpp b/test/network_tests/payload_tests/payload_test_client.hpp
194index 1bab6ba6..1754320c 100644
195--- a/test/network_tests/payload_tests/payload_test_client.hpp
196+++ b/test/network_tests/payload_tests/payload_test_client.hpp
197@@ -15,6 +15,7 @@
198 #include <mutex>
199 #include <condition_variable>
200 #include <functional>
201+#include <iomanip>
202
203 #include "../someip_test_globals.hpp"
204 #include <common/vsomeip_app_utilities.hpp>
205diff --git a/test/network_tests/payload_tests/payload_test_service.hpp b/test/network_tests/payload_tests/payload_test_service.hpp
206index 7d3c01d5..06dbb684 100644
207--- a/test/network_tests/payload_tests/payload_test_service.hpp
208+++ b/test/network_tests/payload_tests/payload_test_service.hpp
209@@ -13,6 +13,7 @@
210 #include <mutex>
211 #include <condition_variable>
212 #include <functional>
213+#include <iomanip>
214
215 #include "../someip_test_globals.hpp"
216 #include <common/vsomeip_app_utilities.hpp>
217diff --git a/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp b/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp
218index 8a7c9e70..6a758318 100644
219--- a/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp
220+++ b/test/network_tests/restart_routing_tests/restart_routing_test_client.hpp
221@@ -19,6 +19,7 @@
222 #include <condition_variable>
223 #include <atomic>
224 #include <future>
225+#include <iomanip>
226
227 class routing_restart_test_client {
228 public:
229diff --git a/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp b/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp
230index 7660b8fc..1fe4d86c 100644
231--- a/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp
232+++ b/test/network_tests/restart_routing_tests/restart_routing_test_service.hpp
233@@ -16,6 +16,7 @@
234 #include <thread>
235 #include <mutex>
236 #include <condition_variable>
237+#include <iomanip>
238
239 class routing_restart_test_service {
240 public:
241diff --git a/test/network_tests/routing_tests/external_local_routing_test_service.hpp b/test/network_tests/routing_tests/external_local_routing_test_service.hpp
242index 2499bc84..b1e2dfd8 100644
243--- a/test/network_tests/routing_tests/external_local_routing_test_service.hpp
244+++ b/test/network_tests/routing_tests/external_local_routing_test_service.hpp
245@@ -13,6 +13,7 @@
246 #include <mutex>
247 #include <condition_variable>
248 #include <functional>
249+#include <iomanip>
250
251 #include "../someip_test_globals.hpp"
252 #include <common/vsomeip_app_utilities.hpp>
253diff --git a/test/network_tests/routing_tests/local_routing_test_client.hpp b/test/network_tests/routing_tests/local_routing_test_client.hpp
254index 09af0bf0..69ee6bfc 100644
255--- a/test/network_tests/routing_tests/local_routing_test_client.hpp
256+++ b/test/network_tests/routing_tests/local_routing_test_client.hpp
257@@ -14,6 +14,7 @@
258 #include <mutex>
259 #include <condition_variable>
260 #include <functional>
261+#include <iomanip>
262
263 #include "../someip_test_globals.hpp"
264 #include <common/vsomeip_app_utilities.hpp>
265diff --git a/test/network_tests/routing_tests/local_routing_test_service.hpp b/test/network_tests/routing_tests/local_routing_test_service.hpp
266index 109dade4..932423d8 100644
267--- a/test/network_tests/routing_tests/local_routing_test_service.hpp
268+++ b/test/network_tests/routing_tests/local_routing_test_service.hpp
269@@ -13,6 +13,7 @@
270 #include <mutex>
271 #include <condition_variable>
272 #include <functional>
273+#include <iomanip>
274
275 #include "../someip_test_globals.hpp"
276 #include <common/vsomeip_app_utilities.hpp>
277diff --git a/test/network_tests/second_address_tests/second_address_test_service.cpp b/test/network_tests/second_address_tests/second_address_test_service.cpp
278index fc9d0a28..3ffa493f 100644
279--- a/test/network_tests/second_address_tests/second_address_test_service.cpp
280+++ b/test/network_tests/second_address_tests/second_address_test_service.cpp
281@@ -9,6 +9,7 @@
282 #include <sstream>
283 #include <thread>
284 #include <map>
285+#include <iomanip>
286
287 #include <gtest/gtest.h>
288 #include <vsomeip/vsomeip.hpp>
289diff --git a/test/network_tests/security_tests/security_test_client.hpp b/test/network_tests/security_tests/security_test_client.hpp
290index ab3d98b8..bd331138 100644
291--- a/test/network_tests/security_tests/security_test_client.hpp
292+++ b/test/network_tests/security_tests/security_test_client.hpp
293@@ -18,6 +18,7 @@
294 #include <mutex>
295 #include <condition_variable>
296 #include <atomic>
297+#include <iomanip>
298
299 class security_test_client {
300 public:
301diff --git a/test/network_tests/security_tests/security_test_service.hpp b/test/network_tests/security_tests/security_test_service.hpp
302index 87fb94fd..1f227072 100644
303--- a/test/network_tests/security_tests/security_test_service.hpp
304+++ b/test/network_tests/security_tests/security_test_service.hpp
305@@ -16,6 +16,7 @@
306 #include <thread>
307 #include <mutex>
308 #include <condition_variable>
309+#include <iomanip>
310
311 class security_test_service {
312 public:
313diff --git a/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp b/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp
314index 6f099ce7..dc9df239 100644
315--- a/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp
316+++ b/test/network_tests/suspend_resume_tests/suspend_resume_test_service.cpp
317@@ -7,6 +7,7 @@
318 #include <mutex>
319 #include <thread>
320 #include <atomic>
321+#include <iomanip>
322
323 #include <gtest/gtest.h>
324
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 @@
1From b1bf398015bc090020459954e5cd1ec3b51b8ac3 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Tue, 11 Jul 2023 16:53:46 +0800
4Subject: [PATCH] Do not build external gtest
5
6We don't need to build external gtest since we already depend on
7googletest.
8
9Upstream-Status: Inappropriate [embedded specific]
10
11Signed-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
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index 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 ###################################################################################################
40diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
41index 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
75diff --git a/test/network_tests/CMakeLists.txt b/test/network_tests/CMakeLists.txt
76index 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--
1862.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
26diff --git a/CMakeLists.txt b/CMakeLists.txt
27index 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--
462.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 36fa196a5f..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,17 +7,17 @@ SECTION = "net"
7LICENSE = "MPL-2.0" 7LICENSE = "MPL-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
9 9
10GTEST_VER = "1.15.2"
10SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=master;protocol=https;name=vsomeip \ 11SRC_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 file://0001-Update-to-C-17-560.patch \
17 file://0002-network_tests-Include-iomanip-system-header.patch \
18 " 17 "
19 18
20SRCREV = "02c199dff8aba814beebe3ca417fd991058fe90c" 19SRCREV = "6461369b3874c844642c9adaac9d1b7406794ab8"
20SRC_URI[gtest.sha256sum] = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926"
21 21
22COMPATIBLE_HOST:mips = "null" 22COMPATIBLE_HOST:mips = "null"
23COMPATIBLE_HOST:mips64 = "null" 23COMPATIBLE_HOST:mips64 = "null"
@@ -26,12 +26,12 @@ COMPATIBLE_HOST:libc-musl = 'null'
26 26
27DEPENDS = "boost dlt-daemon googletest" 27DEPENDS = "boost dlt-daemon googletest"
28 28
29S = "${WORKDIR}/git"
30 29
31inherit cmake pkgconfig 30inherit cmake pkgconfig
32 31
33EXTRA_OECMAKE = "-DINSTALL_LIB_DIR:PATH=${baselib} \ 32EXTRA_OECMAKE = "-DINSTALL_LIB_DIR:PATH=${baselib} \
34 -DINSTALL_CMAKE_DIR:PATH=${baselib}/cmake/vsomeip3 \ 33 -DINSTALL_CMAKE_DIR:PATH=${baselib}/cmake/vsomeip3 \
34 -DGTEST_ROOT=${S}/googletest-${GTEST_VER} \
35 " 35 "
36 36
37# For vsomeip-test 37# For vsomeip-test
@@ -63,7 +63,7 @@ do_install:append() {
63 63
64 for d in unit_tests network_tests; do 64 for d in unit_tests network_tests; do
65 install -d ${D}/opt/${PN}-test/test/$d 65 install -d ${D}/opt/${PN}-test/test/$d
66 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
67 done 67 done
68} 68}
69 69
@@ -75,3 +75,4 @@ FILES:${PN}-dbg += " \
75FILES:${PN}-test = " \ 75FILES:${PN}-test = " \
76 /opt/${PN}-test \ 76 /opt/${PN}-test \
77 " 77 "
78SKIP_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 @@
1From 754b0ca247b2d789f9f613f8757b9732494e9489 Mon Sep 17 00:00:00 2001
2From: Yaakov Selkowitz <yselkowi@redhat.com>
3Date: Thu, 6 Mar 2025 21:03:28 -0500
4Subject: [PATCH] Fix build with GCC 15
5
6GCC 15 defaults to C23, in which the interpretation of function
7declarations without parameters changed from unspecified to `void`. This
8results in `control_handle_lac_status` not being compatible with the
9expected callback function type. Adding the expected type parameters,
10albeit unused, fixes the compatibility.
11
12Upstream-Status: Submitted [https://github.com/xelerance/xl2tpd/pull/272]
13Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
14---
15 xl2tpd.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/xl2tpd.c b/xl2tpd.c
19index 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}"
8LICENSE = "GPL-2.0-only" 8LICENSE = "GPL-2.0-only"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" 9LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
10 10
11SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https" 11SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https \
12 file://0001-Fix-build-with-GCC-15.patch \
13"
12SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" 14SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295"
13 15
14UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases" 16UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases"
15 17
16S = "${WORKDIR}/git"
17 18
18inherit update-rc.d 19inherit update-rc.d
19 20