diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/udp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 6001948600f3..e4cad11f284a 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -852,10 +852,16 @@ do_append_data: | |||
852 | else if (!corkreq) | 852 | else if (!corkreq) |
853 | err = udp_v6_push_pending_frames(sk, up); | 853 | err = udp_v6_push_pending_frames(sk, up); |
854 | 854 | ||
855 | if (dst && connected) | 855 | if (dst) { |
856 | ip6_dst_store(sk, dst, | 856 | if (connected) { |
857 | ipv6_addr_equal(&fl->fl6_dst, &np->daddr) ? | 857 | ip6_dst_store(sk, dst, |
858 | &np->daddr : NULL); | 858 | ipv6_addr_equal(&fl->fl6_dst, &np->daddr) ? |
859 | &np->daddr : NULL); | ||
860 | } else { | ||
861 | dst_release(dst); | ||
862 | } | ||
863 | } | ||
864 | |||
859 | if (err > 0) | 865 | if (err > 0) |
860 | err = np->recverr ? net_xmit_errno(err) : 0; | 866 | err = np->recverr ? net_xmit_errno(err) : 0; |
861 | release_sock(sk); | 867 | release_sock(sk); |