Skip to content

Conversation

@infrastation
Copy link
Member

This comprises two follow-ups to pull request #1573 and a few small improvements.

In my recent commit 1687065 the filter programs for "vxlan [NUM]",
"vxlan and vxlan", "geneve [NUM]" and "geneve and geneve" have become
substantially shorter.  As it turns out, the missing instructions are
the outputs of gen_geneve_offsets() and gen_vxlan_offsets(), so
filtering of protocols encapsulated in GENEVE and VXLAN is no longer
correct.  Because libpcap does not have any apply filter tests for the
affected syntax, this was not apparent until a tcpdump test failed.

The instructions went missing because gen_geneve() and gen_vxlan() need
to use these as a block, but instead of making a new block from scratch
the functions take the result of gen_true() and modify it to add side
effects.  After the commit the block with the wanted side effects ended
up incorrectly marked as a Boolean constant and susequently gen_and()
started to discard it.

In gen_cond() take an optional list of side effect instructions and make
a Boolean constant block a specific case of a block with a degenerate
branch statement.  Switch gen_geneve() and gen_vxlan() from gen_true()
to gen_uncond() to reduce the violation of layers.  Restore the six
previously affected tests exactly as they were before.
To detect gen_geneve() and gen_vxlan() regressions that affect filtering
of encapsulated protocols, define two new apply filter tests.  For now
these stand for IPv4 only.
@infrastation infrastation force-pushed the fix_recent_regressions branch from aea0c67 to f94fce8 Compare November 7, 2025 13:37
@infrastation
Copy link
Member Author

This revision passes the whitespace check.

Six tests make it easy to see another regression I have introduced in
commit 1687065.
I got the comments right, but not all of the code, fix that and update
the tests.
@infrastation infrastation force-pushed the fix_recent_regressions branch from f94fce8 to 3ed0cd0 Compare November 7, 2025 15:09
@infrastation
Copy link
Member Author

I do not understand where this warning comes from:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um\winnt.h(6343,27): warning C4013: '_CountOneBits64' undefined; assuming extern returning int

Let's see if it regards any of the two important bug fixes. This revision now comprises the four most important commits only.

@fxlb
Copy link
Member

fxlb commented Nov 7, 2025

Linked to:
kofemann/ms-nfs41-client@cf173d0
?

@fxlb
Copy link
Member

fxlb commented Nov 7, 2025

But it seems, there is no recent update:
https://www.appveyor.com/updates/

@infrastation
Copy link
Member Author

Then for the purposes of this pull request I am going to ignore Appveyor breakage if everything else passes the CI. For the next pull request I am going to disable the specific permutation that fails.

@infrastation infrastation merged commit 3ed0cd0 into the-tcpdump-group:master Nov 7, 2025
19 of 20 checks passed
@infrastation infrastation deleted the fix_recent_regressions branch November 9, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants