Set high byte of mac addresses for host veth devices to 0xfe
Set high byte of mac addresses for host veth devices to 0xfe

When used in conjunction with a bridge, veth devices with random addresses
may change the mac address of the bridge itself if the mac address of the
interface newly added is numerically lower than the previous mac address
of the bridge. This is documented kernel behavior. To avoid changing the
host's mac address back and forth when starting and/or stopping containers,
this patch ensures that the high byte of the mac address of the veth
interface visible from the host side is set to 0xfe.

A similar logic is also implemented in libvirt.

Fixes SF bug #3411497
See also: <http://thread.gmane.org/gmane.linux.kernel.containers.lxc.general/2709>

Signed-off-by: Daniel Lezcano <3211518dd4d87cb3f7ee12cb52e14b7fb2bc0446@fr.ibm.com>
Acked-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@canonical.com>

cjwatson/lxc,regit/lxc,QingweiPeterLan/cs188-lxc,Distrotech/lxc,efiop/lxc,GreatFruitOmsk/lxc,szaszg/lxc,ecarrara/lxc,bostjan/lxc,codebauss/lxc,thmo/lxc,abstrakraft/lxc-android-lxc,efiop/lxc,coconutpilot/lxc-gentoo-new,Pelagicore/lxc,QingweiPeterLan/cs188-lxc,hallyn/lxc,ojkastl/lxc_Patches,armcc/lxc,DarknessBeforeDawn/lxc,aeris/lxc,lisongmin/lxc,armcc/lxc,hkjolhede/lxc,tych0/lxc,aeris/lxc,tych0/lxc,codebauss/lxc,raspberrypython/lxc,raspberrypython/lxc,rowhit/lxc,armcc/lxc,lazy404/lxc,codebauss/lxc,Distrotech/lxc,Ponce/lxc,federicobriata/lxc,weizhenwei/lxc,JohnPeacockMessageSystems/lxc,weizhenwei/lxc,ksperis/lxc,ioops/lxc,major/lxc,coconutpilot/lxc-gentoo-new,jirislaby/lxc,JohnPeacockMessageSystems/lxc,szaszg/lxc,smoser/lxc,efiop/lxc,yubo/lxc,jirislaby/lxc,sapun/lxc,lazy404/lxc,glensc/lxc,major/lxc,rowhit/lxc,ysbnim/lxc,virajs/lxc,DarknessBeforeDawn/lxc,hkjolhede/lxc,ss1h2a3tw/lxc,virajs/lxc,smoser/lxc,ksperis/lxc,terceiro/lxc,ioops/lxc,rldleblanc/lxc,ksperis/lxc,Pelagicore/lxc,regit/lxc,cjwatson/lxc,potatosalad/lxc,ecarrara/lxc,christiaan/lxc,akshaykarle/lxc,DarknessBeforeDawn/lxc,bmoar/lxc,ojkastl/lxc_Patches,fwilson42/lxc,thmo/lxc,smoser/lxc,hfuCN/lxc,LynxChaus/lxc,bostjan/lxc,major/lxc,caglar10ur/lxc,aeris/lxc,hfuCN/lxc,GreatFruitOmsk/lxc,smoser/lxc,abstrakraft/lxc-android-lxc,abstrakraft/lxc-android-lxc,hkjolhede/lxc,sapun/lxc,terceiro/lxc,bmoar/lxc,lisongmin/lxc,yubo/lxc,GreatFruitOmsk/lxc,Pelagicore/lxc,christiaan/lxc,yubo/lxc,federicobriata/lxc,jirislaby/lxc,akshaykarle/lxc,hallyn/lxc,Distrotech/lxc,ysbnim/lxc,rowhit/lxc,Ponce/lxc,weizhenwei/lxc,caglar10ur/lxc,thmo/lxc,rldleblanc/lxc,szaszg/lxc,virajs/lxc,glensc/lxc,hallyn/lxc,Ponce/lxc,hfuCN/lxc,potatosalad/lxc,LynxChaus/lxc,fwilson42/lxc,ysbnim/lxc,tych0/lxc,JohnPeacockMessageSystems/lxc,bmoar/lxc,raspberrypython/lxc,ss1h2a3tw/lxc,lazy404/lxc,federicobriata/lxc,lisongmin/lxc,ss1h2a3tw/lxc,QingweiPeterLan/cs188-lxc,ojkastl/lxc_Patches,ioops/lxc,fwilson42/lxc,rldleblanc/lxc,cjwatson/lxc,bostjan/lxc,christiaan/lxc,ostap/lxc,ostap/lxc,akshaykarle/lxc,regit/lxc,sapun/lxc,ojkastl/lxc_Patches,glensc/lxc,ecarrara/lxc,terceiro/lxc,LynxChaus/lxc,abstrakraft/lxc-android-lxc,caglar10ur/lxc