summaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2023-02-21 08:02:28 +0000
committerDenis Ovsienko <denis@ovsienko.info>2023-02-22 20:05:58 +0000
commit10b807441e79f9c9e557bbb44ae0ecfe01ed5151 (patch)
treed7da9a0f2ba7dad133266afd85c376d061fdb5e1 /CHANGES
parent64a786abab1ede316c9b23b0ba6efb28bf51917e (diff)
downloadtcpdump-10b807441e79f9c9e557bbb44ae0ecfe01ed5151.tar.gz
Detect OS IPv6 support using AF_INET6 only.
tcpdump source code has not been using struct in6_addr since commit 0c9cfdc in 2019, so lose the conditional structure declaration, which is a no-op. Since commit de7c619 in 2015 netdissect-stdinc.h on Windows defines HAVE_OS_IPV6_SUPPORT if AF_INET6 if defined, which makes it equivalent to AF_INET6. On Unix-like systems taking struct in6_addr out of scope would make HAVE_OS_IPV6_SUPPORT equivalent to AF_INET6, thus after removing struct in6_addr remove HAVE_OS_IPV6_SUPPORT together with Autoconf and CMake checks that define it. Leave an unrelated CMake workaround in place for later debugging. On Windows do not define AF_INET6 if it is not defined, which makes AF_INET6 a universal indicator of the OS IPv6 support on all supported OSes. The few remaining use cases that genuinely need AF_INET6 use it to make OS API calls, so if the macro is not defined, it most likely means such an API call in the best case would return just a well-formed error status. With this in mind, in win32_gethostbyaddr() and ip6addr_string() guard all IPv6-specific code with #ifdef AF_INET6. In tcpdump.c add a comment to note why a guard is not required for Casper-specific conditional code that uses AF_INET6. This way when the OS does not support IPv6, IPv6 addresses will not resolve to names, which is expected. Other than that, tcpdump should be able to process IPv6 addresses the usual way regardless if the OS would be able to process the packets with these addresses.
Diffstat (limited to 'CHANGES')
-rw-r--r--CHANGES1
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 75929a20..8af3559d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -48,6 +48,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
At build time require a proof of suitable snprintf(3) implementation in
libc (and document Solaris 9 as unsupported because of that).
Autoconf: Remove detection of early IPv6 stacks.
+ Detect OS IPv6 support using AF_INET6 only.
DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
Summary for 4.99.4 tcpdump release (so far!)