summaryrefslogtreecommitdiff
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-07-04 21:23:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-15 08:10:28 -0700
commite48fa33d22f6a28b57ade6522230755eae394548 (patch)
tree1cfc2536fabfac9f07acdf8be6f3b7c82fbeba46 /net/core/rtnetlink.c
parent76b9be5d7feba335f0bfd4edf0386296cdaf57f2 (diff)
net: feed /dev/random with the MAC address when registering a device
commit 7bf2357524408b97fec58344caf7397f8140c3fd upstream. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: David Miller <davem@davemloft.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index b8052bab69ca..900fc6162c42 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1376,6 +1376,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
goto errout;
send_addr_notify = 1;
modified = 1;
+ add_device_randomness(dev->dev_addr, dev->addr_len);
}
if (tb[IFLA_MTU]) {