-
Notifications
You must be signed in to change notification settings - Fork 231
USHIFT-7382: Add MTU boundary tests for C2CC and C2CC+IPsec #7024
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
Merged
openshift-merge-bot
merged 5 commits into
openshift:main
from
agullon:c2cc-ipsec-mtu-tests
Jul 23, 2026
+751
−105
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0e26a8a
feat: add jumbo MTU infrastructure for C2CC testing
agullon e2f8a09
feat: add IPv6 support and ESP verification to IPsec keywords
agullon dd4d5c1
feat: add IPsec E2E test suite with DF-bit boundary tests
agullon 8f36b72
feat: add jumbo MTU test suite for C2CC and C2CC+IPsec
agullon 153e608
feat: split C2CC scenarios by architecture to halve job load
agullon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/usr/bin/env python3 | ||
| """Send a UDP datagram with the DF (Don't Fragment) bit set. | ||
|
|
||
| Uses IP_PMTUDISC_DO (IPv4) or IPV6_DONTFRAG (IPv6) so the kernel | ||
| rejects datagrams that exceed the path MTU with EMSGSIZE instead of | ||
| fragmenting them. Auto-detects the address family from the | ||
| destination address. | ||
|
|
||
| Uses UDP instead of ICMP to avoid requiring NET_RAW capability. | ||
| UDP overhead (IP+UDP) matches ICMP overhead (IP+ICMP): 28B for IPv4, | ||
| 48B for IPv6, so payload sizes are equivalent to ping -s values | ||
| within each address family. | ||
|
|
||
| Usage: python3 df-bit-send.py <dest_ip> <payload_size> | ||
| Exit: prints "OK" on success, raises OSError on rejection. | ||
| """ | ||
|
|
||
| import socket | ||
| import sys | ||
|
|
||
| IPPROTO_IPV6 = 41 | ||
| IPV6_DONTFRAG = 62 | ||
| IP_MTU_DISCOVER = 10 | ||
| IP_PMTUDISC_DO = 2 | ||
|
|
||
| dest = sys.argv[1] | ||
| size = int(sys.argv[2]) | ||
|
|
||
| family = socket.AF_INET6 if ":" in dest else socket.AF_INET | ||
| sock = socket.socket(family, socket.SOCK_DGRAM) | ||
|
|
||
| if family == socket.AF_INET6: | ||
| sock.setsockopt(IPPROTO_IPV6, IPV6_DONTFRAG, 1) | ||
| else: | ||
| sock.setsockopt(socket.IPPROTO_IP, IP_MTU_DISCOVER, IP_PMTUDISC_DO) | ||
|
|
||
| try: | ||
| sock.sendto(b"A" * size, (dest, 9999)) | ||
| print("OK") | ||
| except OSError as e: | ||
| print(f"FAIL: {e}") | ||
| finally: | ||
| sock.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| kind: Pod | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: nettest-pod | ||
| spec: | ||
| terminationGracePeriodSeconds: 0 | ||
| containers: | ||
| - name: nettest | ||
| image: registry.access.redhat.com/ubi9/ubi:9.6 | ||
| command: ["sleep", "infinity"] | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| runAsNonRoot: true | ||
| runAsUser: 10001 | ||
| seccompProfile: | ||
| type: RuntimeDefault |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <network> | ||
| <name>jumbo-ipv6</name> | ||
| <forward mode="nat"> | ||
| <nat ipv6='yes'> | ||
| <port start='1024' end='65535'/> | ||
| </nat> | ||
| </forward> | ||
| <mtu size='9000'/> | ||
| <ip family="ipv6" address="2001:db8:ca7:fe::1" prefix="96"> | ||
| <dhcp> | ||
| <range start="2001:db8:ca7:fe::1000" end="2001:db8:ca7:fe::2000" /> | ||
| </dhcp> | ||
| </ip> | ||
| </network> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <network> | ||
| <name>jumbo</name> | ||
| <forward mode='nat'/> | ||
| <mtu size='9000'/> | ||
| <ip address='192.168.150.1' netmask='255.255.255.0'> | ||
| <dhcp> | ||
| <range start='192.168.150.100' end='192.168.150.254'/> | ||
| </dhcp> | ||
| </ip> | ||
| </network> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.