aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorWei Dong <weidong@cn.fujitsu.com>2007-05-31 22:49:28 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-06-03 18:08:50 -0700
commit584bdf8cbdf6f277c2a00e083257ee75687cf6f4 (patch)
treeae652e24340134824fe7016adcd99155ec9b2aea /net/ipv4/udp.c
parent4fcd6b991685493185c2bb8a76b21aadb658bd76 (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/udp.c')
-rw-r--r--net/ipv4/udp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4c7e95fa090..5da703e699d 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -722,8 +722,11 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
.dport = dport } } };
security_sk_classify_flow(sk, &fl);
err = ip_route_output_flow(&rt, &fl, sk, 1);
- if (err)
+ if (err) {
+ if (err == -ENETUNREACH)
+ IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
goto out;
+ }
err = -EACCES;
if ((rt->rt_flags & RTCF_BROADCAST) &&