While figuring out how to get IP fragmentation to take into account the label
stack on an outgoing LSP, I came across the code for ip_send() (in net/ip.h).
I was disappointed to see that ip_send() doesn't use skb->dst->output.
Right now ip_send() either sends the skb to be fragmented (with each fragment
being delivered to ip_finish_output()) or directly to ip_finish_output().
I would have expected it to use skb->dst->output() (as is used most any other
place a packet needs to go to the output portion of the IP stack) I understand
that ip_output() sends the skb through some NAT code before reaching
ip_output_finish() and the path through the kernel that ends up at ip_send()
would already have gone through that code (or an equivlanet), but can't this
be "cleaned up"? The input and output function pointers in the skb exists
for a reason and if a particular protocol doesn't respect them, the whole
scheme falls apart. For example right now my MPLS code has to put a very
ugly check in ip_finish_output() that wouldn't have to be there if IPv4
respected the output function pointer.
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(). I have a patch to
"fix" this, but I haven't taken into account the NAT code.
Jim
--
James R. Leu
|