]> git.baikalelectronics.ru Git - kernel.git/commit
eth: reset addr_assign_type if eth_mac_addr() called
authorDanny Kukawka <danny.kukawka@bisect.de>
Thu, 9 Feb 2012 09:48:53 +0000 (09:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2012 05:46:41 +0000 (00:46 -0500)
commit5a5c21160bba27aab5b0005ac1b35be4f7d384ec
tree22aab521752dbd37a590045935b3d1229398f992
parentc08f4327ece67967fdf99b09306e7b084f98ba78
eth: reset addr_assign_type if eth_mac_addr() called

If eth_mac_addr() get called, usually if SIOCSIFHWADDR was
used to change the MAC of a ethernet device, reset the
addr_assign_type to NET_ADDR_PERM if the state was
NET_ADDR_RANDOM before. Reset the state since the MAC is
no longer random at least not from the kernel side.

v2: changed to bitops, removed if()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethernet/eth.c