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: <Z1lWw5qM-AGPCjuZ@fedora>
Date: Wed, 11 Dec 2024 09:09:23 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, mkubecek@...e.cz,
	Nikolay Aleksandrov <razor@...ckwall.org>,
	Ido Schimmel <idosch@...sch.org>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net 2/5] bonding: Fix initial {vlan,mpls}_feature set in
 bond_compute_features

On Tue, Dec 10, 2024 at 03:12:42PM +0100, Daniel Borkmann wrote:
> If a bonding device has slave devices, then the current logic to derive
> the feature set for the master bond device is limited in that flags which
> are fully supported by the underlying slave devices cannot be propagated
> up to vlan devices which sit on top of bond devices. Instead, these get
> blindly masked out via current NETIF_F_ALL_FOR_ALL logic.
> 
> vlan_features and mpls_features should reuse netdev_base_features() in
> order derive the set in the same way as ndo_fix_features before iterating
> through the slave devices to refine the feature set.
> 
> Fixes: a9b3ace44c7d ("bonding: fix vlan_features computing")
> Fixes: 2e770b507ccd ("net: bonding: Inherit MPLS features from slave devices")
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Nikolay Aleksandrov <razor@...ckwall.org>
> Cc: Ido Schimmel <idosch@...sch.org>
> Cc: Jiri Pirko <jiri@...dia.com>
> ---
>  drivers/net/bonding/bond_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 42c835c60cd8..320dd71392ef 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1563,8 +1563,9 @@ static void bond_compute_features(struct bonding *bond)
>  
>  	if (!bond_has_slaves(bond))
>  		goto done;
> -	vlan_features &= NETIF_F_ALL_FOR_ALL;
> -	mpls_features &= NETIF_F_ALL_FOR_ALL;
> +
> +	vlan_features = netdev_base_features(vlan_features);
> +	mpls_features = netdev_base_features(mpls_features);
>  
>  	bond_for_each_slave(bond, slave, iter) {
>  		vlan_features = netdev_increment_features(vlan_features,
> -- 
> 2.43.0
> 

Reviewed-by: Hangbin Liu <liuhangbin@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ