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]
Date:	Tue, 9 Aug 2011 14:32:21 -0700 (PDT)
From:	Shreyas Bhatewara <sbhatewara@...are.com>
To:	Jesse Gross <jesse@...ira.com>
cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Scott Goldman <scottjg@...are.com>,
	VMware PV-Drivers <pv-drivers@...are.com>
Subject: Re: [PATCH net] vmxnet3: Don't enable vlan filters in promiscuous
 mode.



On Mon, 8 Aug 2011, Jesse Gross wrote:

> @@ -1929,14 +1929,17 @@ static void
>  vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
>  {
>  	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> -	u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable;
> -	unsigned long flags;
>  
> -	VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid);
> -	spin_lock_irqsave(&adapter->cmd_lock, flags);
> -	VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
> -			       VMXNET3_CMD_UPDATE_VLAN_FILTERS);
> -	spin_unlock_irqrestore(&adapter->cmd_lock, flags);
> +	if (!(netdev->flags & IFF_PROMISC)) {
> +		u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable;
> +		unsigned long flags;
> +
> +		VMXNET3_SET_VFTABLE_ENTRY(vfTable, vid);
> +		spin_lock_irqsave(&adapter->cmd_lock, flags);
> +		VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
> +				       VMXNET3_CMD_UPDATE_VLAN_FILTERS);
> +		spin_unlock_irqrestore(&adapter->cmd_lock, flags);
> +	}
>  

If this is done, the driver will ignore all vlan tag registrations (and 
deletions) while the interface is in promiscuous mode. Better solution
would be to send UPDATE_VLAN_FILTERS command alone inside the promiscuous 
condition. vfTable can be set/unset unconditionally as before. By doing 
this, when the interface comes out of promiscuous mode, the restored vlan 
state will have all the added/removed vlan tags into effect.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ