[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>
This commit is contained in:

committed by
David S. Miller

parent
4fcd6b9916
commit
584bdf8cbd
@@ -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) &&
|
||||
|
Reference in New Issue
Block a user