On Tue, 28 Jun 2005 14:40:34 +0800
munro <munro.biswal@smartbridges.com> wrote:
>
>
> Hi, all,
>
> I wish to copy over fdb(forwarding database entries) learnt over from
> one interface onto as they are from another interface.
>
> Like for eg :
> brctl showmacs br0
> port no mac addr is local? ageing timer
> 1 00:30:1a:01:6f:e4 no 0.46
> 1 00:30:1a:1c:3d:b7 yes 0.00
> 2 00:30:1a:1c:3d:b8 yes 0.00
>
> Instead of the above in line 1 if i wish to forcefully add mac "
> 00:30:1a:01:6f:e4 " from port 2 instated of port 1.
Why? What reason.
> Do i need to create a separate ioctl for it from the brctl to the kernel
> code or is thier some provision for doing it.
Since all enhancements can be 2.6 only,
I would prefer a sysfs interface to an ioctl to do this.
You can add a store/write interface to /sys/class/net/brX/bridge/brforward
file. The creative part is figuring out what the semantics should
be and getting the locking right.