]> The Tcpdump Group git mirrors - libpcap/commit
Use a 16-bit comparison for "pppoes NUM".
authorDenis Ovsienko <[email protected]>
Sat, 25 Jan 2025 21:46:22 +0000 (21:46 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 30 Jan 2025 19:45:58 +0000 (19:45 +0000)
commit627fd121b60d984b4dc681a7a9fd5ee2e1f7161b
tree1d2659028bffdb895dce4af91765555ec076fc81
parentbd7d2899ff9e09fb11086fe56d2c844ee2506da8
Use a 16-bit comparison for "pppoes NUM".

gen_pppoes() compares only the low 16 bits of a [32-bit] word, which
does not entirely match the problem space.  Eliminate the bitwise AND
instruction by comparing a [16-bit] half-word with the same 16 bits,
this produces simpler bytecode (thus the corresponding accept test
changes) with an equivalent behaviour (thus no apply tests change).
While at it, add a comment with the packet header diagram and use a
standard named constant for the maximum session ID value.
gencode.c
testprogs/TESTrun