diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-10 12:43:03 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-10 12:43:03 -0700 |
commit | 09f6247a9ccaffcc9af1e4a9038e14ecdb76a79d (patch) | |
tree | f28f9f114c1aab70185f424ec2be689d1e6cbd3b /net/ipv6 | |
parent | 8760f8e3d9806a940d759c9e12fff7eb7130b9ab (diff) | |
parent | d19e48fe5da7b83d02ed4aec3567f08ae02a168c (diff) |
Merge tag 'v4.4.23' into android-4.4.y
This is the 4.4.23 stable release
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ping.c | 9 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index 9411c8d770a5..fa65e92e9510 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -152,8 +152,10 @@ int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) rt = (struct rt6_info *) dst; np = inet6_sk(sk); - if (!np) - return -EBADF; + if (!np) { + err = -EBADF; + goto dst_err_out; + } pfh.icmph.type = user_icmph.icmp6_type; pfh.icmph.code = user_icmph.icmp6_code; @@ -183,6 +185,9 @@ int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) } release_sock(sk); +dst_err_out: + dst_release(dst); + if (err) return err; diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3c6acb67d8e5..f58632cc45dc 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -933,9 +933,15 @@ static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb, /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV * sk->sk_state == TCP_SYN_RECV -> for Fast Open. */ + /* RFC 7323 2.3 + * The window field (SEG.WND) of every outgoing segment, with the + * exception of <SYN> segments, MUST be right-shifted by + * Rcv.Wind.Shift bits: + */ tcp_v6_send_ack(sk, skb, (sk->sk_state == TCP_LISTEN) ? tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt, - tcp_rsk(req)->rcv_nxt, req->rsk_rcv_wnd, + tcp_rsk(req)->rcv_nxt, + req->rsk_rcv_wnd >> inet_rsk(req)->rcv_wscale, tcp_time_stamp, req->ts_recent, sk->sk_bound_dev_if, tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr), 0, 0); |