diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 588f47af5faf..ac66132b8edf 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -909,20 +909,14 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
909 | rt = (struct rtable *)sk_dst_check(sk, 0); | 909 | rt = (struct rtable *)sk_dst_check(sk, 0); |
910 | 910 | ||
911 | if (rt == NULL) { | 911 | if (rt == NULL) { |
912 | struct flowi4 fl4 = { | 912 | struct flowi4 fl4; |
913 | .flowi4_oif = ipc.oif, | ||
914 | .flowi4_mark = sk->sk_mark, | ||
915 | .daddr = faddr, | ||
916 | .saddr = saddr, | ||
917 | .flowi4_tos = tos, | ||
918 | .flowi4_proto = sk->sk_protocol, | ||
919 | .flowi4_flags = (inet_sk_flowi_flags(sk) | | ||
920 | FLOWI_FLAG_CAN_SLEEP), | ||
921 | .fl4_sport = inet->inet_sport, | ||
922 | .fl4_dport = dport, | ||
923 | }; | ||
924 | struct net *net = sock_net(sk); | 913 | struct net *net = sock_net(sk); |
925 | 914 | ||
915 | flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos, | ||
916 | RT_SCOPE_UNIVERSE, sk->sk_protocol, | ||
917 | inet_sk_flowi_flags(sk)|FLOWI_FLAG_CAN_SLEEP, | ||
918 | faddr, saddr, dport, inet->inet_sport); | ||
919 | |||
926 | security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); | 920 | security_sk_classify_flow(sk, flowi4_to_flowi(&fl4)); |
927 | rt = ip_route_output_flow(net, &fl4, sk); | 921 | rt = ip_route_output_flow(net, &fl4, sk); |
928 | if (IS_ERR(rt)) { | 922 | if (IS_ERR(rt)) { |