]> The Tcpdump Group git mirrors - libpcap/commit
Mind all-zeroes IPv6 netmask tetras in gen_hostop6().
authorDenis Ovsienko <[email protected]>
Sat, 29 Mar 2025 14:03:15 +0000 (14:03 +0000)
committerDenis Ovsienko <[email protected]>
Tue, 8 Apr 2025 10:38:17 +0000 (11:38 +0100)
commit8788f6815528c8e39964354523e38c79c4c06af0
tree0aa4582757d21632f9c89af94e9e63f9e17d8977
parent8620df13397e5f6f1dc23202f28c365d3071ca59
Mind all-zeroes IPv6 netmask tetras in gen_hostop6().

Produce as few comparison blocks as possible: skip all zero 32-bit
parts, generate one always-true comparison only if it is the only
comparison block.

Now the unoptimized filter program for "ip6 dst net ::/0" has only one
always-true comparison, longer IPv6 netmasks have none and are the same
as the optimized version.
gencode.c
testprogs/TESTrun