netdev
[Top] [All Lists]

Re: skb->dst->output and ip_send()

To: jleu@xxxxxxxxxxxxxx
Subject: Re: skb->dst->output and ip_send()
From: kuznet@xxxxxxxxxxxxx
Date: Mon, 28 Aug 2000 21:04:44 +0400 (MSK DST)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20000826200433.B32166@xxxxxxxxxxxxx> from "James R. Leu" at Aug 27, 0 05:15:01 am
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> Ofcourse it could also be that case that I just don't understand all of the
> reasons why ip_send() refers to ip_finish_output().

There are no special reasons. It is simply silly to use indirect call,
when we know where it is indirected.

Moreover, dst->output is never used for packet not generated locally.
Rule is simple: packets, arrived from network use dst->input(),
locally generated packets use dst->output(). The only case, when both
of methods are used is when packet is looped back. Actually,
dst->output for forwarding routes could be set to ip_rt_bug().

What's about your problem, I simply do not understand it.
If you want to do something with packet, use netfilter.
Paul designed this amazing engine exactly to allow you to do
everything.

Even if you prefer to hack something in core by some reasons,
ip_finish_output is the only place, where to do this.
All the packets go through it. I even do not understand,
what you planned to do with dst->output.

Alexey

<Prev in Thread] Current Thread [Next in Thread>