Denis Ovsienko [Sat, 31 Dec 2022 03:04:58 +0000 (03:04 +0000)]
CHANGES: Refine the 4.99.2 section. [skip ci]
List user-visible changes that have been made but did not appear in the
change log. Remove entries that are duplicate (including EIGRP from
4.99.1) or have been superseded by later changes (make releasetar).
Francois-Xavier Le Bail [Wed, 30 Nov 2022 11:05:07 +0000 (12:05 +0100)]
CI: Introduce and use TCPDUMP_CMAKE_TAINTED
The new environment variable provides means to declare all or some libpcap
cmake run of a specific environment (CI or a working copy) as tainted.
Add explicit conditions to exempt the cmake run that emit warnings
now and request the compiler to treat warnings as errors *iff* the cmake
run is not tainted. This way if a cmake run that is warning-free now
degrades later, CI will fail it.
The treat warnings as errors cmake option used is:
-Werror=dev
Make developer warnings errors.
Make warnings that are meant for the author of the CMake-
Lists.txt files errors. By default this will also turn on depre-
cated warnings as errors.
Francois-Xavier Le Bail [Fri, 25 Nov 2022 14:49:52 +0000 (15:49 +0100)]
cmake: Update the minimum required version to 2.8.12 (except Windows)
Windows minimum required is already 3.12.
This change avoids this warning:
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Francois-Xavier Le Bail [Mon, 31 Oct 2022 16:20:18 +0000 (17:20 +0100)]
Remove the release candidate rcX targets
These tricky targets used "autoreconf -f" (via "make releasetar") and
they changed the VERSION and configure files locally.
If building a release candidate tar archive is needed, it's better to:
Update VERSION with rcX suffix and configure via "autoreconf -f",
commit them, add a tag and build the archive via "make releasetar".
It should display: Archive build from tag tcpdump-...rcX.
Note: the "autoreconf -f" command changes the configure file in an
uncontrolled way (runstatedir, #define LARGE_OFF_T, etc.) depending on
the autoconf version.
It is necessary to choose the parts that will be added in the commit
with "git add -i".
Francois-Xavier Le Bail [Fri, 28 Oct 2022 16:34:55 +0000 (18:34 +0200)]
Use "git archive" for the "make releasetar" process
Use the release tag if it exists or use HEAD.
Remove the "autoreconf -f" command, because it changes the configure file
locally in an uncontrolled way (runstatedir, #define LARGE_OFF_T, etc.)
depending on the autoconf version. This command is run in the release
process before a commit and we can choose the parts that will be added
in the commit.
Note:
The following target (rcX) must be updated ou removed in a next step
because it was using "autoreconf -f" (via "make releasetar") and it
changes the VERSION and configure files locally.
This change
1) Ensures that we only release files from tag/HEAD, not locally
modified ones.
2) Avoids disclosing personal data such as the username/group of the
local user.
3) Puts by default a umask of 0002, which turns off the world write bit
on files in the archive.
4) Avoids problems on some OSes (no more tar, Git builtin tar.gz
handling).
Guy Harris [Fri, 30 Sep 2022 23:29:34 +0000 (16:29 -0700)]
configure: use pcap-config --static-pcap-only if available.
If we're linking with a libpcap in ../libpcap*, it's static, but we only
need to link with the libraries on wich it immediately depends, we don't
need to link with the libraries on which those libraries depend, etc..
So, if ../libpcap*/pcap-config supports --static-pcap-only, use that.
Sam James [Mon, 12 Sep 2022 16:28:58 +0000 (17:28 +0100)]
configure.ac: fix configure tests broken with Clang 15 (implicit function declarations)
Clang 15 makes implicit function declarations fatal by default which
leads to some of tcpdump's configure tests silently failing/returning
the wrong result.
This adds the needed #includes to various tests for the functions used,
resolving the following errors:
```
net-analyzer/tcpdump-4.99.1/clang15.log:47:error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
net-analyzer/tcpdump-4.99.1/clang15.log:51:error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:55:error: call to undeclared library function 'sscanf' with type 'int (const char *restrict, const char *restrict, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:68:error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:112:error: call to undeclared function 'ether_ntohost'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
net-analyzer/tcpdump-4.99.1/clang15.log:115:error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
```
Nicholas Reilly [Wed, 31 Aug 2022 21:01:08 +0000 (17:01 -0400)]
ICMPv6: Fix the Node Information flags
Don't use htons() when defining the constants because the flags
field is already eventually swapped by fetching with GET_BE_U_2().
Remove unused flags NI_SUPTYPE_FLAG_COMPRESS and NI_FQDN_FLAG_VALIDTTL.
Add a test file with various NI_NODEADDR_FLAG* flags.
Francois-Xavier Le Bail [Wed, 10 Aug 2022 13:02:33 +0000 (15:02 +0200)]
CHDLC: Modernize packet parsing
Enable ND_LONGJMP_FROM_TCHECK and remove the "trunc" labels.
Use ND_ICHECK_U() for length checks and add standard "invalid" sections.
Remove a ndo_ll_hdr_len increment in a truncation case.
Update chdlc_print() to a void function.
Remove a now useless variable.
Guy Harris [Thu, 21 Jul 2022 08:32:44 +0000 (01:32 -0700)]
juniper: don't do bounds checking for fields in the cookie.
l2info.cookie is not inside the packet - it's a copy of data from the
packet, with the copy doing the necessary bounds checking - so we
shouldn't use NT_TCHECK or GET macros on it.
Guy Harris [Sun, 17 Jul 2022 17:56:05 +0000 (10:56 -0700)]
pflog: use nd_ipv4 and nd_ipv6 for addresses in the header.
We should be using nd_ types in structures that are overlaid on packets,
so that we control the field offsets (as independently of the compiler
as possible) and to make it more difficult to fetch data fromt he packet
without using packet data accessor routines (to force bounds checking
and conversion from the appropriate byte order to host byte order as
necessary).