Re: [Patch net] rtnetlink: allocate more memory for dev_set_mac_address()

2017-07-20 Thread David Miller
From: Cong Wang Date: Thu, 20 Jul 2017 11:27:57 -0700 > virtnet_set_mac_address() interprets mac address as struct > sockaddr, but upper layer only allocates dev->addr_len > which is ETH_ALEN + sizeof(sa_family_t) in this case. > > We lack a unified definition for mac address, so just fix > the

[Patch net] rtnetlink: allocate more memory for dev_set_mac_address()

2017-07-20 Thread Cong Wang
virtnet_set_mac_address() interprets mac address as struct sockaddr, but upper layer only allocates dev->addr_len which is ETH_ALEN + sizeof(sa_family_t) in this case. We lack a unified definition for mac address, so just fix the upper layer, this also allows drivers to interpret it to struct sock