All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: fix IPSTATS_MIB_OUTNOROUTES counter for SCTP over ipv6
@ 2010-07-29  2:43 Shan Wei
  0 siblings, 0 replies; only message in thread
From: Shan Wei @ 2010-07-29  2:43 UTC (permalink / raw)
  To: linux-sctp

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-29  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29  2:43 [PATCH] sctp: fix IPSTATS_MIB_OUTNOROUTES counter for SCTP over ipv6 Shan Wei

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.