Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update wireshark to v4 #2160

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/Dockerfile.tshark
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -7,13 +7,15 @@ RUN \
apt-get -o Acquire::Retries=3 update; \
apt-get -o Acquire::Retries=3 install -y cmake libglib2.0-dev libc-ares-dev libgcrypt20-dev flex bison byacc libpcap-dev ninja-build wget build-essential;

ARG version="4.0.2"
ARG version="4.2.3"

RUN \
set -eux; \
wget https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz; \
tar xf wireshark-${version}.tar.xz; \
cd wireshark-${version}; \
cmake -GNinja -DBUILD_wireshark=0 -DBUILD_qtshark=0 -DBUILD_editcap=1 -DBUILD_capinfos=0 -DBUILD_text2pcap=0 -DBUILD_rawshark=0 -DBUILD_sdjournal=0 -DBUILD_sshdump=0 -DBUILD_ciscodump=0 -DENABLE_STATIC=1 -DENABLE_PLUGINS=0 -DENABLE_LIBXML2=0 -DUSE_STATIC=1 -DENABLE_GNUTLS=1 .; \
cmake -GNinja \
-DBUILD_wireshark=0 -DBUILD_qtshark=0 -DBUILD_editcap=1 -DBUILD_capinfos=0 -DBUILD_text2pcap=0 -DBUILD_rawshark=0 -DBUILD_sdjournal=0 -DBUILD_sshdump=0 -DBUILD_ciscodump=0 -DBUILD_androiddump=0 -DBUILD_captype=0 -DBUILD_dcerpcidl2wrs=0 -DBUILD_sharkd=0 -DBUILD_wifidump=0 -DBUILD_randpktdump=0 -DBUILD_mmdbresolve=0 -DBUILD_udpdump=0 \
-DENABLE_STATIC=1 -DENABLE_LTO=1 -DENABLE_PCAP=0 -DENABLE_PLUGINS=0 -DENABLE_LIBXML2=0 -DUSE_STATIC=1 -DENABLE_GNUTLS=1 -DENABLE_SBC=0 -DENABLE_SPANDSP=0 -DENABLE_BCG729=0 .; \
ninja; \
cp run/tshark run/editcap /usr/local/bin/;
82 changes: 12 additions & 70 deletions .github/interop/runner.patch
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
diff --git a/certs.sh b/certs.sh
index 603dade..320f1c0 100755
--- a/certs.sh
+++ b/certs.sh
@@ -21,6 +21,14 @@ openssl req -x509 -sha256 -nodes -days 10 -key "$CERTDIR"/ca_0.key \
-extensions v3_ca \
2> /dev/null

+ # Inflate certificate for the amplification test
+ fakedns=""
+ if [ "$CHAINLEN" != "1" ]; then
+ for i in $(seq 1 20); do
+ fakedns="$fakedns,DNS:$(LC_CTYPE=C tr -dc 0-9A-Za-z < /dev/urandom | head -c 250)"
+ done
+ fi
+
for i in $(seq 1 "$CHAINLEN"); do
# Generate a CSR
SUBJ="interop runner intermediate $i"
@@ -44,7 +52,7 @@ for i in $(seq 1 "$CHAINLEN"); do
else
openssl x509 -req -sha256 -days 10 -in "$CERTDIR"/cert.csr -out "$CERTDIR"/cert_"$i".pem \
-CA "$CERTDIR"/cert_"$j".pem -CAkey "$CERTDIR"/ca_"$j".key -CAcreateserial \
- -extfile <(printf "subjectAltName=DNS:server,DNS:server4,DNS:server6,DNS:server46") \
+ -extfile <(printf "subjectAltName=DNS:server,DNS:server4,DNS:server6,DNS:server46$fakedns") \
2> /dev/null
fi
done
@@ -55,6 +63,6 @@ cp "$CERTDIR"/ca_"$CHAINLEN".key "$CERTDIR"/priv.key
# combine certificates
for i in $(seq "$CHAINLEN" -1 1); do
cat "$CERTDIR"/cert_"$i".pem >> "$CERTDIR"/cert.pem
- rm "$CERTDIR"/cert_"$i".pem "$CERTDIR"/ca_"$i".key
+ rm -f "$CERTDIR"/cert_"$i".pem "$CERTDIR"/ca_"$i".key
done
rm -f "$CERTDIR"/*.srl "$CERTDIR"/ca_0.key "$CERTDIR"/cert.csr
diff --git a/docker-compose.yml b/docker-compose.yml
index 496d7aa..42822d6 100644
--- a/docker-compose.yml
Expand Down Expand Up @@ -83,42 +47,34 @@ index 09e2fdd..72513c8 100644
"role": "both"
},
diff --git a/interop.py b/interop.py
index 8f2769b..df430a9 100644
index b571813..8ab068c 100644
--- a/interop.py
+++ b/interop.py
@@ -123,6 +123,7 @@ class InteropRunner:
@@ -126,6 +126,7 @@ class InteropRunner:
cmd = (
"CERTS=" + certs_dir.name + " "
"TESTCASE_CLIENT=" + random_string(6) + " "
+ "TEST_TYPE=TEST "
"SERVER_LOGS=/dev/null "
"CLIENT_LOGS=" + client_log_dir.name + " "
"WWW=" + www_dir.name + " "
@@ -150,6 +151,7 @@ class InteropRunner:
@@ -153,6 +154,7 @@ class InteropRunner:
cmd = (
"CERTS=" + certs_dir.name + " "
"TESTCASE_SERVER=" + random_string(6) + " "
+ "TEST_TYPE=TEST "
"SERVER_LOGS=" + server_log_dir.name + " "
"CLIENT_LOGS=/dev/null "
"WWW=" + www_dir.name + " "
@@ -217,7 +219,6 @@ class InteropRunner:
t = prettytable.PrettyTable()
t.hrules = prettytable.ALL
t.vrules = prettytable.ALL
- t.field_names = [""]
rows = {}
columns = {}
for client, server in self._client_server_pairs:
@@ -373,6 +374,7 @@ class InteropRunner:
@@ -406,6 +408,7 @@ class InteropRunner:
"CERTS=" + testcase.certs_dir() + " "
"TESTCASE_SERVER=" + testcase.testname(Perspective.SERVER) + " "
"TESTCASE_CLIENT=" + testcase.testname(Perspective.CLIENT) + " "
+ "TEST_TYPE=" + testcase.test_type() + " "
"WWW=" + testcase.www_dir() + " "
"DOWNLOADS=" + testcase.download_dir() + " "
"SERVER_LOGS=" + server_log_dir.name + " "
@@ -490,9 +492,14 @@ class InteropRunner:
@@ -523,9 +526,14 @@ class InteropRunner:
logging.debug(values)
res = MeasurementResult()
res.result = TestResult.SUCCEEDED
Expand All @@ -136,7 +92,7 @@ index 8f2769b..df430a9 100644
return res

def run(self):
@@ -507,23 +514,26 @@ class InteropRunner:
@@ -540,23 +548,26 @@ class InteropRunner:
client,
self._implementations[client]["image"],
)
Expand Down Expand Up @@ -169,7 +125,7 @@ index 8f2769b..df430a9 100644
+ res.details = "Skipping measurements as Transfer testcase was unsuccessful"
self.measurement_results[server][client][measurement] = res

self._print_results()
self._postprocess_results()
diff --git a/pull.py b/pull.py
index c2d6d1f..844bbd5 100644
--- a/pull.py
Expand All @@ -183,30 +139,18 @@ index c2d6d1f..844bbd5 100644

print("\nPulling the iperf endpoint...")
os.system("docker pull martenseemann/quic-interop-iperf-endpoint")
diff --git a/requirements.txt b/requirements.txt
index 131cf94..ce5960d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
pycryptodome
termcolor
prettytable
-pyshark
\ No newline at end of file
+pyshark==0.5.2
\ No newline at end of file
diff --git a/run.py b/run.py
index 4564681..3a28eec 100755
index 462f8df..5eb0cbb 100755
--- a/run.py
+++ b/run.py
@@ -165,4 +165,4 @@ def main():
@@ -180,4 +180,4 @@ def main():


if __name__ == "__main__":
- sys.exit(main())
+ main()
diff --git a/testcases.py b/testcases.py
index df0fac5..91f0261 100644
index df0fac5..994199e 100644
--- a/testcases.py
+++ b/testcases.py
@@ -97,6 +97,10 @@ class TestCase(abc.ABC):
Expand Down Expand Up @@ -323,7 +267,7 @@ index df0fac5..91f0261 100644
TestCaseHTTP3,
TestCaseBlackhole,
TestCaseKeyUpdate,
@@ -1657,12 +1635,11 @@ TESTCASES = [
@@ -1657,11 +1635,10 @@ TESTCASES = [
TestCaseHandshakeCorruption,
TestCaseTransferCorruption,
TestCaseIPv6,
Expand All @@ -332,12 +276,10 @@ index df0fac5..91f0261 100644
- # to decrypt packets sent on the new path.
- # TestCasePortRebinding,
- # TestCaseAddressRebinding,
- # TestCaseConnectionMigration,
+ # s2n-quic doesn't currently support v2
+ # TestCaseV2,
+ TestCasePortRebinding,
+ TestCaseAddressRebinding,
+ TestCaseConnectionMigration,
# TestCaseConnectionMigration,
]

MEASUREMENTS = [
4 changes: 2 additions & 2 deletions .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ env:
RUST_BACKTRACE: 1
# This kept breaking builds so we're pinning for now. We should do our best to keep
# up with the changes, though.
INTEROP_RUNNER_REF: 4be6491794a08899f295dc5cdf9eeba8e9fa5431
INTEROP_RUNNER_REF: 601c9fca5042d9a5f49c3caad3a2bfd1136b31bf
# This should be updated when updating wesleyrosenblum/quic-network-simulator
NETWORK_SIMULATOR_REF: sha256:20abe0bed8c0e39e1d8750507b24295f7c978bdd7e05fa6f3a5afed4b76dc191
IPERF_ENDPOINT_REF: sha256:cb50cc8019d45d9cad5faecbe46a3c21dd5e871949819a5175423755a9045106
WIRESHARK_VERSION: 3.7.1
WIRESHARK_VERSION: 4.2.5
CDN: https://dnglbrstg7yg.cloudfront.net
LOG_URL: logs/latest/SERVER_CLIENT/TEST/index.html

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tshark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ on:
version:
description: 'wireshark version'
required: true
default: '3.7.1'
default: '4.2.5'
type: string

jobs:
build:
runs-on: ubuntu-latest
env:
WIRESHARK_VERSION: ${{ inputs.version || '3.7.1' }}
WIRESHARK_VERSION: ${{ inputs.version || '4.2.5' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -46,14 +46,14 @@ jobs:
cp /usr/local/bin/tshark /usr/local/bin/editcap /host-dir/

- uses: aws-actions/[email protected]
if: github.event_name == 'schedule' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.repository == github.event.pull_request.head.repo.full_name
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1

- name: Upload to S3
if: github.event_name == 'schedule' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.repository == github.event.pull_request.head.repo.full_name
run: |
aws s3 sync target/tshark "s3://s2n-quic-ci-artifacts/tshark" --acl private --follow-symlinks

4 changes: 2 additions & 2 deletions scripts/interop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
## Modifying the runner.patch

```
git clone git@github.com:marten-seemann/quic-interop-runner.git
git clone https://github.com/marten-seemann/quic-interop-runner.git
cd quic-interop-runner
gco b21b8a55de227f665d2381f3e63174a83a3bc66c
gco 601c9fca5042d9a5f49c3caad3a2bfd1136b31bf

cp <s2n-quic_proj_dir>.runner.patch .
git apply --3way runner.patch # apply the current patch
Expand Down
2 changes: 1 addition & 1 deletion scripts/interop/run
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ ! -d $INTEROP_DIR ]; then
git clone https://github.com/marten-seemann/quic-interop-runner $INTEROP_DIR
# make sure to keep this up to date with the interop workflow
cd $INTEROP_DIR
git checkout 4be6491794a08899f295dc5cdf9eeba8e9fa5431
git checkout 601c9fca5042d9a5f49c3caad3a2bfd1136b31bf
git apply --3way ../../.github/interop/runner.patch
cd ../../
fi
Expand Down
Loading