Skip to content
Snippets Groups Projects
Commit 857a6e0a authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller
Browse files

icsk: join error paths using goto

parent 012b215c
No related branches found
No related tags found
No related merge requests found
...@@ -344,16 +344,17 @@ struct dst_entry *inet_csk_route_req(struct sock *sk, ...@@ -344,16 +344,17 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
security_req_classify_flow(req, &fl); security_req_classify_flow(req, &fl);
if (ip_route_output_flow(net, &rt, &fl, sk, 0)) { if (ip_route_output_flow(net, &rt, &fl, sk, 0))
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); goto no_route;
return NULL; if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
} goto route_err;
if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway) {
ip_rt_put(rt);
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
return NULL;
}
return &rt->u.dst; return &rt->u.dst;
route_err:
ip_rt_put(rt);
no_route:
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
return NULL;
} }
EXPORT_SYMBOL_GPL(inet_csk_route_req); EXPORT_SYMBOL_GPL(inet_csk_route_req);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment