All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shan Wei <shanwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH] sctp: fix IPSTATS_MIB_OUTNOROUTES counter for SCTP over ipv6
Date: Thu, 29 Jul 2010 02:43:18 +0000	[thread overview]
Message-ID: <4C50EAC6.2020007@cn.fujitsu.com> (raw)

When transmitting a packet, if no router can be 
found, we should increase IPSTATS_MIB_OUTNOROUTES item
according to the address family type.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 net/sctp/output.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index a646681..5c09baa 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -571,7 +571,11 @@ out:
 	return err;
 no_route:
 	kfree_skb(nskb);
-	IP_INC_STATS_BH(&init_net, IPSTATS_MIB_OUTNOROUTES);
+
+	if (tp->af_specific->sa_family = AF_INET)
+		IP_INC_STATS_BH(&init_net, IPSTATS_MIB_OUTNOROUTES);
+	else
+		IP6_INC_STATS_BH(&init_net, NULL, IPSTATS_MIB_OUTNOROUTES);
 
 	/* FIXME: Returning the 'err' will effect all the associations
 	 * associated with a socket, although only one of the paths of the
-- 
1.6.3.3



                 reply	other threads:[~2010-07-29  2:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4C50EAC6.2020007@cn.fujitsu.com \
    --to=shanwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.