Once upon a time, Ed Brown <[EMAIL PROTECTED]> said:
> You are referring to the http reply packet (or any tcp/udp traffic) as 
> observed on the network.  I'm talking about httpd putting bits 
> together and asking the kernel to schedule it for delivery. 
> Internally on the server, before the packet reaches the tcp/ip stack, 
> it doesn't have a source ip address, because it didn't come from any 
> tcp/ip source, it was created by the application itself.  The kernel 
> is going to decide the outbound interface to use based on the routing 
> table (assuming there's a choice), and it defies common sense to 
> suggest that that interface can then be used in the routing decision.
> 
> I'd sure be relieved if someone would back me up here, OR make me stop 
> before saying anything else foolish, or both...

Too late!

An HTTP reply packet is associated with an open socket, and so it _must_
come from the local address associated with that socket (e.g. that the
incoming request came to).  It doesn't have to go out the interface
associated with that address (that is up to the IP routing layer).

If you open a new outgoing socket and the software binds to INADDR_ANY
as the requested source address (the usual case), the kernel will choose
the outbound interface and use its primary IP as the source.  That's the
only time the kernel chooses a source IP.

-- 
Chris Adams <[EMAIL PROTECTED]>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to