On Thu, 17 Apr 2025 18:51:31 +0200
Laurent Vivier
As the iov_tail has a non zero offset (because of the presence of packet headers in the iov array), we must copy it to a new iov array (using iov_splice()) to pass it to sendmsg().
We cannot use anymore iov_tail_msghdr(), so remove it.
Signed-off-by: Laurent Vivier
--- icmp.c | 30 +++++++++++++++++++----------- icmp.h | 2 +- iov.c | 23 ----------------------- iov.h | 2 -- tap.c | 7 ++----- 5 files changed, 22 insertions(+), 42 deletions(-) diff --git a/icmp.c b/icmp.c index d27d860b4af4..44d431d53c96 100644 --- a/icmp.c +++ b/icmp.c @@ -44,6 +44,7 @@
#define ICMP_ECHO_TIMEOUT 60 /* s, timeout for ICMP socket activity */ #define ICMP_NUM_IDS (1U << 16) +#define MAX_IOV_ICMP 16
Is there any specific / normative reason why you picked 16 here, or it's arbitrary and supposed to be good enough? If it's arbitrary, perhaps indicate it with /* Arbitrary, should be enough */ or suchlike. -- Stefano