diff options
| author | Thomas Wendt <thoemy@gmx.net> | 2014-11-12 23:20:34 +0100 |
|---|---|---|
| committer | Zips <hcolmenares@gmail.com> | 2014-11-13 13:53:12 -0500 |
| commit | 78d665cd45336f49cdb9361d97bf4e9e351da5f5 (patch) | |
| tree | 8e95eb90174c8925f625efd477a9eaa6126c9235 /net/ipv4/tcp_ipv4.c | |
| parent | 1f1c4b90a5edd4c803f7520665569bc1191278d2 (diff) | |
Merge tag 'android-5.0.0_r0.6' into aicplp5.0
Android 5.0.0 Release 0.6
Change-Id: I1f0e5fc82aa17b23a414422e3e2851724a2d8e40
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 6cdf6a28f6b..0b4a35e03df 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -650,6 +650,12 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) arg.iov[0].iov_len, IPPROTO_TCP, 0); arg.csumoffset = offsetof(struct tcphdr, check) / 2; arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0; + /* When socket is gone, all binding information is lost. + * routing might fail in this case. No choice here, if we choose to force + * input interface, we will misroute in case of asymmetric route. + */ + if (sk) + arg.bound_dev_if = sk->sk_bound_dev_if; net = dev_net(skb_dst(skb)->dev); ip_send_reply(net->ipv4.tcp_sock, skb, ip_hdr(skb)->saddr, @@ -1338,6 +1344,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) ireq->rmt_addr = saddr; ireq->no_srccheck = inet_sk(sk)->transparent; ireq->opt = tcp_v4_save_options(sk, skb); + ireq->ir_mark = inet_request_mark(sk, skb); if (security_inet_conn_request(sk, skb, req)) goto drop_and_free; |
