aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 87be58673b55..1dd1affdead2 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -927,7 +927,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
927 struct inet_sock *inet = inet_sk(sk); 927 struct inet_sock *inet = inet_sk(sk);
928 struct ipv6_pinfo *np = inet6_sk(sk); 928 struct ipv6_pinfo *np = inet6_sk(sk);
929 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name; 929 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
930 struct in6_addr *daddr, *final_p = NULL, final; 930 struct in6_addr *daddr, *final_p, final;
931 struct ipv6_txoptions *opt = NULL; 931 struct ipv6_txoptions *opt = NULL;
932 struct ip6_flowlabel *flowlabel = NULL; 932 struct ip6_flowlabel *flowlabel = NULL;
933 struct flowi fl; 933 struct flowi fl;
@@ -1097,14 +1097,9 @@ do_udp_sendmsg:
1097 ipv6_addr_copy(&fl.fl6_src, &np->saddr); 1097 ipv6_addr_copy(&fl.fl6_src, &np->saddr);
1098 fl.fl_ip_sport = inet->inet_sport; 1098 fl.fl_ip_sport = inet->inet_sport;
1099 1099
1100 /* merge ip6_build_xmit from ip6_output */ 1100 final_p = fl6_update_dst(&fl, opt, &final);
1101 if (opt && opt->srcrt) { 1101 if (final_p)
1102 struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt;
1103 ipv6_addr_copy(&final, &fl.fl6_dst);
1104 ipv6_addr_copy(&fl.fl6_dst, rt0->addr);
1105 final_p = &final;
1106 connected = 0; 1102 connected = 0;
1107 }
1108 1103
1109 if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) { 1104 if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) {
1110 fl.oif = np->mcast_oif; 1105 fl.oif = np->mcast_oif;