Commit graph

23 commits

Author SHA1 Message Date
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Kristof Provost f97802a35e bridge tests: test cross-vlan bridging
Ensure that the bridge takes VLAN IDs into account when learning
addresses.

PR:		270559
Differential Revision:	https://reviews.freebsd.org/D39379
2023-04-14 13:17:02 +02:00
Kristof Provost e1274b5b26 bridge tests: re-enable span test
The root cause of the intermittent span test failures has been
identified as a race between sending the packet and starting the bpf
capture.
This is now resolved, so the test can be re-enabled.

PR:		260461
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-11-02 11:59:11 +01:00
Mark Johnston 121e120883 bridge tests: Tests using pft_ping.py require scapy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-08-04 09:41:52 -04:00
Kristof Provost 1e824ee84f if_bridge tests: test adding interfaces with different MTU
We now allow new bridge members to be added with a different MTU from
the bridge. We change the interface MTU to match the bridge.
Test this.

PR:	264883
2022-06-27 08:27:28 +02:00
Warner Losh 7821ef4487 tests: sys.net.if_bridge_test.span is failing in CI
sys.net.if_bridge_test.span has been failing in CI for a while
now. Disable it until this can be resolved.

PR:		260461
Sponsored by:	Netflix
2021-12-15 18:32:37 -07:00
Kristof Provost 441d15a482 bridge tests: verify that we can't change MTU of bridge member interfaces
Reviewed by:	donner
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31305
2021-07-28 22:03:38 +02:00
Kristof Provost 6e43950640 bridge tests: test changing the bridge MTU
Changing the bridge MTU will now also change all of the member interface
MTUs. Test this.

Reviewed by:	donner
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31289
2021-07-28 22:01:12 +02:00
Kristof Provost 4b765ab4cd bridge tests: test linking bridges with a gif tunnel
Fairly basic test case for using gif(4)'s ability to tunnel Ethernet
traffic between bridges.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-07-26 23:13:31 +02:00
Kristof Provost 4ae3a97e12 bridge tests: Test STP config BPDU validation
PR:		254924
Reviewed by:	donner
Differential Revision:	https://reviews.freebsd.org/D29783
2021-04-19 12:09:35 +02:00
Kristof Provost 7a4dbffa42 bridge tests: Test that we also forward on some interfaces
Ensure that we not only block on some interfaces, but also forward on
some. Without the previous commit we wound up discarding on all ports,
rather than only on the ports needed to break the loop.

MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D28917
2021-02-25 10:17:03 +01:00
Kristof Provost 26492ba271 bridge tests: Test STP on top of VLAN devices
This is basically the same test as the existing STP test, but now on top
of VLAN interfaces instead of directly using the epair devices.

MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D28861
2021-02-23 13:54:07 +01:00
Kristof Provost 048c96e3e6 bridge tests: Re-enable STP test
This test should no longer provoke large amounts of traffic, which can
overwhelm single-core systems, preventing them from making progress in the
tests.

The test can now be re-enabled.

PR:		246448
2020-06-07 13:53:02 +00:00
Kristof Provost e07e002e95 bridge tests: Avoid building a switching loop
Enable STP before bringing the bridges up. This avoids a switching loop,
which has a tendency to drown out progress in userspace processes,
especially on single-core systems.

Only check that we have indeed shut down one of the looped interfaces

PR:		246448
Reviewed by:	melifaro
Differential Revision:	https://reviews.freebsd.org/D25084
2020-06-01 19:26:16 +00:00
Li-Wen Hsu bf3dd13d41 Temporarily skip sys.net.if_bridge_test.stp in CI as it always times out
PR:		244229
Sponsored by:	The FreeBSD Foundation
2020-05-13 20:36:38 +00:00
Kristof Provost 5377560783 bridge tests: Test for #216510
We used to have an issue with recursive locking with
net.link.bridge.inherit_mac. This causes us to send an ARP request while
we hold the BRIDGE_LOCK, which used to cause us to acquire the
BRIDGE_LOCK again. We can't re-acquire it, so this caused a panic.

Now that we no longer need to acquire the BRIDGE_LOCK for
bridge_transmit() this should no longer panic. Test this.

PR:	216510
Reviewed by:	emaste, philip
MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24251
2020-04-26 16:27:03 +00:00
Kristof Provost 2885ae0c3c bridge tests: Ensure that bridges in different jails get different MAC addresses
We used to have a problem where bridges created in different vnet jails
would end up having the same mac address. This is now fixed by
including the jail name as a seed for the mac address generation, but we
should verify that it doesn't regress.
2020-04-19 16:30:49 +00:00
Kristof Provost 3f359bfd47 bridge tests: Test deleting a bridge with members
Reviewed by:	philip, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24337
2020-04-17 14:57:15 +00:00
Kristof Provost bb490fcf19 bridge tests: Basic span test
Reviewed by:	philip, emaste (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23961
2020-03-16 08:44:46 +00:00
Kristof Provost d99bb677c1 bridge test: adding and removing static addresses
Reviewed by:	philip
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23960
2020-03-10 06:29:59 +00:00
Kristof Provost 6f0a65b080 bridge test: spanning tree
Basic test case where we create a bridge loop, verify that we really are
looping and then enable spanning tree to resolve the loop.

Reviewed by:	philip
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23959
2020-03-10 06:28:45 +00:00
Kristof Provost e3c73f3d74 bridge tests: Remove unneeded 'All rights reserved.'
The FreeBSD foundation no longer requires this, as per
https://lists.freebsd.org/pipermail/svn-src-all/2019-February/177215.html and
private communications.

Sponsored by:	The FreeBSD Foundation
2020-02-19 16:44:16 +00:00
Kristof Provost 095aabf7dc bridge: Basic test case
Very basic bridge test: Set up two jails and test that they can pass IPv4
traffic over the bridge.

Reviewed by:	melifaro, philip
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23697
2020-02-16 13:16:40 +00:00