summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2018-06-04 19:26:07 -0600
committerDavid S. Miller <davem@davemloft.net>2018-06-05 10:16:25 -0400
commit9deb441c113ae9e761e42f78d90736d762ff49a3 (patch)
tree17ba4e3b0050f94a55f7ed91486261a2ce4e1ddc /drivers
parentf4c9f85f3b2cb7669830cd04d0be61192a4d2436 (diff)
downloadlinux-stable-9deb441c113ae9e761e42f78d90736d762ff49a3.tar.gz
linux-stable-9deb441c113ae9e761e42f78d90736d762ff49a3.tar.bz2
linux-stable-9deb441c113ae9e761e42f78d90736d762ff49a3.zip
net: ipv6: Generate random IID for addresses on RAWIP devices
RAWIP devices such as rmnet do not have a hardware address and instead require the kernel to generate a random IID for the IPv6 addresses. Signed-off-by: Sean Tranchetti <stranche@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
index cb02e1a015c1..b9a7548ec6a0 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
@@ -221,6 +221,10 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev)
rmnet_dev->needs_free_netdev = true;
rmnet_dev->ethtool_ops = &rmnet_ethtool_ops;
+
+ /* This perm addr will be used as interface identifier by IPv6 */
+ rmnet_dev->addr_assign_type = NET_ADDR_RANDOM;
+ eth_random_addr(rmnet_dev->perm_addr);
}
/* Exposed API */