net: feed /dev/random with the MAC address when registering a device

Cc: David Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
This commit is contained in:
Theodore Ts'o
2012-07-04 21:23:25 -04:00
parent b04b3156a2
commit 7bf2357524
2 changed files with 4 additions and 0 deletions

View File

@@ -1378,6 +1378,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]) {