Skip to contentSkip to conversation

sctp: fix IPSTATS_MIB_OUTNOROUTES counter for SCTP over ipv6

PATCH New Shan Wei 1 participant 1 message Jul 29, 2010

Subsystems (2)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 sctp: fix IPSTATS_MIB_OUTNOROUTES counter for SCTP over ipv6

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

---
 net/sctp/output.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
net/sctp/output.c +5 -1
index a646681..5c09baa 100644
@@ -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
Signature · 1 line
1.6.3.3