On Wed, May 4, 2016 at 8:58 AM, David Miller <da...@davemloft.net> wrote: > From: Michal Kubecek <mkube...@suse.cz> > Date: Wed, 4 May 2016 11:28:02 +0200 > >> The commit message says "unless explicitly changed for the VLAN" but >> what you really check is "if it is the same as real device MAC address". >> This, in general, is not the same. (I believe this is what David tries >> to explain from the start.) > > Even more proof that these MAC checks are rediculous, confusing, and > that we need to use a boolean state stores in the vlan private in > order to implement the intended semantics properly and more importantly > "clearly".
Actually last I knew the netdev already has a field called addr_assign_type. You could probably borrow some code from how bonding is currently handling MAC addresses and apply it to VLANs to achieve the effect you are looking for since I believe the default for VLAN is similar to NET_ADDR_STOLEN and when it is set you would switch that over to NET_ADDR_SET. - Alex