lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS2j_BsYHJ3MT41o@horms.kernel.org>
Date: Mon, 1 Dec 2025 14:19:40 +0000
From: Simon Horman <horms@...nel.org>
To: Jonas Gorski <jonas.gorski@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Shuah Khan <shuah@...nel.org>,
	Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH RFC/RFT net-next v2 3/5] selftests: no_forwarding: test
 VLAN uppers on VLAN aware bridged ports

On Mon, Dec 01, 2025 at 11:28:15AM +0100, Jonas Gorski wrote:
> Add a test (mainly for switchdev implementors) to test that multiple
> VLAN uppers on a VLAN aware bridge for the same VLAN do not enable
> forwarding of that VLAN between those ports.
> 
> Since we are testing VLAN uppers, skip checking untagged traffic in
> those cases.
> 
> Disallowing VLAN uppers on bridge ports is a valid choice for switchdev
> drivers, so test if we can create them first and skip the tests if not.
> 
> Signed-off-by: Jonas Gorski <jonas.gorski@...il.com>
> ---
> v1 -> v2:
> * new patch
> 
>  .../selftests/net/forwarding/no_forwarding.sh | 89 ++++++++++++++-----
>  1 file changed, 67 insertions(+), 22 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/forwarding/no_forwarding.sh b/tools/testing/selftests/net/forwarding/no_forwarding.sh
> index 694ece9ba3a7..c8adf04e1328 100755
> --- a/tools/testing/selftests/net/forwarding/no_forwarding.sh
> +++ b/tools/testing/selftests/net/forwarding/no_forwarding.sh
> @@ -1,7 +1,7 @@
>  #!/bin/bash
>  # SPDX-License-Identifier: GPL-2.0
>  
> -ALL_TESTS="standalone two_bridges one_bridge_two_pvids"
> +ALL_TESTS="standalone two_bridges one_bridge_two_pvids bridge_aware_vlan_uppers"
>  NUM_NETIFS=4
>  
>  source lib.sh
> @@ -90,6 +90,7 @@ check_rcv()
>  run_test()
>  {
>  	local test_name="$1"
> +	local swp_uppers=${2:0}

Hi Jonas,

Should this be as follows?

	local swp_uppers=${2:-0}


I.e. default to 0 if $2 is not set,
     rather than take a substring of $2 at index 0 (which is all of $2)

Flagged by Claude Code with review-prompts.

https://netdev-ai.bots.linux.dev/ai-review.html?id=3d47057e-e740-4b66-9d60-9ec2a7ee92a1#patch-2


>  	local smac=$(mac_get $h1)
>  	local dmac=$(mac_get $h2)
>  	local h1_ipv6_lladdr=$(ipv6_lladdr_get $h1)

...

> +bridge_aware_vlan_uppers()
> +{

...

> +	run_test "Switch ports in VLAN-aware bridge with VLAN uppers" 2
> +
> +	ip link del br0
> +}
> +

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ