netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: vlan: inherit addr_assign_type along with dev_addr
@ 2013-08-22 12:23 Bjørn Mork
  2013-08-22 18:49 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Bjørn Mork @ 2013-08-22 12:23 UTC (permalink / raw)
  To: netdev; +Cc: Patrick McHardy, Bjørn Mork

A vlan device inheriting a random or set address should reflect
this in its addr_assign_type.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 net/8021q/vlan_dev.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 1cd3d2a..995684d 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -581,8 +581,10 @@ static int vlan_dev_init(struct net_device *dev)
 	/* ipv6 shared card related stuff */
 	dev->dev_id = real_dev->dev_id;
 
-	if (is_zero_ether_addr(dev->dev_addr))
+	if (is_zero_ether_addr(dev->dev_addr)) {
 		memcpy(dev->dev_addr, real_dev->dev_addr, dev->addr_len);
+		dev->addr_assign_type = real_dev->addr_assign_type;
+	}
 	if (is_zero_ether_addr(dev->broadcast))
 		memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-23  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 12:23 [PATCH] net: vlan: inherit addr_assign_type along with dev_addr Bjørn Mork
2013-08-22 18:49 ` David Miller
2013-08-23  9:11   ` Bjørn Mork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).