aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-11-29 20:47:48 -0800
committerDavid S. Miller <davem@davemloft.net>2014-11-29 20:47:48 -0800
commit60b7379dc5b1743427b031cca53e30860a38ada6 (patch)
treec0462b8dd188861bd04f36dd31672b7446e35dd8 /net/ipv4/tcp_ipv4.c
parentmacvlan: delay the header check for dodgy packets into lower device (diff)
parentMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
downloadlinux-dev-60b7379dc5b1743427b031cca53e30860a38ada6.tar.xz
linux-dev-60b7379dc5b1743427b031cca53e30860a38ada6.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 2c6a955fd5c3..33f5ff068c79 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -598,7 +598,10 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
if (th->rst)
return;
- if (skb_rtable(skb)->rt_type != RTN_LOCAL)
+ /* If sk not NULL, it means we did a successful lookup and incoming
+ * route had to be correct. prequeue might have dropped our dst.
+ */
+ if (!sk && skb_rtable(skb)->rt_type != RTN_LOCAL)
return;
/* Swap the send and the receive. */