2006-08-13 16:18:28

by Innocenti Maresin

[permalink] [raw]
Subject: 2.4 - net/ipv4/route.c/ip_route_output_slow()

Ok, my dear kernel coding gurus.
You have almost nothing to say about "internal IP addresses" and "connect() failures".
Let me swicth the question's language :)
Please, help with the function ip_route_output_slow() in net/ipv4/route.c.
There is such code as:
if (res.type == RTN_NAT)
goto e_inval;

In late 2.4 it is line 1922 (2.6 is irrelevant because of elimination of RTN_NAT).
I realize that this condition means, at least, an explicit ban
on all attempts to use RTN_NATted destination addresses in connect(),
so the kernel fails before the process (or the transport level) attempts to send any packet.
Please, tell me, what value should return this function by design
and what is the difference between it and a similar situation in ip_route_input_slow()
where fib_rules_map_destination() is called instead of just failing.
For what reasons (religious, I think) locally generated packets
may not be RTN_NATted in a manner similar to the routing of forwarding traffic?

Thank you for your attention.


--
qq~~~~\
/ /\ \
\ /_/ /
\____/


2006-08-13 23:59:42

by David Miller

[permalink] [raw]
Subject: Re: 2.4 - net/ipv4/route.c/ip_route_output_slow()

From: Innocenti Maresin <[email protected]>
Date: Sun, 13 Aug 2006 15:17:09 +0000

> Ok, my dear kernel coding gurus. You have almost nothing to say
> about "internal IP addresses" and "connect() failures".

Probably because you are asking this question on the wrong
list. The kernel networking developers subscribe to
[email protected] rather than linux-kernel