diff options
author | Wei Dong <weidong@cn.fujitsu.com> | 2007-06-01 01:49:28 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-06-03 21:08:50 -0400 |
commit | 584bdf8cbdf6f277c2a00e083257ee75687cf6f4 (patch) | |
tree | ae652e24340134824fe7016adcd99155ec9b2aea /net/ipv4/tcp_ipv4.c | |
parent | 4fcd6b991685493185c2bb8a76b21aadb658bd76 (diff) |
[IPV4]: Fix "ipOutNoRoutes" counter error for TCP and UDP
Signed-off-by: Wei Dong <weidong@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5a3e7f839fc5..47c61055eb60 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -192,8 +192,11 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
192 | RT_CONN_FLAGS(sk), sk->sk_bound_dev_if, | 192 | RT_CONN_FLAGS(sk), sk->sk_bound_dev_if, |
193 | IPPROTO_TCP, | 193 | IPPROTO_TCP, |
194 | inet->sport, usin->sin_port, sk, 1); | 194 | inet->sport, usin->sin_port, sk, 1); |
195 | if (tmp < 0) | 195 | if (tmp < 0) { |
196 | if (tmp == -ENETUNREACH) | ||
197 | IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); | ||
196 | return tmp; | 198 | return tmp; |
199 | } | ||
197 | 200 | ||
198 | if (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST)) { | 201 | if (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST)) { |
199 | ip_rt_put(rt); | 202 | ip_rt_put(rt); |