[Click] Weird bridge behavior unpatched 2.6.31.12

Eddie Kohler kohler at cs.ucla.edu
Wed Mar 17 12:09:58 EDT 2010


Lars,

I strongly recommend against mixing brctl with Click linuxpatchless.  Click 
REPLACES the bridge hook when it is installed.  I have no reason to believe 
brctl will work.

Eddie


Lars Bro wrote:
> Hi,
> 
> I have a click configuration where I need make a tap on the traffic between
> two hosts. Therefore, I have made a simple
> "Bridge" element class like below:
>   /*
>    * Bridge between two interfaces and send IP packets to output
>    */
>   elementclass Bridge {
>     \$if1, \$if2 |
>     FromDevice(\$if1) ->
>     if1_tee::Tee();
>     FromDevice(\$if2) ->
>     if2_tee::Tee();
>     if1_tee\[0\] ->
>     Queue() ->
>     ToDevice(\$if2);
>     if1_tee\[1\] ->
>     Strip(14) ->
>     output;
>     if2_tee\[0\] ->
>     Queue() ->
>     ToDevice(\$if1);
>     if2_tee\[1\] ->
>     Strip(14) ->
>     output;
>   };
> 
> When the test router is not running, I will of course need the bridging
> functionality anyway, so I do
>   brctl addbr br0
>   brctl addif br0 xxx
>   brctl addif br0 yyy
>   ip link set up dev br0
> 
> Before starting the router. I remove the bridge and set the interfaces up
>   ip link set down dev br0
>   brctl delbr br0
>   ip link set up dev xxx
>   ip link set up dev yyy
>   click-install ...
> 
> This seems not to work, however. It seems that only broadcast traffic (and
> maybe also traffic directly for the xxx and yyy
> MAC addrees, but I dont know, since I am trying to make a bridge)
> 
> If I try with
>   ip link set xxx promisc on
>   ip link set yyy promisc on
> 
> I get "some" data through, still not good enough
> 
> But if I start the router without removing the original bridge, it works
> fine as far as I can see.
> 
> Is this as it is supposed to be ?
> 
> 
> yours,
> Lars Bro
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list