Re: target extension: set output interface

Vaclav Dvorak <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Bart De Schuymer wrote:

>>Would it be possible to add a target extension to ebtables that would,
>>for a matching packet, set the network interface that it will be sent
>>out with? It would be analogous to the ROUTE target extension of
>>iptables:
>>http://www.netfilter.org/documentation/pomlist/pom-extra.html#ROUTE
>>It would take either option "--transmit-on <real_interface>", or
>>"--flood <bridge_interface>".
> 
> Can you elaborate on the possible use of "--transmit-on <real_interface>" and
> "--flood <bridge_interface>"? Unless they can have some use I don't think 
> these options should be included, the implementation will touch the bridge 
> code.

Well, what you propose (--resend-on-iif) seems to be sufficient for my 
case. I just thought that these would be the most general way, possibly 
allowing for other, unforeseen situations. Just like the ROUTE target in 
iptables "enables you to setup unusual routes not supported by the 
standard kernel routing table", this might enable you to setup unusual 
bridging. :-)

> Seems to me your problem asks for an option "--resend-on-iif" (resend on input 
> interface). This can be implemented in a fairly easy way, 'though it will 
> touch the bridge code. I'll put this on the todo-list.

Would be nice, thanks.

Anyway, since the posting, I have mostly solved my problem without 
touching the kernel at all. I made a script that runs tcpdump and 
replies to ARP who-has requests with a is-at <MAC of self>; the WiFi 
stations then send all their IP packets to the router, where the IP 
stack routes them back to the same interface. If anyone's interested, I 
can supply the script and a needed patch for arping. There are a few 
problems (which are not problems for me, fortunately):
- only IP gets through (that's actually good)
- broadcasts are not re-broadcast (not really needed in my case, anyway)
- you need to turn off sending ICMP redirects on the interface or they 
will take up half your bandwidth ;-)
- you must not reply to ARP who-has X tell X, because that's how Windows 
probes whether IP address X is not already taken

Anyway, thanks for your reply.

-- 
Vaclav Dvorak  <[email protected]>
http://www.vdvo.net/



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.