aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/netinet6/frag6
Commit message (Collapse)AuthorAgeFilesLines
* Unskip test sys.netinet6.frag6.frag6_07.frag6_07Siva Mahadevan2025-12-161-3/+0
| | | | | | | | | This is now consistently passing with 100+ consecutive runs. Signed-off-by: Siva Mahadevan <me@svmhdvn.name> PR: 244170 MFC after: 3 days Sponsored by: The FreeBSD Foundation
* tests: Require python3 when using ScapyJose Luis Duran2025-03-031-1/+1
| | | | | | | | | | | | | | | python3 is a symbolic link that points to the current python 3.X version. It is possible for a system to have python (python 3.X) without the python3 (symlink) package. Test scripts that use Scapy are invoked using python3, so add it as a required program. Reviewed by: ngie, asomers Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D49007
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* frag6 tests: SerializeMark Johnston2023-12-311-0/+2
| | | | | | | I'm not sure exactly why, but these tests consistently fail when run in parallel. Serialize them for now. MFC after: 1 week
* Skip sys.netinet6.frag6.frag6_19.frag6_19 in CILi-Wen Hsu2023-11-061-0/+3
| | | | | | | This test case is unreliable in CI environment. PR: 274941 Sponsored by: The FreeBSD Foundation
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1643-43/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* netinet6: make IPv6 fragment TTL per-VNET configurable.Alexander V. Chernikov2023-06-0112-14/+18
| | | | | | | | | | Having it configurable adds more flexibility, especially for the systems with low amount of memory. Additionally, it allows to speedup frag6/ tests execution. Reviewed by: kp, markj, bz Differential Revision: https://reviews.freebsd.org/D35755 MFC after: 2 weeks
* tests: Only log critical errors from scapyKristof Provost2021-05-1221-0/+42
| | | | | | | | | | | | Since 2.4.5 scapy started issuing warnings about a few different configurations during our tests. These are harmless, but they generate stderr output, which upsets atf_check. Configure scapy to only log critical errors (and thus not warnings) to fix these tests. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
* netinet6 tests: Fix Python warningKristof Provost2021-05-111-1/+1
| | | | | | | | | | Python 3.8 warns about line 112: 'SyntaxWarning: "is" with a literal. Did you mean "=="?' Use '==' as Python suggests. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
* Temporarily skip flakey test case sys.netinet6.frag6.frag6_07.frag6_07 in CILi-Wen Hsu2020-02-161-0/+3
| | | | | | | | PR: 244170 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358005
* frag6: properly handle atomic fragments according to RFCs.Bjoern A. Zeeb2019-11-082-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | RFC 8200 says: "If the fragment is a whole datagram (that is, both the Fragment Offset field and the M flag are zero), then it does not need any further reassembly and should be processed as a fully reassembled packet (i.e., updating Next Header, adjust Payload Length, removing the Fragment header, etc.). .." That means we should remove the fragment header and make all the adjustments rather than just skipping over the fragment header. The difference should be noticeable in that a properly handled atomic fragment triggering an ICMPv6 message at an upper layer (e.g. dest unreach, unreachable port) will not include the fragment header. Update the test cases to also test for an unfragmentable part. That is needed so that the next header is properly updated (not just lengths). MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22155 Notes: svn path=/head/; revision=354542
* ipv6 tests: cleanupBjoern A. Zeeb2019-11-061-2/+2
| | | | | | | | | | | | Remove mentions of fragmentation tests from extension header test. Remove setting an MTU > IF_MAXMTU from the test cases to avoid warnings; this was only possible in a local research tree. MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354390
* frag6 tests: set end to catch timeout as errorBjoern A. Zeeb2019-11-052-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | There are times when we have to wait for reply packets. There are either an ICMPv6 (error) reply or the expiration timeout. In these cases synchonous ICMPv6 replies should arrive, always, unless the packet is lost. Due to errors experienced with the test software sending an invlaid request on at least i386 (*) these packets are not generated. That means we are waiting for a long time for the replies or even timeout the test case. Manually set the "End" flag on these test cases as well, so they do fail rather than timeout as the sniffer timeout happens. This improves debugging options, reflects the error properly, and saves time on each test suit run. (*) The real cause for that is still to be found (see the referenced PRs) PR: 241493, 239380 MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354357
* frag6-test: update for r354046, conform to 8200 for overlapping fragmentsBjoern A. Zeeb2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | The change to conform to RFC 8200 for overlapping fragments now frees the entire reassembly queue if the overlapping fragments are not an exact match. As a result we do see one less packet in the timeout statistics from expiry. No other statistics change as the event is not counted. It can be argued that we should improve the statistics counters in that case. This test case update should have been committed alongside the original commit. Pointyhat to: bz MFC after: 3 weeks X-MFC with: r354046 Sponsored by: Netflix Notes: svn path=/head/; revision=354084
* frag6: prevent overwriting initial fragoff=0 packet meta-data.Bjoern A. Zeeb2019-10-243-1/+372
| | | | | | | | | | | | | | | | | | | | | | | | When we receive the packet with the first fragmented part (fragoff=0) we remember the length of the unfragmentable part and the next header (and should probably also remember ECN) as meta-data on the reassembly queue. Someone replying this packet so far could change these 2 (3) values. While changing the next header seems more severe, for a full size fragmented UDP packet, for example, adding an extension header to the unfragmentable part would go unnoticed (as the framented part would be considered an exact duplicate) but make reassembly fail. So do not allow updating the meta-data after we have seen the first fragmented part anymore. The frag6_20 test case is added which failed before triggering an ICMPv6 "param prob" due to the check for each queued fragment for a max-size violation if a fragoff=0 packet was received. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354053
* frag6 test cases: check more counters, wait for expiryBjoern A. Zeeb2019-10-2423-32/+275
| | | | | | | | | | | | | | | | | | | | | | | | When done with tests check that both the per-VNET and the global-fragmented- packets-in-system counters are zero to make sure we do not leak counters or queue entries. This implies that for all test cases we either have to check for the ICMPv6 packet sent in case of TLL=0 expiry (if it is sent) or sleep at least long enough for the TTL to expire for all packets (e.g., fragments where we do not have the off=0 packet). This also means that statistics are now updated to include all the expired packets. There are cases when we do not check for counters to be zero and this is when testing VNET teardown to behave properly and not panic, when we are intentionally leaving fragments in the system. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354045
* frag6: import a set of test casesBjoern A. Zeeb2019-10-2141-0/+6389
In order to ensure that changing the frag6 code does not change behaviour or break code a set of test cases were implemented. Like some other test cases these use Scapy to generate packets and possibly wait for expected answers. In most cases we do check the global and per interface (netstat) statistics output using the libxo output and grep to validate fields and numbers. This is a bit hackish but we currently have no better way to match a selected number of stats only (we have to ignore some of the ND6 variables; otherwise we could use the entire list). Test cases include atomic fragments, single fragments, multi-fragments, and try to cover most error cases in the code currently. In addition vnet teardown is tested to not panic. A separate set (not in-tree currently) of probes were used in order to make sure that the test cases actually test what they should. The "sniffer" code was copied and adjusted from the netpfil version as we sometimes will not get packets or have longer timeouts to deal with. Sponsored by: Netflix Notes: svn path=/head/; revision=353794