Open chantra opened 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
@nealcardwell I forced pushed the change with my corp email address. CLA bot is now happy.
Summary: In current script, we can either specify every tcp option of a packet, or use <...> for "any tcp options". This is not flexible enough, as some script may have requirements for some tcp options; while be flexible with other options.
This patch tries to address this by adding wildcard for option wscale. Specifically, "wscale *" in the tcp option list means any wscale value.
To mark a tcp option in the script as wildcard, we leverage the highest bit of tcp_option->kind, as TCPOPT_WILDCARD (0x80). tcp_option->kind of TCPOPT_WILDCARD | TCPOPT_WINDOW (0x83) means wscale option of any value.
verify_outbound_live_tcp_options() is updated to be able to understand TCPOPT_WILDCARD when set on the script packet and with TCPOPT_WINDOW.
Testing: Using a script that currently fail on my environment with wscale:
Changed the wscale to wildcard:
and confirmed the test now pass:
and also still work properly when the wscale is matching expectations:
with
Also comfirmed that wscale wildcard would not cause and option which has 0x80 set to pass.
For instance with:
The test fails at handling Fast Open Experimental