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:	Wed, 11 Jul 2007 19:54:18 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	davem@...emloft.net
CC:	netdev@...r.kernel.org, greearb@...delatech.com, xemul@...nvz.org
Subject: Re: [VLAN 02/04]: Fix MAC address handling

Patrick McHardy wrote:
> [VLAN]: Fix MAC address handling
> 
> +static void vlan_sync_address(struct net_device *dev,
> +			      struct net_device *vlandev)
> +{
> +	struct vlan_dev_info *vlan = VLAN_DEV_INFO(vlandev);
> +
> +	if (!compare_ether_addr(vlan->real_dev_addr, dev->dev_addr))
> +		return;
> +
> +	if (compare_ether_addr(vlandev->dev_addr, dev->dev_addr))
> +		dev_unicast_add(dev, vlandev->dev_addr, ETH_ALEN);
> +	else
> +		dev_unicast_delete(dev, vlandev->dev_addr, ETH_ALEN);
> +
> +	memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN);
> +}


Unfortunately the one case I didn't test is still wrong :|

The above synchronization incorrectly removes the address in case
if was different before and is still different afterwards. This
patch is fixed and contains a few comments as an added bonus :)


View attachment "02.diff" of type "text/x-diff" (8173 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ