Permanent hardware address of a network device was traditionally provided via ethtool ioctl interface but as Jiri Pirko pointed out in a review of ethtool netlink interface, rtnetlink is much more suitable for it so let's add it to the RTM_NEWLINK message. Add IFLA_PERM_ADDRESS attribute to RTM_NEWLINK messages unless the permanent address is all zeros (i.e. device driver did not fill it). As permanent address is not modifiable, reject userspace requests containing IFLA_PERM_ADDRESS attribute. Note: we already provide permanent hardware address for bond slaves; unfortunately we cannot drop that attribute for backward compatibility reasons. v5 -> v6: only add the attribute if permanent address is not zero
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -169,6 +169,7 @@ enum { · 168 unmodified lines | |||
| 169 | IFLA_MAX_MTU, | 169 | IFLA_MAX_MTU, |
| 170 | IFLA_PROP_LIST, | 170 | IFLA_PROP_LIST, |
| 171 | IFLA_ALT_IFNAME, /* Alternative ifname */ | 171 | IFLA_ALT_IFNAME, /* Alternative ifname */ |
| 172 | IFLA_PERM_ADDRESS, | ||
| 172 | __IFLA_MAX | 173 | __IFLA_MAX |
| 173 | }; | 174 | }; |
| 174 | 175 | ||