lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/10] net: feed /dev/random with the MAC address when registering a device
Date
Cc: David Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
---
net/core/dev.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 6df2140..46f2f0c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5542,6 +5542,9 @@ int register_netdevice(struct net_device *dev)
dev_hold(dev);
list_netdevice(dev);

+ if (dev->dev_addr)
+ add_device_randomness(dev->dev_addr, dev->addr_len);
+
/* Notify protocols, that a new device appeared. */
ret = call_netdevice_notifiers(NETDEV_REGISTER, dev);
ret = notifier_to_errno(ret);
--
1.7.11.1.108.gb129051


\
 
 \ /
  Last update: 2012-07-05 21:01    [W:0.199 / U:30.912 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site