diff options
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 9969afb82271..9a419b099482 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1667,9 +1667,11 @@ struct net_device *rtnl_create_link(struct net *net, | |||
1667 | 1667 | ||
1668 | if (tb[IFLA_MTU]) | 1668 | if (tb[IFLA_MTU]) |
1669 | dev->mtu = nla_get_u32(tb[IFLA_MTU]); | 1669 | dev->mtu = nla_get_u32(tb[IFLA_MTU]); |
1670 | if (tb[IFLA_ADDRESS]) | 1670 | if (tb[IFLA_ADDRESS]) { |
1671 | memcpy(dev->dev_addr, nla_data(tb[IFLA_ADDRESS]), | 1671 | memcpy(dev->dev_addr, nla_data(tb[IFLA_ADDRESS]), |
1672 | nla_len(tb[IFLA_ADDRESS])); | 1672 | nla_len(tb[IFLA_ADDRESS])); |
1673 | dev->addr_assign_type = NET_ADDR_SET; | ||
1674 | } | ||
1673 | if (tb[IFLA_BROADCAST]) | 1675 | if (tb[IFLA_BROADCAST]) |
1674 | memcpy(dev->broadcast, nla_data(tb[IFLA_BROADCAST]), | 1676 | memcpy(dev->broadcast, nla_data(tb[IFLA_BROADCAST]), |
1675 | nla_len(tb[IFLA_BROADCAST])); | 1677 | nla_len(tb[IFLA_BROADCAST])); |