mptcpd: update to version 0.13

Changes since v0.12:
 7fb6416 tests: fix segfault with no /etc/protocols (#286)
 0dddc42 README: Update branch references in badge URLs
 5eea3f4 github: Update branch names for actions
 b102523 scripts: get debug info for bug reports
 334bb9c Make listening socket creation optional. (#297)
 a4e7b65 {etc,man}: improve check_route address notification flag documentation (#301)
 ffa276f Support ELL 0.68 l_netlink_message API. (#303)
 269f10a gh: daily validation of the ELL compatibility (#308)
 824ff8c Support listener events (#304)
 5d9f33a Some clean-ups (#305)
 05a08bf lib: switch to v4.0.1: only added items (#306)
 3702487 scripts: debug: also print system info (#307)
 5d8db15 ell: only include 'ell/ell.h' header (#309)
 772afe9 AUTHORS: Update e-mail addresses.
 0c36dba mptcpd 0.13

Drop backported patches which are part of the release.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2024-11-16 17:36:04 +00:00
parent 11b3b811b3
commit 46e1b60f5d
5 changed files with 3 additions and 945 deletions

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mptcpd
PKG_VERSION:=0.12
PKG_VERSION:=0.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/multipath-tcp/mptcpd/releases/download/v$(PKG_VERSION)
PKG_HASH:=0507d497383b773a168cd35f4680b41894fcd8d941cb6619800a8e2bed831cbe
PKG_HASH:=7acb115c50c89aff5e0e5c53df4aef5c9846e79b32442f8700ff6d737396edab
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-clause

View File

@@ -1,193 +0,0 @@
From 334bb9c87005d851f4f2549f95342b8d0a41a6db Mon Sep 17 00:00:00 2001
From: marco-a-itl <marco.angaroni@italtel.com>
Date: Fri, 23 Aug 2024 11:05:35 +0200
Subject: [PATCH] Make listening socket creation optional. (#297)
In some cases, it is known in advanced that external applications have
created or will create listening sockets, and mptcpd doesn't need to do
that to avoid reporting failures because the address and port are
already in use.
This commit makes listening socket creation optional for userspace path
manager plugins by extending the API: it is now possible to call
`mptcpd_pm_add_addr_no_listener()` instead of `mptcpd_pm_add_addr()` to
announce a new address without creating a new listener socket.
Fixes #296.
---
include/mptcpd/path_manager.h | 18 ++++++++++++++++
include/mptcpd/private/path_manager.h | 31 ++++++++++++++++-----------
lib/path_manager.c | 28 +++++++++++++++++++-----
src/netlink_pm_mptcp_org.c | 5 ++++-
src/netlink_pm_upstream.c | 25 ++++++++++-----------
5 files changed, 76 insertions(+), 31 deletions(-)
--- a/include/mptcpd/path_manager.h
+++ b/include/mptcpd/path_manager.h
@@ -127,6 +127,24 @@ MPTCPD_API int mptcpd_pm_add_addr(struct
mptcpd_token_t token);
/**
+ * @brief Advertise new network address to peers without creating a listener.
+ *
+ * @param[in] pm The mptcpd path manager object.
+ * @param[in,out] addr Local IP address and port to be advertised
+ * through the MPTCP protocol @c ADD_ADDR
+ * option. If the port is zero no port will be
+ * specified on the underlying protocol level.
+ * @param[in] id MPTCP local address ID.
+ * @param[in] token MPTCP connection token.
+ *
+ * @return @c 0 if operation was successful. -1 or @c errno otherwise.
+ */
+MPTCPD_API int mptcpd_pm_add_addr_no_listener(struct mptcpd_pm *pm,
+ struct sockaddr *addr,
+ mptcpd_aid_t id,
+ mptcpd_token_t token);
+
+/**
* @brief Stop advertising network address to peers.
*
* @param[in] pm The mptcpd path manager object.
--- a/include/mptcpd/private/path_manager.h
+++ b/include/mptcpd/private/path_manager.h
@@ -138,18 +138,22 @@ struct mptcpd_pm_cmd_ops
/**
* @brief Advertise new network address to peers.
*
- * @param[in] pm The mptcpd path manager object.
- * @param[in,out] addr Local IP address and port to be
- * advertised through the MPTCP protocol
- * @c ADD_ADDR option. If the port is
- * zero an ephemeral port will be chosen,
- * and assigned to the appropriate
- * underlying address family-specific
- * port member, e.g. @c sin_port or
- * @c sin6_port. The port will be in
- * network byte order.
- * @param[in] id MPTCP local address ID.
- * @param[in] token MPTCP connection token.
+ * @param[in] pm The mptcpd path manager object.
+ * @param[in,out] addr Local IP address and port to be
+ * advertised through the MPTCP protocol
+ * @c ADD_ADDR option. If the port is
+ * zero an ephemeral port will be chosen,
+ * and assigned to the appropriate
+ * underlying address family-specific
+ * port member, e.g. @c sin_port or
+ * @c sin6_port. The port will be in
+ * network byte order.
+ * If listener is not created, port zero
+ * will cause no port specification at
+ * protocol level.
+ * @param[in] id MPTCP local address ID.
+ * @param[in] token MPTCP connection token.
+ * @param[in] listener Create listener.
*
* @return @c 0 if operation was successful. -1 or @c errno
* otherwise.
@@ -157,7 +161,8 @@ struct mptcpd_pm_cmd_ops
int (*add_addr)(struct mptcpd_pm *pm,
struct sockaddr *addr,
mptcpd_aid_t id,
- mptcpd_token_t token);
+ mptcpd_token_t token,
+ bool listener);
/**
* @brief Stop advertising network address to peers.
--- a/lib/path_manager.c
+++ b/lib/path_manager.c
@@ -238,10 +238,11 @@ int mptcpd_kpm_set_flags(struct mptcpd_p
// -------------------------------------------------------------------
-int mptcpd_pm_add_addr(struct mptcpd_pm *pm,
- struct sockaddr *addr,
- mptcpd_aid_t address_id,
- mptcpd_token_t token)
+static int do_pm_add_addr(struct mptcpd_pm *pm,
+ struct sockaddr *addr,
+ mptcpd_aid_t address_id,
+ mptcpd_token_t token,
+ bool listener)
{
if (pm == NULL || addr == NULL || address_id == 0)
return EINVAL;
@@ -258,7 +259,24 @@ int mptcpd_pm_add_addr(struct mptcpd_pm
return ops->add_addr(pm,
addr,
address_id,
- token);
+ token,
+ listener);
+}
+
+int mptcpd_pm_add_addr(struct mptcpd_pm *pm,
+ struct sockaddr *addr,
+ mptcpd_aid_t address_id,
+ mptcpd_token_t token)
+{
+ return do_pm_add_addr(pm, addr, address_id, token, true);
+}
+
+int mptcpd_pm_add_addr_no_listener(struct mptcpd_pm *pm,
+ struct sockaddr *addr,
+ mptcpd_aid_t address_id,
+ mptcpd_token_t token)
+{
+ return do_pm_add_addr(pm, addr, address_id, token, false);
}
int mptcpd_pm_remove_addr(struct mptcpd_pm *pm,
--- a/src/netlink_pm_mptcp_org.c
+++ b/src/netlink_pm_mptcp_org.c
@@ -155,8 +155,11 @@ static bool append_remote_addr_attr(stru
static int mptcp_org_add_addr(struct mptcpd_pm *pm,
struct sockaddr *addr,
mptcpd_aid_t id,
- mptcpd_token_t token)
+ mptcpd_token_t token,
+ bool listener)
{
+ (void) listener;
+
/*
Payload:
Token
--- a/src/netlink_pm_upstream.c
+++ b/src/netlink_pm_upstream.c
@@ -219,20 +219,21 @@ static int send_add_addr(struct mptcpd_p
static int upstream_announce(struct mptcpd_pm *pm,
struct sockaddr *addr,
mptcpd_aid_t id,
- mptcpd_token_t token)
+ mptcpd_token_t token,
+ bool listener)
{
- /**
- * Set up MPTCP listening socket.
- *
- * @note An ephemeral port will be assigned to the port in
- * @a addr if it is zero.
- *
- * @todo This should be optional.
- */
- int const r = mptcpd_lm_listen(pm->lm, addr);
+ if (listener) {
+ /**
+ * Set up MPTCP listening socket.
+ *
+ * @note An ephemeral port will be assigned to the port in
+ * @a addr if it is zero.
+ */
+ int const r = mptcpd_lm_listen(pm->lm, addr);
- if (r != 0)
- return r;
+ if (r != 0)
+ return r;
+ }
/**
* @todo Add support for the optional network interface index

View File

@@ -1,187 +0,0 @@
From ffa276fc8ee18321b3c2f22deae2e254a69ae4dc Mon Sep 17 00:00:00 2001
From: Ossama Othman <ossama.othman@intel.com>
Date: Sat, 14 Sep 2024 17:50:13 +0900
Subject: [PATCH] Support ELL 0.68 l_netlink_message API. (#303)
* configure: Check for l_netlink_message_new_sized()
ELL 0.68 introduced a non-backward compatible change to its API by
introducing a new l_netlink_message API to simplify use of the
l_netlink_send() function. Check for the existence of the new API in
the mptcpd configure script.
* network_monitor: Support ELL l_netlink_message API
Support both the pre- and post- ELL 0.68 versions of l_netlink_send()
function.
* network_monitor: Refactor l_netlink_send() calls.
Refactor #ifdef blocks containing calls to the pre- and post-0.68
ELL l_netlink_send() calls to a separate helper functions. This
simplifies the code, and obviates the need to have an #ifdef block
each time l_netlink_send() is called. Many thanks to Matthieu Baerts
for making this suggestion.
* configure: Bump copyright year.
---
configure.ac | 8 +++-
lib/network_monitor.c | 95 +++++++++++++++++++++++++++++++------------
2 files changed, 77 insertions(+), 26 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
-# Copyright (c) 2017-2023, Intel Corporation
+# Copyright (c) 2017-2024, Intel Corporation
AC_PREREQ([2.69])
AC_INIT([mptcpd],
@@ -265,6 +265,12 @@ AC_CHECK_FUNC([l_hashmap_replace],
[AC_DEFINE([HAVE_L_HASHMAP_REPLACE],
[],
[ELL has l_hashmap_replace()])])
+
+dnl l_netlink_message_new_sized() was introduced in ELL v0.68.
+AC_CHECK_FUNC([l_netlink_message_new_sized],
+ [AC_DEFINE([HAVE_L_NETLINK_MESSAGE_NEW_SIZED],
+ [],
+ [ELL has l_netlink_message_new_sized()])])
LIBS=$mptcpd_save_libs
# ---------------------------------------------------------------
--- a/lib/network_monitor.c
+++ b/lib/network_monitor.c
@@ -4,7 +4,7 @@
*
* @brief mptcpd network device monitoring.
*
- * Copyright (c) 2017-2022, Intel Corporation
+ * Copyright (c) 2017-2022, 2024, Intel Corporation
*/
#ifdef HAVE_CONFIG_H
@@ -96,6 +96,51 @@ struct mptcpd_nm
};
// -------------------------------------------------------------------
+// Helper Functions
+// -------------------------------------------------------------------
+
+/**
+ * @brief Wrap different versions of ELL @c l_netlink_send().
+ *
+ * ELL 0.68 changed the API for @c l_netlink_send(). This helper
+ * function wraps the two different function calls so that mptcpd will
+ * work with both pre- and post-0.68 @c l_netlink_send() APIs.
+ */
+static unsigned int netlink_send(struct l_netlink *netlink,
+ uint16_t type,
+ uint16_t flags,
+ void const *data,
+ uint32_t len,
+ l_netlink_command_func_t function,
+ void *user_data,
+ l_netlink_destroy_func_t destroy)
+{
+#ifdef HAVE_L_NETLINK_MESSAGE_NEW_SIZED
+ // ELL >= 0.68
+ struct l_netlink_message *const message =
+ l_netlink_message_new_sized(type, flags, len);
+
+ l_netlink_message_add_header(message, data, len);
+
+ return l_netlink_send(netlink,
+ message,
+ function,
+ user_data,
+ destroy);
+#else
+ // ELL < 0.68
+ return l_netlink_send(netlink,
+ type,
+ flags,
+ data,
+ len,
+ function,
+ user_data,
+ destroy);
+#endif
+}
+
+// -------------------------------------------------------------------
// Network Address Information Handling
// -------------------------------------------------------------------
@@ -1015,14 +1060,14 @@ static void check_default_route(struct n
*/
mptcpd_addr_get(ai);
- if (l_netlink_send(ai->nm->rtnl,
- RTM_GETROUTE,
- 0,
- &store,
- buf - (char *) &store,
- handle_rtm_getroute,
- ai,
- NULL) == 0) {
+ if (netlink_send(ai->nm->rtnl,
+ RTM_GETROUTE,
+ 0,
+ &store,
+ buf - (char *) &store,
+ handle_rtm_getroute,
+ ai,
+ NULL) == 0) {
l_debug("Route lookup failed");
mptcpd_addr_put(ai);
}
@@ -1388,14 +1433,14 @@ static void send_getaddr_command(void *u
// Get IP addresses.
struct ifaddrmsg addr_msg = { .ifa_family = AF_UNSPEC };
- if (l_netlink_send(nm->rtnl,
- RTM_GETADDR,
- NLM_F_DUMP,
- &addr_msg,
- sizeof(addr_msg),
- handle_rtm_getaddr,
- nm,
- NULL) == 0) {
+ if (netlink_send(nm->rtnl,
+ RTM_GETADDR,
+ NLM_F_DUMP,
+ &addr_msg,
+ sizeof(addr_msg),
+ handle_rtm_getaddr,
+ nm,
+ NULL) == 0) {
l_error("Unable to obtain IP addresses.");
/*
@@ -1481,14 +1526,14 @@ struct mptcpd_nm *mptcpd_nm_create(uint3
* resulted in an EBUSY error.
*/
struct ifinfomsg link_msg = { .ifi_family = AF_UNSPEC };
- if (l_netlink_send(nm->rtnl,
- RTM_GETLINK,
- NLM_F_DUMP,
- &link_msg,
- sizeof(link_msg),
- handle_rtm_getlink,
- nm,
- send_getaddr_command)
+ if (netlink_send(nm->rtnl,
+ RTM_GETLINK,
+ NLM_F_DUMP,
+ &link_msg,
+ sizeof(link_msg),
+ handle_rtm_getlink,
+ nm,
+ send_getaddr_command)
== 0) {
l_error("Unable to obtain network devices.");
mptcpd_nm_destroy(nm);

View File

@@ -1,562 +0,0 @@
From b1239f7518de8d5d59ac51e3b9e30f45c7286c80 Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Date: Sat, 26 Oct 2024 12:41:31 +0200
Subject: [PATCH] ell: only include 'ell/ell.h' header
When looking at the code of other projects using ELL (IWD, BlueZ,
Ofono), it looks like only 'ell.h' should be included, not individual
header files from the 'ell' header directory.
That looks like the way to go, because when looking at ell/genl.h, it
uses functions declared in ell/netlink.h, without including this file
before. This causes issues when compiling the code using libell-dev
installed on the system:
libtool: compile: gcc (...) -c path_manager.c (...)
In file included from path_manager.c:21:
/usr/include/ell/genl.h: In function 'l_genl_attr_next':
/usr/include/ell/genl.h:98:16: error: implicit declaration of function 'l_netlink_attr_next'; did you mean 'l_genl_attr_next'? [-Wimplicit-function-declaration]
98 | return l_netlink_attr_next((struct l_netlink_attr *) attr,
| ^~~~~~~~~~~~~~~~~~~
| l_genl_attr_next
/usr/include/ell/genl.h: In function 'l_genl_attr_recurse':
/usr/include/ell/genl.h:105:16: error: implicit declaration of function 'l_netlink_attr_recurse'; did you mean 'l_genl_attr_recurse'? [-Wimplicit-function-declaration]
105 | return l_netlink_attr_recurse((struct l_netlink_attr *) attr,
| ^~~~~~~~~~~~~~~~~~~~~~
| l_genl_attr_recurse
make[2]: *** [Makefile:597: libmptcpd_la-path_manager.lo] Error 1
All .c files including ELL header files have been modified to include
only <ell/ell.h>. The .cpp file in the tests has not been modified,
because it looks like that causes some issues. For the same reason,
include/mptcpd/private/plugin.h file has not been modified as well.
Closes: #302
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
lib/hash_sockaddr.c | 6 +-----
lib/id_manager.c | 9 +--------
lib/listener_manager.c | 8 +-------
lib/network_monitor.c | 10 +---------
lib/path_manager.c | 8 +-------
lib/plugin.c | 8 +-------
lib/sockaddr.c | 5 +----
plugins/path_managers/addr_adv.c | 7 +------
plugins/path_managers/sspi.c | 7 +------
src/commands.c | 7 +------
src/configuration.c | 9 +--------
src/mptcpd.c | 7 +------
src/netlink_pm.c | 6 +-----
src/netlink_pm_mptcp_org.c | 4 +---
src/netlink_pm_upstream.c | 7 +------
src/path_manager.c | 9 +--------
tests/plugins/noop/noop.c | 6 +-----
tests/plugins/priority/one.c | 6 +-----
tests/plugins/priority/two.c | 6 +-----
tests/plugins/security/four.c | 6 +-----
tests/plugins/security/three.c | 6 +-----
tests/test-addr-info.c | 3 +--
tests/test-commands.c | 11 +----------
tests/test-configuration.c | 8 +-------
tests/test-id-manager.c | 3 +--
tests/test-listener-manager.c | 7 +------
tests/test-murmur-hash.c | 7 +------
tests/test-network-monitor.c | 9 +--------
tests/test-path-manager.c | 9 +--------
tests/test-plugin.c | 3 +--
tests/test-sockaddr.c | 7 +------
31 files changed, 31 insertions(+), 183 deletions(-)
--- a/lib/hash_sockaddr.c
+++ b/lib/hash_sockaddr.c
@@ -16,11 +16,7 @@
#include <string.h>
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h>
-#pragma GCC diagnostic pop
-
+#include <ell/ell.h>
#include <mptcpd/private/murmur_hash.h>
--- a/lib/id_manager.c
+++ b/lib/id_manager.c
@@ -20,14 +20,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/hashmap.h>
-#include <ell/uintset.h>
-#include <ell/util.h>
-#include <ell/log.h>
-#include <ell/random.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/murmur_hash.h>
#include <mptcpd/private/id_manager.h>
--- a/lib/listener_manager.c
+++ b/lib/listener_manager.c
@@ -19,13 +19,7 @@
#include <errno.h>
#include <string.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/hashmap.h>
-#include <ell/util.h>
-#include <ell/log.h>
-#include <ell/random.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/murmur_hash.h>
#include <mptcpd/private/listener_manager.h>
--- a/lib/network_monitor.c
+++ b/lib/network_monitor.c
@@ -23,15 +23,7 @@
#include <net/if.h> // For standard network interface flags.
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/netlink.h>
-#include <ell/log.h>
-#include <ell/util.h>
-#include <ell/queue.h>
-#include <ell/timeout.h>
-#include <ell/rtnl.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/path_manager.h>
#include <mptcpd/private/sockaddr.h>
--- a/lib/path_manager.c
+++ b/lib/path_manager.c
@@ -16,13 +16,7 @@
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/genl.h>
-#include <ell/queue.h>
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/path_manager.h>
#include <mptcpd/private/path_manager.h>
--- a/lib/plugin.c
+++ b/lib/plugin.c
@@ -20,13 +20,7 @@
#include <unistd.h>
#include <assert.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/queue.h>
-#include <ell/hashmap.h>
-#include <ell/util.h>
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
/**
* @todo Remove this preprocessor symbol definition once support for
--- a/lib/sockaddr.c
+++ b/lib/sockaddr.c
@@ -11,10 +11,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/sockaddr.h>
--- a/plugins/path_managers/addr_adv.c
+++ b/plugins/path_managers/addr_adv.c
@@ -13,12 +13,7 @@
#include <errno.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by ELL log macros.
-#include <ell/log.h>
-#pragma GCC diagnostic pop
-
+#include <ell/ell.h>
#include <mptcpd/private/path_manager.h>
#include <mptcpd/private/configuration.h>
--- a/plugins/path_managers/sspi.c
+++ b/plugins/path_managers/sspi.c
@@ -17,12 +17,7 @@
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#include <ell/queue.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/network_monitor.h>
#include <mptcpd/path_manager.h>
--- a/src/commands.c
+++ b/src/commands.c
@@ -16,12 +16,7 @@
#include <string.h>
#include <arpa/inet.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/genl.h>
-#include <ell/util.h> // For L_STRINGIFY needed by l_error(), etc.
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include "commands.h"
--- a/src/configuration.c
+++ b/src/configuration.c
@@ -21,14 +21,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/log.h>
-#include <ell/util.h>
-#include <ell/settings.h>
-#include <ell/queue.h>
-#include <ell/string.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/types.h>
--- a/src/mptcpd.c
+++ b/src/mptcpd.c
@@ -15,12 +15,7 @@
#include <signal.h>
#include <assert.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#include <ell/main.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/configuration.h>
--- a/src/netlink_pm.c
+++ b/src/netlink_pm.c
@@ -10,11 +10,7 @@
#include <stdbool.h>
#include <stdio.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/log.h>
-#include <ell/util.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include "netlink_pm.h"
--- a/src/netlink_pm_mptcp_org.c
+++ b/src/netlink_pm_mptcp_org.c
@@ -15,9 +15,7 @@
#include <errno.h>
#include <stdio.h>
-#include <ell/genl.h>
-#include <ell/util.h> // For L_STRINGIFY needed by l_error(), etc.
-#include <ell/log.h>
+#include <ell/ell.h>
#include "commands.h"
#include "netlink_pm.h"
--- a/src/netlink_pm_upstream.c
+++ b/src/netlink_pm_upstream.c
@@ -15,12 +15,7 @@
#include <errno.h>
#include <sys/socket.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/genl.h>
-#include <ell/util.h> // For L_STRINGIFY needed by l_error(), etc.
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/types.h>
#include <mptcpd/listener_manager.h>
--- a/src/path_manager.c
+++ b/src/path_manager.c
@@ -21,14 +21,7 @@
#include <arpa/inet.h> // For inet_ntop().
#include <netinet/in.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/genl.h>
-#include <ell/log.h>
-#include <ell/queue.h>
-#include <ell/timeout.h>
-#include <ell/util.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/path_manager.h>
#include <mptcpd/private/path_manager.h>
--- a/tests/plugins/noop/noop.c
+++ b/tests/plugins/noop/noop.c
@@ -7,11 +7,7 @@
* Copyright (c) 2019-2022, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#ifdef HAVE_CONFIG_H
# include <mptcpd/private/config.h>
--- a/tests/plugins/priority/one.c
+++ b/tests/plugins/priority/one.c
@@ -7,11 +7,7 @@
* Copyright (c) 2019-2022, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#ifdef HAVE_CONFIG_H
# include <mptcpd/private/config.h>
--- a/tests/plugins/priority/two.c
+++ b/tests/plugins/priority/two.c
@@ -7,11 +7,7 @@
* Copyright (c) 2019-2022, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#ifdef HAVE_CONFIG_H
# include <mptcpd/private/config.h>
--- a/tests/plugins/security/four.c
+++ b/tests/plugins/security/four.c
@@ -7,11 +7,7 @@
* Copyright (c) 2019-2022, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#ifdef HAVE_CONFIG_H
# include <mptcpd/private/config.h>
--- a/tests/plugins/security/three.c
+++ b/tests/plugins/security/three.c
@@ -7,11 +7,7 @@
* Copyright (c) 2019-2022, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // For L_STRINGIFY needed by l_error().
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#ifdef HAVE_CONFIG_H
# include <mptcpd/private/config.h>
--- a/tests/test-addr-info.c
+++ b/tests/test-addr-info.c
@@ -8,8 +8,7 @@
*/
#include <arpa/inet.h> // htonl() and htons()
-#include <ell/log.h>
-#include <ell/test.h>
+#include <ell/ell.h>
#include <mptcpd/addr_info.h>
#include <mptcpd/private/addr_info.h>
--- a/tests/test-commands.c
+++ b/tests/test-commands.c
@@ -14,16 +14,7 @@
#include <arpa/inet.h>
#include <net/if.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/main.h>
-#include <ell/idle.h>
-#include <ell/util.h> // Needed by <ell/log.h>
-#include <ell/log.h>
-#include <ell/netlink.h>
-#include <ell/rtnl.h>
-#include <ell/test.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
// Internal Headers
// -----------------
--- a/tests/test-configuration.c
+++ b/tests/test-configuration.c
@@ -7,13 +7,7 @@
* Copyright (c) 2019, 2021, Intel Corporation
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/main.h>
-#include <ell/util.h> // Needed by <ell/log.h>
-#include <ell/log.h>
-#include <ell/test.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/configuration.h> // INTERNAL!
--- a/tests/test-id-manager.c
+++ b/tests/test-id-manager.c
@@ -9,8 +9,7 @@
#include <stddef.h>
-#include <ell/log.h>
-#include <ell/test.h>
+#include <ell/ell.h>
#include <mptcpd/private/id_manager.h>
#include <mptcpd/id_manager.h>
--- a/tests/test-listener-manager.c
+++ b/tests/test-listener-manager.c
@@ -11,12 +11,7 @@
#include <netinet/in.h>
#include <sys/un.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h>
-#include <ell/log.h>
-#include <ell/test.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/listener_manager.h>
#include <mptcpd/listener_manager.h>
--- a/tests/test-murmur-hash.c
+++ b/tests/test-murmur-hash.c
@@ -10,12 +10,7 @@
#include <stdint.h>
#include <stddef.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/util.h> // Needed by <ell/log.h>.
-#include <ell/log.h>
-#include <ell/test.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/murmur_hash.h>
--- a/tests/test-network-monitor.c
+++ b/tests/test-network-monitor.c
@@ -15,14 +15,7 @@
#include <netinet/in.h> // For INET_ADDRSTRLEN and INET6_ADDRSTRLEN.
#include <net/if.h> // For standard network interface flags.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/main.h>
-#include <ell/idle.h>
-#include <ell/util.h> // Needed by <ell/log.h>
-#include <ell/log.h>
-#include <ell/queue.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/network_monitor.h>
#include <mptcpd/network_monitor.h>
--- a/tests/test-path-manager.c
+++ b/tests/test-path-manager.c
@@ -9,14 +9,7 @@
#include <unistd.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/main.h>
-#include <ell/genl.h>
-#include <ell/timeout.h>
-#include <ell/util.h> // Needed by <ell/log.h>
-#include <ell/log.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include "test-util.h"
--- a/tests/test-plugin.c
+++ b/tests/test-plugin.c
@@ -14,8 +14,7 @@
#include <stdlib.h>
#include <stdbool.h>
-#include <ell/test.h>
-#include <ell/queue.h>
+#include <ell/ell.h>
#include <mptcpd/plugin.h>
#include <mptcpd/private/plugin.h>
--- a/tests/test-sockaddr.c
+++ b/tests/test-sockaddr.c
@@ -9,12 +9,7 @@
#include <sys/un.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#include <ell/log.h>
-#include <ell/test.h>
-#include <ell/util.h>
-#pragma GCC diagnostic pop
+#include <ell/ell.h>
#include <mptcpd/private/sockaddr.h>

View File

@@ -9,7 +9,7 @@ Subject: [PATCH 09/11] 7
--- a/src/configuration.c
+++ b/src/configuration.c
@@ -52,7 +52,10 @@
@@ -51,7 +51,10 @@
# error Problem configuring default log message destination.
#endif
/// Name of the default logging function determined at compile-time.