netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nivedita Singhvi <niv@us.ibm.com>
To: David Miller <davem@redhat.com>
Cc: netdev <netdev@oss.sgi.com>
Subject: [PATCH 2.6] sock_put() on a TIMEWAIT socket
Date: Sun, 28 Mar 2004 18:04:52 -0800	[thread overview]
Message-ID: <40678444.3070402@us.ibm.com> (raw)

Instances of sock_put() being used instead of tcp_tw_put().
This is for the 2.6 tree.

Patch applies to 2.6.4, but should apply cleanly
to later versions as well.

thanks,
Nivedita


diff -urN linux-2.6.4/net/ipv4/tcp_ipv4.c linux-2.6.4mc/net/ipv4/tcp_ipv4.c
--- linux-2.6.4/net/ipv4/tcp_ipv4.c	2004-03-10 18:55:25.000000000 -0800
+++ linux-2.6.4mc/net/ipv4/tcp_ipv4.c	2004-03-28 17:26:52.000000000 -0800
@@ -1825,12 +1825,15 @@
  	goto discard_it;

  do_time_wait:
-	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
-		goto discard_and_relse;
+	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+		tcp_tw_put((struct tcp_tw_bucket *) sk);
+		goto discard_it;
+	}

  	if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) {
  		TCP_INC_STATS_BH(TcpInErrs);
-		goto discard_and_relse;
+		tcp_tw_put((struct tcp_tw_bucket *) sk);
+		goto discard_it;
  	}
  	switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk,
  					   skb, th, skb->len)) {

             reply	other threads:[~2004-03-29  2:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29  2:04 Nivedita Singhvi [this message]
2004-03-29  5:53 ` [PATCH 2.6] sock_put() on a TIMEWAIT socket David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40678444.3070402@us.ibm.com \
    --to=niv@us.ibm.com \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).