diff options
author | David S. Miller <davem@davemloft.net> | 2012-02-11 05:32:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-11 05:32:28 +0100 |
commit | d5ef8a4d87ab21d575ac86366599c9152a28028d (patch) | |
tree | 8b1be85ad1af7ee6a0e3e36c77ae738c966c1f21 /net/ipv4/tcp_ipv4.c | |
parent | igb: fix warning about unused function (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-d5ef8a4d87ab21d575ac86366599c9152a28028d.tar.xz linux-d5ef8a4d87ab21d575ac86366599c9152a28028d.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/infiniband/hw/nes/nes_cm.c
Simple whitespace conflict.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 90e47931e217..4d6f81c818dc 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -676,6 +676,11 @@ 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. using iif for oif to + * make sure we can deliver it + */ + arg.bound_dev_if = sk ? sk->sk_bound_dev_if : inet_iif(skb); net = dev_net(skb_dst(skb)->dev); arg.tos = ip_hdr(skb)->tos; |