Thread (24 messages) 24 messages, 3 authors, 2024-09-11

Re: [PATCH V9 net-next 11/11] net: add ndo_validate_addr check in dev_set_mac_address

From: Jijie Shao <shaojijie@huawei.com>
Date: 2024-09-10 14:01:50
Also in: lkml

on 2024/9/10 16:39, Kalesh Anakkur Purayil wrote:
On Tue, Sep 10, 2024 at 1:36 PM Jijie Shao [off-list ref] wrote:
quoted
+++ b/net/core/dev.c
@@ -9087,6 +9087,11 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
                 return -EOPNOTSUPP;
         if (sa->sa_family != dev->type)
                 return -EINVAL;
+       if (ops->ndo_validate_addr) {
+               err = ops->ndo_validate_addr(dev);
+               if (err)
+                       return err;
+       }
[Kalesh] It would be better to move this code after
netif_device_present() check. Minor nit and there will not be any
functional impact.
Yes, You are right,
For other reasons I need to send v10, I will move it.

Thanks,
	Jijie Shao


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help