-
Notifications
You must be signed in to change notification settings - Fork 12
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
test: Multi-Port Network Namespaces #799
Commits on Nov 4, 2024
-
test: pcap: Avoid creating dumpcap zombies
Story time: In the days of yore, we generated PCAPs using tcpdump, which will flush any buffered packets to its output file on reception of SIGUSR2. Therefore we sent a USR2 before terminating the capture. At some point, we switched over to use tshark to capture packets for us, but the SIGUSR2 sayed in place. It turns out, tshark will just die on USR2, abandoning the dumpcap child it has created, which means the enclosing network namespace can't be properly torn down. Therefore: Remove skip sending USR2 and just send TERM directly.
Configuration menu - View commit details
-
Copy full SHA for 17403af - Browse repository at this point
Copy the full SHA 17403afView commit details -
test: netns: Generalize IsolatedMacVlan to support multiple interfaces
This is needed to create namespaces with MACVLANs from different parent interfaces. The first consumer will be a Two-Port Mac Relay (TPMR), so that we can control the flow of packets between two nodes.
Configuration menu - View commit details
-
Copy full SHA for f9e430e - Browse repository at this point
Copy the full SHA f9e430eView commit details -
test: netns: Use passthru mode for MACVLANs
This mode let's us receive all packets from the parent device, which is automatically set in promiscuous mode, and let's the MACVLAN transmit packets with any SA, which we need to implement a TPMR (or a bridge or anything else we might dream up)
Configuration menu - View commit details
-
Copy full SHA for 3031bba - Browse repository at this point
Copy the full SHA 3031bbaView commit details -
test: netns: Clean up lingering namespaces on test exit
This gets rid of annoying "Address already in use" errors when running tests repeatedly from a test-sh.
Configuration menu - View commit details
-
Copy full SHA for 2a6e440 - Browse repository at this point
Copy the full SHA 2a6e440View commit details -
test: netns: Guard against "double free" when failing to setup netns
When used as a context manager, __exit__ will be called even though __enter__ might throw an exception half way through. So there is no guarantee that the instance is on the cleanup list when we get to stop().
Configuration menu - View commit details
-
Copy full SHA for a4a4a49 - Browse repository at this point
Copy the full SHA a4a4a49View commit details -
test: netns: Poll for MACVLAN removal completion
Now that we're using the `passthru` mode of MACVLANs, it seems we can rely on the parent interface's promiscuity going down to 0 as an indication that the kernel has completed the removal of the interface, and will accept the creation of a new one.
Configuration menu - View commit details
-
Copy full SHA for be828d4 - Browse repository at this point
Copy the full SHA be828d4View commit details -
test: netns: Add Two-Port MAC Relay (TPMR)
This is a specialized namespace, containing two ports, which (hopefully) acts as completely transparent "bump-on-the-wire" bridge. Useful in scenarios where you want to test what happens when the flow of packets between two nodes is disrupted. E.g., for testing fail-over behavior in dynamic routing protocols, L2 redundancy, VRRP etc.
Configuration menu - View commit details
-
Copy full SHA for dc92db4 - Browse repository at this point
Copy the full SHA dc92db4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f2f376 - Browse repository at this point
Copy the full SHA 7f2f376View commit details -
test: vlan_ping: Improve test step description and structure
Initially done as a workaround for the MACVLAN create/remove race. But even though the old version of this test now works, this refactor provides better test step descriptions, making it easier to follow for anyone looking to manually verify the functionality.
Configuration menu - View commit details
-
Copy full SHA for 96d200f - Browse repository at this point
Copy the full SHA 96d200fView commit details
Commits on Nov 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 56abfde - Browse repository at this point
Copy the full SHA 56abfdeView commit details