[Bridge] Customize bridge code to set transmit interface

Steve Lazaridis slaz at fortresstech.com
Thu Jun 21 13:17:46 PDT 2007


Write a driver that hooks into the bridge code.
Drop incoming frames on ath0
Drop outgoing frames from ath1
Allow the rest.

Netfilter provides you the hook API to do this without having to hack
device.c or any other main kernel code.

Or just use ebtables and setup some rules to do that :)


Of course, you'll still receive packets on the radio, but you just won't
process them through the bridge stack.

If you want to do this type of filtering at the radio level you should
be hacking your atheros driver instead.


Regards,
Steve



Hasan Rashid wrote:
> I am trying to modify the bridge code so I can define what interfaces to
> transmit data through. I added a function in brctl CLI to accept the
> interface name as an argument.
> 
>  
> 
> For example:
> 
>  
> 
> brctl settransmit br0 ath0
> 
>  
> 
> Basically this is for an embedded device where I have two radios on the
> device. I want to send all the outgoing traffic through ath0 (radio 1)
> and use the other radio for receving ath1 (radio 2).
> 
>  
> 
> I am trying to load the net_bridge_port from the ifindex and set that as
> the port for the *skb->dev->br_port in br_device.c in function
> br_dev_xmit. No real success so far.
> 
>  
> 
> Any ideas on how this could be accomplished?
> 
>  
> 
> Thank you!
> 
>  
> 
> Regards,
> 
> *Hasan Rashid*
> 
> Software Developer
> 
>  
> 
> //Digital Path, Inc//////
> 
> 275 Airpark Blvd suite 500
> 
> Chico, CA 95973
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bridge mailing list
> Bridge at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/bridge


More information about the Bridge mailing list