save source address on accept()
Subsystems (2)
PATCH 1/1 save source address on accept()
All,
attached is a (small) patch which saves the src address on tcp_accept(). Please let me know if there are any problems taking this for general inclusion.
Tim
Signature · 4 lines
Tim Hockin Systems Software Engineer Sun Microsystems, Cobalt Server Appliances [email protected]
net/ipv4/tcp.c +1 -0
@@ -2138,6 +2138,7 @@ tp->accept_queue_tail =NULL ; newsk = req->sk; + newsk->rcv_saddr = req->af.v4_req.loc_addr;tcp_acceptq_removed (sk);tcp_openreq_fastfree (req);BUG_TRAP (newsk->state !=TCP_SYN_RECV );
Quoted 3 lines · Tim Hockin
attached is a (small) patch which saves the src address on
tcp_accept(). Please let me know if there are any problems taking this for general inclusion.
And what would this even be used for? I see no need for it.
Later,
David S. Miller
[email protected]
Quoted 3 lines · Tim Hockin
attached is a (small) patch which saves the src address on
tcp_accept(). Please let me know if there are any problems taking this for general inclusion.
..
net/ipv4/tcp.c line 2144
Quoted 10 lines
net/ipv4/tcp.c +1
-0@@ -2138,6 +2138,7 @@ tp->accept_queue_tail =NULL ; newsk = req->sk; + newsk->rcv_saddr = req->af.v4_req.loc_addr;tcp_acceptq_removed (sk);tcp_openreq_fastfree (req);BUG_TRAP (newsk->state !=TCP_SYN_RECV );
Tim, this is in fact completely bogus, it is already being done in tcp_v{4,6}_syn_recv_sock(), so there is no reason to do the exact same thing again here in tcp_accept().
Later,
David S. Miller
[email protected]