[LiSA-Devel] 8021q and bridge implementation

Claudiu Ghioc claudiughioc at gmail.com
Fri May 3 15:56:26 EEST 2013


On Fri, May 3, 2013 at 12:30 AM, Radu Rendec <radu.rendec at mindbit.ro> wrote:
> On Thu, 2013-05-02 at 18:50 +0300, Claudiu Ghioc wrote:
>> 1. In switch_init, now we add a default VLAN (VID 1), using the
>> "vlan_add" function. I believe we must add a default bridge (let's
>> name it br1) in which the switch interfaces will be added. Am I
>> correct?
>
> The vlan_add() implementation for bridge should create a bridge
> interface that corresponds to the given vlan id. Since switch_init()
> calls vlan_add() with id=1, the "default" bridge will be created
> automagically. You don't need to do anything specific for creating the
> "default" bridge.

Thanks for the detailed reply. I have another question. We create a
new bridge each time we add a new VLAN, and we have at least 5 VLANs
all the time (1, 1002 ... 1005). Shouldn't we create a cleanup
function to remove all the bridges we made during a session? Maybe a
"switch_exit" function.

-- 
Claudiu Ghioc
Software Developer
CloudBit
Email: claudiu.ghioc at gmail.com
+(40) 745 783 796


More information about the LiSA-Devel mailing list