From patchwork Fri Aug 9 10:53:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7950 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WgLNv3vBvz3wwf for ; Fri, 9 Aug 2024 10:53:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WgLNs6Qzbz3vW; Fri, 9 Aug 2024 10:53:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WgLNs3Tzwz33xN; Fri, 9 Aug 2024 10:53:17 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WgLNq0RHGz33LN for ; Fri, 9 Aug 2024 10:53:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4WgLNp1TXyz375; Fri, 9 Aug 2024 10:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1723200794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7pS13zJWC4+MxArlulzuYwtNR147mTYsQMpIsjmayj8=; b=jFJzv+liycpL/+C5yJocwF/HNqBkTv6ASRuolifro6ParHbjTAIeGpcnoVVjQ0BlArxDjD yBe9/Dsj3ZiW2nHFsw44jth9xSuDsvq+YnjySzH4mgH5VbzP8qCooyqNcLI+c5iRUwNA8b 2ZmNnKFAO61x9d2L7P0bHi3IQrFQIQb+m07ekA+l43ZHC43GDcG5StPbaxCNdnf/j3+PfM dH0N1DqZ5QZISOvKrvafUDbgI0Ha6YwBrKxsQi4XM2OcjNUnLrUMG2gP5qWBtw7hTL6dXC 0wKgaqSonGmee2UzwIiQRGZEbDiaj5XlgCWZClyrLysf+KkzZjmyhCtHC5DAVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1723200794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7pS13zJWC4+MxArlulzuYwtNR147mTYsQMpIsjmayj8=; b=s4NBX1BZjE1S70954W9/e5agrHXXs8nFowyf51dymjfzTuzAC8jOV+zLM6BqN1o/z43WhX Bj/qgioraQDrUPAQ== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] libnet: Update to version 1.3 Date: Fri, 9 Aug 2024 12:53:11 +0200 Message-ID: <20240809105311.6204-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: NFJTLJ2I6Q76GFM3OVH46U5A5XTR4OYY X-Message-ID-Hash: NFJTLJ2I6Q76GFM3OVH46U5A5XTR4OYY X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - Update from version 1.1.6 to 1.3 - Update of rootfile - sobump gives suricata and arping as dependencies so those packages also need to be shipped. - Changelog 1.3 ### Changes - License change of critical files from 4-clause BSD to 3-clause and 2-clause BSD. This fixes issue #85: "GPL license compatibility". - Migrate from Travis-CI (Linux) and Appveyor (Win32) to GitHub Actions - Win32 changes: - switch to npcap from winpcap - Simplify and update build scripts - Encode version in DLL instead of in filename - Add support for LLDP, mandatory TLVs. - Add support for Cisco UniDirectional Link Detection (UDLD), RFC5171 - Initial support for unit tests: - `libnet-build_ethernet()` - Complete UDLD API tests - Initial "devcontainer": provide VS Code development environment for rapid setup of a development environment - Run unit tests in GitHub Actions - New GitHub Action for FreeBSD 13 clang/gcc - Calling `libnet_init()` with a RAW type no longer sets a TX buffer max size. Use the new `libnet_setfd_max_sndbuf()` instead when needed. - Remove support for `SOCK_PACKET` sockets causing invalid builds on, e.g., musl libc. We assume everyone on Linux has `PF_PACKET` now. ### Fixes - Fix #139: fail-to-build-from-source on FreeBSD - Fix #122: unused parameter warnings - Fix #123: potential memory leak in `libnet_cq_add()` - Fix #124: potential name conflict with C++ keyword `new` - Fix #96: pointer type warnings when dumping raw data with `%p` - Fix #97: non-standard types: - `int64_t` instead of `__int64_t` for mingw cross build - `uint32_t` instead of `u_int` and `uint16_t` instead of `u_short` - Fix #98: lots of signed vs unsigned comparisons - Fix #102: possible buffer overflows in `libnet_plist_chain_dump_string()` - Reproducible build fixes for man-page generation, use LC_ALL=C and UTC - Simplify `fixmanpages` - Fix #120: possible NULL pointer dereference in `libnet_cq_add()` - Fix #120: memory leak in `libnet_plist_chain_new()` - Fix segmentation fault in `libnet_ifaddrlist()` - Fix #150: segfault when number of IPs > 512 1.2 ### Changes - Removed Lua bindings from repo and dist files, now available separately - Removed generated HTML and Nroff (man pages) documentation files, must be regenerated with Doxygen using `make doc` - Add `pkg-config` support with `libnet.pc`, replaces `libnet-config` tool, although it is kept for compatibility for now - Factorize socket setup code for socket opening to provide output device selection for IPv4 - Make `libnet_get_hwaddr()` work with 802.1q interfaces in bpf (BSD) - New API for OSPF HELLO messages, with neighbor ### Fixes - Use `getifaddrs()` on OpnBSD and Linux - For samples, `netinet/in.h` is not on windows - Fix errors with missing `IPPROTO_MH` on windows - Fix build error on Mac OS X - Fix #34 checksum caculation when IPv6 extension headers being used - Remove unneeded trailing `-Wl` from `-version-info` line - `libnet_build_snmp()` fix warning - Use `LIBNET_*RESOLVE` const in `libnet_name2addr*` - Fix i486 sample synflood6 warning - Some samples need `#include` for `IPPROTO_*` on OpenBSD 5.2 - Fix gcc warnings - Check for `socklen_t`. Suggested by g.esp and Stefanos Harhalakis - libnet: update for obsolete INCLUDE directive - Fix warning inside comment - Automatic link options `#pragma comment(lib, ...)` are only for MSVC - Fix several warnings for MS C/C++ compiler - `libnet_open_raw4()` doesn't return a SOCKET on win32 - Fixes error messages sometimes include newline, sometimes not - Properly set `l->err_buf` if `libnet_ifaddrlist()` fails - dlpi: Try harder to find the device for the interface - dlpi: Correctly extract unit number from devices with numbers in their name - Make interface selection work for interfaces with multiple addresses - Fix memory leak, device list needs to freed after use - Fix file descriptor leak in `libnet_ifaddrlist()` - Fix `libnet_get_hwaddr()` for large(!) number of interfaces - Fix to support musl libc, removes support for GLIBC <2.1 - Fix win32 buffer overrun in `libnet_get_ipaddr4()` - Interface selection was ignoring interfaces with IPv6 - Use `LIBNET_API` on public functions, instead of an export file - Add Visual Studio 2010 project files, with build instructions - Define INET6 on IRIX, making libnet compile cleanly - Check for FreeBSD pre-11 before enabling `LIBNET_BSD_BYTE_SWAP` - Use `LIBNET_BSDISH_OS` and `LIBNET_BSD_BYTE_SWAP` on Darwin - Add BSD byteswap for Darwin. Otherwise `sendto(` returns `EINVAL` - `netinet/in.h` is needed for `IPPROTO_` and `sockaddr_in` Signed-off-by: Adolf Belka --- config/rootfiles/common/libnet | 14 ++++++++------ lfs/libnet | 9 +++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/config/rootfiles/common/libnet b/config/rootfiles/common/libnet index ffa20fd0e..07d741391 100644 --- a/config/rootfiles/common/libnet +++ b/config/rootfiles/common/libnet @@ -9,9 +9,11 @@ #usr/include/libnet/libnet-types.h #usr/lib/libnet.a #usr/lib/libnet.la -usr/lib/libnet.so -usr/lib/libnet.so.1 -usr/lib/libnet.so.1.7.0 -#usr/share/man/man3/libnet-functions.h.3 -#usr/share/man/man3/libnet-macros.h.3 -#usr/share/man/man3/libnet.h.3 +#usr/lib/libnet.so +usr/lib/libnet.so.9 +usr/lib/libnet.so.9.0.0 +#usr/lib/pkgconfig/libnet.pc +#usr/share/doc/libnet +#usr/share/doc/libnet/ChangeLog.md +#usr/share/doc/libnet/LICENSE +#usr/share/doc/libnet/README.md diff --git a/lfs/libnet b/lfs/libnet index 7768d9fae..7f44f2f1e 100644 --- a/lfs/libnet +++ b/lfs/libnet @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2024 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@ include Config -VER = 1.1.6 +VER = 1.3 THISAPP = libnet-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = 328ff98701fc19dc4f717e47ad5bc490741b248588eadc196de16b66ffa2df27ce58105c704d640fa6d93ba254259d4e90d03babdb33fc0f1f0e2b18ed448c4b +$(DL_FILE)_BLAKE2 = b43f15143e6a1de3350b814d7acd4a41d61eb08e6dfeb729868e55f65c445942ae52905953f3a4fad00402b47fc5119634233ea3ae28806c1869bb34ef6fba9b install : $(TARGET) @@ -71,7 +71,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) $(UPDATE_AUTOMAKE) - cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && ./configure \ + --prefix=/usr cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install @rm -rf $(DIR_APP)