public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] save source address on accept()
@ 2001-06-01  1:29 Tim Hockin
  2001-06-01  3:21 ` David S. Miller
  2001-06-01  3:42 ` David S. Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Tim Hockin @ 2001-06-01  1:29 UTC (permalink / raw)
  To: davem; +Cc: Linux Kernel Mailing List, alan

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

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

-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com

[-- Attachment #2: tcp-saveaddr.diff --]
[-- Type: text/plain, Size: 397 bytes --]

diff -ruN dist-2.4.5/net/ipv4/tcp.c cobalt-2.4.5/net/ipv4/tcp.c
--- dist-2.4.5/net/ipv4/tcp.c	Wed May 16 10:31:27 2001
+++ cobalt-2.4.5/net/ipv4/tcp.c	Thu May 31 14:33:23 2001
@@ -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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] save source address on accept()
  2001-06-01  1:29 [PATCH] save source address on accept() Tim Hockin
@ 2001-06-01  3:21 ` David S. Miller
  2001-06-01  3:42 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2001-06-01  3:21 UTC (permalink / raw)
  To: Tim Hockin; +Cc: Linux Kernel Mailing List, alan


Tim Hockin writes:
 > 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
davem@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] save source address on accept()
  2001-06-01  1:29 [PATCH] save source address on accept() Tim Hockin
  2001-06-01  3:21 ` David S. Miller
@ 2001-06-01  3:42 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2001-06-01  3:42 UTC (permalink / raw)
  To: Tim Hockin; +Cc: Linux Kernel Mailing List, alan


Tim Hockin writes:
 > 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.
 ..
 > --- dist-2.4.5/net/ipv4/tcp.c	Wed May 16 10:31:27 2001
 > +++ cobalt-2.4.5/net/ipv4/tcp.c	Thu May 31 14:33:23 2001
 > @@ -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
davem@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-01  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-01  1:29 [PATCH] save source address on accept() Tim Hockin
2001-06-01  3:21 ` David S. Miller
2001-06-01  3:42 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox