From: "junk" <junk@toutatis.be>
To: netdev@oss.sgi.com
Subject: Re: ipt_ROUTE and destination MAC address
Date: Fri, 11 Feb 2005 15:17:12 +0100 [thread overview]
Message-ID: <20050211140611.M58411@toutatis.be> (raw)
In-Reply-To: <Pine.LNX.4.61.0502110100240.13349@filer.marasystems.com>
On Fri, 11 Feb 2005 01:07:55 +0100 (CET), Henrik Nordstrom wrote
> On Thu, 10 Feb 2005, junk wrote:
>
> > i'm coding a virtual interface. That virtual interface has to receive packets
> > coming on eth0. For that purpose, i'm using ipt_ROUTE. That works great, i can
> > see my packets arriving on red0 (my virtual interface).
> >
> > The problem is that the destination MAC is the one of eth0, so, it seems the
> > kernel doesn't really deliver the packet to my driver. I can see it in tcpdump
> > but my driver receive function is never called.
>
> It is not due to the destination MAC, but to what ipt_ROUTE does.
>
> ipt_ROUTE reoutes the packet as if it came in on the other interface,
> all done at the IP layer in the kernel, it does not resubmit the
> packet to the driver level.
>
> The MAC is not modified as this is not relevant to the IP layer, and
> there really isn't any reason why it should be modified either. The
> MAC used in received skbufs is the MAC the sending station was
> addressing the packet to, not the MAC of the receiving interface.
> Usually they are the same, but not always.
>
> Can you give an more detailed example of what it is you are trying
> to accomplish or why you need a custom virtual interface driver? It
> is possible (or even likely) there is other better tools for the job.
>
> Also I am a little confused on your virtual interface driver.
> Normally virtual interface drivers does not have a receive function,
> only a transmit function called when packets are routed to be
> transmitted on the interface.. How you make packets arrive at the
> interface driver is up to you (emulated hardware or whatever).
>
> Regards
> Henrik
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
The purpose is to run a redundant network.
My virtual interface has to duplicate packets it receive from software, and
send each copy of it on eth0 and eth1 respectively.
>From the application, there is only one interface: red0.
red0 has to:
- duplicate packets having red0 as outgoing interface (real output iface are
eth0/eth1)
- receive packets from eth0/eth1, discarding the copy (as eth0 and eth1
receive the same data), pass the packet to application
- alert userland if eth0 or eth1 comes down
The problem is that I want my driver to know about incoming packets, not only
the software.
prev parent reply other threads:[~2005-02-11 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <S262133AbVBJPBt/20050210150149Z+8411@vger.kernel.org>
2005-02-11 12:39 ` ipt_ROUTE and destination MAC address junk
2005-02-12 13:32 ` jamal
[not found] ` <20050210141334.M57687@toutatis.be>
[not found] ` <Pine.LNX.4.61.0502110100240.13349@filer.marasystems.com>
2005-02-11 14:17 ` junk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050211140611.M58411@toutatis.be \
--to=junk@toutatis.be \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).