|
@@ -270,6 +270,7 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
|
|
|
if (IS_ERR(rt))
|
|
|
return rt;
|
|
|
ip_rt_put(rt);
|
|
|
+ flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr);
|
|
|
}
|
|
|
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
|
|
return ip_route_output_flow(net, fl4, sk);
|
|
@@ -284,6 +285,9 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
|
|
|
fl4->fl4_dport = dport;
|
|
|
fl4->fl4_sport = sport;
|
|
|
ip_rt_put(rt);
|
|
|
+ flowi4_update_output(fl4, sk->sk_bound_dev_if,
|
|
|
+ RT_CONN_FLAGS(sk), fl4->daddr,
|
|
|
+ fl4->saddr);
|
|
|
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
|
|
return ip_route_output_flow(sock_net(sk), fl4, sk);
|
|
|
}
|