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:   Fri, 30 Aug 2019 12:35:56 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH v6 net-next 12/19] ionic: Add Rx filter and rx_mode ndo
 support

On 8/29/19 4:06 PM, Jakub Kicinski wrote:
> On Thu, 29 Aug 2019 11:27:13 -0700, Shannon Nelson wrote:
>> @@ -588,8 +866,26 @@ static int ionic_set_features(struct net_device *netdev,
>>   
>>   static int ionic_set_mac_address(struct net_device *netdev, void *sa)
>>   {
>> -	netdev_info(netdev, "%s: stubbed\n", __func__);
>> -	return 0;
>> +	struct sockaddr *addr = sa;
>> +	u8 *mac;
>> +
>> +	mac = (u8 *)addr->sa_data;
>> +	if (ether_addr_equal(netdev->dev_addr, mac))
>> +		return 0;
>> +
>> +	if (!is_valid_ether_addr(mac))
>> +		return -EADDRNOTAVAIL;
>> +
>> +	if (!is_zero_ether_addr(netdev->dev_addr)) {
>> +		netdev_info(netdev, "deleting mac addr %pM\n",
>> +			    netdev->dev_addr);
>> +		ionic_addr_del(netdev, netdev->dev_addr);
>> +	}
>> +
>> +	memcpy(netdev->dev_addr, mac, netdev->addr_len);
>> +	netdev_info(netdev, "updating mac addr %pM\n", mac);
>> +
>> +	return ionic_addr_add(netdev, mac);
>>   }
> Please use the eth_prepare_mac_addr_change() and
> eth_commit_mac_addr_change() helpers.

Oh, hadn't seen those before... sure.
sln

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ